Home
last modified time | relevance | path

Searched refs:data_expected (Results 1 – 25 of 30) sorted by relevance

12

/third_party/mindspore/tests/ut/python/dataset/
Dtest_time_stretch.py37 def count_unequal_element(data_expected, data_me, rtol, atol): argument
38 assert data_expected.shape == data_me.shape
39 total_count = len(data_expected.flatten())
40 error = np.abs(data_expected - data_me)
41 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
44 data_expected[greater], data_me[greater], error[greater])
47 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
48 if np.any(np.isnan(data_expected)):
49 assert np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan)
50 elif not np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan):
[all …]
Dtest_amplitude_to_db.py37 def count_unequal_element(data_expected, data_me, rtol, atol): argument
39 assert data_expected.shape == data_me.shape
40 total_count = len(data_expected.flatten())
41 error = np.abs(data_expected - data_me)
42 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
45 data_expected[greater], data_me[greater], error[greater])
48 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
50 if np.any(np.isnan(data_expected)):
51 assert np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan)
52 elif not np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan):
[all …]
Dtest_frequency_masking.py37 def count_unequal_element(data_expected, data_me, rtol, atol): argument
39 assert data_expected.shape == data_me.shape
40 total_count = len(data_expected.flatten())
41 error = np.abs(data_expected - data_me)
42 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
45 data_expected[greater], data_me[greater], error[greater])
48 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
50 if np.any(np.isnan(data_expected)):
51 assert np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan)
52 elif not np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan):
[all …]
Dtest_time_masking.py37 def count_unequal_element(data_expected, data_me, rtol, atol): argument
39 assert data_expected.shape == data_me.shape
40 total_count = len(data_expected.flatten())
41 error = np.abs(data_expected - data_me)
42 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
45 data_expected[greater], data_me[greater], error[greater])
48 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
50 if np.any(np.isnan(data_expected)):
51 assert np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan)
52 elif not np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan):
[all …]
Dtest_vol.py27 def count_unequal_element(data_expected, data_me, rtol, atol): argument
29 assert data_expected.shape == data_me.shape
30 total_count = len(data_expected.flatten())
31 error = np.abs(data_expected - data_me)
32 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
36 format(data_expected[greater], data_me[greater], error[greater])
39 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
41 if np.any(np.isnan(data_expected)):
42 assert np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan)
43 elif not np.allclose(data_me, data_expected, rtol, atol, equal_nan=equal_nan):
[all …]
Dtest_contrast.py24 def count_unequal_element(data_expected, data_me, rtol, atol): argument
25 assert data_expected.shape == data_me.shape
26 total_count = len(data_expected.flatten())
27 error = np.abs(data_expected - data_me)
28 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
31 data_expected[greater], data_me[greater], error[greater])
Dtest_highpass_biquad.py27 def count_unequal_element(data_expected, data_me, rtol, atol): argument
28 assert data_expected.shape == data_me.shape
29 total_count = len(data_expected.flatten())
30 error = np.abs(data_expected - data_me)
31 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
35 format(data_expected[greater], data_me[greater], error[greater])
Dtest_equalizer_biquad.py26 def count_unequal_element(data_expected, data_me, rtol, atol): argument
27 assert data_expected.shape == data_me.shape
28 total_count = len(data_expected.flatten())
29 error = np.abs(data_expected - data_me)
30 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
33 data_expected[greater], data_me[greater], error[greater])
Dtest_deemph_biquad.py23 def count_unequal_element(data_expected, data_me, rtol, atol): argument
24 assert data_expected.shape == data_me.shape
25 total_count = len(data_expected.flatten())
26 error = np.abs(data_expected - data_me)
27 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
31 format(data_expected[greater], data_me[greater], error[greater])
Dtest_lowpass_biquad.py27 def count_unequal_element(data_expected, data_me, rtol, atol): argument
28 assert data_expected.shape == data_me.shape
29 total_count = len(data_expected.flatten())
30 error = np.abs(data_expected - data_me)
31 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
34 data_expected[greater], data_me[greater], error[greater])
Dtest_dc_shift.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
Dtest_allpass_biquad.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
Dtest_angle.py23 def count_unequal_element(data_expected, data_me, rtol, atol): argument
24 assert data_expected.shape == data_me.shape
25 total_count = len(data_expected.flatten())
26 error = np.abs(data_expected - data_me)
27 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
30 data_expected[greater], data_me[greater], error[greater])
Dtest_bandreject_biquad.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
Dtest_biquad.py23 def count_unequal_element(data_expected, data_me, rtol, atol): argument
24 assert data_expected.shape == data_me.shape
25 total_count = len(data_expected.flatten())
26 error = np.abs(data_expected - data_me)
27 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
31 format(data_expected[greater], data_me[greater], error[greater])
Dtest_bass_biquad.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
Dtest_lfilter.py23 def count_unequal_element(data_expected, data_me, rtol, atol): argument
24 assert data_expected.shape == data_me.shape
25 total_count = len(data_expected.flatten())
26 error = np.abs(data_expected - data_me)
27 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
31 format(data_expected[greater], data_me[greater], error[greater])
Dtest_bandpass_biquad.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
Dtest_band_biquad.py22 def count_unequal_element(data_expected, data_me, rtol, atol): argument
23 assert data_expected.shape == data_me.shape
24 total_count = len(data_expected.flatten())
25 error = np.abs(data_expected - data_me)
26 greater = np.greater(error, atol + np.abs(data_expected) * rtol)
29 data_expected[greater], data_me[greater], error[greater])
/third_party/mindspore/tests/st/mix_precision/
Dutils.py26 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
27 assert data_expected.shape == data_me.shape
28 total_count = len(data_expected.flatten())
29 error = np.abs(data_expected - data_me)
34 format(data_expected[greater], data_me[greater], error[greater])
37 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
38 if np.any(np.isnan(data_expected)):
39 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
40 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
41 _count_unequal_element(data_expected, data_me, rtol, atol)
/third_party/mindspore/tests/st/auto_monad/
Dtest_auto_monad_expression.py40 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
41 assert data_expected.shape == data_me.shape
42 total_count = len(data_expected.flatten())
43 error = np.abs(data_expected - data_me)
48 format(data_expected[greater], data_me[greater], error[greater])
51 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
52 if np.any(np.isnan(data_expected)):
53 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
54 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
55 _count_unequal_element(data_expected, data_me, rtol, atol)
/third_party/mindspore/tests/st/pynative/
Dtest_pynative_mixed_precision_cells.py70 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
71 assert data_expected.shape == data_me.shape
72 total_count = len(data_expected.flatten())
73 error = np.abs(data_expected - data_me)
78 format(data_expected[greater], data_me[greater], error[greater])
80 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
81 if np.any(np.isnan(data_expected)):
82 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
83 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
84 _count_unequal_element(data_expected, data_me, rtol, atol)
Dtest_pynative_layernorm_input_and_argmaxwithvalue.py75 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
76 assert data_expected.shape == data_me.shape
77 total_count = len(data_expected.flatten())
78 error = np.abs(data_expected - data_me)
83 format(data_expected[greater], data_me[greater], error[greater])
85 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
86 if np.any(np.isnan(data_expected)):
87 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
88 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
89 _count_unequal_element(data_expected, data_me, rtol, atol)
/third_party/mindspore/tests/st/auto_parallel/
Doptimizer_parallel.py44 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
45 assert data_expected.shape == data_me.shape
46 total_count = len(data_expected.flatten())
47 error = np.abs(data_expected - data_me)
52 format(data_expected[greater], data_me[greater], error[greater])
55 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
56 if np.any(np.isnan(data_expected)):
57 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
58 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
59 _count_unequal_element(data_expected, data_me, rtol, atol)
Dmultifieldembeddinglookup_parallel.py40 def _count_unequal_element(data_expected, data_me, rtol, atol): argument
41 assert data_expected.shape == data_me.shape
42 total_count = len(data_expected.flatten())
43 error = np.abs(data_expected - data_me)
48 format(data_expected[greater], data_me[greater], error[greater])
51 def allclose_nparray(data_expected, data_me, rtol, atol, equal_nan=True): argument
52 if np.any(np.isnan(data_expected)):
53 assert np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan)
54 elif not np.allclose(data_expected, data_me, rtol, atol, equal_nan=equal_nan):
55 _count_unequal_element(data_expected, data_me, rtol, atol)

12