summaryrefslogtreecommitdiff
path: root/torch/autograd
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2018-03-15 15:05:51 -0400
committerGitHub <noreply@github.com>2018-03-15 15:05:51 -0400
commit404b8e944208d205bbb88eaef166337980f67135 (patch)
treea6ef484d92611d40f66278b91acd0ce3f71d73de /torch/autograd
parenteee4f1ee4203d0b09f05efe86a0886d94ec857c5 (diff)
downloadpytorch-404b8e944208d205bbb88eaef166337980f67135.tar.gz
pytorch-404b8e944208d205bbb88eaef166337980f67135.tar.bz2
pytorch-404b8e944208d205bbb88eaef166337980f67135.zip
Revert "introduce size_as_tensor and resize_from_tensor" (#5818)
* Revert "introduce size_as_tensor and resize_from_tensor (#5792)" This reverts commit 4fa08535ed8c63f05c7e33ca6faa255c0bb5e93b.
Diffstat (limited to 'torch/autograd')
-rw-r--r--torch/autograd/variable.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/torch/autograd/variable.py b/torch/autograd/variable.py
index 0cfb583c91..db5f87818d 100644
--- a/torch/autograd/variable.py
+++ b/torch/autograd/variable.py
@@ -8,15 +8,6 @@ import warnings
import weakref
from torch._six import imap
from torch._C import _add_docstr
-import torch.onnx
-
-
-def _size_as_tensor(g, input):
- return g.op('Shape', input)
-
-
-def _resize_from_tensor(g, input, shape):
- return g.op('ReshapeDynamic', input, shape)
class Variable(_C._VariableBase):
@@ -268,15 +259,6 @@ class Variable(_C._VariableBase):
else:
return super(Variable, self).btrifact(pivot=pivot)
- @torch.onnx.symbolic_override(_size_as_tensor)
- def size_as_tensor(self):
- return torch.Tensor(tuple(self.size()))
-
- @torch.onnx.symbolic_override(_resize_from_tensor)
- def resize_from_tensor(self, size):
- from ._functions import Resize
- return Resize.apply(self, torch.Size(size()))
-
def resize(self, *sizes):
warnings.warn("non-inplace resize is deprecated")
from ._functions import Resize