Code Monkey home page Code Monkey logo

Comments (6)

zrl4836 avatar zrl4836 commented on July 20, 2024

https://github.com/PeikeLi/Self-Correction-Human-Parsing/blob/e449f4261f8377a64ceda3799b37807e3bddde35/model.py#L223

from self-correction-human-parsing.

 avatar commented on July 20, 2024

The code works fine for lip dataset but if I choose either atr or pascal it's showing a runtime error as shown below.

Traceback (most recent call last):
File "evaluate.py", line 144, in
main()
File "evaluate.py", line 99, in main
model.load_state_dict(state_dict)
File "/home/harish/.pyenv/versions/schp/lib/python3.6/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.decoder.conv4.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.decoder.conv4.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).
size mismatch for module.fushion.3.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.fushion.3.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).

Any hints to rectify this would be appreciated. Thanks in advance..

from self-correction-human-parsing.

zrl4836 avatar zrl4836 commented on July 20, 2024

The code works fine for lip dataset but if I choose either atr or pascal it's showing a runtime error as shown below.

Traceback (most recent call last):
File "evaluate.py", line 144, in
main()
File "evaluate.py", line 99, in main
model.load_state_dict(state_dict)
File "/home/harish/.pyenv/versions/schp/lib/python3.6/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.decoder.conv4.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.decoder.conv4.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).
size mismatch for module.fushion.3.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.fushion.3.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).

Any hints to rectify this would be appreciated. Thanks in advance..

What is your command on runtime ?

from self-correction-human-parsing.

GoGoDuck912 avatar GoGoDuck912 commented on July 20, 2024

The code works fine for lip dataset but if I choose either atr or pascal it's showing a runtime error as shown below.

Traceback (most recent call last):
File "evaluate.py", line 144, in
main()
File "evaluate.py", line 99, in main
model.load_state_dict(state_dict)
File "/home/harish/.pyenv/versions/schp/lib/python3.6/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.decoder.conv4.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.decoder.conv4.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).
size mismatch for module.fushion.3.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.fushion.3.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).

Any hints to rectify this would be appreciated. Thanks in advance..

The code works fine for lip dataset but if I choose either atr or pascal it's showing a runtime error as shown below.

Traceback (most recent call last):
File "evaluate.py", line 144, in
main()
File "evaluate.py", line 99, in main
model.load_state_dict(state_dict)
File "/home/harish/.pyenv/versions/schp/lib/python3.6/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.decoder.conv4.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.decoder.conv4.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).
size mismatch for module.fushion.3.weight: copying a param with shape torch.Size([20, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([18, 256, 1, 1]).
size mismatch for module.fushion.3.bias: copying a param with shape torch.Size([20]) from checkpoint, the shape in current model is torch.Size([18]).

Any hints to rectify this would be appreciated. Thanks in advance..

@charishnaidu It seems like you use the wrong checkpoint model. Please check your cmd --dataset 'lip or atr or pascal' and make sure you choose the right corresponding checkpoint.

from self-correction-human-parsing.

GoGoDuck912 avatar GoGoDuck912 commented on July 20, 2024

Hello. Thank you for sharing!
In the PPT about LIP Challenge say,replace all max pooling operation.
But it still have max pooling in the model.
Is my understanding right? How much difference there is between using it and not using it。

The boost is very little +/- 0.3. And we only use that in the challenge. Currently we only provide the original Resnet-101 version.

from self-correction-human-parsing.

zrl4836 avatar zrl4836 commented on July 20, 2024

Hello. Thank you for sharing!
In the PPT about LIP Challenge say,replace all max pooling operation.
But it still have max pooling in the model.
Is my understanding right? How much difference there is between using it and not using it。

The boost is very little +/- 0.3. And we only use that in the challenge. Currently we only provide the original Resnet-101 version.

OK!

from self-correction-human-parsing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.