DomainLab
DomainLab copied to clipboard
Fbopt
Codecov Report
Attention: Patch coverage is 63.17241% with 267 lines in your changes are missing coverage. Please review.
Project coverage is 91.33%. Comparing base (
1577a7e) to head (7bdf2ef). Report is 58 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #462 +/- ##
==========================================
- Coverage 95.15% 91.33% -3.83%
==========================================
Files 127 135 +8
Lines 4994 5699 +705
==========================================
+ Hits 4752 5205 +453
- Misses 242 494 +252
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 91.33% <63.17%> (-3.83%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
now this branch contains old code https://github.com/marrlab/DomainLab/tree/fbopt_depreciated
diff --git a/domainlab/models/a_model_classif.py b/domainlab/models/a_model_classif.py index 470f0e6d..1917f752 100644 --- a/domainlab/models/a_model_classif.py +++ b/domainlab/models/a_model_classif.py @@ -18,6 +18,13 @@ from domainlab.utils.perf_metrics import PerfMetricClassif from domainlab.utils.utils_class import store_args from domainlab.utils.utils_classif import get_label_na, logit2preds_vpic
+try:
- from backpack import extend +except:
- backpack = None
+loss_cross_entropy_extended = extend(nn.CrossEntropyLoss(reduction="none")) +