Git Product home page Git Product logo

meta_learner's People

Watchers

 avatar  avatar  avatar  avatar

meta_learner's Issues

non-cuda bug

Fix Line 112 in rnn_optimizer.py from self.cuda to self.use_cuda

Double loss computation

Not entirely sure about this but it seems to me as if you are computing the nll twice for every set of optimizee parameters:
First, you compute
loss = reg_funcs.compute_neg_ll(average_over_funcs=False, size_average=False)
around line 266 in train_optimizer.py
Then you compute the parameter delta with the meta optimizer and based on the updated optimizee parameters you compute the new nll:
loss_step = meta_optimizer.step_loss(reg_funcs, par_new, average_batch=True)
around line 292 in train_optimizer.py.

Then, in the next iteration you compute the loss
loss = reg_funcs.compute_neg_ll(average_over_funcs=False, size_average=False) again, which is, as far as I understand, the same as what happened in line 292 in the previous iteration.

It seems to me you could gain efficiency here if I understand correctly.

Questions wrt. gradient computation

I'm not 100% clear about pytorch syntax. Should the two following ways to compute the gradients df/dtheta be equivalent? Why are they not? :) I'm not entirely sure what loss.backward(backward_ones) does. Is this df/d1 ?

loss.mean().backward(retain_variables=True)
print(reg_funcs.params.grad.data)
reg_funcs.params.data.zero_()
loss.backward(backward_ones)
print(reg_funcs.params.grad.data)

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.