def test_average_pooling(self):
        input_data = theano.shared(
            asfloat(np.array([
            [1, 2, 3, -1],
            [4, -6, 3, 1],
            [0, 0, 1, 0],
            [0, -1, 0, 0],
            ]))
        )
        expected_output = asfloat(np.array([
            [1 / 4., 6 / 4.],
            [-1 / 4., 1 / 4.],
        ]))

        average_pool_layer = layers.AveragePooling((2, 2))
        actual_output = average_pool_layer.output(input_data).eval()
        np.testing.assert_array_almost_equal(actual_output, expected_output)
dataset/ETHPy150Open itdxer/neupy/tests/layers/test_conv_layers.py/ConvLayersTestCase.test_average_pooling/original