Coder Social home page Coder Social logo

Comments (4)

joannahong avatar joannahong commented on June 2, 2024 1

same here

from lightcnn.

jiesonshan avatar jiesonshan commented on June 2, 2024 1
    if self._use_cuda:
        checkpoint = torch.load(self._model_path)
        restore_dict = checkpoint
    else:
        checkpoint = torch.load(model_path, map_location='cpu')
        restore_dict = {k[7:]: v for k, v in checkpoint['state_dict'].items()}
    self.model.load_state_dict(restore_dict)

from lightcnn.

AminTaheri23 avatar AminTaheri23 commented on June 2, 2024

same here @AlfredXiangWu
I downloaded All of the files for models and all of them make an Error.
this is the error I get.

loading checkpoint 'prev9.path.tar' Traceback (most recent call last): File "extract_features.py", line 115, in <module> main() File "extract_features.py", line 67, in main model.load_state_dict(checkpoint['state_dict']) File "/home/amint/virtualenvironment/lightcnn/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 839, in load_state_dict self.__class__.__name__, "\n\t".join(error_msgs))) RuntimeError: Error(s) in loading state_dict for network_9layers: Missing key(s) in state_dict: "features.0.filter.bias", "features.0.filter.weight", "features.2.conv_a.filter.bias", "features.2.conv_a.filter.weight", "features.2.conv.filter.bias", "features.2.conv.filter.weight", "features.4.conv_a.filter.bias", "features.4.conv_a.filter.weight", "features.4.conv.filter.bias", "features.4.conv.filter.weight", "features.6.conv_a.filter.bias", "features.6.conv_a.filter.weight", "features.6.conv.filter.bias", "features.6.conv.filter.weight", "features.7.conv_a.filter.bias", "features.7.conv_a.filter.weight", "features.7.conv.filter.bias", "features.7.conv.filter.weight", "fc1.filter.bias", "fc1.filter.weight", "fc2.bias", "fc2.weight". Unexpected key(s) in state_dict: "module.features.0.filter.weight", "module.features.0.filter.bias", "module.features.2.conv_a.filter.weight", "module.features.2.conv_a.filter.bias", "module.features.2.conv.filter.weight", "module.features.2.conv.filter.bias", "module.features.4.conv_a.filter.weight", "module.features.4.conv_a.filter.bias", "module.features.4.conv.filter.weight", "module.features.4.conv.filter.bias", "module.features.6.conv_a.filter.weight", "module.features.6.conv_a.filter.bias", "module.features.6.conv.filter.weight", "module.features.6.conv.filter.bias", "module.features.7.conv_a.filter.weight", "module.features.7.conv_a.filter.bias", "module.features.7.conv.filter.weight", "module.features.7.conv.filter.bias", "module.fc1.filter.weight", "module.fc1.filter.bias", "module.fc2.weight", "module.fc2.bias".

from lightcnn.

AminTaheri23 avatar AminTaheri23 commented on June 2, 2024

#37

the solution is in this issue.

from lightcnn.

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.