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