test_mean_op.py 372 字节
Newer Older
L
liaogang 已提交
1 2 3 4 5 6 7 8 9 10
import unittest
from op_test_util import OpTestMeta
import numpy as np


class TestMeanOp(unittest.TestCase):
    __metaclass__ = OpTestMeta

    def setUp(self):
        self.type = "mean"
D
dangqingqing 已提交
11 12
        self.inputs = {'X': np.random.random((32, 784)).astype("float32")}
        self.outputs = {'Out': np.mean(self.inputs['X'])}
L
liaogang 已提交
13 14 15 16


if __name__ == '__main__':
    unittest.main()