From 7d70866a85aac6193a3d06f618e7d0463fde7a99 Mon Sep 17 00:00:00 2001 From: shenyunhang Date: Wed, 10 Apr 2019 15:17:49 +0800 Subject: [PATCH] Rename ndim() -> dim() and size() -> numel() --- detectron/ops/zero_even_op.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detectron/ops/zero_even_op.cu b/detectron/ops/zero_even_op.cu index a606727d9..206864ce8 100644 --- a/detectron/ops/zero_even_op.cu +++ b/detectron/ops/zero_even_op.cu @@ -35,14 +35,14 @@ template <> bool ZeroEvenOp::RunOnDevice() { // Retrieve the input tensor. const auto& X = Input(0); - CAFFE_ENFORCE(X.ndim() == 1); + CAFFE_ENFORCE(X.dim() == 1); // Initialize the output tensor to a copy of the input tensor. auto* Y = Output(0); Y->CopyFrom(X); // Set output elements at even indices to zero. - auto output_size = Y->size(); + auto output_size = Y->numel(); if (output_size > 0) { size_t num_even_inds = output_size / 2 + output_size % 2;