/third_party/mindspore/tests/ut/python/dataset/ |
D | test_time_stretch.py | 37 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 …]
|
D | test_amplitude_to_db.py | 37 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 …]
|
D | test_frequency_masking.py | 37 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 …]
|
D | test_time_masking.py | 37 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 …]
|
D | test_vol.py | 27 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 …]
|
D | test_contrast.py | 24 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])
|
D | test_highpass_biquad.py | 27 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])
|
D | test_equalizer_biquad.py | 26 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])
|
D | test_deemph_biquad.py | 23 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])
|
D | test_lowpass_biquad.py | 27 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])
|
D | test_dc_shift.py | 22 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])
|
D | test_allpass_biquad.py | 22 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])
|
D | test_angle.py | 23 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])
|
D | test_bandreject_biquad.py | 22 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])
|
D | test_biquad.py | 23 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])
|
D | test_bass_biquad.py | 22 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])
|
D | test_lfilter.py | 23 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])
|
D | test_bandpass_biquad.py | 22 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])
|
D | test_band_biquad.py | 22 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/ |
D | utils.py | 26 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/ |
D | test_auto_monad_expression.py | 40 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/ |
D | test_pynative_mixed_precision_cells.py | 70 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)
|
D | test_pynative_layernorm_input_and_argmaxwithvalue.py | 75 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/ |
D | optimizer_parallel.py | 44 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)
|
D | multifieldembeddinglookup_parallel.py | 40 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)
|