diff --git a/mindspore/lite/src/runtime/kernel/arm/fp32/one_hot.cc b/mindspore/lite/src/runtime/kernel/arm/fp32/one_hot.cc index c0bb5f87eb..7c9891733e 100644 --- a/mindspore/lite/src/runtime/kernel/arm/fp32/one_hot.cc +++ b/mindspore/lite/src/runtime/kernel/arm/fp32/one_hot.cc @@ -179,7 +179,7 @@ kernel::LiteKernel *CpuOneHotFp32KernelCreator(const std::vector &tflit MS_LOG(ERROR) << "tensor is null"; return RET_NULL_PTR; } - const auto tensor_shape = tensor->shape; - if (axis < 0) { - axis += tensor_shape.size(); - } attr->axis = axis; op->primitive->value.type = schema::PrimitiveType_OneHot;