phlower.nn.Share

class phlower.nn.Share(reference_name, **kwards)[source]

Bases: IPhlowerCoreModule, Module

Share module have same operations as the reference module.

Parameters:

reference_name (str) – Name of the reference module.

Notes

Share module is a reference to another module. Share module itself does not have any trainable parameters.

Methods

forward(data, *[, field_data])

forward function which overload torch.nn.Module

from_setting(setting)

get_nn_name()

Attributes

T_destination

call_super_init

dump_patches

training

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

forward function which overload 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