dgs.models.combine.combine.CombineSimilaritiesModule

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

Given two or more similarity matrices, combine them into a single similarity matrix.

Params

Optional Params

softmax (bool, optional):

Whether to compute the softmax along the last dimension of the resulting weighted similarity matrix. Default DEF_VAL.combine.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(*args, **kwargs)

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