find resize nn input tensor 2 num case

This commit is contained in:
zhaozhenlong 2021-01-08 15:41:29 +08:00
parent 8ce17ba568
commit 8a6d5baeca
1 changed files with 0 additions and 11 deletions

View File

@ -198,17 +198,6 @@ int ResizeCPUKernel::RunImpl(int task_id) {
break;
}
case static_cast<int>(schema::ResizeMethod_NEAREST): {
if (in_tensors_.size() == lite::kDoubleNum && !const_shape_) {
auto out_shape = in_tensors_.at(1);
auto data = reinterpret_cast<int32_t *>(out_shape->MutableData());
if (data == nullptr) {
MS_LOG(ERROR) << "The out shape data is nullptr.";
return RET_NULL_PTR;
} else {
out_tensors_.at(0)->shape().at(1) = static_cast<int64_t>(data[0]);
out_tensors_.at(0)->shape().at(2) = static_cast<int64_t>(data[1]);
}
}
ret = ResizeNearestNeighbor(input_data, output_data, input_shape.data(), out_tensors_[0]->shape().data(),
calculate_, coordinate_transform_mode_, task_id, context_->thread_num_);
break;