Giter VIP home page Giter VIP logo

Comments (3)

zhoudw-zdw avatar zhoudw-zdw commented on September 2, 2024 2

Typical finetuning loss should be the latter one you mentioned. We make some modifications to improve its performance.

But I think this does not influence much of the performance since finetuning is always the worst choice of incremental learning. Just replace it and have a try.

from pycil.

G-U-N avatar G-U-N commented on September 2, 2024

Good question. Just as we claimed in the README file

By default, weights corresponding to the outputs of previous classes are not updated.

This implementation is to avoid updating the prototypes of old categories. And therefore, the training of new classes will only corrupt the feature extractor while the prototypes are preserved.

from pycil.

G-U-N avatar G-U-N commented on September 2, 2024

But here is indeed a bug caused by weight decay that I ignored before. Since even the old prototypes are not used to calculate the final loss, the old prototypes will still be slightly changed by the weight decay. To understand this problem, run the following python script. I will correct the bug later. And if you have any insights into this bug, welcome to contribute to our repo.

a=nn.Linear(10,2)
optimizer=torch.optim.SGD(a.parameters(),lr=0.1,weight_decay=5e-4)
for i in range(1000):
    optimizer.zero_grad()
    output=a(torch.randn(10))
    output[0].backward()
    optimizer.step()
    print(a.bias.data)

from pycil.

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.