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


					)

				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: 5

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: mynlp/ccg2lambda
Commit Name: 66a06524eba0b22d14204baeb2ca6d4c9db7d1d0
Time: 2017-05-12
Author: pascual@nii.ac.jp
File Name: scripts/semantic_types.py
Class Name:
Method Name: convert_coq_to_nltk_type


Project Name: evilsocket/pwnagotchi
Commit Name: 2f948306ebeabf10050bb0c07a3254b420c30751
Time: 2019-11-01
Author: evilsocket@gmail.com
File Name: pwnagotchi/plugins/__init__.py
Class Name:
Method Name: load_from_path