codemode change missing [from D13586737]
Summary: as title
Reviewed By: jerryzh168
Differential Revision: D15327669
fbshipit-source-id: e262dacb097e91475b1925ec40b375ec6722ad5a
diff --git a/caffe2/video/video_input_op.h b/caffe2/video/video_input_op.h
index c7e0dab..c5441e6 100644
--- a/caffe2/video/video_input_op.h
+++ b/caffe2/video/video_input_op.h
@@ -484,8 +484,10 @@
label_shape[1] = num_of_class_;
ReinitializeTensor(&prefetched_label_, label_shape, at::dtype<int>().device(CPU));
} else {
- prefetched_label_.Resize(
- vector<int64_t>(1, batch_size_ * clip_per_video_ * multi_crop_count_));
+ ReinitializeTensor(
+ &prefetched_label_,
+ vector<int64_t>(1, batch_size_ * clip_per_video_ * multi_crop_count_),
+ at::dtype<int>().device(CPU));
}
ReinitializeTensor(&prefetched_video_id_, vector<int64_t>(1, batch_size_ * clip_per_video_ * multi_crop_count_), at::dtype<int>().device(CPU));