Resize image Tensor dimention assert check. must be 3D (HWC data format)
@@ -162,6 +162,7 @@ Tensor Resize(const Tensor& image, const int width, const int height,
const enum ResizeFilter filter) {
auto shape = image.shape();
int channels = shape[2];
+ assert(shape.size() == 3); // 3D shape: HWC
assert((channels == 1) || (channels == 3)); // grayscale or RGB
assert((filter == RESIZE_FILTER_NEAREST_NEIGHBOR) || (channels == RESIZE_FILTER_BI_LINEAR));
const int srcHeight = shape[0];
