-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Documentation cleanup for activation functions #5457
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
Conversation
|
That looks great, but I think it would be much better to add scripts that can be used to generate the images at build time instead of checking them in to the repo as they are now. Can you please try that? This has a few benefits, like allowing us to change the style of the plots easily. Thanks! |
|
great improvements, thanks a lot. I dont think adding scripts used to generate the images at build-time is THAT necessary. If you have them lying around, it'd be great to check them in, but if not we'll make do what the images as-is. |
b368a76 to
ff06ba5
Compare
|
Thank you all for the feedback. I checked the script in. Being new to the project, I'm not familiar with build conventions. In particular, please let me know whether:
I personally prefer both the simplicity of just having the script but still having the images check in and not adding another build step:
|
|
Thanks a lot, this will be very useful.
It's generally best to avoid checking in images, because git is pretty bad at handling binary data (the repo size gets much larger, and everyone has to download the images).
|
|
I removed the images and added to the Regarding building docs locally, I'm more concerned about any local tools which interpret docstrings (IDEs, etc.). It'd be nice to have that just work. But half a meg is a decent chunk to add to a git repo, and that can grow if we decide to add illustrations more places. I take your point, though. For reference:
|
|
Oh I didn't see this PR and wrote the RReLU doc myself in #5459 . I can remove my changes so these two PRs won't conflict (hopefully). However, I have two comments on the RReLU doc:
|
|
Also this is great improvement, thanks! |
|
@ssnl Good catch! That could have been embarrassing. I took formula from a source which divided by three rather than multiplying by 1/3. Fixed. "Where" is lower-case. The comma, in the interests of consensus, I added as you suggested. I think it is clearer without (and most parts of the documentation appear to omit it). I added on the second line, since otherwise it typeset very poorly (vertical center and far-right) |
apaszke
left a comment
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 great! Can you please revert the change of signature for nn.Threshold? Will be good to merge after that
torch/nn/modules/activation.py
Outdated
| """ | ||
|
|
||
| def __init__(self, threshold, value, inplace=False): | ||
| def __init__(self, threshold=0.0, value=0.0, inplace=False): |
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.
|
@pytorchbot test this please |
|
@pmitros Looks great, thanks! |
|
@ssnl I looked over your PR. On the whole, your text is better than mine. I apologize for not noticing you were working on it. I merged the text. Please feel free to tweak further in your PR. |
|
@pytorchbot test this please |
|
@pmitros It was my bad. :) Thanks for merging the text. I'll rebase my PR on top of yours when it is merged. |
|
@pytorchbot retest this please |
|
Thanks a lot @pmitros! |

This pull request improves documentation for the activation functions.
Specifically, it:
Potential issues: