From 89daa7d5e4fdcbb3a4209a3b540937e84cb8437e Mon Sep 17 00:00:00 2001 From: zhaozhenlong Date: Thu, 3 Sep 2020 19:08:42 +0800 Subject: [PATCH] fix onehot converter parser axis bug --- mindspore/lite/src/runtime/kernel/arm/fp32/one_hot.cc | 2 +- .../tools/converter/parser/tflite/tflite_one_hot_parser.cc | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) 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 c0bb5f87eb9..7c9891733ea 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;