diff --git a/mindspore/lite/src/runtime/kernel/arm/fp16/bias_fp16.cc b/mindspore/lite/src/runtime/kernel/arm/fp16/bias_fp16.cc index 60d1132dc0..7b97a6d1dc 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp16/bias_fp16.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp16/bias_fp16.cc @@ -82,7 +82,7 @@ int BiasCPUFp16Kernel::Init() { return RET_NULL_PTR; } auto *bias = reinterpret_cast(bias_tensor->MutableData()); - if (bias != nullptr) { + if (bias == nullptr) { MS_LOG(ERROR) << "bias is nullptr!"; return RET_NULL_PTR; } diff --git a/mindspore/lite/src/runtime/kernel/arm/fp16/transpose_fp16.cc b/mindspore/lite/src/runtime/kernel/arm/fp16/transpose_fp16.cc index 9ad44fc860..bc9c87a4ff 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp16/transpose_fp16.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp16/transpose_fp16.cc @@ -40,6 +40,7 @@ int TransposeFp16CPUKernel::Init() { int TransposeFp16CPUKernel::Run() { MS_ASSERT(in_tensors_.size() == 1 || in_tensors_.size() == 2); TransposeParameter *param = reinterpret_cast(this->op_parameter_); + param->data_size_ = in_tensors_[0]->Size(); if (in_tensors_.size() == 2) { auto input_perm = in_tensors_.at(1); MS_ASSERT(input_perm != nullptr);