未验证 提交 da7748c5 编写于 作者: Z Zhaolong Xing 提交者: GitHub

add conv, depthwise_conv, pooling (#20966)

test=develop
上级 768f9242
...@@ -62,6 +62,12 @@ struct SimpleOpTypeSetTeller : public Teller { ...@@ -62,6 +62,12 @@ struct SimpleOpTypeSetTeller : public Teller {
bool OpTeller::Tell(const std::string& op_type, const framework::OpDesc& desc) { bool OpTeller::Tell(const std::string& op_type, const framework::OpDesc& desc) {
for (auto& teller : tellers_) { for (auto& teller : tellers_) {
if (op_type == "pool2d" || op_type == "conv2d" ||
op_type == "depthwise_conv2d" || op_type == "conv2d_transpose") {
std::vector<int> paddings =
boost::get<std::vector<int>>(desc.GetAttr("paddings"));
if (paddings.size() > 2) return false;
}
if ((*teller)(op_type, desc)) return true; if ((*teller)(op_type, desc)) return true;
} }
return false; return false;
......
...@@ -61,6 +61,12 @@ bool OpTeller::Tell(const std::string& op_type, const framework::OpDesc& desc) { ...@@ -61,6 +61,12 @@ bool OpTeller::Tell(const std::string& op_type, const framework::OpDesc& desc) {
boost::get<std::string>(desc.GetAttr("op_namescope")) == "/skip_quant_2/") boost::get<std::string>(desc.GetAttr("op_namescope")) == "/skip_quant_2/")
return false; return false;
for (auto& teller : tellers_) { for (auto& teller : tellers_) {
if (op_type == "pool2d" || op_type == "conv2d" ||
op_type == "depthwise_conv2d" || op_type == "conv2d_transpose") {
std::vector<int> paddings =
boost::get<std::vector<int>>(desc.GetAttr("paddings"));
if (paddings.size() > 2) return false;
}
if ((*teller)(op_type, desc)) return true; if ((*teller)(op_type, desc)) return true;
} }
return false; return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册