Git Product home page Git Product logo

Comments (3)

DoranLyong avatar DoranLyong commented on August 17, 2024 3

As I can't use Baidu account, I downloaded the pretrained model from here.
Then, I got the same problem.

I found out that the pretrained model file has different layer names with this repository.

So, I fixed the code block a bit and it worked!

Go to .../model/backbones/resnet.py
and I changed def load_param(self, model_path) block like:

    def load_param(self, model_path):
        param_dict = torch.load(model_path)
        for i in param_dict:
            j = i.replace("base.","")
            if 'fc' in i:
                continue
            if j in self.state_dict().keys():
                self.state_dict()[j].copy_(param_dict[i])

from person-reid-tiny-baseline.

HWNHJJ avatar HWNHJJ commented on August 17, 2024

多GPU训练保存的参数单GPU的环境无法直接用

from person-reid-tiny-baseline.

mojiayuan avatar mojiayuan commented on August 17, 2024

多GPU训练保存的参数单GPU的环境无法直接用
您好,这个解决不了吗

from person-reid-tiny-baseline.

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.