DeblurGAN
DeblurGAN copied to clipboard
unexpected key "model.0.weight" in state_dict
Hi, When I run test.py as per instructions in readme file, I get the 'unexpected key "model.0.weight" in state_dict' error.
$ python test.py --dataroot ../BlurredImages/ --model test --dataset_mode single --learn_residual------------ Options -------------
aspect_ratio: 1.0
batchSize: 1
checkpoints_dir: ./checkpoints
dataroot: ../BlurredImages/
dataset_mode: single
display_id: 1
display_port: 8097
display_single_pane_ncols: 0
display_winsize: 256
fineSize: 256
gan_type: wgan-gp
gpu_ids: [0]
how_many: 5000
input_nc: 3
isTrain: False
learn_residual: True
loadSizeX: 640
loadSizeY: 360
max_dataset_size: inf
model: test
nThreads: 2
n_layers_D: 3
name: experiment_name
ndf: 64
ngf: 64
no_dropout: False
no_flip: False
norm: instance
ntest: inf
output_nc: 3
phase: test
resize_or_crop: resize_and_crop
results_dir: ./results/
serial_batches: False
which_direction: AtoB
which_epoch: latest
which_model_netD: basic
which_model_netG: resnet_9blocks
-------------- End ----------------
CustomDatasetDataLoader
dataset [SingleImageDataset] was created
/usr/local/lib/python2.7/dist-packages/torchvision/transforms/transforms.py:156: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Traceback (most recent call last):
File "test.py", line 21, in
If you could suggest how to fix this error it will be helpful. Thanks
This error occurs if the weights file does not match with the network. Do you have the correct latest_net_G model?
Thanks for your response. No, I am using the latest_net_D model as that was the link provided by the readme file. From where can I get the correct latest_net_G model?
The author doesn't provide latest_net_G model .So, you should train it by yourself or request from the author.
We provide the generator model, however, I have some problems with Dropbox so it was unavailable. I already updated the link to the model, please send me the message if you still can not download the weights or run the model
Seems that the generator model still does not work @KupynOrest see #145