GeometricMean

class torchjd.scalarization.GeometricMean[source]

Scalarizer that returns the geometric mean of the input tensor of values, as studied in MultiNet++: Multi-Stream Feature Aggregation and Geometric Loss Strategy for Multi-Task Learning.

This method is also known as GLS (Geometric Loss Strategy).

__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