Skip to content

Commit

Permalink
add test for start_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
ckkelvinchan committed Sep 23, 2021
1 parent 64a93b3 commit 6414162
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_models/test_restorers/test_real_esrgan.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ def test_real_esrgan():
assert torch.is_tensor(outputs['results']['output'])
assert outputs['results']['output'].size() == (1, 3, 128, 128)

# test disc_steps and disc_init_steps
# test disc_steps and disc_init_steps and start_iter
data_batch = {
'lq': inputs.cpu(),
'gt': targets.cpu(),
'gt_unsharp': targets.cpu()
}
train_cfg = dict(disc_steps=2, disc_init_steps=2)
train_cfg = dict(disc_steps=2, disc_init_steps=2, start_iter=0)
restorer = build_model(model_cfg, train_cfg=train_cfg, test_cfg=test_cfg)
with patch.object(
restorer,
Expand Down

0 comments on commit 6414162

Please sign in to comment.