dgs.models.dgs.dgs.DGSModule¶
- class dgs.models.dgs.dgs.DGSModule(*args: Any, **kwargs: Any)[source]¶
Torch module containing the code for the model called ‘dynamically gated similarities’.
Params¶
- names (list[NodePath]):
The names or
NodePath
s of the keys within the current configuration which contain all theSimilarityModule
s used in this module.- combine (NodePath):
The name or
NodePath
of the key in the current configuration containing the parameters for theCombineSimilaritiesModule
used to combine the similarities.
Optional Params¶
- new_track_weight (float, optional):
The weight of the new tracks as probability. “0.0” means, that existing tracks will always be preferred, while “1.0” means that new tracks are preferred. Default
DEF_VAL.dgs.similarity_softmax
.
- __init__(config: dict[str, any], path: list[str])[source]¶
Methods
configure_torch_module
(module[, train])Set compute mode and send model to the device or multiple parallel devices if applicable.
forward
(ds, target, **kwargs)Given a State containing the current detections and a target, compute the similarity between every pair.
Terminate the DGS module and delete the torch modules.
validate_params
(validations[, attrib_name])Given per key validations, validate this module's parameters.
Attributes
Get the device of this module.
Get whether this module is set to training-mode.
Get the name of the module.
Get the name of the module.
Get the escaped name of the module usable in filepaths by replacing spaces and underscores.
Get the (floating point) precision used in multiple parts of this module.