yoonholee / mt-net Goto Github PK
View Code? Open in Web Editor NEWCode accompanying the ICML-2018 paper "Gradient-Based Meta-Learning with Learned Layerwise Metric and Subspace"
License: MIT License
Code accompanying the ICML-2018 paper "Gradient-Based Meta-Learning with Learned Layerwise Metric and Subspace"
License: MIT License
gumbel_hard = tf.cast(tf.equal(gumbel_softmax, tf.reduce_max(gumbel_softmax, 1, keep_dims=True)), tf.float32)
mask = tf.stop_gradient(gumbel_hard - gumbel_softmax) + gumbel_softmax
For the above code, it seems to choose the maximal index marked with "1" and all other indexes set to 0?, it means you only allow 1 element go through the gradient descent, which is too strict...?
It's annoying but print needs parenthesis in Python 3; you have a few without the parenthesis.
In MAML.py, you have
for k, v in weights.iteritems():
You should update it to
for k, v in weights.items():
That's all. The code runs, good work.
Dear Authors,
In the code:
sampled_character_folders = random.sample(folders, self.num_classes)
random.shuffle(sampled_character_folders)
labels_and_images = get_images(sampled_character_folders, range(self.num_classes), nb_samples=self.num_samples_per_class, shuffle=False)
One of random labels (1 to 5 class) are assigned to each folder of random selected 5 folders. It seems that there are label conflict between two batches, for example:
batch1: label 1: folder 11, label 2: folder 12, label 3: folder 13, label 4: folder 14;
batch2: label 1: folder 12, label 2: folder 13, label 3: folder 14, label 4: folder 15;
In this case, in two different batch1, and batch 2, folder 12 is assgined to label 1 and label 2.
In my understanding, each folder with images belong to one object should be assigned a unique label.
Hello,
I'm trying to reproduce the result reported in your paper.
However, by running the default script for omniglot 20way 1shot,
python main.py --datasource=omniglot --metatrain_iterations=40000 --meta_batch_size=16 --update_batch_size=1 --num_classes=20 --num_updates=1 --logdir=logs/omniglot20way --update_lr=.1 --use_T=True --use_M=True --share_M=True
gives 90.X accuracy on test time.
The result was not different even if I changed num_updates
to 5 on train time.
Could you give suggestion for reproducing the performance?
Hi, yoohholee,
MT-net is a fantastic idea.
I ran this code but only got 50.04% for miniImagenet 1-shot classification.
Do you have any suggestions or recommendations to reproduce the results in the paper?
Such as data preprocessing, validation, tensorflow and python version or maybe other tricks?
Thanks so much!
Hello, I tried to reproduce the results of T-net on 5w1s miniimagenet experiment.
I set parameters as
--metatrain_iterations=60000 --meta_batch_size=4 --update_batch_size=1 --num_updates=5 --logdir=logs/miniimagenet5way --update_lr=.01 --meta_lr=0.001 --resume=True --num_filters=32 --max_pool=True --use_T=True
But I can only get accuraty about 48.8%, which is not as good as 50.86% writen ny you paper.
Maybe you can tell me your parameters setting if you still have it.
Thank you.
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.