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

Method _set_trainable_state

tensorflow/python/keras/engine/base_layer.py:2198–2204  ·  view source on GitHub ↗

Set `trainable` state for each sublayer.

(self, trainable_state)

Source from the content-addressed store, hash-verified

2196 return trainable_state
2197
2198 def _set_trainable_state(self, trainable_state):
2199 """Set `trainable` state for each sublayer."""
2200 layers = trackable_layer_utils.filter_empty_layer_containers(self._layers)
2201 if self in trainable_state:
2202 self.trainable = trainable_state[self]
2203 for layer in layers:
2204 layer._set_trainable_state(trainable_state)
2205
2206 @property
2207 def _obj_reference_counts(self):

Callers 3

_process_single_batchFunction · 0.80
_make_train_functionMethod · 0.80
_make_train_functionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected