Regarding your second issue:
If you are using the functional API (F.dropout), you have to set the training flag yourself as shown in your second example.
It might be a bit easier to initialize dropout as a module in __init__ and use it as such in forward, as shown with self.conv2_drop. This module will be automatically set to train and eval respectively if you call it on your model.