Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
the torch7 had Add a keepdim parameter for reduction functions over a single dimension.For detail torch/torch7@c5e5487
so that commit make thpp can't compile.
  • Loading branch information
codeVerySlow authored May 26, 2017
1 parent 899817d commit d9f982c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions thpp/detail/TensorGeneric.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,17 @@ template <> struct TensorOps<Tensor<real>> {
}
static void _max(THTensor* values, THLongTensor* indices,
THTensor* t, int dim) {
return THTensor_(max)(values, indices, t, dim);
return THTensor_(max)(values, indices, t, dim, 1);
}
static void _min(THTensor* values, THLongTensor* indices,
THTensor* t, int dim) {
return THTensor_(min)(values, indices, t, dim);
return THTensor_(min)(values, indices, t, dim, 1);
}
static void _sum(THTensor* r, THTensor* t, int dim) {
return THTensor_(sum)(r, t, dim);
return THTensor_(sum)(r, t, dim, 1);
}
static void _prod(THTensor* r, THTensor* t, int dim) {
return THTensor_(prod)(r, t, dim);
return THTensor_(prod)(r, t, dim, 1);
}
static void _cumsum(THTensor* r, THTensor* t, int dim) {
return THTensor_(cumsum)(r, t, dim);
Expand Down

0 comments on commit d9f982c

Please sign in to comment.