Add buffers(), named_buffers() methods.#10554
Add buffers(), named_buffers() methods.#10554jma127 wants to merge 1 commit intopytorch:masterfrom jma127:named_buffers
buffers(), named_buffers() methods.#10554Conversation
|
don't forget tests! |
|
Yep, adding as we speak :) |
buffers(), named_buffers() methods.buffers(), named_buffers() methods.
torch/nn/modules/module.py
Outdated
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.
torch/nn/modules/module.py
Outdated
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.
torch/nn/modules/module.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/nn/modules/module.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
LGTM, but please let's remove the stuff that you kept for backwards compatibility. All those functions were implementation details, and we shouldn't keep them around for the sake of code clarity. |
|
Got it, will do. |
This commit adds the ``buffers()`` and ``named_buffers()`` methods as analogues of ``parameters()`` and ``named_parameters()``.
facebook-github-bot
left a comment
There was a problem hiding this comment.
SsnL has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please |
This commit adds the
buffers()andnamed_buffers()methods asanalogues of
parameters()andnamed_parameters().