c12f538d2d496f5e8f932abc1ee72a586b9ea855,fonduer/learning/disc_learning.py,TFNoiseAwareModel,save,#TFNoiseAwareModel#Any#Any#Any#Any#,330
Before Change
os.makedirs(model_dir)
// Create Saver
with self.graph.as_default():
saver = tf.train.Saver(tf.global_variables())
// Save model kwargs needed to rebuild model
with open(os.path.join(model_dir, "model_kwargs.pkl"), "wb") as f:
dump(self.model_kwargs, f)
// Save graph and report if verbose
After Change
model_file = "{0}.mdl.ckpt.{1}".format(model_name, global_step)
try:
torch.save(params, "{0}/{1}".format(model_dir, model_file))
except BaseException:
self.logger.warning("Saving failed... continuing anyway.")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: HazyResearch/fonduer
Commit Name: c12f538d2d496f5e8f932abc1ee72a586b9ea855
Time: 2018-08-14
Author: senwu@cs.stanford.edu
File Name: fonduer/learning/disc_learning.py
Class Name: TFNoiseAwareModel
Method Name: save
Project Name: snorkel-team/snorkel
Commit Name: b56a4b355dfc302fa449d223e065af3a7acac986
Time: 2018-05-03
Author: dnicholson329@gmail.com
File Name: snorkel/learning/pytorch/noise_aware_model.py
Class Name: TorchNoiseAwareModel
Method Name: save
Project Name: snorkel-team/snorkel
Commit Name: b56a4b355dfc302fa449d223e065af3a7acac986
Time: 2018-05-03
Author: dnicholson329@gmail.com
File Name: snorkel/learning/pytorch/noise_aware_model.py
Class Name: TorchNoiseAwareModel
Method Name: load