1D convolution layer (e.g. temporal convolution).

Inherits From: Layer, Module

Used in the notebooks

Used in the guide Used in the tutorials

This layer creates a convolution kernel that is convolved with the layer input over a single spatial (or temporal) dimension to produce a tensor of outputs. If use_bias is True, a bias vector is created and added to the outputs. Finally, if activation is not None, it is applied to the outputs as well.

When using this layer as the first layer in a model, provide an input_shape argument (tuple of integers or None, e.g. (10, 128) for sequences of 10 vectors of 128-dimensional vectors, or (None, 128) for variable-length sequences of 128-dimensional vectors.


# The inputs are 128-length vectors with 10 timesteps, and the batch size