mlreco.models.layers.gnn.encoders.geometric module

class mlreco.models.layers.gnn.encoders.geometric.ClustGeoNodeEncoder(model_config, batch_col=0, coords_col=(1, 4))[source]

Bases: torch.nn.modules.module.Module

Produces geometric cluster node features.

The first 19 features are composed of:
  • Center (3)

  • Covariance matrix (9)

  • Principal axis (3)

  • Voxel count (1)

  • Mean energy (1)

  • RMS energy (1)

  • Semantic type (1), i.e. most represented type in cluster

6 features for the end points (duplicated for shower,

randomly ordered for tracks)

3 features for direction estimate (mean direction w.r.t. start point)

Total of 28 hand-engineered features

__init__(model_config, batch_col=0, coords_col=(1, 4))[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(data, clusts)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

__module__ = 'mlreco.models.layers.gnn.encoders.geometric'
training: bool
class mlreco.models.layers.gnn.encoders.geometric.ClustGeoEdgeEncoder(model_config, batch_col=0, coords_col=(1, 4))[source]

Bases: torch.nn.modules.module.Module

Produces geometric cluster edge features.

__init__(model_config, batch_col=0, coords_col=(1, 4))[source]

Initializes internal Module state, shared by both nn.Module and ScriptModule.

forward(data, clusts, edge_index)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

__module__ = 'mlreco.models.layers.gnn.encoders.geometric'
training: bool