Skip to content

Commit

Permalink
Update test_observer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun authored Oct 8, 2023
1 parent 4deb022 commit ed209dd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,23 @@ def test_deepall():
del exp
torch.cuda.empty_cache()
gc.collect()


def test_deepall_trloss():
"""
unit deep all
"""
parser = mk_parser_main()
margs = parser.parse_args(["--te_d", "caltech",
"--task", "mini_vlcs",
"--aname", "deepall", "--bs", "2",
"--nname", "conv_bn_pool_2",
"--msel", "loss_tr"
])
exp = Exp(margs)
exp.trainer.before_tr()
exp.trainer.tr_epoch(0)
exp.trainer.observer.update(True)
del exp
torch.cuda.empty_cache()
gc.collect()

0 comments on commit ed209dd

Please sign in to comment.