Implementing Matrix Norm for torch.norm#11261
Implementing Matrix Norm for torch.norm#11261yya007-zz wants to merge 1 commit intopytorch:masterfrom
Conversation
|
This PR applied the comments in the # 10722 and redesigned the norm function. The internal reviewer could check T28601904 for details. |
facebook-github-bot
left a comment
There was a problem hiding this comment.
yya007 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
I'm a bit uncertain if this is the way we want to support parameter-based choice of norm. @ssnl, you've thought about this before; should we start supporting strings for selecting this sort of thing? Should we block this until enums work? |
|
@ezyang Yes enum support would be ideal. However, let's not block this bootcamp task for that, because afaik no one is actively working on that. Correct me if I am wrong though! :) |
ssnl
left a comment
There was a problem hiding this comment.
Can you also add relevant test to test_autograd to make sure that they are differentiable?
torch/functional.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.
torch/functional.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.
torch/functional.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/functional.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
f97623c to
99c0b96
Compare
|
@ssnl Autograd test was added. |
torch/functional.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.
torch/functional.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/functional.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
7f77dd9 to
cc0a7e0
Compare
|
@li-roy Thank you for the comments. I have resolved those. |
cc0a7e0 to
8286a67
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
facebook-github-bot
left a comment
There was a problem hiding this comment.
yya007 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please |
242637a to
6feaf2a
Compare
|
@pytorchbot retest this please |
facebook-github-bot
left a comment
There was a problem hiding this comment.
li-roy has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
6feaf2a to
757e6d8
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
yya007 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Currently, norm function only supports vector norm. This PR extends vector norm to matrix norm. Pull Request resolved: pytorch/pytorch#11261 Reviewed By: li-roy Differential Revision: D9652379 Pulled By: yya007 fbshipit-source-id: 519b3fb80b563c17c56a24675c7b0e46bf5a3a1c
Summary: Spruriously added in pytorch#11261 I had a PR to catch these automatically (pytorch#11279), but it had some issues passing on some CI environments but not others (e.g. for `test_nn_group_norm`), any ideas? Pull Request resolved: pytorch#11916 Differential Revision: D9992065 Pulled By: driazati fbshipit-source-id: 05cfa8ed9af939e8ffd5827847ee7bfe0be799b2
Currently, norm function only supports vector norm. This PR extends vector norm to matrix norm.