View source on GitHub |
Extracts the state spec from a layer.
tf_agents.networks.network.get_state_spec(
layer: tf.keras.layers.Layer
) -> tf_agents.typing.types.NestedTensorSpec
Args | |
---|---|
layer
|
The layer to extract from; can be a Network .
|
Returns | |
---|---|
The state spec. |
Raises | |
---|---|
TypeError
|
If layer is a subclass of tf.keras.layers.RNN (it must
be wrapped by an RNNWrapper object).
|
ValueError
|
If layer is a Keras layer and create_variables has
not been called on it.
|