Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing pretrained model #6

Open
boomland opened this issue Apr 9, 2021 · 1 comment
Open

Testing pretrained model #6

boomland opened this issue Apr 9, 2021 · 1 comment

Comments

@boomland
Copy link

boomland commented Apr 9, 2021

Hi!
I am having difficulties running the code, can you please help me?

I want to test your pretrained S2D network using test_rnn.py (in useful_scripts/evaluation/test_rnn.py).

I have tried to run this code this way:
python3 useful_scripts/evaluation/test_rnn.py --logroot exp_folder/logs/ --checkpoints_dir ../s2d/ --dataroot ../s2d_data/test_data_real/ --model cycle_gan --which_model_netG unet_1024

For generator model I have tried different variations of architectures: unet_512, unet_512_Re1, unet_512_Re2, unet_1024, xrnn_512. But in all this cases I got error when try to initialize and load model ( self.load_network(self.netG_A, 'G_A', which_epoch)):

RuntimeError: Error(s) in loading state_dict for UnetGenerator:
Missing key(s) in state_dict: "model.model.0.bias", "model.model.1.model.1.bias", "model.mo.1.model.3.model.1.bias", "model.model.1.model.3.model.3.model.1.bias", "model.model.1.model.3.mode.model.3.model.1.bias", "model.model.1.model.3.model.3.model.3.model.3.model.1.bias", "model.model.odel.3.model.3.model.3.model.3.model.3.model.1.bias", "model.model.1.model.3.model.3.model.3.model.odel.3.model.3.model.1.bias", "model.model.1.model.3.model.3.model.3.model.3.model.3.model.3.model.odel.1.bias", "model.model.1.model.3.model.3.model.3.model.3.model.3.model.3.model.3.model.3.bias",odel.model.1.model.3.model.3.model.3.model.3.model.3.model.3.model.5.bias", "model.model.1.model.3.el.3.model.3.model.3.model.3.model.5.bias", "model.model.1.model.3.model.3.model.3.model.3.model.5.s", "model.model.1.model.3.model.3.model.3.model.5.bias", "model.model.1.model.3.model.3.model.5.bi, "model.model.1.model.3.model.5.bias", "model.model.1.model.5.bias".
Unexpected key(s) in state_dict: "model.model.5.weight", "model.model.5.bias", "model.modelmodel.7.weight", "model.model.1.model.7.bias", "model.model.1.model.3.model.7.weight", "model.modelmodel.3.model.7.bias", "model.model.1.model.3.model.3.model.7.weight", "model.model.1.model.3.modelmodel.7.bias", "model.model.1.model.3.model.3.model.3.model.7.weight", "model.model.1.model.3.modelmodel.3.model.7.bias", "model.model.1.model.3.model.3.model.3.model.3.model.7.weight", "model.modelmodel.3.model.3.model.3.model.3.model.7.bias", "model.model.1.model.3.model.3.model.3.model.3.modelmodel.7.weight", "model.model.1.model.3.model.3.model.3.model.3.model.3.model.7.bias", "model.modelmodel.3.model.3.model.3.model.3.model.3.model.3.model.7.weight", "model.model.1.model.3.model.3.mod3.model.3.model.3.model.3.model.7.bias", "model.model.1.model.3.model.3.model.3.model.3.model.3.mod3.model.3.model.5.weight", "model.model.1.model.3.model.3.model.3.model.3.model.3.model.3.model.3.ml.5.bias".

My question is, can you please provide some instructions on how to run testing script properly on pretrained S2D model?

Best regards,
Yaroslav

@wsh312
Copy link
Owner

wsh312 commented Jun 24, 2021

Hi,

Thanks for your questions!
Unfortunately, I have forgotten what parameters used for the provided pre-trained model, and I think the provided test_rnn.py were not designed to run the pre-trained model (maybe test.py would be closer to one would need but I doubt). To figure out, one would need to first run the training (on a small dataset) and see it was structured. Sorry about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants