“7dabee27960b5e043b85aca3ee51568443b326f4”上不存在“paddle/fluid/inference/io.cc”
提交 89daa7d5 编写于 作者: Z zhaozhenlong

fix onehot converter parser axis bug

上级 fbf8a3bb
......@@ -179,7 +179,7 @@ kernel::LiteKernel *CpuOneHotFp32KernelCreator(const std::vector<lite::tensor::T
OpParameter *opParameter, const lite::Context *ctx,
const kernel::KernelKey &desc,
const mindspore::lite::PrimitiveC *primitive) {
if (opParameter != nullptr) {
if (opParameter == nullptr) {
MS_LOG(ERROR) << "OneHot opParameter nullptr.";
return nullptr;
}
......
......@@ -56,10 +56,6 @@ STATUS TfliteOneHotParser::Parse(const std::unique_ptr<tflite::OperatorT> &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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册