代码拉取完成,页面将自动刷新
From e0cbe113745a38be7b3afa0dff63a819e4490005 Mon Sep 17 00:00:00 2001
From: lzk <liuzhongkai2@huawei.com>
Date: Fri, 21 May 2021 01:11:07 -0700
Subject: [PATCH] div 0 bug fix
---
.../lite/tools/converter/parser/tflite/tflite_conv_parser.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc b/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
index 3e552883af..c2aac03799 100644
--- a/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
+++ b/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
@@ -111,6 +111,10 @@ ops::PrimitiveC *TfliteDepthwiseConv2DParser::Parse(const std::unique_ptr<tflite
auto weight_shape = weight_tensor->shape;
prim->set_kernel_size({weight_shape[1], weight_shape[2]});
prim->set_in_channel(weight_shape[3]);
+ if (tflite_attr->depth_multiplier == 0) {
+ MS_LOG(ERROR) << "depth_multiplier must not be zero!";
+ return nullptr;
+ }
prim->set_group(weight_shape[3] / tflite_attr->depth_multiplier);
// get data tensor
--
2.17.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。