-
Notifications
You must be signed in to change notification settings - Fork 7k
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
fix a bug described in issue #488 #489
Conversation
torchvision/transforms/transforms.py
Outdated
@@ -377,6 +378,13 @@ def __init__(self, size, padding=0, pad_if_needed=False): | |||
self.size = (int(size), int(size)) | |||
else: | |||
self.size = size | |||
|
|||
if isinstance(padding, numbers.Number): |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@KovenYu hi, wonder if you had time to make the changes yet |
@soumith Hi, that's my pleasure and I've been excited to have this chance... but I'm not familiar with Github's work flow.. shall I open a new PR, or can I directly modify in this PR? thanks |
@KovenYu you can actually just commit to your fork's branch |
@vfdev-5 oh I got it. it works. thank you man! :) |
@KovenYu you're welcome! Could you also please improve the docs of |
@vfdev-5 thank you! yes I'm glad to; I was just not sure whether I could do that :) would you please review it? |
@KovenYu looks good! Just remarked that |
@vfdev-5 thx! sry I'm not quite sure what you mean.. what do you mean by "padding_mode has been merged"? do you mean there was some merging in the master branch, so I should make some adaptive changes? though I checked the master branch and seemed that my fork is aligned with it in RandomCrop and pad.. |
@vfdev-5 got it. fairly reasonable! let's just do it and see what they say. |
In addition, there are some conflicts that should be addressed before we can merge this. |
@fmassa yeah. done. |
@pytorchbot retest this please |
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!
my pleasure! |
* fix a bug described in issue pytorch#488 * improve doc described in issue pytorch#488 * add arguments in RandomCrop as proposed by vfdev-5 in PR pytorch#489
#488