b01ea16c4fadeb271c2bde653947d92048f367c8,kur/backend/keras_backend.py,KerasBackend,_restore_keras,#KerasBackend#Any#Any#,386

Before Change



				// Get the symbolic weights.
				symbolic_weights = layer.weights
				if len(weights) != len(symbolic_weights):
					raise ValueError("Layer "%s" expected %d weights, but we "
						"found %d on disk.", layer_name, len(symbolic_weights),
						len(weights))

				// Get the associated names (so we know what order to assign the
				// weights in.
				weight_names, _ = \
					self._get_weight_names_and_values_from_symbolic(
						symbolic_weights
					)

After Change


						symbolic_weights
					)

				available = set(weights.keys())
				needed = set(name.replace("/", "_") for name in weight_names)
				if available ^ needed:
					logger.error("Weight discrepancy in the weights we are "
						"supposed to load.")
					logger.error("These weights are on-disk, but not "
						"requested: %s", ", ".join(available - needed))
					logger.error("These weights were requested, but not "
						"available: %s", ", ".join(needed - available))
					raise ValueError("Layer "{}" expected {} weights, but we "
						"found {} on disk.".format(layer_name,
						len(needed), len(available)))

				for i, name in enumerate(weight_names):
					name = name.replace("/", "_")
					weight_value_tuples.append((symbolic_weights[i], weights[name]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: deepgram/kur
Commit Name: b01ea16c4fadeb271c2bde653947d92048f367c8
Time: 2017-03-21
Author: ajsyp@syptech.net
File Name: kur/backend/keras_backend.py
Class Name: KerasBackend
Method Name: _restore_keras


Project Name: IndicoDataSolutions/finetune
Commit Name: 880e57c9796c5f4ed79195bdd38bc4b0d3abf25f
Time: 2018-10-01
Author: benlt@hotmail.co.uk
File Name: finetune/saver.py
Class Name: Saver
Method Name: save


Project Name: dnouri/skorch
Commit Name: 53ef00376510ee9ba4506918db06b25dad4a7ea4
Time: 2017-07-31
Author: benjamin.bossan@ottogroup.com
File Name: inferno/callbacks.py
Class Name: BestLoss
Method Name: initialize