Skip to content

Commit

Permalink
Revert "pooling.cc improvements (apache#4767)"
Browse files Browse the repository at this point in the history
This reverts commit 23ba37d.
  • Loading branch information
yy665 committed Jan 23, 2020
1 parent 9719418 commit 330c0c3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/relay/op/nn/pooling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ bool Pool2DRel(const Array<Type>& types,
return false;
}

std::vector<IndexExpr> oshape(dshape.begin(), dshape.end());
std::vector<IndexExpr> oshape;
for (const auto& e : dshape) {
oshape.push_back(e);
}

if (dshape[hidx].as<tir::AnyNode>()) {
oshape[hidx] = dshape[hidx];
Expand Down Expand Up @@ -772,7 +775,10 @@ bool Pool1DRel(const Array<Type>& types,
return false;
}

std::vector<IndexExpr> oshape(dshape.begin(), dshape.end());
std::vector<IndexExpr> oshape;
for (const auto& e : dshape) {
oshape.push_back(e);
}

if (dshape[widx].as<tir::AnyNode>()) {
oshape[widx] = dshape[widx];
Expand Down Expand Up @@ -960,9 +966,12 @@ bool Pool3DRel(const Array<Type>& types,
return false;
}

std::vector<IndexExpr> oshape(dshape.begin(), dshape.end());
std::vector<IndexExpr> oshape;
for (const auto& e : dshape) {
oshape.push_back(e);
}

int idxes[3] = {didx, hidx, widx};
std::vector<int> idxes = {didx, hidx, widx};
for (int i = 0; i < 3; i++) {
int ii = idxes[i];
if (dshape[ii].as<tir::AnyNode>()) {
Expand Down

0 comments on commit 330c0c3

Please sign in to comment.