SR2LinearCombination

Source: models/common/LinearCombination.py

Calculate linear combination of multiple SR2 tensors as \(u = w_i v_i + b\) (Einstein summation assumed), where \(w_i\) are the weights, and \(v_i\) are the variables to be summed. \(b\) is a constant offset.

Inputs

frominput · SR2 · required

SR2 tensors to be summed

Outputs

tooutput · SR2 · required

The sum

Parameters

weightsparameter · Scalar · default 1

Per-input weight parameters. When the list is length 1, the single weight is broadcast across every from-variable.

offsetparameter · Scalar · default 0

The constant coefficient added to the final summation