Save model with updated weights in pytorch
I have a model that I want to train for 5 epochs. Then, I would like to see where the model was wrong and increase the training set accordingly. How can I save the following model with the learnt weight?

trainer_ = Trainer(network = network,
                       optimizer = optim.Adam(network.parameters(), lr=0.001),
                       loss_function = loss_function,
                       train_loader = train_loader,
                       valid_every = 100,
                       print_every = 50,
                       save_every = 15000,
                       save_path = ".",
                       cudaok = is_cuda_available)

trainer_.run(4,is_cuda_available)


I have tried this: 

path = os.path.join(project_path, 'model.pth')
torch.save(network.cpu().state_dict(), path) # saving model


But I don't really think that the object network contains weights. 

I am very confused here. Can anyone help? Thank you!

network.state_dict() is a dictionary; try this to see your weights:

for param in network.state_dict():
    print(param, "\n", network.state_dict()[param])

