Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

all_losses.py 943 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  1. from torch import nn
  2. from super_gradients.common.object_names import Losses
  3. from super_gradients.training.losses import (
  4. LabelSmoothingCrossEntropyLoss,
  5. ShelfNetOHEMLoss,
  6. ShelfNetSemanticEncodingLoss,
  7. RSquaredLoss,
  8. SSDLoss,
  9. BCEDiceLoss,
  10. YoloXDetectionLoss,
  11. YoloXFastDetectionLoss,
  12. KDLogitsLoss,
  13. DiceCEEdgeLoss,
  14. )
  15. from super_gradients.training.losses.stdc_loss import STDCLoss
  16. LOSSES = {
  17. Losses.CROSS_ENTROPY: LabelSmoothingCrossEntropyLoss,
  18. Losses.MSE: nn.MSELoss,
  19. Losses.R_SQUARED_LOSS: RSquaredLoss,
  20. Losses.SHELFNET_OHEM_LOSS: ShelfNetOHEMLoss,
  21. Losses.SHELFNET_SE_LOSS: ShelfNetSemanticEncodingLoss,
  22. Losses.YOLOX_LOSS: YoloXDetectionLoss,
  23. Losses.YOLOX_FAST_LOSS: YoloXFastDetectionLoss,
  24. Losses.SSD_LOSS: SSDLoss,
  25. Losses.STDC_LOSS: STDCLoss,
  26. Losses.BCE_DICE_LOSS: BCEDiceLoss,
  27. Losses.KD_LOSS: KDLogitsLoss,
  28. Losses.DICE_CE_EDGE_LOSS: DiceCEEdgeLoss,
  29. }
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...