Comments (6)
An example of transformation looks like:
mean = [(0 + 100) / 2,
(-86.183 + 98.233) / 2,
(-107.857 + 94.478) / 2]
std = [(100 - 0) / 2,
(86.183 + 98.233) / 2,
(107.857 + 94.478) / 2]
train_transform = transforms.Compose([
transforms.RandomCrop(64),
# transforms.RandomResizedCrop(64, scale=(0.08, 1)),
transforms.RandomHorizontalFlip(),
RGB2Lab(),
transforms.ToTensor(),
transforms.Normalize(mean=mean, std=std)
])
test_transform = transforms.Compose([
transforms.CenterCrop(64),
RGB2Lab(),
transforms.ToTensor(),
transforms.Normalize(mean=mean, std=std)
])
Using RandomCrop without resize should be able to reproduce the results in the paper. RandomResizedCrop could further improve the results, though.
from cmc.
I enjoyed reading the paper and thanks for uploading the code.
Quick question - would it be possible to also upload the scripts to run the STL-10 eval?
Thanks!
Hi, thanks for your interest!
I plan to but would not do it now. If you cannot wait, simply modifying the train_CMC.py
and following the hyperparameters in the paper will work.
from cmc.
If possible it would also be great if you could upload your trained models. Thanks!
BTW are the following augmentations accurate for STL10 i.e. no color transformations and resize (as opposed to center crop) for the test loader?
im_size = 64
norm_vals = [(0.5, 0.5, 0.5), (0.5, 0.5, 0.5)]
transform_train = transforms.Compose([
transforms.RandomResizedCrop(size=im_size, scale=(0.2,1.0)),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
transforms.Normalize(norm_vals[0], norm_vals[1]),
])
transform_test = transforms.Compose([
transforms.Resize(im_size),
transforms.ToTensor(),
transforms.Normalize(norm_vals[0], norm_vals[1]),
])
from cmc.
Based on your comments, I managed to get within 1% of the results in the paper for CMC NCE linear fc7 for STL10. Would you mind letting me know what batch size, momentum, and weight_decay you used for the self-supervised training and also if there were any changes to the existing code when training the linear classifier.
Thanks!
from cmc.
Hi,
For self-supervised NCE CMC stage on STL-10:
batch_size = 64 or 128 (I used the latter, both delivers similar accuracy), momentum = 0.9, weight_decay = 1e-4.
For Linear Classifier on STL-10, I used Adam following the original Deep Infomax. The detailed setting is:
lr = 1e-3, betas = (0.5, 0.999), weight_decay = 0. Remember to decay the learning rate at epoch 60, 80 by a factor of 5. And 100 epochs in total.
Let me know if there are other questions.
from cmc.
Seems it's not active now, I am closing it. Feel free to reopen it.
from cmc.
Related Issues (20)
- Weight shape in Linear classifier HOT 1
- Train/Test split when training linear classifier (ImageNet) HOT 3
- Gpu memory heavy on gpu0 HOT 1
- mean std value for LAB/YCbCr normalization HOT 1
- How to prevent positive sample is sampled by AliasMethod? HOT 1
- Format of dataset HOT 2
- index drawn by AliasMethod is not on the same gpu as the model HOT 1
- About the training epochs for ImageNet-1K
- question about shuffle_ids
- Training Loss Doesn't Improve for CIFAR10
- pretrained model of ResNet50v1
- Feature Tensor Shape Question HOT 1
- how to use the pretrained MoCo
- Protential memory leak when training?
- Modified AlexNet architecture for STL-10 dataset
- question about input image
- Questions about NCEAverage.py
- How can it be used for more than two views datasets?
- Pre-trained model for Video task HOT 1
- CMC for small custom dataset
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 cmc.