netket.nn.MaskedConv1D#

class netket.nn.MaskedConv1D[source]#

Bases: Module

1D convolution module with mask for autoregressive NN.

Attributes
feature_group_count: int = 1#

1).

Type:

if specified, divides the input features into groups (default

precision: Any = None#

numerical precision of the computation, see jax.lax.Precision for details.

use_bias: bool = True#

True).

Type:

whether to add a bias to the output (default

features: int#

number of convolution filters.

kernel_size: int#

length of the convolutional kernel.

kernel_dilation: int#

dilation factor of the convolution kernel.

exclusive: bool#

True if an output element does not depend on the input element at the same index.

kernel_init: Callable[[Any, Sequence[int], Any], Union[ndarray, Array]]#

initializer for the convolutional kernel.

bias_init: Callable[[Any, Sequence[int], Any], Union[ndarray, Array]]#

initializer for the bias.

Methods
__call__(inputs)[source]#

Applies a masked convolution to the inputs. For 1D convolution, there is not really a mask. We only need to apply appropriate padding.

Parameters:

inputs (Union[ndarray, Array]) – input data with dimensions (batch, length, features).

Return type:

Union[ndarray, Array]

Returns:

The convolved data.