EncoderNetwork

class EncoderNetwork(kernel_size=None, n_filters=None, dropout_proba=0.2, max_pool_size=2, activation='sigmoid', padding='same', strides=1, fc_units=256)[source]

Establish the network structure for an Encoder.

Adapted from the implementation used in [1]

Parameters:
kernel_sizearray of int, default = [5, 11, 21]

Specifies the length of the 1D convolution windows.

n_filtersarray of int, default = [128, 256, 512]

Specifying the number of 1D convolution filters used for each layer, the shape of this array should be the same as kernel_size.

max_pool_sizeint, default = 2

Size of the max pooling windows.

activationstring, default = sigmoid

Keras activation function.

dropout_probafloat, default = 0.2

specifying the dropout layer probability.

paddingstring, default = “same”

Specifying the type of padding used for the 1D convolution.

stridesint, default = 1

Specifying the sliding rate of the 1D convolution filter.

fc_unitsint, default = 256

Specifying the number of units in the hiddent fully connected layer used in the EncoderNetwork.

Notes

Adapted from source code https://github.com/hfawaz/dl-4-tsc/blob/master/classifiers/encoder.py

References

[1]

Serrà et al. Towards a Universal Neural Network Encoder for Time Series

In proceedings International Conference of the Catalan Association for Artificial Intelligence, 120–129 2018.

Methods

build_network(input_shape, **kwargs)

Construct a network and return its input and output layers.

build_network(input_shape, **kwargs)[source]

Construct a network and return its input and output layers.

Parameters:
input_shapetuple

The shape of the data fed into the input layer.

Returns:
input_layera keras layer
output_layera keras layer