如何理解caffe reshape参数

时间:2016-09-17 11:50:29

标签: deep-learning caffe pycaffe

我能理解前三个例子,但不能理解最后一个例子 如果它原来是2 x 8(only two dimension),那么dim: -1 dim: 0 dim: 2如何使它成为2 x 2 x 4?它表示只有-10具有特殊含义,因此此处的最后一个参数2应表示维度的大小。这不是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 } }

0 个答案:

没有答案