Coder Social home page Coder Social logo

cs326-few-shot-classification's People

Contributors

universome avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cs326-few-shot-classification's Issues

Questions about outer-loop loss.backward()

I noticed that in the outer loop, the outer_loop_loss.backward() and optim.step() cannot update the MAMLModel.params, which causes each episode cannot update the model.params.

Finally, the meta part cannot change the model.params and has no effect.

I’m wondering whether this is deliberately designed? If yes, it seems that we need to add some code except the “TODO” to update the initial params using the gradients of fast weights?

There is a training loop in the trainer which return loss and accuracy for the last batch

return losses[-1], accs[-1]

I understand that we for save of computing power measure accuracy and loss via moving model, but it may be the case that current implementation that just returns last loss and last acc in the last batch a bit incorrect.

I suggest replace it:
``` sum(losses)/len(losses), sum(accs)/len(accs)``

It's still approximate computation of loss and accuracy because we evaluate acc and loss in different points.

MAML Forward Function

line 34 in maml.py:
def __call__(self, x: Tensor) -> Tensor:
Should this function be changed to
def __call__(self, x: Tensor, params: Tensor = None) -> Tensor:

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.