Git Product home page Git Product logo

gbml's People

Contributors

sungyubkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gbml's Issues

inner-loop regularization term missing in imaml

As mentioned in Section 2.2 of "Meta-Learning with Implicit Gradients" paper, regularization term should be added in inner-loop objective function like figure below. however, your code (line 25 of gbml/imaml.py) is missing this regularization term.
image

Train-val accuracy logging

Hi Sungyub Kim,

Thanks for the great implementation.

I have a question about your code here:

GBML/main.py

Lines 69 to 71 in 1577e17

train_loss, train_acc, train_grad = train(args, model, train_loader)
valid_loss, valid_acc = valid(args, model, valid_loader)
test_loss, test_acc = valid(args, model, test_loader)

Here, you are first training on all the batches in the meta-train set, then you are doing validation and testing.
However, the original algorithm seems to record the testing accuracy after training on every batch of tasks in the meta-train set. Do you observe the difference? I know it is a matter of implementation, we could have done the testing simultaneously, but as a matter of keeping consistent with the original implementation and the way others report their accuracy, would it make sense to observe the testing accuracy immediately after training on 1 meta-batch?

Thanks

ResNet makes 'nan' loss in 'imaml' mode

Thank you for sharing your codes.

image

python main.py --alg "iMAML" --net "ResNet"

I have some problem, when I train imaml with ResNet.

ConVNet case is Ok for me, but ResNet case makes some problem.

Did you ever face like this problem?

Memory leak?

Hi @sungyubkim, thank you for publishing this great repository.

I found that your MAML algorithm on ResNet increases the GPU memory usage every iteration and causes a CUDA out of memory error.
I ran it by python main.py --alg MAML --net ResNet. I use PyTorch 1.3.1 with CUDA 10.1 and the latest dependencies.

Thank you.

About the accuracy of MAML in 5way1shot tasks

Thank you for your excellent work.

I run python3 main.py --alg=MAML without any changes for 5way1shot tasks on miniImagenet, and the test accuracy seems to be 63.85%. But the official result of MAML is 49%. Is my understanding wrong?
image
image

MiniImagenet Integrity Check Failure

Hello, This seems like an error in my torchmeta setup, but wanted to get your perspective if otherwise. thanks in advance - VV

(dsai20) dg8965@mb-qs-pp-v100:~/GBML$ python3 main.py --alg=Reptile
using gpu: 0
Traceback (most recent call last):
File "main.py", line 225, in
main(args)
File "main.py", line 115, in main
target_transform=Categorical(num_classes=args.num_way)
File "/home/dg8965/.conda/envs/dsai20/lib/python3.6/site-packages/torchmeta/datasets/miniimagenet.py", line 89, in init
download=download)
File "/home/dg8965/.conda/envs/dsai20/lib/python3.6/site-packages/torchmeta/datasets/miniimagenet.py", line 127, in init
raise RuntimeError('MiniImagenet integrity check failed')
RuntimeError: MiniImagenet integrity check failed

Reptile: track_higher_grads=True?

Thanks so much for the great codes!

I was checking the reptile code, and it appears I need to set track_higher_grads=True in the context for this to run.

Is there something I am missing here? Thanks!

with higher.innerloop_ctx(self.network, self.inner_optimizer, track_higher_grads=False) as (fmodel, diffopt):

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.