未验证 提交 81bd57c7 编写于 作者: F Fisher 提交者: GitHub

[CINN] Remove threshold in op mapper relu6 (#55611)

* Just set threshold to 6 in op mapper relu6

* Remove attrs in op mapper relu6
上级 bea1f04c
......@@ -398,12 +398,6 @@ void PaddleModelToProgram::AddOpMapper_relu6() {
CHECK_EQ(op_desc.Output("Out").size(), 1UL);
auto out_name = op_desc.Output("Out").front();
absl::flat_hash_map<std::string, hlir::framework::NodeAttr::attr_t> attrs;
CHECK(op_desc.HasAttr("threshold"));
CHECK_EQ(op_desc.GetAttr<float>("threshold"), 6.0f)
<< "Threshold of Relu6 is not 6! To be implemented.";
attrs["threshold"] = op_desc.GetAttr<float>("threshold");
auto x = GetVar(TransValidVarName(x_name));
auto out = net_builder_->Relu6(x);
AddVar(TransValidVarName(out_name), out);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册