/third_party/mindspore/tests/st/nccl/ |
D | test_nccl_all_reduce_op.py | 74 expect2 = expect1 75 diff2 = output[2].asnumpy() - expect2 76 error2 = np.ones(shape=expect2.shape) * 1.0e-5 78 assert output[2].shape == expect2.shape 120 expect2 = expect1 * size 121 diff2 = abs(output[2].asnumpy() - expect2) 122 error2 = np.ones(shape=expect2.shape) * 1.0e-5 124 assert output[2].shape == expect2.shape 157 expect2 = np.ones([3, 4, 6, 3]).astype(np.float32) * 0 160 expect2 += part [all …]
|
D | test_nccl_broadcast_op.py | 56 expect2 = np.ones([3, 1, 3, 3]).astype(np.float32) * 3 68 diff2 = output[2][0].asnumpy() - expect2 69 error2 = np.ones(shape=expect2.shape) * 1.0e-5 71 assert output[2][0].shape == expect2.shape
|
D | test_nccl_reduce_scatter_op.py | 72 expect2 = np.ones([1, 1, 3, 3]).astype(np.float32) * 0.01 * 1 73 diff2 = output[2].asnumpy() - expect2 74 error2 = np.ones(shape=expect2.shape) * 1.0e-5 76 assert output[2].shape == expect2.shape
|
/third_party/mindspore/tests/st/control/inner/ |
D | test_110_if_after_if_in_if.py | 130 def control_flow_if_after_if_in_if(input_net, x, expect1, expect2): argument 141 assert graph_backward_res == expect2 152 expect2 = (Tensor(1, mstype.int32),) 153 control_flow_if_after_if_in_if(IfAfterIfInIfNet, x, expect1, expect2) 164 expect2 = (Tensor(1, mstype.int32),) 165 control_flow_if_after_if_in_if(IfAfterIfInIfNet1, x, expect1, expect2) 174 expect2 = (Tensor(1, mstype.int32),) 175 control_flow_if_after_if_in_if(IfAfterIfInIfNet2, x, expect1, expect2) 184 expect2 = (Tensor(1, mstype.int32),) 185 control_flow_if_after_if_in_if(IfAfterIfInIfNet2, x, expect1, expect2) [all …]
|
D | test_100_if_after_if.py | 127 def control_flow_if_after_if(input_net, x, y, expect1, expect2): argument 138 assert graph_backward_res == expect2 150 expect2 = (Tensor(0, mstype.int32), Tensor(1, mstype.int32)) 151 control_flow_if_after_if(IfAfterIfNet, x, y, expect1, expect2) 163 expect2 = (Tensor(0, mstype.int32), Tensor(1, mstype.int32)) 164 control_flow_if_after_if(IfAfterIfNet1, x, y, expect1, expect2) 176 expect2 = (Tensor(1, mstype.int32), Tensor(1, mstype.int32)) 177 control_flow_if_after_if(IfAfterIfNet2, x, y, expect1, expect2) 189 expect2 = (Tensor(5, mstype.int32), Tensor(2, mstype.int32)) 190 control_flow_if_after_if(IfAfterIfNet3, x, y, expect1, expect2) [all …]
|
D | test_010_if_in_if.py | 140 def control_flow_if_in_if(input_net, x, expect1, expect2): argument 151 assert graph_backward_res == expect2 162 expect2 = (Tensor(1, mstype.int32),) 163 control_flow_if_in_if(IfInIfNet, x, expect1, expect2) 174 expect2 = (Tensor(1, mstype.int32),) 175 control_flow_if_in_if(IfInIfNet1, x, expect1, expect2) 187 expect2 = 0 188 control_flow_if_in_if(IfInIfNet2, x, expect1, expect2) 199 expect2 = (Tensor(1, mstype.int32),) 200 control_flow_if_in_if(IfInIfNet3, x, expect1, expect2) [all …]
|
D | test_112_if_after_if_in_for.py | 122 def control_flow_if_after_if_in_for(input_net, x, expect1, expect2): argument 133 assert graph_backward_res == expect2 145 expect2 = (Tensor(1, mstype.int32),) 146 control_flow_if_after_if_in_for(IfAfterIfInForNet, x, expect1, expect2) 157 expect2 = (Tensor(1, mstype.int32),) 158 control_flow_if_after_if_in_for(IfAfterIfInForNet1, x, expect1, expect2) 169 expect2 = (Tensor(1, mstype.int32),) 170 control_flow_if_after_if_in_for(IfAfterIfInForNet2, x, expect1, expect2) 181 expect2 = (Tensor(1, mstype.int32),) 182 control_flow_if_after_if_in_for(IfAfterIfInForNet3, x, expect1, expect2)
|
D | test_000_single_if.py | 60 def control_flow_single_if(input_net, x, y, expect1, expect2): argument 71 assert graph_backward_res == expect2 83 expect2 = (Tensor(2, mstype.int32), Tensor(2, mstype.int32)) 84 control_flow_single_if(SingleIfNet1, x, y, expect1, expect2) 96 expect2 = (Tensor(2, mstype.int32), Tensor(2, mstype.int32)) 97 control_flow_single_if(SingleIfNet1, x, y, expect1, expect2)
|
/third_party/mindspore/tests/st/ops/gpu/ |
D | test_argmaxwithvalue_op.py | 53 expect2 = np.array([1, 0, 0, 0]).astype(data_type) 61 assert (output[1][0].asnumpy() == expect2).all() 71 assert (output[1][0].asnumpy() == expect2).all() 85 expect2 = np.maximum.reduce(x_np, 0) 87 assert (output[1].asnumpy() == expect2).all() 92 expect2 = np.maximum.reduce(x_np, 1) 94 assert (output[1].asnumpy() == expect2).all() 99 expect2 = np.maximum.reduce(x_np, 2) 101 assert (output[1].asnumpy() == expect2).all()
|
D | test_argminwithvalue_op.py | 53 expect2 = np.array([0, 1, 2, 2]).astype(data_type) 61 assert (output[1][0].asnumpy() == expect2).all() 71 assert (output[1][0].asnumpy() == expect2).all() 85 expect2 = np.minimum.reduce(x_np, 0) 87 assert (output[1].asnumpy() == expect2).all() 92 expect2 = np.minimum.reduce(x_np, 1) 94 assert (output[1].asnumpy() == expect2).all() 99 expect2 = np.minimum.reduce(x_np, 2) 101 assert (output[1].asnumpy() == expect2).all()
|
D | test_sparse_apply_proximal_adagrad_op.py | 59 expect2 = np.array([[64., 64., 64.], 63 np.testing.assert_array_almost_equal(output2.asnumpy(), expect2) 81 expect2 = np.array([[64., 64., 64.], 85 np.testing.assert_array_almost_equal(net.accum.data.asnumpy(), expect2) 102 expect2 = np.array([[64., 64., 64.], 106 np.testing.assert_array_almost_equal(output2.asnumpy(), expect2) 123 expect2 = np.array([[102463., 107648., 112961.], 127 np.testing.assert_array_almost_equal(output2.asnumpy(), expect2) 148 expect2 = np.array([[[38., 39., 40., 41.], 155 np.testing.assert_array_almost_equal(output2.asnumpy(), expect2)
|
D | test_float_status_op.py | 77 expect2 = 1 78 assert output2.asnumpy()[0] == expect2 95 expect2 = [[False, False, False, False]] 96 assert (output2.asnumpy() == expect2).all() 113 expect2 = [[True, False, False, False]] 114 assert (output2.asnumpy() == expect2).all() 131 expect2 = [[False, True, True, True]] 132 assert (output2.asnumpy() == expect2).all()
|
D | test_mul_op.py | 74 expect2 = np.multiply(x2_np, y2_np) 75 diff2 = output2.asnumpy() - expect2 76 error2 = np.ones(shape=expect2.shape) * 1.0e-5 78 assert output2.shape == expect2.shape 111 expect2 = np.multiply(x2_np, y2_np) 112 diff2 = output2.asnumpy() - expect2 113 error2 = np.ones(shape=expect2.shape) * 1.0e-5 115 assert output2.shape == expect2.shape 192 expect2 = np.multiply(x2_np, y2_np) 194 diff2 = output2.asnumpy() - expect2 [all …]
|
D | test_realdiv_op.py | 77 expect2 = np.divide(x2_np, y2_np) 78 diff2 = output2.asnumpy() - expect2 79 error2 = np.ones(shape=expect2.shape) * 1.0e-5 81 assert output2.shape == expect2.shape 114 expect2 = np.divide(x2_np, y2_np) 115 diff2 = output2.asnumpy() - expect2 116 error2 = np.ones(shape=expect2.shape) * 1.0e-5 118 assert output2.shape == expect2.shape
|
D | test_random_choice_with_mask.py | 68 expect2 = (10,) 72 assert output2.shape == expect2 83 expect2 = (10,) 87 assert output2.shape == expect2 98 expect2 = (4,) 102 assert output2.shape == expect2
|
D | test_oneslike_op.py | 81 expect2 = np.ones_like(x2_np) 82 diff2 = output2.asnumpy() - expect2 83 error2 = np.ones(shape=expect2.shape) * 1.0e-5 85 assert output2.shape == expect2.shape
|
D | test_sub_op.py | 72 expect2 = np.subtract(np_x2, np_y2) 73 error2 = np.ones(shape=expect2.shape) * 1.0e-5 92 diff2 = output2.asnumpy() - expect2 94 assert output2.shape == expect2.shape 115 diff2 = output2.asnumpy() - expect2 117 assert output2.shape == expect2.shape
|
D | test_softmax_op.py | 45 expect2 = np.ones(4) 47 error2 = expect2 * 1.0e-6 55 diff2 = np.abs(outputSum2 - expect2) 65 diff2 = np.abs(outputSum2 - expect2)
|
/third_party/mindspore/tests/st/ops/cpu/ |
D | test_argmaxwithvalue_op.py | 53 expect2 = np.array([1, 0, 0, 0]).astype(data_type) 61 assert (output[1][0].asnumpy() == expect2).all() 71 assert (output[1][0].asnumpy() == expect2).all() 85 expect2 = np.maximum.reduce(x_np, 0) 87 assert (output[1].asnumpy() == expect2).all() 92 expect2 = np.maximum.reduce(x_np, 1) 94 assert (output[1].asnumpy() == expect2).all() 99 expect2 = np.maximum.reduce(x_np, 2) 101 assert (output[1].asnumpy() == expect2).all()
|
D | test_random_choice_with_mask_op.py | 68 expect2 = (10,) 72 assert output2.shape == expect2 83 expect2 = (10,) 87 assert output2.shape == expect2 98 expect2 = (4,) 102 assert output2.shape == expect2
|
D | test_squared_difference_op.py | 55 expect2 = diff * diff 56 assert np.all(expect2 == output2) 57 assert output2.shape == expect2.shape 84 expect2 = diff * diff 85 assert np.all(expect2 == output2) 86 assert output2.shape == expect2.shape
|
D | test_arithmetic_op.py | 140 expect2 = np.divide(x2_np, y2_np).astype(np.float16) 141 diff2 = output2.asnumpy() - expect2 142 error2 = np.ones(shape=expect2.shape) * 1.0e-5 144 assert output2.shape == expect2.shape 221 expect2 = np.floor_divide(x2_np, y2_np).astype(np.float16) 222 diff2 = output2.asnumpy() - expect2 223 error2 = np.ones(shape=expect2.shape) * 1.0e-5 225 assert output2.shape == expect2.shape 298 expect2 = np.mod(x2_np, y2_np).astype(np.float16) 299 diff2 = output2.asnumpy() - expect2 [all …]
|
D | test_transpose_op.py | 76 expect2 = np.array([[[[[0, 1, 2, 3, 4], 144 assert (output[2].asnumpy() == expect2).all() 198 expect2 = np.array([[[[[0, 1, 2, 3, 4], 266 assert (output[2].asnumpy() == expect2).all() 320 expect2 = np.array([[[[[0, 1, 2, 3, 4], 388 assert (output[2].asnumpy() == expect2).all()
|
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | NumberFormatTest.java | 264 expect2(df, 1, "1.00 "); in Test20186_SpacesAroundSemicolon() 265 expect2(df, -1, " -1.00"); in Test20186_SpacesAroundSemicolon() 268 expect2(df, 1, "1.00"); in Test20186_SpacesAroundSemicolon() 269 expect2(df, -1, "-1.00"); in Test20186_SpacesAroundSemicolon() 272 expect2(df, 1, "1.00"); in Test20186_SpacesAroundSemicolon() 276 expect2(df, 1, " 1.00 "); in Test20186_SpacesAroundSemicolon() 277 expect2(df, -1, " -1.00 "); in Test20186_SpacesAroundSemicolon() 622 expect2(df, 1.23, "\u00A41.23"); in TestMismatchedCurrencyFormatFail() 624 expect2(df, 1.23, "\u20AC1.23"); in TestMismatchedCurrencyFormatFail() 1193 expect2(fmt1, n, "1.234E3"); in TestExponent() [all …]
|
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/format/ |
D | NumberFormatTest.java | 267 expect2(df, 1, "1.00 "); in Test20186_SpacesAroundSemicolon() 268 expect2(df, -1, " -1.00"); in Test20186_SpacesAroundSemicolon() 271 expect2(df, 1, "1.00"); in Test20186_SpacesAroundSemicolon() 272 expect2(df, -1, "-1.00"); in Test20186_SpacesAroundSemicolon() 275 expect2(df, 1, "1.00"); in Test20186_SpacesAroundSemicolon() 279 expect2(df, 1, " 1.00 "); in Test20186_SpacesAroundSemicolon() 280 expect2(df, -1, " -1.00 "); in Test20186_SpacesAroundSemicolon() 625 expect2(df, 1.23, "\u00A41.23"); in TestMismatchedCurrencyFormatFail() 627 expect2(df, 1.23, "\u20AC1.23"); in TestMismatchedCurrencyFormatFail() 1196 expect2(fmt1, n, "1.234E3"); in TestExponent() [all …]
|