hi david,
tried as you suggested
----------------------------------------------------------------
)f
or i in xrange(pooled_shape[1]):
for j in xrange(pooled_shape[2]):
for k in xrange(pooled_shape[3]):
for l in xrange(pooled_shape[4]):
pooled[0][i][j][k][l]=math.
tanh((numpy.sum(conv_out[0][i][j][k*3][l*3:(l+1)*3])+numpy.sum(conv_out[0][i][j][k*3+1][l*3:(l+1)*3])+numpy.sum(conv_out[0][i][j][k*3+2][l*3:(l+1)*3]))/9.0+b[i][j])
pooled[0, :, :, k, l] = numpy.tanh(output)-----------------------------------------------------------------
for i in xrange(self.pooled_shape[1]):
for j in xrange(self.pooled_shape[2]):
for k in xrange(self.pooled_shape[3]):
for l in xrange(self.pooled_shape[4]):
#-- commented-- self.pooled[0][i][j][k][l]=math.tanh((numpy.sum(self.conv_out[0][i][j][k*3][l*3:(l+1)*3])+numpy.sum(self.conv_out[0][i][j][k*3+1][l*3:(l+1)*3])+numpy.sum(self.conv_out[0][i][j][k*3+2][l*3:(l+1)*3]))/9.0+self.b[i][j])
vec = numpy.sum(self.conv_out[0, i, j, k*3: k*3 + 2, l*3:(l+1)*3], axis=-1)
self.pooled[0, i, j, k, l] = math.tanh((vec[0] + vec[1] + vec[2] )/ 9.0+self.b[i][j])
but it gave following error
----------------------------------------------------------------------------------
Traceback (most recent call last):
File "3dcnn_test.py", line 401, in <module>
check()
File "3dcnn_test.py", line 392, in check
layer1.change_input(numpy.reshape(test_set_x[i],(1,1,9,60,80)))
File "3dcnn_test.py", line 77, in change_input
self.pooled[0, i, j, k, l] = math.tanh((vec[0] + vec[1] + vec[2] )/ 9.0+self.b[i][j])
IndexError: index out of bounds