add conv, depthwise_conv, pooling (#20966)

test=develop
paddle_tiny_install
Zhaolong Xing 6 years ago committed by GitHub
parent 768f9242e9
commit da7748c53d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

@ -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;

Loading…
Cancel
Save