1330ea3102315bd79c9c6efdbd8818c8e2a3cb8f,deepchem/metalearning/maml.py,MAML,fit,#MAML#Any#Any#Any#Any#,200
Before Change
self._session.run(self._clear_gradients)
for j in range(self.meta_batch_size):
self.learner.select_task()
feed_dict = self.learner.get_batch()
feed_dict[self._global_step] = i
for key, value in self.learner.get_batch().items():
feed_dict[self._meta_placeholders[key]] = value
self._session.run(self._add_gradients, feed_dict=feed_dict)
self._session.run(self._meta_train_op)
// Do checkpointing.
After Change
feed_dict = {}
feed_dict[self._global_step] = i
for k in range(len(inputs)):
feed_dict[self._input_placeholders[k]] = inputs[k]
feed_dict[self._meta_placeholders[k]] = inputs[k]
self._session.run(self._add_gradients, feed_dict=feed_dict)
self._session.run(self._meta_train_op)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: deepchem/deepchem
Commit Name: 1330ea3102315bd79c9c6efdbd8818c8e2a3cb8f
Time: 2019-07-09
Author: peastman@stanford.edu
File Name: deepchem/metalearning/maml.py
Class Name: MAML
Method Name: fit
Project Name: ruotianluo/ImageCaptioning.pytorch
Commit Name: 35374bebada9b1d9bb50a48bce8cf939d9c6baf1
Time: 2017-02-13
Author: rluo@ttic.edu
File Name: eval_utils.py
Class Name:
Method Name: eval_split