phlower.nn.GCN

class phlower.nn.GCN(nodes, support_name, activations=None, dropouts=None, repeat=1, factor=1.0, bias=True)[source]

Bases: IPhlowerCoreModule, Module

Graph Convolutional Neural Network

Methods

forward(data, *, field_data, **kwards)

forward function which overload torch.nn.Module

from_setting(setting)

Create GCN from GCNSetting instance

get_nn_name()

Return neural network name

Attributes

T_destination

call_super_init

dump_patches

training

Parameters:
  • nodes (list[int])

  • support_name (str)

  • activations (list[str] | None)

  • dropouts (list[float] | None)

  • repeat (int)

  • factor (float)

  • bias (bool)

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

forward function which overload torch.nn.Module

Parameters:
  • data (IPhlowerTensorCollections) – data which receives from predecessors

  • supports (dict[str, PhlowerTensor]) – sparse tensor objects

  • field_data (ISimulationField)

Returns:

Tensor object

Return type:

PhlowerTensor

classmethod from_setting(setting)[source]

Create GCN from GCNSetting instance

Parameters:

setting (GCNSetting) – setting object for GCN

Returns:

GCN object

Return type:

GCN

classmethod get_nn_name()[source]

Return neural network name

Returns:

name

Return type:

str