0

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 } }
Chan Kim
  • 5,177
  • 12
  • 57
  • 112
  • 1
    What version of Caffe are you looking at? looking at recent version caffe/blob/master/src/caffe/proto/caffe.proto I see the last example has dim:4 as you expect – Shai Sep 17 '16 at 19:28
  • 1
    Agree with @Shai. It should be `dim: -1 dim: 0 dim: 4` according to the version of caffe https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto. – Dale Sep 18 '16 at 01:30
  • 1
    Oh, I see, I was using py-caffe (faster-rcnn). it is March 6th, 2016 version and it appears to have typo there. – Chan Kim Sep 18 '16 at 07:26

0 Answers0