Coder Social home page Coder Social logo

Comments (6)

lxztju avatar lxztju commented on May 20, 2024

这是优化器定义时,不小心写错了模型的名字,已经改过来

from pytorch_classification.

Shank2358 avatar Shank2358 commented on May 20, 2024

嗯嗯谢谢,我也按照那个修改了。现在出现了另外一个问题就是初始化模型之后直接结束了,GPU也没有启动,我检查了一下数据格式和dataloader好像没有问题(我之前怀疑是数据错误导致抛出异常),检查了一下发现加载数据都是正常的,请问您有遇到过这样的情况吗,我在另外一个issue里面也看到了类似问题。谢谢。
image

from pytorch_classification.

PngYng avatar PngYng commented on May 20, 2024

在加载完模型之后出现错误ValueError: optimizer got an empty parameter list

定位到的报错位置是
File "train.py", line 76, in
optimizer = optim.Adam(filter(lambda p: p.requires_grad, model.parameters()), lr=cfg.LR)

你好请问这个具体在哪里修改呀,我没找见,出现了同样的错误

from pytorch_classification.

PngYng avatar PngYng commented on May 20, 2024

这是优化器定义时,不小心写错了模型的名字,已经改过来

你好请问这个具体在哪里修改呀,我没找见,出现了同样的错误

from pytorch_classification.

DnYoZn avatar DnYoZn commented on May 20, 2024

这是优化器定义时,不小心写错了模型的名字,已经改过来

你好请问这个具体在哪里修改呀,我没找见,出现了同样的错误

你这个问题解决了吗

from pytorch_classification.

dmuqlzhang avatar dmuqlzhang commented on May 20, 2024

这是优化器定义时,不小心写错了模型的名字,已经改过来

你好请问这个具体在哪里修改呀,我没找见,出现了同样的错误

你这个问题解决了吗

已解决问题,train.py 43行param.requires_grad = False,将False改为True即可正常训练

from pytorch_classification.

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.