Skip to content

SubBoxCNNPooler

One dimension CNN encoding multi-kernel layer. Input embeddings are convoluted using linear kernels each parametrized with a (window) size of kernel_size[kernel_i] The output of the kernels are concatenated together, max-pooled and finally projected to a size of output_size.

Parameters

PARAMETER DESCRIPTION
pipeline

Pipeline instance

TYPE: Pipeline DEFAULT: None

name

Name of the component

TYPE: str DEFAULT: 'sub-box-cnn-pooler'

output_size

Size of the output embeddings Defaults to the input_size

TYPE: Optional[int] DEFAULT: None

out_channels

Number of channels

TYPE: Optional[int] DEFAULT: None

kernel_sizes

Window size of each kernel

TYPE: Sequence[int] DEFAULT: (3, 4, 5)

activation

Activation function to use

TYPE: ActivationFunction DEFAULT: 'relu'