Skip to content

Commit

Permalink
add conv, depthwise_conv, pooling (PaddlePaddle#20966)
Browse files Browse the repository at this point in the history
test=develop
  • Loading branch information
NHZlX authored and seiriosPlus committed Dec 9, 2019
1 parent 75d5fcb commit 4f0b131
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions paddle/fluid/inference/anakin/op_teller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ struct SimpleOpTypeSetTeller : public Teller {

bool OpTeller::Tell(const std::string& op_type, const framework::OpDesc& desc) {
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;
}
return false;
Expand Down
6 changes: 6 additions & 0 deletions paddle/fluid/inference/tensorrt/op_teller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
return false;
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;
}
return false;
Expand Down

0 comments on commit 4f0b131

Please sign in to comment.