Belle II Software development
|
basf2 (Belle II Analysis Software Framework) # Author: The Belle II Collaboration # # See git log for contributors and copyright holders. More...
Functions | |
Type | _get_model_cls (str model) |
Helper function that imports and returns the class Model from the Python module named as model and assumed to be located in the package pxd.background_generator.models . | |
Callable | _get_generate_func (str model) |
Helper function that imports and returns the function generate from the Python module named as model and assumed to be located in the package pxd.background_generator.models . | |
Variables | |
tuple | MODELS |
Container for names of generator models that are available for selection. | |
basf2 (Belle II Analysis Software Framework) # Author: The Belle II Collaboration # # See git log for contributors and copyright holders.
# This file is licensed under LGPL-3.0, see LICENSE.md. #
This package encapsulates different generator models that can be selected to generate digits in the PXD background generator module.
|
protected |
Helper function that imports and returns the function generate
from the Python module named as model
and assumed to be located in the package pxd.background_generator.models
.
An error is raised if the Python module named as model
:
generate
.model | Model name and the name of the corresponding Python module implementing the model |
Definition at line 55 of file __init__.py.
|
protected |
Helper function that imports and returns the class Model
from the Python module named as model
and assumed to be located in the package pxd.background_generator.models
.
An error is raised if the Python module named as model
:
Model
.model | Model name and the name of the corresponding Python module implementing the model |
Definition at line 31 of file __init__.py.
tuple MODELS |
Container for names of generator models that are available for selection.
Each model name is assumed to match a corresponding Python module that is located in the package pxd.background_generator.models
and implements the specific model, i.e. defines a:
Model
,generate
.The class Model
must inherit from the base class torch.nn.Module
.
The generation function generate
specific to a model is assumed to act on a model instance and produce an output of type torch.Tensor
that is of shape (40, 250, 768)
and contains values of type torch.uint8
in the interval . Each index in the first axis of the output tensor is assumed to correspond to the PXD sensor specified by the VxdID
arguments in pxd.background_generator.VXDID_ARGS
at the same index.
Definition at line 86 of file __init__.py.