def test_Mean(tmpdir): in1 = C.input_variable((4,)) in2 = C.input_variable((4,)) model = C.mean([in1, in2]) in1_data = np.asarray([[1., 2., 3., 4.]], np.float32) in2_data = np.asarray([[0., 5., -3., 2.]], np.float32) verify_two_input(model, in1_data, in2_data, tmpdir, 'Mean_2')
def test_Mean(tmpdir, dtype): with C.default_options(dtype=dtype): in1 = C.input_variable((4, )) in2 = C.input_variable((4, )) model = C.mean([in1, in2]) in1_data = np.asarray([[1., 2., 3., 4.]], dtype=dtype) in2_data = np.asarray([[0., 5., -3., 2.]], dtype=dtype) verify_two_input(model, in1_data, in2_data, tmpdir, 'Mean_2')
def test_Mean(tmpdir, dtype): with C.default_options(dtype = dtype): in1 = C.input_variable((4,)) in2 = C.input_variable((4,)) model = C.mean([in1, in2]) in1_data = np.asarray([[1., 2., 3., 4.]], dtype = dtype) in2_data = np.asarray([[0., 5., -3., 2.]], dtype = dtype) verify_two_input(model, in1_data, in2_data, tmpdir, 'Mean_2')