-
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
2 changed files
with
37 additions
and
25 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,37 @@ | ||
""" | ||
unit and end-end test for deep all, mldg | ||
""" | ||
import pytest | ||
from tests.utils_test import utils_test_algo | ||
|
||
|
||
def test_erm_fbopt(): | ||
""" | ||
erm | ||
""" | ||
args = "--te_d=caltech --task=mini_vlcs --debug --bs=2 --model=erm \ | ||
--trainer=fbopt --nname=alexnet --epos=3 \ | ||
--no_dump" # pylint: disable=line-too-long | ||
with pytest.raises(RuntimeError): | ||
utils_test_algo(args) | ||
|
||
|
||
def test_irm_fbopt(): | ||
""" | ||
irm | ||
""" | ||
args = "--te_d=caltech --task=mini_vlcs --debug --bs=2 --model=erm \ | ||
--trainer=fbopt_irm --nname=alexnet --epos=3 \ | ||
--no_dump" # pylint: disable=line-too-long | ||
utils_test_algo(args) | ||
|
||
|
||
def test_forcesetpoint_fbopt(): | ||
""" | ||
diva | ||
""" | ||
args = "--te_d=0 --tr_d 1 2 --task=mnistcolor10 --bs=16 --model=jigen \ | ||
--trainer=fbopt --nname=conv_bn_pool_2 --epos=10 --es=0 \ | ||
--mu_init=0.00001 --coeff_ma_setpoint=0.5 \ | ||
--coeff_ma_output_state=0.99 --force_setpoint_change_once --no_dump" | ||
utils_test_algo(args) |