Skip to content

Commit

Permalink
fix fc fuse proble (#36568)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiweibo authored Oct 20, 2021
1 parent 3f2d6a3 commit fc5db55
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paddle/fluid/framework/ir/fc_fuse_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ FCFusePass::FCFusePass() {
.IsTensor()
.End()
.AddAttr("axis")
.IsNumGE(1)
.IsNumMatch<int>([](int axis) -> bool {
if (axis == -1 || axis >= 1) {
return true;
}
return false;
})
.End();

AddOpCompat(OpCompat("relu"))
Expand Down

0 comments on commit fc5db55

Please sign in to comment.