def test_ReduceL1(tmpdir): data = np.array([[[1,2], [3,4]],[[5,6], [7,8]],[[9,10], [11,12]]], dtype=np.float32) model = C.reduce_l1(data, 1) verify_no_input(model, tmpdir, 'ReduceL1_0') x = C.input_variable(np.shape(data)) model = C.reduce_l1(x, 1) verify_one_input(model, data, tmpdir, 'ReduceL1_1')
def test_ReduceL1(tmpdir, dtype): with C.default_options(dtype = dtype): data = np.array([[[1,2], [3,4]],[[5,6], [7,8]],[[9,10], [11,12]]], dtype=dtype) model = C.reduce_l1(data, 1) verify_no_input(model, tmpdir, 'ReduceL1_0') x = C.input_variable(np.shape(data)) model = C.reduce_l1(x, 1) verify_one_input(model, data, tmpdir, 'ReduceL1_1')