Giter VIP home page Giter VIP logo

compositionalhumanparsing's People

Contributors

zzzjzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

compositionalhumanparsing's Issues

AttributeError: 'Namespace' object has no attribute 'num_classes' / Missing and Unexpected keys in state_dict

I assume I have all the correct dependencies since I had errors before and resolved them by installing cuda 9.0 with gcc-5 and g++-5, but now I can not seem to solve this issue.
When I run the evaluate.py script I get the following error:

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 37, in main
    model = get_model(num_classes=args.num_classes)
AttributeError: 'Namespace' object has no attribute 'num_classes'

If I change the num_classes to anything but 7 I get the following err (this example is without putting in a parameter):

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 41, in main
    model.load_state_dict(saved_state_dict, strict=False)
  File "/home/lukak/anaconda3/envs/CompositionalHumanParsing/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Stream:
	size mismatch for decoder.layer_dsn.3.weight: copying a param of torch.Size([20, 512, 1, 1]) from checkpoint, where the shape is torch.Size([7, 512, 1, 1]) in current model.
	size mismatch for decoder.layer_dsn.3.bias: copying a param of torch.Size([20]) from checkpoint, where the shape is torch.Size([7]) in current model.

When I change the num_classes to 7 I get the following err with long list of missing keys and unexpected keys:

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 41, in main
    model.load_state_dict(saved_state_dict)
  File "/home/lukak/anaconda3/envs/CompositionalHumanParsing/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Stream:
	Missing key(s) in state_dict:  "decoder.layer5.b0.0.weight", "decoder.layer5.b0.1.weight", "decoder.layer5.b0.1.bias", ...
        .
        .
        .
        Unexpected key(s) in state_dict: "decoder.layer6.alpha", "decoder.layer6.conv0.0.weight", "decoder.layer6.conv0.1.weight", ...
        .
        .
        .

I have searched the internet for answers but found nothing that helped and as I am not an experienced software engineer any help would be appreciated.

AttributeError: 'Namespace' object has no attribute 'num_classes' / Missing and Unexpected Key(s) in state_dict

I assume I have all the correct dependencies since I had errors before and resolved them by installing cuda 9.0 with gcc-5 and g++-5, but now I can not seem to solve this issue.
When I run the evaluate.py script I get the following error:

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 37, in main
    model = get_model(num_classes=args.num_classes)
AttributeError: 'Namespace' object has no attribute 'num_classes'

If I change the num_classes to anything but 7 I get the following err (this example is without putting in a parameter):

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 41, in main
    model.load_state_dict(saved_state_dict, strict=False)
  File "/home/lukak/anaconda3/envs/CompositionalHumanParsing/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Stream:
	size mismatch for decoder.layer_dsn.3.weight: copying a param of torch.Size([20, 512, 1, 1]) from checkpoint, where the shape is torch.Size([7, 512, 1, 1]) in current model.
	size mismatch for decoder.layer_dsn.3.bias: copying a param of torch.Size([20]) from checkpoint, where the shape is torch.Size([7]) in current model.

When I change the num_classes to 7 I get the following err with long list of missing keys and unexpected keys:

Traceback (most recent call last):
  File "evaluate.py", line 234, in <module>
    main()
  File "evaluate.py", line 41, in main
    model.load_state_dict(saved_state_dict)
  File "/home/lukak/anaconda3/envs/CompositionalHumanParsing/lib/python3.6/site-packages/torch/nn/modules/module.py", line 719, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Stream:
	Missing key(s) in state_dict:  "decoder.layer5.b0.0.weight", "decoder.layer5.b0.1.weight", "decoder.layer5.b0.1.bias", ...
        .
        .
        .
        Unexpected key(s) in state_dict: "decoder.layer6.alpha", "decoder.layer6.conv0.0.weight", "decoder.layer6.conv0.1.weight", ...
        .
        .
        .

I have searched the internet for answers but found nothing that helped and as I am not an experienced software engineer any help would be appreciated.

model

大佬,这个有没有开源的模型啊

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.