diff options
author | Gregory Chanan <gchanan@fb.com> | 2019-04-21 14:11:14 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2019-04-21 14:14:37 -0700 |
commit | 9eb48e1b0308aa255818ced641893968b77235d2 (patch) | |
tree | 84f92049e3f97d15fbcd765a3771857d73a12eda | |
parent | 67330374165c8647ac134c60ad6755bd4fc4efa4 (diff) | |
download | pytorch-9eb48e1b0308aa255818ced641893968b77235d2.tar.gz pytorch-9eb48e1b0308aa255818ced641893968b77235d2.tar.bz2 pytorch-9eb48e1b0308aa255818ced641893968b77235d2.zip |
Make one_hot non-differentiable. (#19524)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/19524
ghimport-source-id: ceda3ad43471242ebbd272a21de11731c7d8bef6
Differential Revision: D15021417
Pulled By: gchanan
fbshipit-source-id: 65d1f17a32f81f47dba5e58e343d0b7b828e1d51
-rw-r--r-- | tools/autograd/derivatives.yaml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/autograd/derivatives.yaml b/tools/autograd/derivatives.yaml index 563765678f..11a608a84d 100644 --- a/tools/autograd/derivatives.yaml +++ b/tools/autograd/derivatives.yaml @@ -817,6 +817,9 @@ - name: t(Tensor self) self: grad.t() +- name: one_hot(Tensor self, int64_t num_classes) + self: non_differentiable + - name: flip(Tensor self, IntArrayRef dims) self: grad.flip(dims) |