dgs.models.combine.static.StaticAlphaCombine

class dgs.models.combine.static.StaticAlphaCombine(*args: Any, **kwargs: Any)[source]

Weight two or more similarity matrices using constant (float) values for alpha.

Params

alpha (list[float]):

A list containing the constant weights for the different similarities. The weights should be probabilities and therefore sum to one and lie within [0..1].

__init__(*args, **kwargs)

Methods

configure_torch_module(module[, train])

Set compute mode and send model to the device or multiple parallel devices if applicable.

forward(*tensors, **_kwargs)

Given alpha from the configuration file and args of the same length, multiply each alpha with each matrix and compute the sum.

terminate()

Terminate this module and all of its submodules.

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.

softmax