Comments (14)
- We use the Brier score (MSE loss) to make the training more robust to incorrect guesses. This is detailed in the paper on arxiv.
- You could use a big batch. Just be mindful that with
training=True
the batch size must always be the same for batch_norm to behave properly. In particular, we run the model in guess_labels (on u1, u2) and we run it in the main body again (on x', u1', u2'). That's why we ended up running each group (x', u1, u2, u1', u2') separately since combining them would result in two mismatched batches.
from mixmatch.
In the settings of this code base, there are 5 forward computations per iteration: 2 for label guessing on u1 and u2, and 3 on the mixed input. All of these 5 forward computations would affect the running mean/var status of bn layers, though computation on u1 and u2 are not meant for training. Would it be better if we find a way to remove the impact on bn status brought by u1 and u2?
from mixmatch.
Actually only one forward computation affects the batch norm running mean and var. We explicitly make sure of that in the code by shuffling the batches contents (layers.interleave
) and by ignoring the global updates (see post_ops
) other than for that one batch.
from mixmatch.
Thanks, I will try it.
from mixmatch.
Just be mindful that with
training=True
the batch size must always be the same for batch_norm to behave properly.
Hi, thank you for your in-depth discussion. With regard to the statement above, I wonder is there any literature shows that it is best to ensure that the batch sizes are consistent for infering through the model during one batch iteration?
from mixmatch.
I am not sure about literature on the topic. It's just that with different batches sizes, I would expect the variance to change. So basically I erred on the safe side in the code. But feel free to experiment may it can be simplified.
from mixmatch.
Thanks for reply.
from mixmatch.
Hi, I have one more question about the CIFAR100 experiment.
In your paper, a 28-layer Wide Resnet model (which has 135 filters per layer, resulting in 26 million parameters) is used for CIFAR100. According to the tutorial in readme file, I just set the parameter filter equals to 135 and the code shows that total number of parameter is 25,985,290. I also notice that the filter number of the first conv layer(filter=16) is fixed in your ResNet class . so I wonder if this setup is the same as yours for getting the results in your paper. Thanks.
from mixmatch.
Yes it is the same setup. In reality we had a little bit less parameters than the methods we compared to, so yes the number is correct it's almost 26M.
from mixmatch.
Thanks
from mixmatch.
Hi,
Thanks for these replies, I am not familiar with tensorflow, so I feel maybe I better ask a bit more about the details :)
Did you use a batch of 64 interleaved samples to train the model with the other 128 samples neglected in computing the gradients of all parameters (or only use 64 samples to update bn, and use all the 192 samples to update other parameters)? If only 64 samples are used on all parameters, since I want to try a big batch of 192 samples per forward computation, should I multiply the learning rate by 3? As for the number of epoches and iterations, you trained with batch size of 64 for 1024 epoches and with each epoch consists of 1024 iterations, so if I train with 192 samples per iteration, I should reduce the number of iterations per epoch to 1024/3, am I correct ?
from mixmatch.
All batches (192 samples) are used in gradient computation.
from mixmatch.
Hello, I am very inspired to read your thesis, but when I run the code, I find that the code is missing files. Can you send me the complete code? Appreciate it!
from mixmatch.
I'm closing this issue since I answered the original question. For unrelated questions, please open new issues.
from mixmatch.
Related Issues (20)
- When will Remixmatch (ICLR'20) be available? HOT 3
- A question about "post_ops" in mixmatch.py HOT 2
- Implemented on other models HOT 1
- What are the most important things to reproduce the result on my own dataset? HOT 2
- Use MixMatch on tabular data. HOT 6
- A question about lambda_u HOT 2
- Is there any reason why you chose to use Beta Distribution? HOT 1
- Reason for ramping up weight of unlabelled loss function(lambda_u). HOT 3
- Comparison of fully supervised models with MixMatch. HOT 2
- How to chose total number of training steps HOT 5
- how to save the train and test accuracies to disk HOT 2
- question about mixmatch/scripts/create_split.py line113-130
- Working with higher resolution images HOT 1
- Hello, can I use it for multi label classification? If so, what should I pay attention to in the process of tag prediction? For multi label classification, sigmoid is generally used as the loss function. In this case, can you change your loss function to sigmoid? HOT 3
- what is the proper behavior of consistency loss HOT 1
- how to recover performance when doing evaluation HOT 4
- why not using dropout in the wide resnet as done in the wide resnet paper? HOT 4
- In your implementation of Mean teacher, isn't the student model and the teacher model the same? HOT 1
- ModuleNotFoundError: No module named 'libml' HOT 1
- Project dependencies may have API risk issues HOT 1
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 mixmatch.