Comments (3)
It is because the checkpoint model requires instance map. The number of input channel using instance map will be one larger than not using instance map. Please refer to this issue
from spade.
When I'm trying to run test.py with --no_instance flag, I get the following error (I tried this flag on COCO and Cityscapes checkpoints, and the error happens on both):
Traceback (most recent call last): File "test.py", line 19, in <module> model = Pix2PixModel(opt) File "D:\...path...\SPADE\models\pix2pix_model.py", line 26, in __init__ self.netG, self.netD, self.netE = self.initialize_networks(opt) File "D:\...path...\SPADE\models\pix2pix_model.py", line 98, in initialize_networks netG = util.load_network(netG, 'G', opt.which_epoch, opt) File "D:\...path...\SPADE\util\util.py", line 194, in load_network net.load_state_dict(weights) File "D:\...path...\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 769, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for SPADEGenerator: size mismatch for fc.weight: copying a param with shape torch.Size([1024, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([1024, 183, 3, 3]). size mismatch for head_0.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for head_0.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for G_middle_0.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for G_middle_0.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for G_middle_1.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for G_middle_1.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_0.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_0.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_0.norm_s.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_1.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_1.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_1.norm_s.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_2.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_2.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_2.norm_s.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_3.norm_0.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_3.norm_1.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]). size mismatch for up_3.norm_s.mlp_shared.0.weight: copying a param with shape torch.Size([128, 184, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 183, 3, 3]).
Thank you for the code and the great work
I also got the same , I am using Input label maps (my own label maps but generated using model trained on COCO), Since instances maps is needed to use the pretrained model on coco stuff
I tried to use coco generated instance file to generated instances maps for them but i got the following error
/mnt/HDD/VE_Saida/lib/python3.6/site-packages/skimage/io/_io.py:48: UserWarning: as_grey
has been deprecated in favor of as_gray
warn('as_grey
has been deprecated in favor of as_gray
')
Traceback (most recent call last):
File "/mnt/HDD/VE_Saida/Updated_SPADE/SPADE-master/datasets/coco_generate_instance_map.py", line 54, in
img[rr, cc] = count
IndexError: index 256 is out of bounds for axis 0 with size 256
Process finished with exit code 1
Can you please let me know how can i use pre-trained mode for coco stuff on my lables maps dataset, I mean how i can generated instances for them .
Thank you very much
from spade.
Hello @code-de , did you solve this issue ?
from spade.
Related Issues (20)
- How can I run this using RGB label as input ? HOT 4
- CUDA error: device-side assert triggered HOT 1
- Two update_learning_rate with same name
- RuntimeError: cublas runtime error : an access to GPU memory space failed at
- Converting to onnx HOT 2
- Choice between multi-scale discriminator and progrssive growing of GANs ?
- How many categories have you predicted for flickr data using deeplab?
- How "label_nc" in the setting works? HOT 2
- CUDA Error?? HOT 4
- Public API
- Extend to instance segmentation
- IndexError with custom dataset HOT 2
- errors with custom dataset HOT 3
- how to prepare the custom datasets?
- Issue a black background is added to the transparent image HOT 1
- GauGAN2 Paper HOT 1
- add --tf_log , program can not run HOT 1
- any pretrained models on ade20k or cityscapes with use_vae?
- Online demo app no longer on nvidia site?
- Training the model for Image to Image translation without label_nc and instance maps.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spade.