Skip to content

Commit

Permalink
fix: HuberLoss workaround added (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
bagxi committed Jun 16, 2021
1 parent f69c292 commit dfb8d32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Engine hotfix for `predict_loader` ([#1235](https://github.com/catalyst-team/catalyst/pull/1235))
- ([#1230](https://github.com/catalyst-team/catalyst/pull/1230))
- Hydra hotfix due to `1.1.0` version changes
- `HuberLoss` name conflict for pytorch 1.9 hotfix ([#1239](https://github.com/catalyst-team/catalyst/pull/1239))


## [21.05] - YYYY-MM-DD
Expand Down
6 changes: 5 additions & 1 deletion catalyst/contrib/nn/criterion/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# flake8: noqa

import torch
from torch.nn.modules.loss import *

from catalyst.contrib.nn.criterion.ce import (
Expand All @@ -22,7 +23,10 @@
GradientPenaltyLoss,
MeanOutputLoss,
)
from catalyst.contrib.nn.criterion.huber import HuberLoss

if torch.__version__ < "1.9":
from catalyst.contrib.nn.criterion.huber import HuberLoss

from catalyst.contrib.nn.criterion.iou import IoULoss
from catalyst.contrib.nn.criterion.trevsky import TrevskyLoss, FocalTrevskyLoss
from catalyst.contrib.nn.criterion.lovasz import (
Expand Down

0 comments on commit dfb8d32

Please sign in to comment.