MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / get_weights

Method get_weights

tensorflow/python/keras/engine/training.py:162–173  ·  view source on GitHub ↗

Retrieves the weights of the model. Returns: A flat list of Numpy arrays.

(self)

Source from the content-addressed store, hash-verified

160 self._experimental_run_tf_function = False
161
162 def get_weights(self):
163 """Retrieves the weights of the model.
164
165 Returns:
166 A flat list of Numpy arrays.
167 """
168 strategy = (self._distribution_strategy or
169 self._compile_time_distribution_strategy)
170 if strategy:
171 with strategy.scope():
172 return super(Model, self).get_weights()
173 return super(Model, self).get_weights()
174
175 def load_weights(self, filepath, by_name=False):
176 """Loads all layer weights, either from a TensorFlow or an HDF5 file."""

Calls 1

scopeMethod · 0.45