ConvLSTM2D
classtf_keras.layers.ConvLSTM2D(
filters,
kernel_size,
strides=(1, 1),
padding="valid",
data_format=None,
dilation_rate=(1, 1),
activation="tanh",
recurrent_activation="hard_sigmoid",
use_bias=True,
kernel_initializer="glorot_uniform",
recurrent_initializer="orthogonal",
bias_initializer="zeros",
unit_forget_bias=True,
kernel_regularizer=None,
recurrent_regularizer=None,
bias_regularizer=None,
activity_regularizer=None,
kernel_constraint=None,
recurrent_constraint=None,
bias_constraint=None,
return_sequences=False,
return_state=False,
go_backwards=False,
stateful=False,
dropout=0.0,
recurrent_dropout=0.0,
**kwargs
)
2D Convolutional LSTM.
Similar to an LSTM layer, but the input transformations and recurrent transformations are both convolutional.
Arguments
dilation_rate
value != 1."valid"
or "same"
(case-insensitive). "valid"
means
no padding. "same"
results in padding evenly to the left/right or
up/down of the input such that output has the same height/width
dimension as the input.channels_last
(default) or
channels_first
. The ordering of the dimensions in the inputs.
channels_last
corresponds to inputs with shape (batch, time, ...,
channels)
while channels_first
corresponds to inputs with shape
(batch, time, channels, ...)
. When unspecified, uses
image_data_format
value found in your TF-Keras config file at
~/.keras/keras.json
(if exists) else 'channels_last'.
Defaults to 'channels_last'.dilation_rate
value != 1 is incompatible with specifying any strides
value != 1.tanh(x)
).kernel
weights matrix, used for
the linear transformation of the inputs.recurrent_kernel
weights
matrix, used for the linear transformation of the recurrent state.bias_initializer="zeros"
.
This is recommended in Jozefowicz et al., 2015kernel
weights
matrix.recurrent_kernel
weights matrix.kernel
weights
matrix.recurrent_kernel
weights matrix.Call arguments
(samples, timesteps)
indicating whether a
given timestep should be masked.dropout
or
recurrent_dropout
are set.Input shape - If data_format='channels_first'
5D tensor with shape: (samples, time, channels, rows, cols)
- If
data_format='channels_last'
5D tensor with shape: (samples, time, rows, cols, channels)
Output shape
return_state
: a list of tensors. The first tensor is the output.
The remaining tensors are the last states,
each 4D tensor with shape: (samples, filters, new_rows, new_cols)
if
data_format='channels_first'
or shape: (samples, new_rows, new_cols, filters)
if
data_format='channels_last'. rows
and cols
values might have
changed due to padding.return_sequences
: 5D tensor with shape: (samples, timesteps,
filters, new_rows, new_cols)
if data_format='channels_first'
or shape: (samples, timesteps, new_rows, new_cols, filters)
if
data_format='channels_last'.(samples, filters, new_rows, new_cols)
if
data_format='channels_first'
or shape: (samples, new_rows, new_cols, filters)
if
data_format='channels_last'.Raises
References