Conv1DTranspose classtf_keras.layers.Conv1DTranspose(
filters,
kernel_size,
strides=1,
padding="valid",
output_padding=None,
data_format=None,
dilation_rate=1,
activation=None,
use_bias=True,
kernel_initializer="glorot_uniform",
bias_initializer="zeros",
kernel_regularizer=None,
bias_regularizer=None,
activity_regularizer=None,
kernel_constraint=None,
bias_constraint=None,
**kwargs
)
Transposed convolution layer (sometimes called Deconvolution).
The need for transposed convolutions generally arises from the desire to use a transformation going in the opposite direction of a normal convolution, i.e., from something that has the shape of the output of some convolution to something that has the shape of its input while maintaining a connectivity pattern that is compatible with said convolution.
When using this layer as the first layer in a model,
provide the keyword argument input_shape
(tuple of integers or None, does not include the sample axis),
e.g. input_shape=(128, 3) for data with 128 time steps and 3 channels.
Arguments
dilation_rate value != 1. Defaults to 1."valid" or "same" (case-insensitive).
"valid" means no padding. "same" results in padding with zeros
evenly to the left/right or up/down of the input such that output has
the same height/width dimension as the input.None (default), the output shape is inferred.channels_last (default) or
channels_first. The ordering of the dimensions in the inputs.
channels_last corresponds to inputs with shape
(batch_size, length, channels) while channels_first corresponds to
inputs with shape (batch_size, channels, length).dilation_rate value != 1 is
incompatible with specifying a stride value != 1.
Also dilation rate larger than 1 is not currently supported.keras.activations).kernel weights matrix
(see keras.initializers). Defaults to 'glorot_uniform'.keras.initializers). Defaults to 'zeros'.kernel weights matrix (see keras.regularizers).keras.regularizers).keras.regularizers).keras.constraints).keras.constraints).Input shape
3D tensor with shape:
(batch_size, steps, channels)
Output shape
3D tensor with shape:
(batch_size, new_steps, filters)
If output_padding is specified:
new_timesteps = ((timesteps - 1) * strides + kernel_size -
2 * padding + output_padding)
Returns
A tensor of rank 3 representing
activation(conv1dtranspose(inputs, kernel) + bias).
Raises
padding is "causal".strides > 1 and dilation_rate > 1.References