Coverage for polytorch/enums.py : 100.00%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from enum import Enum
2import torch.nn.functional as F
5class ContinuousLossType(Enum):
6 L1_LOSS = 0
7 MSE_LOSS = 1
8 SMOOTH_L1_LOSS = 2
11class BinaryLossType(Enum):
12 CROSS_ENTROPY = 0
13 IOU = 1
14 DICE = 2
17class CategoricalLossType(Enum):
18 CROSS_ENTROPY = 0
19 DICE = 1
20 # TODO: Focal Loss
21 # TODO Wasserstein distance (Earth mover loss)