phlower.nn.Pooling

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

Bases: IGenericPhlowerCoreModule[IPhlowerLayerParameters, PhlowerTensor], Module

Pooling is a layer to perform pooling in the specified dimension.

Parameters:
  • nodes (list[int]) – List of feature dimension sizes (The last value of tensor shape).

  • unbatch_key (str | None) – Key of the unbatch operation.

  • pooling_dimension (int | None) – Dimension to perform pooling. By default, the dimension of vertex is used.

  • pool_operator_name (str)

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

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