I made the changes as you suggested and added at the end of the script the parameters I used for training:
model = CNNModel1(target_id=“AB”, fully_layer_1=512, fully_layer_2=256, learning_rate=0.001, batch_size=32, drop_rate=0.5, n_epoch=50, experiment_name=“VA2”)
model.load_state_dict(torch.load(‘VA2.pth’))
however I got a quick error reply on running just on the first line of the code ! as follows:
runfile(‘C:/- DOCKING/Macros/py/inouts/pthModels/pthModels.py’, wdir=‘C:/- DOCKING/Macros/py/inouts/pthModels’)
Traceback (most recent call last):
File “C:- DOCKING\Macros\py\inouts\pthModels\pthModels.py”, line 15, in
class CNNModel1(nn.Module):
TypeError: str() argument 2 must be str, not tuple
It surprised me because it is the same code line that is used by the training program!
what is going on?