UnetSkipConnectionBlock Attribute Error
Hello,
I am trying to run pix2pix model and getting this error:
python test.py --dataroot ./datasets/ --model pix2pix --direction AtoB --preprocess scale_width_and_crop --load_size 320 --crop_size 256
dataset [AlignedDataset] was created
initialize network with normal
model [Pix2PixModel] was created
loading the model from ./checkpoints\experiment_name\latest_net_G.pth
Traceback (most recent call last):
File "D:\LLVIP-main\LLVIP-main\pix2pixGAN\test.py", line 47, in
Hi, I meet the same problem as you. I also encountered this error when I used the pre-trained model provided by the author as following. I would like to ask if you solved this problem later?
Hello, you can try using a generator with resnet9 as the backbone network. This setting can be modified in the testing script.
I don't think this is a solution because the '--netG' default setting in base_options.py is 'resnet_9blocks' as following: https://github.com/bupt-ai-cz/LLVIP/blob/main/pix2pixGAN/options/base_options.py#L35
I solved this problem in another way. I use the BCI code from another open-source project of your team and the pretrained model you provided, and this combination can run. Is this solution correct?
You need to add --netG resnet_9blocks to your command line, the default value in base_option.py is set to be resnet_9blocks but for some reason, the code accepts unet_256 as a default value.
python test.py --dataroot ./datasets/LLVIP --name LLVIP --model pix2pix --direction AtoB --gpu_ids 0 --preprocess scale_width_and_crop --load_size 320 --crop_size 256 --netG resnet_9blocks works well for me.