Add CI for Super Resolution example and tqdm bar to the example#2899
Add CI for Super Resolution example and tqdm bar to the example#2899vfdev-5 merged 38 commits intopytorch:masterfrom
Conversation
examples/super_resolution/main.py
Outdated
|
|
||
| class SRDataset(torch.utils.data.Dataset): | ||
| def __init__(self, dataset, scale_factor, crop_size=256): | ||
| def __init__(self, dataset, scale_factor, crop_size=180): |
There was a problem hiding this comment.
If you tweak this value for CI, let's make it as a parameter and keep default as 256
There was a problem hiding this comment.
ok let me do that
There was a problem hiding this comment.
Hey @vfdev-5 , Actually I tested it again and it may not work for crop_size=256 always as some images may have a lower size than 200 pixels. So I have made it an argument of main.py that can be variable depending upon the choice of dataset for training and the upscale_factor
There was a problem hiding this comment.
Thanks for the PR @guptaaryan16
Can you retrain a bit longer a mode and add to the example README a matplotlib image of super-resolved CIFAR10 image vs bicubic upsampled image (similar to Colab).
Please also add a debug arg option to reduce dataset size to 5 train batches and run this example in debug mode to reduce CI time. Currently it takes around 3 minutes, we have to reduce that.
examples/super_resolution/main.py
Outdated
| print("Checkpoint saved to {}".format(model_out_path)) | ||
|
|
||
|
|
||
| ProgressBar().attach(trainer) |
There was a problem hiding this comment.
Let's remove log_training_loss handler and update ProgressBar options to display similar things.
|
Hey @vfdev-5 please review |
|
Hey @vfdev-5 I have added the BasicProfileHandler and reduced the time of |
vfdev-5
left a comment
There was a problem hiding this comment.
Looks good, thanks @guptaaryan16
Just few improvements in the readme and good to go
|
Hey @vfdev-5 I have made the relevant changes in README.md |
vfdev-5
left a comment
There was a problem hiding this comment.
LGTM, thanks @guptaaryan16 !
Fixes #2885
Description: I have added the SR example to CI and it works on the unit tests
Check list: