From 2ac7b6b683c35b4f9d430bd871b728947180253c Mon Sep 17 00:00:00 2001 From: Jerry Zhang Date: Wed, 24 Oct 2018 15:00:24 -0700 Subject: [PATCH] Tensor dims() -> sizes() (caffe2/operators) - 5/5 (#13032) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/13032 Codemod generated with clangr shard mode, 25 files per diff, for renaming dims() to sizes() Reviewed By: ezyang Differential Revision: D10476235 fbshipit-source-id: 263ad75689d864b414dae63cb9a30cb3285dae31 --- caffe2/operators/weighted_sample_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caffe2/operators/weighted_sample_op.cc b/caffe2/operators/weighted_sample_op.cc index c8b278b30f8c9..593a464fd4b75 100644 --- a/caffe2/operators/weighted_sample_op.cc +++ b/caffe2/operators/weighted_sample_op.cc @@ -24,8 +24,8 @@ bool WeightedSampleOp::RunOnDevice() { if (InputSize() == 2) { auto& values = Input(1); CAFFE_ENFORCE_EQ( - weights.dims(), - values.dims(), + weights.sizes(), + values.sizes(), "The sampling weights tensor and the sampling values tensor must have the same dimensions."); mat_values = values.template data(); auto* out_value = Output(1);