phlower.nn.Pooling

class phlower.nn.Pooling(pool_operator_name, nodes=None, unbatch_key=None)[source]

Bases: IGenericPhlowerCoreModule[IPhlowerLayerParameters, PhlowerTensor], Module

Methods

forward(data, *[, field_data])

forward function which overloads torch.nn.Module

from_setting(setting)

Create Pooling from setting object

get_nn_name()

Return name of Pooling

Attributes

T_destination

call_super_init

dump_patches

training

Parameters:
  • pool_operator_name (str)

  • nodes (list[int] | None)

  • unbatch_key (str | None)

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]

Create Pooling from setting object

Parameters:

setting (PoolingSetting) – setting object

Returns:

Pooling Module

Return type:

Pooling

classmethod get_nn_name()[source]

Return name of Pooling

Returns:

name

Return type:

str