Table of Contents

Class Conv1DLayer

Namespace
NeuralNetworks.Layers
Assembly
NeuralNetworks.dll

Represents a one-dimensional convolutional layer that applies multiple kernels to input data, enabling feature extraction in neural network models.

public class Conv1DLayer : Layer<float[,,], float[,,]>
Inheritance
Layer<float[,,], float[,,]>
Conv1DLayer
Inherited Members

Remarks

This layer is commonly used in sequence modeling tasks, such as time series analysis or natural language processing. The combination of kernels, kernel size, stride, and dilation allows for flexible feature extraction from one-dimensional data.

The input data is [batch, channels, length]. The output data is [batch, kernels, length].

Constructors

Conv1DLayer(int, int, ActivationFunction<float[,,], float[,,]>, ParamInitializer, Dropout3D?, bool, int?, int, int)

Represents a one-dimensional convolutional layer that applies multiple kernels to input data, enabling feature extraction in neural network models.

public Conv1DLayer(int kernels, int kernelLength, ActivationFunction<float[,,], float[,,]> activationFunction, ParamInitializer paramInitializer, Dropout3D? dropout = null, bool addBias = true, int? padding = null, int stride = 1, int dilatation = 1)

Parameters

kernels int

The number of convolution kernels to apply. Determines the depth of the output feature map. Must be a positive integer.

kernelLength int

The size of the convolution kernel. Specifies the width of each filter applied to the input data. Must be a positive integer.

activationFunction ActivationFunction<float[,,], float[,,]>

The activation function to apply after the convolution operation. Introduces non-linearity to the layer's output.

paramInitializer ParamInitializer

The initializer used to set the initial values of the layer's weights. Influences the starting point for training.

dropout Dropout3D

An optional dropout layer applied during training to reduce overfitting by randomly setting a fraction of input units to zero.

addBias bool
padding int?

The amount of zero-padding to add to the input. If not specified, the layer will use half of the kernel size as padding, ensuring that the output has the same width as the input. Must be a non-negative integer.

stride int

The stride of the convolution operation. Defines how many input positions the filter moves at each step. Must be a positive integer.

dilatation int

The dilation rate for the convolution. Expands the kernel by inserting spaces between elements, allowing for larger receptive fields.

Remarks

This layer is commonly used in sequence modeling tasks, such as time series analysis or natural language processing. The combination of kernels, kernel size, stride, and dilation allows for flexible feature extraction from one-dimensional data.

The input data is [batch, channels, length]. The output data is [batch, kernels, length].

Methods

CreateOperationListBuilder()

public override OperationListBuilder<float[,,], float[,,]> CreateOperationListBuilder()

Returns

OperationListBuilder<float[,,], float[,,]>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.