c15d91b235b77b177377ea382bdf9d4149e52ca5,theanolm/src/rnnlm.py,RNNLM,load_params,#RNNLM#Any#,179

Before Change


		print("Read %d parameter values from %s." % (num_updated, path))

		// Reload the error history.
		if not "error_history" in data:
			self.error_history = []
			warnings.warn("Training error history was not found from the archive.")
		else:
			saved_error_history = data["error_history"].tolist()
			// If the error history was empty when the state was saved,
			// ndarray.tolist() will return None.
			if not saved_error_history is None:
				self.error_history = saved_error_history
			self.print_error_history()

	def save_params(self, path, params=None):
		Saves neural network parameters to disk.

		The current parameter values, or the values given in ``params`` argument

After Change


		num_updated = 0
		for name in self.params:
			if not name in data:
				raise InputError("parameter %s was not found from %s." % (name, path))
			self.params[name].set_value(data[name])
			num_updated += 1
		print("Read %d parameter values from %s." % (num_updated, path))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: senarvi/theanolm
Commit Name: c15d91b235b77b177377ea382bdf9d4149e52ca5
Time: 2015-09-20
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/rnnlm.py
Class Name: RNNLM
Method Name: load_params


Project Name: statsmodels/statsmodels
Commit Name: e947c29c1508cec4522bac1ee4ef483e85c50417
Time: 2020-07-24
Author: kevin.k.sheppard@gmail.com
File Name: statsmodels/tsa/statespace/kalman_filter.py
Class Name: FilterResults
Method Name: predict


Project Name: scipy/scipy
Commit Name: 0e22219cfa3b5b8c4af77a452812f03cc3a13a06
Time: 2015-07-28
Author: n59_ru@hotmail.com
File Name: scipy/optimize/least_squares.py
Class Name:
Method Name: least_squares