fix space to depth

pull/4657/head
zhongligeng 5 years ago
parent 3c0591dc4f
commit efb831fc89

@ -58,9 +58,9 @@ int SpaceToDepth::InferShape(std::vector<lite::tensor::Tensor *> inputs, std::ve
} }
int32_t block_size = GetBlockSize(); int32_t block_size = GetBlockSize();
if (input_shape[NHWC_C] % (block_size * block_size) != 0 || input_shape[NHWC_C] == 0) { if (input_shape[NHWC_H] % block_size != 0 || input_shape[NHWC_H] == 0 || input_shape[NHWC_W] % block_size != 0 ||
MS_LOG(ERROR) << "input dimension c size " << input_shape[NHWC_C] << " should be mulitple of block_size(" input_shape[NHWC_W] == 0) {
<< block_size << ") * block_size)!"; MS_LOG(ERROR) << "input dimension h or w size error!";
return 1; return 1;
} }
std::vector<int32_t> output_shape(input_shape.size()); std::vector<int32_t> output_shape(input_shape.size());

Loading…
Cancel
Save