-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
31 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
end-end test for mutual information regulation | ||
""" | ||
from tests.utils_test import utils_test_algo | ||
|
||
|
||
def test_miro2(): | ||
""" | ||
train with MIRO | ||
""" | ||
args = "--te_d=caltech --task=mini_vlcs --debug --bs=2 --model=erm \ | ||
--trainer=miro --nname=alexnet \ | ||
--layers2extract_feats _net_invar_feat.net_torchvision.features.1" | ||
utils_test_algo(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
end-end test for mutual information regulation | ||
""" | ||
import pytest | ||
from tests.utils_test import utils_test_algo | ||
|
||
|
||
def test_miro3(): | ||
""" | ||
train with MIRO | ||
""" | ||
args = "--te_d=caltech --task=mini_vlcs --debug --bs=2 --model=erm \ | ||
--trainer=miro --nname=alexnet \ | ||
--layers2extract_feats features" | ||
with pytest.raises(RuntimeError): | ||
utils_test_algo(args) | ||
raise RuntimeError("This is a runtime error") |