phlower.nn.MLP¶
- class phlower.nn.MLP(nodes, activations=None, dropouts=None, bias=True)[source]¶
Bases:
IPhlowerCoreModule
,Module
Multi Layer Perceptron
Methods
forward
(data, *[, field_data, supports])forward function which overloads torch.nn.Module
from_setting
(setting)Generate MLP from setting object
Return neural network name
Attributes
T_destination
call_super_init
dump_patches
training
- Parameters:
nodes (list[int])
activations (list[str] | None)
dropouts (list[float] | None)
bias (bool)
- forward(data, *, field_data=None, supports=None, **kwards)[source]¶
forward function which overloads torch.nn.Module
- Parameters:
data (IPhlowerTensorCollections) – data which receives from predecessors
supports (dict[str, PhlowerTensor], optional) – Graph object. Defaults to None.
field_data (ISimulationField | None)
- Returns:
Tensor object
- Return type: