You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mssa-2021-004.patch 1.1 kB

123456789101112131415161718192021222324252627
  1. From e0cbe113745a38be7b3afa0dff63a819e4490005 Mon Sep 17 00:00:00 2001
  2. From: lzk <liuzhongkai2@huawei.com>
  3. Date: Fri, 21 May 2021 01:11:07 -0700
  4. Subject: [PATCH] div 0 bug fix
  5. ---
  6. .../lite/tools/converter/parser/tflite/tflite_conv_parser.cc | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc b/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
  9. index 3e552883af..c2aac03799 100644
  10. --- a/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
  11. +++ b/mindspore/lite/tools/converter/parser/tflite/tflite_conv_parser.cc
  12. @@ -111,6 +111,10 @@ ops::PrimitiveC *TfliteDepthwiseConv2DParser::Parse(const std::unique_ptr<tflite
  13. auto weight_shape = weight_tensor->shape;
  14. prim->set_kernel_size({weight_shape[1], weight_shape[2]});
  15. prim->set_in_channel(weight_shape[3]);
  16. + if (tflite_attr->depth_multiplier == 0) {
  17. + MS_LOG(ERROR) << "depth_multiplier must not be zero!";
  18. + return nullptr;
  19. + }
  20. prim->set_group(weight_shape[3] / tflite_attr->depth_multiplier);
  21. // get data tensor
  22. --
  23. 2.17.1