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 the SimilarityModule s used in this module.

combine (NodePath):

The name or NodePath of the key in the current configuration containing the parameters for the CombineSimilaritiesModule 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()

Terminate the DGS module and delete the torch modules.

validate_params(validations[, attrib_name])

Given per key validations, validate this module's parameters.

Attributes

device

Get the device of this module.

is_training

Get whether this module is set to training-mode.

module_name

Get the name of the module.

module_type

name

Get the name of the module.

name_safe

Get the escaped name of the module usable in filepaths by replacing spaces and underscores.

precision

Get the (floating point) precision used in multiple parts of this module.

sim_mods

combine

new_track_weight