gt4sd.frameworks.granular.ml.models.loss module

Losses for granular models.

Summary

Classes:

MSLELossNegMix9

MSLE loss negative mix 9.

MSLELossNegMix91

MSLE loss negative mix 91.

MSLELossNegMix92

MSLE loss negative mix 92.

MSLELossNegMix99

MSLE loss negative mix 99.

MaeWithNans

MAE with NaNs handling.

MseWithNans

MSE with NaNs handling.

Reference

class MSLELossNegMix9[source]

Bases: Module

MSLE loss negative mix 9.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MSLE loss negative mix 9.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'
class MSLELossNegMix91[source]

Bases: Module

MSLE loss negative mix 91.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MSLE loss negative mix 91.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'
class MseWithNans[source]

Bases: Module

MSE with NaNs handling.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MSE with NaNs handling.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'
class MaeWithNans[source]

Bases: Module

MAE with NaNs handling.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MAE with NaNs handling.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'
class MSLELossNegMix92[source]

Bases: Module

MSLE loss negative mix 92.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MSLE loss negative mix 92.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'
class MSLELossNegMix99[source]

Bases: Module

MSLE loss negative mix 99.

__init__()[source]

Initialize the loss.

forward(prediction, target)[source]

Forward pass in the loss.

Parameters
  • prediction (Tensor) – predictions.

  • target (Tensor) – groundtruth.

Return type

Any

Returns

loss value.

__annotations__ = {}
__doc__ = 'MSLE loss negative mix 99.'
__module__ = 'gt4sd.frameworks.granular.ml.models.loss'