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
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: