GithubHelp home page GithubHelp logo

Comments (8)

Aruen24 avatar Aruen24 commented on May 23, 2024

我也是报的这个错误,解决了吗?

from pytorch_classification.

Romitavia avatar Romitavia commented on May 23, 2024

from pytorch_classification.

kk701710 avatar kk701710 commented on May 23, 2024

我也是报的这个错误,解决了吗?

兄弟问下你这个问题解决了吗???

from pytorch_classification.

Romitavia avatar Romitavia commented on May 23, 2024

from pytorch_classification.

kk701710 avatar kk701710 commented on May 23, 2024

解决了的 我忘记这个报错是具体在哪一部分了 要不加qq联系

------------------ 原始邮件 ------------------ 发件人: "lxztju/pytorch_classification" @.>; 发送时间: 2021年4月1日(星期四) 中午11:04 @.>; @.@.>; 主题: Re: [lxztju/pytorch_classification] ValueError: optimizer got an empty parameter list (#26) 我也是报的这个错误,解决了吗? 兄弟问下你这个问题解决了吗??? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

我扣扣598369667,加我以下

from pytorch_classification.

Romitavia avatar Romitavia commented on May 23, 2024

from pytorch_classification.

Romitavia avatar Romitavia commented on May 23, 2024

from pytorch_classification.

caixh39 avatar caixh39 commented on May 23, 2024
#####build the network model
if not cfg.RESUME_EPOCH:
    print('****** Training {} ****** '.format(cfg.model_name))
    print('****** loading the Imagenet pretrained weights ****** ')
    if not cfg.model_name.startswith('efficientnet'):
        model = cfg.MODEL_NAMES[cfg.model_name](num_classes=cfg.NUM_CLASSES)
        # #冻结前边一部分层不训练
        ct = 0
        for child in model.children():
            ct += 1
            # print(child)
            if ct < 8:
                print(child)
                for param in child.parameters():
                    param.requires_grad = False

in train.py file, I change the "param.requires_grad = False" to "param.requires_grad = True", and problem solved

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.