-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement simple training test. (#203)
Only runs the training, no actual check except no crashes. For #198
- Loading branch information
Showing
7 changed files
with
35 additions
and
5 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
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
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
File renamed without changes.
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,22 @@ | ||
|
||
import torch | ||
from PIL import Image | ||
from training.main import main | ||
import pytest | ||
import os | ||
os.environ["CUDA_VISIBLE_DEVICES"] = "" | ||
|
||
def test_training(): | ||
main([ | ||
'--save-frequency', '1', | ||
'--zeroshot-frequency', '1', | ||
'--dataset-type', "synthetic", | ||
'--train-num-samples', '16', | ||
'--warmup', '1', | ||
'--batch-size', '4', | ||
'--lr', '1e-3', | ||
'--wd', '0.1', | ||
'--epochs', '1', | ||
'--workers', '2', | ||
'--model', 'RN50' | ||
]) |