phlower.nn.EnEquivariantTCNΒΆ

class phlower.nn.EnEquivariantTCN(nodes, kernel_sizes, dilations, activations, bias=True, dropouts=None, create_linear_weight=True)[source]ΒΆ

Bases: Module, IPhlowerCoreModule

EnEquivariantTCN is a neural network module that performs an E(n)-equivariant operation on the time series input tensors.

Parameters:
  • nodes (list[int]) – List of feature dimension sizes (The last value of tensor shape).

  • kernel_sizes (list[int]) – List of kernel sizes.

  • dilations (list[int]) – List of dilations.

  • activations (list[str]) – List of activation functions.

  • bias (bool) – Whether to use bias.

  • dropouts (list[float] | None (optional)) – List of dropout rates.

  • create_linear_weight (bool) – Whether to create a linear weight. Default is True.

Examples

>>> en_equivariant_tcn = EnEquivariantTCN(
...     nodes=[10, 20, 30],
...     kernel_sizes=[3, 3, 3],
...     dilations=[1, 2, 4],
...     activations=["relu", "relu", "relu"],
...     bias=True,
...     dropouts=[0.1, 0.1, 0.1],
...     create_linear_weight=True)
>>> en_equivariant_tcn(data)

Methods

forward(data, *[, field_data])

forward function which overloads torch.nn.Module

from_setting(setting)

Generate model from setting object

get_nn_name()

Return neural network name

Attributes

T_destination

call_super_init

dump_patches

training

forward(data, *, field_data=None, **kwards)[source]ΒΆ

forward function which overloads torch.nn.Module

Parameters:
  • data (IPhlowerTensorCollections) – IPhlowerTensorCollections data which receives from predecessors

  • field_data (ISimulationField | None) – ISimulationField | None Constant information through training or prediction

Returns:

Tensor object

Return type:

PhlowerTensor

classmethod from_setting(setting)[source]ΒΆ

Generate model from setting object

Parameters:

setting (EnEquivariantMLPSetting) – setting object

Returns:

EnEquivariantTCN object

Return type:

EnEquivariantTCN

classmethod get_nn_name()[source]ΒΆ

Return neural network name

Returns:

name

Return type:

str