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

error while using pretrained model #110

Open
sudip550 opened this issue Sep 27, 2023 · 0 comments
Open

error while using pretrained model #110

sudip550 opened this issue Sep 27, 2023 · 0 comments

Comments

@sudip550
Copy link

i am using pretrained model and geting below error =

Namespace(name='GMM', dress_type='dresses', gpu_ids='', workers=4, batch_size=4, dataroot='./../result', datamode='test', stage='GMM', data_list='./../result/inference_dress.txt', fine_width=384, fine_height=512, radius=5, grid_size=10, tensorboard_dir='tensorboard', result_dir='result', checkpoint='./../../gdrive/MyDrive/gmm_final.pth', display_count=1, shuffle=False)
Start to test stage: GMM, named: GMM!
/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:560: UserWarning: This DataLoader will create 4 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.
warnings.warn(_create_warning_msg(
initialization method [normal]
initialization method [normal]
Traceback (most recent call last):
File "/content/virtual-try-on-app/network/test.py", line 231, in
main()
File "/content/virtual-try-on-app/network/test.py", line 215, in main
load_checkpoint(model, opt.checkpoint)
File "/content/virtual-try-on-app/network/networks.py", line 556, in load_checkpoint
model.load_state_dict(torch.load(checkpoint_path))
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for GMM:
size mismatch for regression.conv.0.weight: copying a param with shape torch.Size([512, 192, 4, 4]) from checkpoint, the shape in current model is torch.Size([512, 768, 4, 4]).
size mismatch for regression.linear.weight: copying a param with shape torch.Size([50, 768]) from checkpoint, the shape in current model is torch.Size([200, 3072]).
size mismatch for regression.linear.bias: copying a param with shape torch.Size([50]) from checkpoint, the shape in current model is torch.Size([200]).

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

1 participant