Loads all layer weights, either from a TensorFlow or an HDF5 file.
(self, filepath, by_name=False)
| 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.""" |
| 177 | if distributed_training_utils.is_tpu_strategy(self._distribution_strategy): |
| 178 | if (self._distribution_strategy.extended.steps_per_run > 1 and |
| 179 | (not network._is_hdf5_filepath(filepath))): # pylint: disable=protected-access |
| 180 | raise ValueError('Load weights is not yet supported with TPUStrategy ' |
| 181 | 'with steps_per_run greater than 1.') |
| 182 | return super(Model, self).load_weights(filepath, by_name) |
| 183 | |
| 184 | @trackable.no_automatic_dependency_tracking |
| 185 | def compile(self, |
no outgoing calls