Comments (8)
@cbfinn, as you mentioned before,
I compute the test-time statistics using the test batch of data, instead of computing the average training statistics
This seems to be a bit of cheating especially on test-time. In general, we can assume evaluating only one sample at a time on test-time and then there is no way to get proper statistics for batch_norm. This means the test-set performance will partially dependent on the size of batch.
from maml.
I compute the test-time statistics using the test batch of data, instead of computing the average training statistics. This doesn't require keeping track of batch norm training statistics. [Note that train is always set to True when calling the batch_norm function, which means that tensorflow will compute the statistics using the current batch]
It's possible that it would work better by using training batch statistics, but I haven't tried it.
from maml.
It's not the issue I'm talking about. See the Note from tf.contrib.layers.batch_norm
page
Note: when training, the moving_mean and moving_variance need to be updated. By default the update ops are placed in tf.GraphKeys.UPDATE_OPS, so they need to be added as a dependency to the train_op.
In other words, without these steps I wrote in the issue, moving_mean and moving_variance doesn't update at all (even during training). Again, maybe I'm missing some other way you're updating them.
from maml.
You only need to update moving_mean and moving_variance if you use them. In this case, the batch norm statistics are being computed using the batch data rather than a moving average of the statistics (so they don't need to be updated).
from maml.
OK. Indeed, they're needed only during testing.
Thanks.
from maml.
from maml.
Hi, I see your approcach.
If I use moving average of the statistics by adding update_op into train ops, Then Need I set train=FALSE when testing use batch_norm function?
from maml.
from maml.
Related Issues (20)
- ModuleNotFoundError: No module named 'tensorflow.contrib' HOT 1
- Pretrained weights for omniglot
- Some question about cross-entropy loss xent
- How to open the results in LOGs
- Memory efficient MAML
- wrong comparison in maml.py
- What weights you are using during testing
- Prelosses and Postlosses HOT 2
- First-order approximation HOT 11
- Sinusoid results
- include how to cite paper on read me
- Definition of tasks in the Meta Phase
- Why 20000 tasks are set, but only one batch task is used HOT 1
- something about Computational Graph
- Testing always creates same results across 600 test points
- Why was a scheduler/annealing rate not used?
- itr is referenced before assignment in main.py, line 160
- model parameters of meta-training
- Interpretation of the results HOT 1
- Create tests file to highlight usage
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.