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

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

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