Skip to content

Commit

Permalink
fix mshadow Shape index
Browse files Browse the repository at this point in the history
  • Loading branch information
shuokay committed Aug 29, 2019
1 parent e2b99a4 commit b6990b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mshadow/tensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ struct Shape {
* \param idx dimension index
* \return the corresponding dimension size
*/
MSHADOW_XINLINE index_t &operator[](index_t idx) {
MSHADOW_XINLINE index_t &operator[](int idx) {
return shape_[idx];
}
/*!
* \brief get corresponding index
* \param idx dimension index
* \return the corresponding dimension size
*/
MSHADOW_XINLINE const index_t &operator[](index_t idx) const {
MSHADOW_XINLINE const index_t &operator[](int idx) const {
return shape_[idx];
}
/*!
Expand Down Expand Up @@ -484,7 +484,7 @@ struct Tensor: public TRValue<Tensor<Device, dimension, DType>,
* \param idx the dimension count from the highest dimensin
* \return the size
*/
MSHADOW_XINLINE index_t size(index_t idx) const {
MSHADOW_XINLINE index_t size(int idx) const {
return shape_[idx];
}
/*!
Expand Down

0 comments on commit b6990b2

Please sign in to comment.