forked from mindspore-Ecosystem/mindspore
!1099 fix bug of can not find op adapter
Merge pull request !1099 from fary86/fix_bug_for_can_not_find_opadapter
This commit is contained in:
commit
a2d5ad5abe
|
@ -429,9 +429,8 @@ OpAdapterPtr DfGraphConvertor::FindAdapter(const AnfNodePtr node, bool train) {
|
|||
auto it_adpt = get_adpt_map().find(name);
|
||||
if (it_adpt != get_adpt_map().end()) {
|
||||
return it_adpt->second->Get(train);
|
||||
} else {
|
||||
MS_LOG(ERROR) << "Can't find OpAdapter for " << name;
|
||||
}
|
||||
MS_LOG(EXCEPTION) << "Can't find OpAdapter for " << name;
|
||||
}
|
||||
|
||||
if (node->isa<ValueNode>()) {
|
||||
|
@ -521,8 +520,7 @@ OpAdapterPtr DfGraphConvertor::FindAdapter(const std::string &name, bool train)
|
|||
if (it != get_adpt_map().end()) {
|
||||
return it->second->Get(train);
|
||||
}
|
||||
MS_LOG(ERROR) << "Can't find OpAdapter for " << name;
|
||||
return transform::OpAdapterPtr(nullptr);
|
||||
MS_LOG(EXCEPTION) << "Can't find OpAdapter for " << name;
|
||||
}
|
||||
|
||||
void DfGraphConvertor::DrawParamInitSubGraph(const std::string &name, const AnfNodePtr &it) {
|
||||
|
|
Loading…
Reference in New Issue