Belle II Software development
|
Public Member Functions | |
def | __init__ (self, nfeat_in_dim, efeat_in_dim, gfeat_in_dim, edge_classes=6, x_classes=7, hidden_layer_dim=128, num_hid_layers=1, num_ML=1, dropout=0.0, global_layer=True, **kwargs) |
def | forward (self, batch) |
Public Attributes | |
first_ML | |
First MetaLayer. | |
ML_list | |
Intermediate MetaLayers. | |
last_ML | |
Output MetaLayer. | |
Actual implementation of the model, based on the `MetaLayer <https://pytorch-geometric.readthedocs.io/en/latest/generated/torch_geometric.nn.models.MetaLayer.html>`_ class. .. seealso:: `Relational inductive biases, deep learning, and graph networks <https://arxiv.org/abs/1806.01261>`_ The network is composed of: 1. A first MetaLayer to increase the number of nodes and edges features; 2. A number of intermediate MetaLayers (tunable in config file); 3. A last MetaLayer to decrease the number of node and edge features to the desired output dimension. .. figure:: figs/graFEI.png :width: 42em :align: center Each MetaLayer is in turn composed of `EdgeLayer`, `NodeLayer` and `GlobalLayer` sub-blocks. Args: nfeat_in_dim (int): Node features dimension (number of input node features). efeat_in_dim (int): Edge features dimension (number of input edge features). gfeat_in_dim (int): Global features dimension (number of input global features). edge_classes (int): Edge features output dimension (i.e. number of different edge labels in the LCAS matrix). x_classes (int): Node features output dimension (i.e. number of different mass hypotheses). hidden_layer_dim (int): Intermediate features dimension (same for node, edge and global). num_hid_layers (int): Number of hidden layers in every MetaLayer. num_ML (int): Number of intermediate MetaLayers. dropout (float): Dropout rate :math:`r \\in [0,1]`. global_layer (bool): Whether to use global layer. :return: Node, edge and global features after model evaluation. :rtype: tuple(`Tensor <https://pytorch.org/docs/stable/tensors.html#torch.Tensor>`_)
Definition at line 15 of file geometric_network.py.
def __init__ | ( | self, | |
nfeat_in_dim, | |||
efeat_in_dim, | |||
gfeat_in_dim, | |||
edge_classes = 6 , |
|||
x_classes = 7 , |
|||
hidden_layer_dim = 128 , |
|||
num_hid_layers = 1 , |
|||
num_ML = 1 , |
|||
dropout = 0.0 , |
|||
global_layer = True , |
|||
** | kwargs | ||
) |
Initialization.
Definition at line 53 of file geometric_network.py.
def forward | ( | self, | |
batch | |||
) |
Called internally by PyTorch to propagate the input through the network.
Definition at line 179 of file geometric_network.py.
first_ML |
First MetaLayer.
Definition at line 73 of file geometric_network.py.
last_ML |
Output MetaLayer.
Definition at line 144 of file geometric_network.py.
ML_list |
Intermediate MetaLayers.
Definition at line 106 of file geometric_network.py.