Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
TorchJD
Light Logo Dark Logo

Getting Started

  • Installation
  • Examples
    • Basic Usage
    • Instance-Wise Risk Minimization (IWRM)
    • Partial Jacobian Descent for IWRM
    • Multi-Task Learning (MTL)
    • Instance-Wise Multi-Task Learning (IWMTL)
    • Recurrent Neural Network (RNN)
    • Monitoring aggregations
    • PyTorch Lightning Integration
    • Automatic Mixed Precision (AMP)
    • Grouping

API Reference

  • autogram
    • Engine
  • autojac
    • backward
    • mtl_backward
    • jac
    • jac_to_grad
  • aggregation
    • UPGrad
    • Aligned-MTL
    • CAGrad
    • ConFIG
    • Constant
    • CR-MOGM
    • DualProj
    • FairGrad
    • GradDrop
    • GradVac
    • IMTL-G
    • Krum
    • Mean
    • MGDA
    • Nash-MTL
    • PCGrad
    • Random
    • Sum
    • Trimmed Mean
  • scalarization
    • Constant
    • Mean
    • Random
    • Sum
  • linalg
    • Matrix
    • PSDMatrix
    • Dual Cone Projectors
Back to top
View this page

Random¶

class torchjd.scalarization.Random[source]¶

Scalarizer that combines the input tensor of values with positive random weights summing to 1, as defined in Algorithm 2 of Reasonable Effectiveness of Random Weighting: A Litmus Test for Multi-Task Learning.

__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

Next
Sum
Previous
Mean
Copyright © SimplexLab, Valerian Rey, Pierre Quinton
Made with Sphinx and @pradyunsg's Furo