phlower.nn.SPMM¶
- class phlower.nn.SPMM(factor, support_name, transpose=False, **kwards)[source]¶
Bases:
Module
,IPhlowerCoreModule
Sparse Matrix Multiplication Network
- Parameters:
factor (float) – Factor to multiply the support matrix.
support_name (str) – Name of the support matrix.
transpose (bool) – Whether to transpose the support matrix.
Examples
>>> spmm = SPMM(factor=1.0, support_name="support", transpose=False) >>> spmm(data)
Methods
forward
(data, *, field_data, **kwards)forward function which overload torch.nn.Module
from_setting
(setting)Create SPMM from SPMMSetting instance
Return neural network name
Attributes
T_destination
call_super_init
dump_patches
training
- forward(data, *, field_data, **kwards)[source]¶
forward function which overload torch.nn.Module
- Parameters:
data (IPhlowerTensorCollections) – IPhlowerTensorCollections data which receives from predecessors
field_data (ISimulationField) – ISimulationField | None Constant information through training or prediction
- Returns:
Tensor object
- Return type: