Comments (10)
- according to the paper, one gradient step or several gradient step are both supported. Hence K here means the theta_prime parameters will be updated K times on individual task.
In the actual code from Chelsa Finn, she chose K=5 in meta-trian and K=10 in meta-test.
Its different from parameter k_shot. - Not every time calling will
empty
bn_mean & bn_variance. It will be emptyed only when creating the model.
So if you resume training from last time, you are supposed to load checkpoint from file which saved whole network weights including bn_mean&bn_variance.
In that case, bn_mean and bn_variance will keep saved and work as normal.
from maml-pytorch.
hi,
- not repeating training K times. I dnt know why u state that .
- what u mean by "move mean and variance".
Maybe you should make your doubts clear.
from maml-pytorch.
抱歉学长,我还是用中文阐述吧(^_^)
1、https://github.com/dragen1860/MAML-Pytorch/blob/master/maml.py#L374
这个循环 我觉得是将 task[i] 迭代更新了 k 次( 从 0 到 k-1),不太明白为何要这样做?
2、https://github.com/dragen1860/MAML-Pytorch/blob/master/maml.py#L83
这里,将参数“bn_mean”、“bn_vear”的梯度设为不求导,并且调用的时候每次都为 empty ,那相当于
在Batchnorm里这两个参数不起作用吧?不太明白为何要移除这两个参数。
希望能得到学长的回复,本人在读研一,导师给的研究方向是这个“few shot learning”,感觉您在这方面做了好多工作,学长有可以分享的经验吗?因为实验室无人做这个,感觉自己在瞎学……
谢谢学长~
from maml-pytorch.
However, I wonder if "bn_mean & bn_variance" 's " requires_grad=False ", then in the process of back propagation, their grads can't be computed, so how can the parameters of "bn_mean & bn_variance" be updated without grads?
https://github.com/dragen1860/MAML-Pytorch/blob/master/maml.py#L83
from maml-pytorch.
hi, it's will be updated on the statistics of batching data but not depending on backprop.
Please refer to some batch norm tutorial to understand this.
from maml-pytorch.
ok, I get it. Thanks a lot!
Just one more question hoped to get answers:
in the line 399:
https://github.com/dragen1860/MAML-Pytorch/blob/master/maml.py#L399
you say "this is a potential problems", could you explain this potential bug specifically?
from maml-pytorch.
pls refer to this: #6
from maml-pytorch.
Thank you again. you know, I have no intention of offending, but I also think it is not correct if you update the parameters during meta testing.
https://github.com/dragen1860/MAML-Pytorch/blob/master/maml.py#L399
from maml-pytorch.
Yes, i know. Please discuss this bug on issues: #6
if you have a feasible solution.
from maml-pytorch.
我是去年入学的,方向也是fewshot learning。。。请问你有什么进展吗,感觉好难呀
from maml-pytorch.
Related Issues (20)
- why use custom grad clip function?
- omniglot dataset download error HOT 1
- Does the hessian really gets computed? HOT 1
- Can you please add a 1-d CNN model to the learner.
- Incorrect losses_q HOT 3
- about dataset spiltting
- create_graph parameter is False hence first-order MAML? HOT 1
- Asking about inner and outer loop
- 您好,对于代码有两个问题,请教您一下,谢谢 HOT 3
- About training and testing HOT 6
- can you offer us your requirements of environment?
- Why is `for epoch in range(args.epoch // 10000):` HOT 2
- Why the code for Learner is so complicated? HOT 1
- 请问模型权值文件在哪里进行保存?代码在哪里? HOT 1
- debug
- Using the Learner object for my project, Loss not behaving at its best
- About accuracy HOT 6
- What is the backup file for and what is the reference navie5 in navie5?
- 准确率不变 HOT 4
- 训练自己的数据集
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maml-pytorch.