A nest of tensor_spec.TensorSpec representing the
input observations.
action_spec
A nest of tensor_spec.BoundedTensorSpec representing the
actions.
preprocessing_layers
(Optional.) A nest of tf.keras.layers.Layer
representing preprocessing for the different observations.
All of these layers must not be already built. For more details see
the documentation of networks.EncodingNetwork.
preprocessing_combiner
(Optional.) A keras layer that takes a flat list
of tensors and combines them. Good options include
tf.keras.layers.Add and tf.keras.layers.Concatenate(axis=-1).
This layer must not be already built. For more details see
the documentation of networks.EncodingNetwork.
conv_layer_params
Optional list of convolution layers parameters, where
each item is a length-three tuple indicating (filters, kernel_size,
stride).
input_fc_layer_params
Optional list of fully connected parameters, where
each item is the number of units in the layer. These feed into the
recurrent layer.
lstm_size
An iterable of ints specifying the LSTM cell sizes to use.
output_fc_layer_params
Optional list of fully connected parameters, where
each item is the number of units in the layer. These are applied on top
of the recurrent layer.
activation_fn
Activation function, e.g. tf.keras.activations.relu,.
rnn_construction_fn
(Optional.) Alternate RNN construction function, e.g.
tf.keras.layers.LSTM, tf.keras.layers.CuDNNLSTM. It is invalid to
provide both rnn_construction_fn and lstm_size.
rnn_construction_kwargs
(Optional.) Dictionary or arguments to pass to
rnn_construction_fn.
(Optional). Override or provide an input tensor spec
when creating variables.
**kwargs
Other arguments to network.call(), e.g. training=True.
Returns
Output specs - a nested spec calculated from the outputs (excluding any
batch dimensions). If any of the output elements is a tfp Distribution,
the associated spec entry returned is a DistributionSpec.
Raises
ValueError
If no input_tensor_spec is provided, and the network did
not provide one during construction.
Total length of printed lines
(e.g. set this to adapt the display to different
terminal window sizes).
positions
Relative or absolute positions of log elements
in each line. If not provided,
defaults to [.33, .55, .67, 1.].
print_fn
Print function to use. Defaults to print.
It will be called on each line of the summary.
You can set it to a custom function
in order to capture the string summary.