Browse Source

!4408 fix anf_parser bug

Merge pull request !4408 from yankai10/merge_fix_lenet
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
19e7be3104
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      mindspore/lite/src/common/anf_importer/anf_populater/anf_matmul_populater.cc
  2. +2
    -2
      mindspore/lite/src/common/anf_importer/anf_populater/anf_reshape_populater.cc

+ 1
- 0
mindspore/lite/src/common/anf_importer/anf_populater/anf_matmul_populater.cc View File

@@ -35,4 +35,5 @@ int AnfMatmulPopulater::Populate(const PrimitivePtr &prim, PrimitiveTValue *prim
return 0;
}
AnfNodePopulaterRegistrar anfMatmulPopulater("Matmul", new AnfMatmulPopulater());
AnfNodePopulaterRegistrar anfMatMulPopulater("MatMul", new AnfMatmulPopulater());
} // namespace mindspore::lite

+ 2
- 2
mindspore/lite/src/common/anf_importer/anf_populater/anf_reshape_populater.cc View File

@@ -25,8 +25,8 @@ int AnfReshapePopulater::Populate(const PrimitivePtr &prim, PrimitiveTValue *pri
const std::vector<AnfNodePtr> &inputs) {
auto primitive = std::make_unique<schema::PrimitiveT>();
auto attr = std::make_unique<schema::ReshapeT>();
MS_ASSERT(inputs.size() == kAnfPopulaterThree);
auto inputNode = inputs[kAnfPopulaterTwo];
MS_ASSERT(inputs.size() == kAnfPopulaterThree - 1);
auto inputNode = inputs[kAnfPopulaterTwo - 1];
if (inputNode->isa<ValueNode>()) {
auto valueNode = inputNode->cast<ValueNodePtr>();
MS_ASSERT(valueNode != nullptr);


Loading…
Cancel
Save