Hello everyone,
I am saving model using:
torch.save({
                    'step': step,
                    'arch': args.net,
                    'G_state_dict': G.state_dict(),
                    'F1_state_dict': F1.state_dict(),
                    'best_acc_test': best_acc_test,
                    'optimizer_g' : optimizer_g.state_dict(),
                    'optimizer_f' : optimizer_f.state_dict(),
                    'feat_dict_target': feat_dict_target
                    },os.path.join(args.checkpath,"%s_%s_%s_%d.ckpt.pth.tar"%(args.net,args.source,args.target,step)))

But when I try model.load_state_dict(the_state_dict), it seems like every key of the dictionary is getting prepended by this string: module. When I iterate through this state_dict and remove this string from each of the keys, the state_dict loads just fine. I am using resnet34.
Please help.
Thanks