Skip to content

🏭 Preprocessing Layers Factory

You can find all available layers in the PreprocessorLayerFactory class:

cast_to_float32_layer(name='cast_to_float32', **kwargs) staticmethod

Create a CastToFloat32Layer layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'cast_to_float32'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the CastToFloat32Layer layer.

create_layer(layer_class, name=None, **kwargs) staticmethod

Create a layer using the layer class name, automatically filtering kwargs based on the layer class.

Parameters:

Name Type Description Default
layer_class str | Class Object

The name of the layer class to be created (e.g., 'Normalization', 'Rescaling') or the class object itself.

required
name str

The name of the layer. Optional.

None
**kwargs

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the specified layer class.

date_encoding_layer(name='date_encoding_layer', **kwargs) staticmethod

Create a DateEncodingLayer layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'date_encoding_layer'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the DateEncodingLayer layer.

date_parsing_layer(name='date_parsing_layer', **kwargs) staticmethod

Create a DateParsingLayer layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'date_parsing_layer'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the DateParsingLayer layer.

date_season_layer(name='date_season_layer', **kwargs) staticmethod

Create a SeasonLayer layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'date_season_layer'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the SeasonLayer layer.

text_preprocessing_layer(name='text_preprocessing', **kwargs) staticmethod

Create a TextPreprocessingLayer layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'text_preprocessing'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the TextPreprocessingLayer layer.

transformer_block_layer(name='transformer', **kwargs) staticmethod

Create a TransformerBlock layer.

Parameters:

Name Type Description Default
name str

The name of the layer.

'transformer'
**kwargs dict

Additional keyword arguments to pass to the layer constructor.

{}

Returns:

Type Description
Layer

An instance of the TransformerBlock layer.