A nest of tensor_spec.TensorSpec representing the
(Optional.) A nest of tf.keras.layers.Layer
representing preprocessing for the different observations. All of these
layers must not be already built.
(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.
Optional list of convolution layers parameters, where
each item is either a length-three tuple indicating
(filters, kernel_size, stride) or a length-four tuple indicating
(filters, kernel_size, stride, dilation_rate).
Optional list of fully_connected parameters, where each
item is the number of units in the layer.
Optional list of dropout layer parameters, each item
is the fraction of input units to drop or a dictionary of parameters
according to the keras.Dropout documentation. The additional parameter
permanent', if set to True, allows to apply dropout at inference for
approximated Bayesian inference. The dropout layers are interleaved with
the fully connected layers; there is a dropout layer after each fully
connected layer, except if the entry in the list is None. This list must
have the same length of fc_layer_params, or be None.
Activation function, e.g. tf.keras.activations.relu.
Optional list of weight decay parameters for the
fully connected layers.
Initializer to use for the kernels of the conv and
dense layers. If none is provided a default variance_scaling_initializer
If True the outer_ranks of the observation are squashed into
the batch dimension. This allow encoding networks to be used with
observations with shape [BxTx...].
The dtype to use by the convolution and fully connected layers.
A string representing name of the network.
string, '1d' or '2d'. Convolution layers will be 1d or 2D
If any of preprocessing_layers is already built.
If preprocessing_combiner is already built.
If the number of dropout layer parameters does not match the
number of fully connected layer parameters.
If conv_layer_params tuples do not have 3 or 4 elements each.
Returns the spec of the input to the network of type InputSpec.
Get the list of all (nested) sub-layers used in this Network.