def test_invalid_shape_gpu(self): self.x.to_gpu() with self.assertRaises(self.error): functions.maxout(self.x, self.pool_size)