summaryrefslogtreecommitdiff
path: root/caffe2/operators/gather_op.h
diff options
context:
space:
mode:
authorJerry Zhang <jerryzh@fb.com>2018-10-24 14:30:17 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-10-24 14:34:45 -0700
commitbe43a0faa9e00896636b62bd7a9884ca4b22f423 (patch)
tree3f2cc1440e7880120d023cebf65022e9247c4902 /caffe2/operators/gather_op.h
parent07c0f4a097fdd37bd93d47dc775175ada4b66338 (diff)
downloadpytorch-be43a0faa9e00896636b62bd7a9884ca4b22f423.tar.gz
pytorch-be43a0faa9e00896636b62bd7a9884ca4b22f423.tar.bz2
pytorch-be43a0faa9e00896636b62bd7a9884ca4b22f423.zip
Tensor dims() -> sizes() (caffe2/operators) - 2/5 (#13029)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/13029 Codemod generated with clangr shard mode, 25 files per diff, for renaming dims() to sizes() Reviewed By: ezyang Differential Revision: D10476225 fbshipit-source-id: 5e63ca80b3843967ea1661ada447bbc18661378d
Diffstat (limited to 'caffe2/operators/gather_op.h')
-rw-r--r--caffe2/operators/gather_op.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/caffe2/operators/gather_op.h b/caffe2/operators/gather_op.h
index ed03167b0e..3f2ae4aad1 100644
--- a/caffe2/operators/gather_op.h
+++ b/caffe2/operators/gather_op.h
@@ -26,8 +26,8 @@ class GatherOp : public Operator<Context> {
auto* output = Output(0);
CAFFE_ENFORCE_GE(data.ndim(), 1, "DATA should be at least 1-D");
- auto shape = indices.dims().vec();
- shape.insert(shape.end(), data.dims().begin() + 1, data.dims().end());
+ auto shape = indices.sizes().vec();
+ shape.insert(shape.end(), data.sizes().begin() + 1, data.sizes().end());
output->Resize(shape);
int block_size = data.size_from_dim(1);