Commit ebcad896 by Haichen Shen Committed by eqy

Fix typo (#2595)

thanks @icemelon9, this is merged
parent 7e6cba48
......@@ -44,7 +44,7 @@ inline Expr RavelIndex(Array<Var> indices, Array<Expr> shape) {
*
* \return The coordinate corresponding to the 1D index
*/
inline Array<Expr> UnavelIndex(Expr idx, Array<Expr> shape) {
inline Array<Expr> UnravelIndex(Expr idx, Array<Expr> shape) {
std::vector<Expr> indices;
for (int i = static_cast<int>(shape.size()) - 1; i >= 0; --i) {
......
......@@ -188,7 +188,7 @@ inline Tensor reshape(const Tensor& x,
auto x_shape = x->shape;
return compute(
newshape, [&](const Array<Var>& indices) {
return x(UnavelIndex(RavelIndex(indices, newshape), x_shape));
return x(UnravelIndex(RavelIndex(indices, newshape), x_shape));
}, name, tag);
}
......@@ -566,7 +566,7 @@ inline Tensor take(const Tensor& a,
for (size_t j = 0; j < indices->shape.size(); ++j) {
indices_position.push_back(out_index[j]);
}
return a(UnavelIndex(indices(indices_position), a_shape));
return a(UnravelIndex(indices(indices_position), a_shape));
}, name, tag);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment