I am using max_pooling function using chainer for maxpooling operation in CNN.
I am getting the following error. i have placed the code which i used for max_pooling operation.what i need to do to resolve this issue?
Pool_1=F.max_pooling_2d(Feature_map1_pool, ksize=3, stride=None, pad=0, cover_all=True, return_indices=False)
InvalidType: Invalid operation is performed in: MaxPooling2D
(Forward)
Expect: in_types[0].dtype.kind == f
Actual: O != f
InvalidType: Invalid operation is performed in: MaxPooling2D (Forward)
Expect: in_types[0].dtype.kind == f
Actual: O != f
This error indicates that the argument Feature_map1_pool
has the dtype 'O'
= 'object'
.
There should be some mistake in creation of the array Feature_map1_pool
. There are many ways from which such array may result. The following code is just one example.
Feature_map1_pool = numpy.asarray([numpy.array([2, 2]), numpy.array([1])])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.