Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
round scale
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Jul 31, 2018
1 parent 38956fd commit d1a6fdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cpp/operator/mkldnn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ std::vector<NDArrayAttrs> GetTestInputArrays(bool rand = false,
continue;

for (int dim = 0; dim < scale.size(); dim++)
shape[dim] = shape[dim] * scale[dim];
shape[dim] = static_cast<int>(round(shape[dim] * scale[dim]));

// Type 1.
NDArray arr(shape, Context());
Expand Down Expand Up @@ -702,7 +702,7 @@ std::vector<NDArrayAttrs> GetTestOutputArrays(
TShape shape = shp;

for (int dim = 0; dim < scale.size(); dim++)
shape[dim] = static_cast<int>(shape[dim] * scale[dim]);
shape[dim] = static_cast<int>(round(shape[dim] * scale[dim]));

std::vector<NDArrayAttrs> in_arrs;
std::string desc;
Expand Down

0 comments on commit d1a6fdb

Please sign in to comment.