Mean

class torchjd.scalarization.Mean[source]

Scalarizer that returns the mean of the input tensor of values.

__call__(values, /)[source]

Computes the scalar value from the input tensor of values and applies all registered hooks.

Parameters:

values (Tensor) – The tensor of values to scalarize. May be of any shape.

Return type:

Tensor