diff --git a/mindspore/lite/schema/ops.fbs b/mindspore/lite/schema/ops.fbs index 84f5443b10..0c1fa797bf 100644 --- a/mindspore/lite/schema/ops.fbs +++ b/mindspore/lite/schema/ops.fbs @@ -660,7 +660,7 @@ table NetOutput { } table MatMul { - broadcast : bool = false; + broadcast : bool = false; // DEPRECATED transposeA : bool = false; transposeB : bool = false; } diff --git a/mindspore/lite/src/ops/conv2d.cc b/mindspore/lite/src/ops/conv2d.cc index 5d7155a403..e5a7ff1931 100644 --- a/mindspore/lite/src/ops/conv2d.cc +++ b/mindspore/lite/src/ops/conv2d.cc @@ -189,7 +189,7 @@ void Conv2D::PopulaterConv2DMultiGroup(const Primitive &prim, schema::PrimitiveT attr->channelMultiplier = channel_mutiplier; MS_ASSERT(inputs.size() == kAnfPopulaterInputNumTwo); - auto input_node = inputs[kAnfPopulaterInputNumOne]; + auto input_node = inputs.at(kAnfPopulaterInputNumOne); MS_ASSERT(input_node != nullptr); if (input_node->isa()) { auto param_node = input_node->cast(); @@ -201,7 +201,7 @@ void Conv2D::PopulaterConv2DMultiGroup(const Primitive &prim, schema::PrimitiveT MS_ASSERT(abstractTensor != nullptr); if (utils::isa(abstractTensor->BuildShape())) { auto dims = utils::cast(abstractTensor->BuildShape())->shape(); - attr->channelIn = dims[kAnfPopulaterInputNumOne]; + attr->channelIn = dims.at(kAnfPopulaterInputNumOne); } } } else if (input_node->isa()) { diff --git a/mindspore/lite/src/ops/depthwise_conv2d.cc b/mindspore/lite/src/ops/depthwise_conv2d.cc index f9a44a32c6..783afa34ab 100644 --- a/mindspore/lite/src/ops/depthwise_conv2d.cc +++ b/mindspore/lite/src/ops/depthwise_conv2d.cc @@ -128,7 +128,7 @@ int DepthwiseConv2D::UnPackAttr(const Primitive &prim, const std::vectorchannelMultiplier = channel_multiplier; MS_ASSERT(inputs.size() == kAnfPopulaterInputNumTwo); - auto inputNode = inputs[kAnfPopulaterInputNumOne]; + auto inputNode = inputs.at(kAnfPopulaterInputNumOne); MS_ASSERT(inputNode != nullptr); if (inputNode->isa()) { auto paramNode = inputNode->cast(); @@ -139,7 +139,7 @@ int DepthwiseConv2D::UnPackAttr(const Primitive &prim, const std::vector(abstractTensor->BuildShape())) { auto dims = utils::cast(abstractTensor->BuildShape())->shape(); - attr->channelIn = dims[kAnfPopulaterInputNumOne]; + attr->channelIn = dims.at(kAnfPopulaterInputNumOne); } } } diff --git a/mindspore/lite/tools/converter/parser/onnx/onnx_matmul_parser.cc b/mindspore/lite/tools/converter/parser/onnx/onnx_matmul_parser.cc index 03ee1f156e..4c4d8c0e4c 100644 --- a/mindspore/lite/tools/converter/parser/onnx/onnx_matmul_parser.cc +++ b/mindspore/lite/tools/converter/parser/onnx/onnx_matmul_parser.cc @@ -42,9 +42,6 @@ STATUS OnnxMatmulParser::Parse(const onnx::GraphProto &onnx_graph, const onnx::N float beta = 1.0f; for (const auto &onnx_node_attr : onnx_node.attribute()) { const auto &attribute_name = onnx_node_attr.name(); - if (attribute_name == "broadcast") { - attr->broadcast = static_cast(onnx_node_attr.i()); - } if (attribute_name == "transA") { attr->transposeA = static_cast(onnx_node_attr.i()); } else if (attribute_name == "transB") { diff --git a/mindspore/lite/tools/converter/parser/tflite/tflite_custom_parser.cc b/mindspore/lite/tools/converter/parser/tflite/tflite_custom_parser.cc index b57ad24cbf..c373dad616 100644 --- a/mindspore/lite/tools/converter/parser/tflite/tflite_custom_parser.cc +++ b/mindspore/lite/tools/converter/parser/tflite/tflite_custom_parser.cc @@ -199,7 +199,6 @@ STATUS TfliteCustomParser::BatchMatMul(const std::vector &custom_attr, MS_LOG(ERROR) << "new op failed"; return RET_NULL_PTR; } - attr->broadcast = false; attr->transposeA = false; attr->transposeB = false; op->primitive->value.type = schema::PrimitiveType_MatMul; diff --git a/mindspore/lite/tools/converter/parser/tflite/tflite_matmul_parser.cc b/mindspore/lite/tools/converter/parser/tflite/tflite_matmul_parser.cc index 61af580b70..42e352594b 100644 --- a/mindspore/lite/tools/converter/parser/tflite/tflite_matmul_parser.cc +++ b/mindspore/lite/tools/converter/parser/tflite/tflite_matmul_parser.cc @@ -36,7 +36,6 @@ PrimitiveC *TfliteMatMulParser::ParseLitePrimitive(const std::unique_ptrbuiltin_options.AsBatchMatMulOptions(); attr->transposeA = tflite_attr->adj_x; attr->transposeB = tflite_attr->adj_y; - attr->broadcast = false; primitive->value.type = schema::PrimitiveType_MatMul; primitive->value.value = attr.release();