phlower.nn.DeepSets¶
- class phlower.nn.DeepSets(lambda_config, gamma_config, last_activation_name, pool_operator_name, unbatch_key=None)[source]¶
Bases:
IPhlowerCoreModule
,Module
DeepSets is a neural network module that performs permutation invariant / equivariant operation on the input tensor.
Ref: https://arxiv.org/abs/1703.06114
- Parameters:
lambda_config (MLPConfiguration) – Configuration for the lambda network.
gamma_config (MLPConfiguration) – Configuration for the gamma network.
last_activation_name (str) – Name of the last activation function.
pool_operator_name (str) – Name of the pooling operator. “max” or “mean”. Default is “max”.
unbatch_key (str | None) – Key of the unbatch operation.
Methods
forward
(data, *[, field_data])forward function which overloads torch.nn.Module
from_setting
(setting)Create DeepSets from setting object
Return name of DeepSets
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: