未验证 提交 260f92da 编写于 作者: 王明冬 提交者: GitHub

fix the bug in repeated_fc_relu_fuse_pass.test=develop (#33386)

上级 366d3463
...@@ -66,9 +66,13 @@ static bool IsFCWithPaddingWeights(Node* n) { ...@@ -66,9 +66,13 @@ static bool IsFCWithPaddingWeights(Node* n) {
} }
static bool IsParamOfFC(Node* n, const std::string& param_name) { static bool IsParamOfFC(Node* n, const std::string& param_name) {
if (IsInputOfFC(n) && n->inputs.empty() && if (IsInputOfFC(n) && n->inputs.empty()) {
(n->Name() == n->outputs[0]->Op()->Input(param_name)[0])) { for (auto* out : n->outputs) {
return true; if (out->Op()->Type() == "fc" &&
n->Name() == out->Op()->Input(param_name)[0]) {
return true;
}
}
} }
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册