shape of a tensor
More...
#include <tensor.h>
|
static const int | kDimension = dimension |
| dimension of current shape More...
|
|
static const int | kSubdim = dimension - 1 |
| dimension of current shape minus one More...
|
|
template<int dimension>
struct mshadow::Shape< dimension >
shape of a tensor
- Template Parameters
-
dimension | dimension of tensor |
default constructor, do nothing
flatten the tensor, return a 1D shape
- Returns
- the flat 1d shape
flatten the higher dimension to second dimension, return a 2D shape
- Returns
- the flat 2d shape
- Returns
- whether two shape not equal
- Parameters
-
s | the shape to compare against |
- Returns
- whether two shape equals
- Parameters
-
s | the shape to compare against |
get corresponding index
- Parameters
-
- Returns
- the corresponding dimension size
get corresponding index
- Parameters
-
- Returns
- the corresponding dimension size
- Returns
- product shape in [dimstart,dimend)
- Parameters
-
dimstart | start dimension |
dimend | end dimension |
- Returns
- number of valid elements
template<int dimension>
template<int dimstart, int dimend>
slice the shape from start to end
- Template Parameters
-
dimstart | start dimension |
dimend | end dimension |
- Returns
- the sliced shape
get subshape that takes off largest dimension v *
- Returns
- subshape
dimension of current shape
dimension of current shape minus one
storing the dimension information
The documentation for this struct was generated from the following file:
- /work/mxnet/3rdparty/mshadow/mshadow/tensor.h