Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions detectron/ops/zero_even_op.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ template <>
bool ZeroEvenOp<float, CUDAContext>::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;
Expand Down