toologicbv / meta_learner Goto Github PK
View Code? Open in Web Editor NEWAI masterthesis. Iterative learning. Meta learning. Stochastic approach to adaptive computation
AI masterthesis. Iterative learning. Meta learning. Stochastic approach to adaptive computation
Fix Line 112 in rnn_optimizer.py from self.cuda to self.use_cuda
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.
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)
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.