netket.nn.MaskedDense1D#

class netket.nn.MaskedDense1D[source]#

Bases: Module

1D linear transformation module with mask for autoregressive NN.

Attributes
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#

output feature density, should be the last dimension.

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 weight matrix.

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

initializer for the bias.

Methods
__call__(inputs)[source]#

Applies a masked linear transformation to the inputs.

Parameters:

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

Return type:

Union[ndarray, Array]

Returns:

The transformed data.