vision-cair / cs326-few-shot-classification Goto Github PK
View Code? Open in Web Editor NEWCS326 Practical assignment #2: few-shot classification
CS326 Practical assignment #2: few-shot classification
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?
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.
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:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.