Do not use isinstance to select array module
@@ -43,7 +43,7 @@ class Unpooling2D(pooling_2d.Pooling2D):
xp = cuda.get_array_module(*x)
col = xp.tile(x[0][:, :, None, None],
(1, 1, self.kh, self.kw, 1, 1))
- if isinstance(x[0], cuda.ndarray):
+ if xp is cuda.cupy:
y = conv.col2im_gpu(col, self.sy, self.sx, self.ph, self.pw,
self.outh, self.outw)
else:
