kerasadf.layers.convolutional.Conv1D¶
- class kerasadf.layers.convolutional.Conv1D(filters, kernel_size, strides=1, padding='valid', 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)¶
Bases:
Conv
1D convolution layer (for example temporal convolution).
Assumed Density Filtering (ADF) version of
keras.layers.Conv1D
.- Parameters:
- filters
int
Dimensionality of the output space (i.e. the number of filters in the convolution).
- kernel_size
int
ortuple
ofint
orlist
ofint
An integer or tuple of int or list of a single integer, specifying the length of the convolution window.
- strides
int
ortuple
ofint
orlist
ofint
, optional An integer or tuple/list of a single integer, specifying the stride length of the convolution. Specifying any stride value != 1 is incompatible with specifying any
dilation_rate
value != 1. Default is 1.- padding{“valid”, “same”}, optional
The padding method. Case-insensitive. Default is “valid”.
- data_format{“channels_last”, “channels_first”}, optional
The ordering of the dimensions in the inputs. “channels_last” corresponds to inputs with shape
(batch, steps, features)
while “channels_first” corresponds to inputs with shape(batch, features, steps)
. It defaults to theimage_data_format
value found in your Keras config file at~/.keras/keras.json
. If you never set it, then it will be “channels_last”.- dilation_rate
int
ortuple
ofint
orlist
ofint
, optional An integer or tuple/list of a single integer, specifying the dilation rate to use for dilated convolution. Currently, specifying any
dilation_rate
value != 1 is incompatible with specifying anystrides
value != 1. Default is 1.- activation
callable()
orstr
, optional Activation function to use. Default is no activation (ie. “linear” activation:
a(x) = x
).- use_biasbool
Whether the layer uses a bias.
- kernel_initializer
Initializer
orstr
, optional Initializer for the convolution
kernel
. Default is “glorot_uniform” initialization.- bias_initializer
Initializer
orstr
, optional Initializer for the bias vector. Default is
None
.- kernel_regularizer
Regularizer
orstr
, optional Regularizer function applied to the convolution
kernel
. Default isNone
.- bias_regularizer
Regularizer
orstr
, optional Regularizer function applied to the bias vector. Default is
None
.- activity_regularizer
Regularizer
orstr
, optional Regularizer function applied to the output of the layer. Default is
None
.- kernel_constraint
Constraint
orstr
, optional Constraint function applied to the convolution
kernel
. Default isNone
.- bias_constraint
Constraint
orstr
, optional Constraint function applied to the bias vector. Default is
None
.
- filters
Notes
- Input shape
3D tensor with shape
(samples, features, steps)
ifdata_format
is “channels_first” or shape(samples, steps, features)
ifdata_format
is “channels_last”.- Output shape
3D tensor with shape
(samples, filters, new_steps)
ifdata_format
is “channels_first” or shape(samples, new_steps, filters)
ifdata_format
is “channels_last”.new_steps
value might be different fromsteps
due to padding.