6506f3a125e001e7667771f3c1f570c53dbefd06,tgen/seq2seq.py,Seq2SeqGen,save_to_file,#Seq2SeqGen#Any#,290
Before Change
self._training_pass(iter_no)
def save_to_file(self, fname):
raise NotImplementedError()
def generate_tree(self, inputs):
raise NotImplementedError()
After Change
def save_to_file(self, model_fname):
log_info("Saving generator to %s..." % model_fname)
with file_stream(model_fname, "wb", encoding=None) as fh:
data = {"emb_size": self.emb_size,
"batch_size": self.batch_size,
"randomize": self.randomize,
"passes": self.passes,
"da_embs": self.da_embs,
"tree_embs": self.tree_embs,
"da_dict_size": self.da_dict_size,
"tree_dict_size": self.tree_dict_size,
"max_da_len": self.max_da_len,
"max_tree_len": self.max_tree_len}
pickle.dump(data, fh, protocol=pickle.HIGHEST_PROTOCOL)
tf_session_fname = re.sub(r"(.pickle)?(.gz)?$", ".tfsess", model_fname)
self.saver.save(self.session, tf_session_fname)
@staticmethod
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: UFAL-DSG/tgen
Commit Name: 6506f3a125e001e7667771f3c1f570c53dbefd06
Time: 2016-01-08
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/seq2seq.py
Class Name: Seq2SeqGen
Method Name: save_to_file
Project Name: neurosynth/neurosynth
Commit Name: e4f774a55446bb6f7fab43d999dd6fea24158e26
Time: 2014-10-27
Author: tyarkoni@gmail.com
File Name: neurosynth/analysis/cluster.py
Class Name: Clusterer
Method Name: cluster
Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 6ac03e0efe901d7d07be17f39b0186d26b89f2db
Time: 2019-05-07
Author: beat.buesser@ie.ibm.com
File Name: art/classifiers/sklearn_logistic_regression.py
Class Name: SklearnLogisticRegression
Method Name: save