-
-
Notifications
You must be signed in to change notification settings - Fork 617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CI for Super Resolution example and tqdm bar to the example #2899
Conversation
examples/super_resolution/main.py
Outdated
@@ -45,7 +47,7 @@ | |||
|
|||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok let me do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -145,4 +149,6 @@ def checkpoint(): | |||
print("Checkpoint saved to {}".format(model_out_path)) | |||
|
|||
|
|||
ProgressBar().attach(trainer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @guptaaryan16 !
Fixes #2885
Description: I have added the SR example to CI and it works on the unit tests
Check list: