I can understand the first 3 examples but not the last one.
If it was originally 2 x 8(only two dimension)
, then, how does dim: -1 dim: 0 dim: 2
make it 2 x 2 x 4
? It says only -1
and 0
has special meaning so the last parameter 2
here should mean the size of the dimension. Isn't it a typo of dim: -1 dim: 0 dim: 4
?
// If "input" is 2D with shape 2 x 8, then the following reshape_param
// specifications are all equivalent, producing a 3D blob "output" with shape
// 2 x 2 x 4:
//
// reshape_param { shape { dim: 2 dim: 2 dim: 4 } }
// reshape_param { shape { dim: 0 dim: 2 dim: 4 } }
// reshape_param { shape { dim: 0 dim: 2 dim: -1 } }
// reshape_param { shape { dim: -1 dim: 0 dim: 2 } }