Home
last modified time | relevance | path

Searched refs:arange (Results 1 – 25 of 172) sorted by relevance

1234567

/third_party/mindspore/tests/st/ops/gpu/
Dtest_cast_op.py60 x0 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.float32))
62 x1 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.float16))
78 x0 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.int32))
80 x1 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.bool))
95 x0 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.float16))
97 x1 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.float16))
112 x0 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.int64))
114 x1 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.float32))
129 x0 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.int32))
131 x1 = Tensor(np.arange(24).reshape((4, 3, 2)).astype(np.int32))
[all …]
Dtest_addn_op.py41 x = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float32)
42 y = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float32)
43 z = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float32)
64 x = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
65 y = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
66 z = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
81 x = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
82 y = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
83 z = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.float64)
103 x = np.arange(1 * 3 * 3 * 4).reshape(1, 3, 3, 4).astype(np.int64)
[all …]
Dtest_batch_matmul.py39 input_x = Tensor(np.arange(2 * 4 * 1 * 3).reshape(2, 4, 1, 3), mstype.float32)
40 input_y = Tensor(np.arange(2 * 4 * 3 * 4).reshape(2, 4, 3, 4), mstype.float32)
61 input_x = Tensor(np.arange(2 * 4 * 1 * 3).reshape(2, 4, 1, 3), mstype.float64)
62 input_y = Tensor(np.arange(2 * 4 * 3 * 4).reshape(2, 4, 3, 4), mstype.float64)
83 input_x = Tensor(np.arange(2 * 4 * 3 * 1).reshape(2, 4, 3, 1), mstype.float32)
84 input_y = Tensor(np.arange(2 * 4 * 3 * 4).reshape(2, 4, 3, 4), mstype.float32)
105 input_x = Tensor(np.arange(2 * 4 * 1 * 3).reshape(2, 4, 1, 3), mstype.float32)
106 input_y = Tensor(np.arange(2 * 4 * 4 * 3).reshape(2, 4, 4, 3), mstype.float32)
127 input_x = Tensor(np.arange(2 * 4 * 3 * 1).reshape(2, 4, 3, 1), mstype.float32)
128 input_y = Tensor(np.arange(2 * 4 * 4 * 3).reshape(2, 4, 4, 3), mstype.float32)
[all …]
Dtest_apply_gradient_descent_op.py40 var = Tensor(np.arange(10).reshape(2, 5).astype(np.float32) / 10)
43 delta = Tensor(np.arange(34, 44).reshape(2, 5).astype(np.float32))
51 var = Tensor(np.arange(10).reshape(2, 5).astype(np.float32) / 10)
54 delta = Tensor(np.arange(34, 44).reshape(2, 5).astype(np.float32))
67 var = Tensor(np.arange(10).reshape(2, 5).astype(np.float16) / 10)
70 delta = Tensor(np.arange(34, 44).reshape(2, 5).astype(np.float16))
78 var = Tensor(np.arange(10).reshape(2, 5).astype(np.float16) / 10)
81 delta = Tensor(np.arange(34, 44).reshape(2, 5).astype(np.float16))
Dtest_repeat_elements_op.py43 a = np.arange(1)
54 a = np.arange(1)
69 a = np.arange(24)
80 a = np.arange(24)
91 a = np.arange(1).reshape(1, 1)
106 a = np.arange(1).reshape(1, 1)
121 a = np.arange(24).reshape(12, 2)
136 a = np.arange(24).reshape(8, 3)
151 a = np.arange(1).reshape(1, 1, 1)
170 a = np.arange(1).reshape(1, 1, 1)
[all …]
Dtest_zeroslike_op.py97 x = Tensor(np.arange(120).reshape(3, 4, 1, 2, 5).astype(np.bool))
106 x = Tensor(np.arange(24).reshape(1, 4, 1, 6).astype(np.int8))
115 x = Tensor(np.arange(30).reshape(3, 2, 5).astype(np.uint8))
124 x = Tensor(np.arange(16).reshape(2, 2, 2, 2).astype(np.int32))
133 x = Tensor(np.arange(120).reshape(3, 4, 1, 2, 5).astype(np.float16))
142 x = Tensor(np.arange(63).reshape(3, 7, 3).astype(np.float32))
151 x = Tensor(np.arange(2).reshape(2, 1, 1).astype(np.float64))
163 x = Tensor(np.arange(4).reshape(4).astype(np.float32))
168 x = Tensor(np.arange(8).reshape(2, 1, 2, 2).astype(np.uint8))
173 x = Tensor(np.arange(1).reshape(1).astype(np.float16))
Dtest_sparse_apply_proximal_adagrad_op.py48 var = Tensor(np.arange(9).reshape(3, 3).astype(np.float32))
69 var = Tensor(np.arange(9).reshape(3, 3).astype(np.float32))
91 var = Tensor(np.arange(9).reshape(3, 3).astype(np.float32))
112 var = Tensor(np.arange(9).reshape(3, 3).astype(np.float32))
113 accum = Tensor(np.arange(63, 72).reshape(3, 3).astype(np.float32))
117 grad = Tensor(np.arange(34, 43).reshape(3, 3).astype(np.float32) * 8)
133 var = Tensor(np.arange(24).reshape((2, 3, 4)).astype(np.float32))
134 accum = Tensor(np.arange(34, 58).reshape((2, 3, 4)).astype(np.float32))
139 indices = Tensor(np.arange(2).astype(np.int32))
Dtest_scatter_func_op.py110 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float32))
134 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float32))
162 updates = Tensor(np.arange(96).reshape((2, 2, 2, 3, 4)).astype(np.float32))
271 updates = Tensor(np.arange(6).reshape((2, 3)).astype(np.float32))
303 updates = Tensor(np.arange(34, 70).reshape((2, 2, 3, 3)).astype(np.float32))
343 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float16))
367 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.float16))
420 inputx = Tensor(np.flip(np.arange(34, 46).reshape(3, 4).astype(np.float16)))
422 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.float16))
456 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.int32))
[all …]
Dtest_unique_op.py109 x_np1 = np.arange(100)
110 x_np2 = np.arange(100, 200)
111 x_np3 = np.arange(200, 300)
114 exp_output = np.arange(300).astype(np.float32)
169 x_np1 = np.arange(100)
170 x_np2 = np.arange(100, 200)
171 x_np3 = np.arange(200, 300)
174 exp_output = np.arange(300).astype(np.float16)
229 x_np1 = np.arange(100)
230 x_np2 = np.arange(100, 200)
[all …]
Dtest_conv2d_op.py50 x = Tensor(np.arange(1 * 3 * 3 * 3).reshape(1, 3, 3, 3).astype(np.float32))
51 w = Tensor(np.arange(2 * 3 * 1 * 1).reshape(2, 3, 1, 1).astype(np.float32))
197 x1 = Tensor(np.arange(1 * 3 * 3 * 3).reshape(1, 3, 3, 3).astype(np.float32))
198 w1 = Tensor(np.arange(2 * 3 * 1 * 1).reshape(2, 3, 1, 1).astype(np.float32))
206 x2 = Tensor(np.arange(5 * 1 * 2 * 2).reshape(5, 1, 2, 2).astype(np.float32))
207 w2 = Tensor(np.arange(2 * 1 * 1 * 1).reshape(2, 1, 1, 1).astype(np.float32))
259 x1 = Tensor(np.arange(1 * 4 * 4 * 1).reshape(1, 4, 4, 1).astype(np.float32))
260 w1 = Tensor(np.arange(3 * 2 * 2 * 1).reshape(3, 2, 2, 1).astype(np.float32))
Dtest_tensor_scatter_add.py50 arr_input = np.arange(21).reshape(3, 7).astype(np.float32)
58 arr_input = np.arange(24).reshape(4, 2, 3).astype(np.float32)
73 arr_input = np.arange(21).reshape(3, 7).astype(np.float32)
80 arr_input = np.arange(24).reshape(4, 2, 3).astype(np.float32)
88 arr_input = np.arange(25).reshape(5, 5).astype(np.float32)
108 arr_input = np.arange(25).reshape(5, 5).astype(np.float64)
128 arr_input = np.arange(25).reshape(5, 5).astype(np.int32)
Dtest_add_op.py41 Tensor(np.arange(3).reshape(3).astype(nptype)), [3]), name='x1')
46 … Tensor(np.arange(3 * 3 * 3 * 3).reshape(3, 3, 3, 3).astype(nptype)), [3, 3, 3, 3]), name='x2')
48 … Tensor(np.arange(3 * 3 * 3 * 3).reshape(3, 3, 3, 3).astype(nptype)), [3, 3, 3, 3]), name='y2')
51 … Tensor(np.arange(1 * 1 * 3 * 3).reshape(1, 1, 3, 3).astype(nptype)), [1, 1, 3, 3]), name='x3')
53 … Tensor(np.arange(3 * 3 * 3 * 3).reshape(3, 3, 3, 3).astype(nptype)), [3, 3, 3, 3]), name='y3')
185 x1 = Tensor(np.arange(3).reshape(3).astype(nptype))
188 x2 = Tensor(np.arange(3 * 3 * 3 * 3).reshape(3, 3, 3, 3).astype(nptype))
189 y2 = Tensor(np.arange(3 * 3 * 3 * 3).reshape(3, 3, 3, 3).astype(nptype))
/third_party/mindspore/tests/st/ops/cpu/
Dtest_matmul.py43 input_x = Tensor(np.arange(1 * 3).reshape((1, 3)), mstype.float32)
44 input_y = Tensor(np.arange(3 * 5).reshape((3, 5)), mstype.float32)
57 input_x = Tensor(np.arange(4 * 3).reshape((4, 3)), mstype.float32)
58 input_y = Tensor(np.arange(3 * 5).reshape((3, 5)), mstype.float32)
74 input_x = Tensor(np.arange(3 * 2).reshape((3, 2)), mstype.float32)
75 input_y = Tensor(np.arange(3 * 4).reshape((3, 4)), mstype.float32)
89 input_x = Tensor(np.arange(2 * 3).reshape((2, 3)), mstype.float32)
90 input_y = Tensor(np.arange(5 * 3).reshape((5, 3)), mstype.float32)
104 input_x = Tensor(np.arange(3 * 5).reshape((3, 5)), mstype.float16)
105 input_y = Tensor(np.arange(4 * 3).reshape((4, 3)), mstype.float16)
Dtest_batch_matmul.py45 input_x = Tensor(np.arange(2 * 4 * 1 * 3).reshape((2, 4, 1, 3)), mstype.float32)
46 input_y = Tensor(np.arange(2 * 4 * 3 * 4).reshape((2, 4, 3, 4)), mstype.float32)
66 input_x = Tensor(np.arange(2 * 3 * 2 * 3).reshape((2, 3, 2, 3)), mstype.float32)
67 input_y = Tensor(np.arange(2 * 3 * 3 * 4).reshape((2, 3, 3, 4)), mstype.float32)
91 input_x = Tensor(np.arange(2 * 3 * 3 * 2).reshape((2, 3, 3, 2)), mstype.float32)
92 input_y = Tensor(np.arange(2 * 3 * 3 * 4).reshape((2, 3, 3, 4)), mstype.float32)
116 input_x = Tensor(np.arange(2 * 3 * 2 * 3).reshape((2, 3, 2, 3)), mstype.float32)
117 input_y = Tensor(np.arange(2 * 3 * 4 * 3).reshape((2, 3, 4, 3)), mstype.float32)
141 input_x = Tensor(np.arange(2 * 3 * 3 * 2).reshape((2, 3, 3, 2)), mstype.float16)
142 input_y = Tensor(np.arange(2 * 3 * 4 * 3).reshape((2, 3, 4, 3)), mstype.float16)
Dtest_transpose_op.py34 …self.x_2D = Parameter(initializer(Tensor(np.arange(5 * 6).reshape(5, 6).astype(np.float32)), [5, 6…
38 …self.x_3D = Parameter(initializer(Tensor(np.arange(2 * 2 * 4).reshape(2, 2, 4).astype(np.float32))…
43 initializer(Tensor(np.arange(2 * 3 * 4 * 5).reshape(2,
49 … initializer(Tensor(np.arange(1 * 2 * 3 * 4 * 5).reshape(1, 2, 3, 4, 5).astype(np.float32)),
156 …self.x_2D = Parameter(initializer(Tensor(np.arange(5 * 6).reshape(5, 6).astype(np.int64)), [5, 6]),
160 …self.x_3D = Parameter(initializer(Tensor(np.arange(2 * 2 * 4).reshape(2, 2, 4).astype(np.int64)), …
165 initializer(Tensor(np.arange(2 * 3 * 4 * 5).reshape(2,
171 … initializer(Tensor(np.arange(1 * 2 * 3 * 4 * 5).reshape(1, 2, 3, 4, 5).astype(np.int64)),
278 …self.x_2D = Parameter(initializer(Tensor(np.arange(5 * 6).reshape(5, 6).astype(np.uint8)), [5, 6]),
282 …self.x_3D = Parameter(initializer(Tensor(np.arange(2 * 2 * 4).reshape(2, 2, 4).astype(np.uint8)), …
[all …]
Dtest_addn_op.py40 x = np.arange(2 * 3 * 2).reshape((2, 3, 2))
41 y = np.arange(88, 2 * 3 * 2 + 88).reshape((2, 3, 2))
64 x = np.arange(2 * 3).reshape((2, 3))
65 y = np.arange(1, 2 * 3 + 1).reshape((2, 3))
66 m = np.arange(2, 2 * 3 + 2).reshape((2, 3))
67 n = np.arange(3, 2 * 3 + 3).reshape((2, 3))
Dtest_scatter_arithmetic_op.py57 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float32))
70 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float32))
85 updates = Tensor(np.arange(96).reshape((2, 2, 2, 3, 4)).astype(np.float32))
120 updates = Tensor(np.arange(6).reshape((2, 3)).astype(np.float32))
138 updates = Tensor(np.arange(34, 70).reshape((2, 2, 3, 3)).astype(np.float32))
152 updates = Tensor(np.arange(12).reshape((2, 2, 3)).astype(np.float16))
165 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.float16))
180 inputx = Tensor(np.flip(np.arange(34, 46).reshape(3, 4).astype(np.float16)))
185 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.float16))
199 updates = Tensor(np.arange(63, 111).reshape((2, 2, 3, 4)).astype(np.int32))
[all …]
Dtest_dot_op.py66 …x1_tensor = initializer(Tensor(np.arange(2 * 3 * 4).reshape(2, 3, 4).astype(np.float32)), [2, 3, 4…
67 …x2_tensor = initializer(Tensor(np.arange(1 * 5 * 4 * 2).reshape(1, 5, 4, 2).astype(np.float32)), […
109 x1_tensor = initializer(Tensor(np.arange(3 * 4).reshape(3, 4).astype(np.float32)), [3, 4])
110 x2_tensor = initializer(Tensor(np.arange(4 * 5).reshape(4, 5).astype(np.float32)), [4, 5])
125 …x1_tensor = initializer(Tensor(np.arange(2 * 3 * 4).reshape(2, 3, 4).astype(np.float32)), [2, 3, 4…
126 x2_tensor = initializer(Tensor(np.arange(4 * 5).reshape(4, 5).astype(np.float32)), [4, 5])
144 x1_tensor = initializer(Tensor(np.arange(4).reshape(4).astype(np.float32)), [4])
145 …x2_tensor = initializer(Tensor(np.arange(2 * 4 * 5).reshape(2, 4, 5).astype(np.float32)), [2, 4, 5…
155 x1_tensor = initializer(Tensor(np.arange(4).reshape(4).astype(np.float32)), [4])
156 x2_tensor = initializer(Tensor(np.arange(4 * 4).reshape(4, 4).astype(np.float32)), [4, 4])
Dtest_split_op.py43 input_x = Tensor(np.arange(24).astype(np.int32).reshape((2, 2, 6)))
58 input_x = Tensor(np.arange(24).astype(np.int32).reshape((2, 2, 6)))
75 input_x = Tensor(np.arange(24).astype(np.float32).reshape((2, 2, 6)))
90 input_x = Tensor(np.arange(192).astype(np.float32).reshape((2, 2, 2, 2, 2, 6)))
112 input_x = Tensor(np.arange(192).astype(np.float64).reshape((2, 2, 2, 2, 2, 6)))
134 input_x = Tensor(np.arange(320).astype(np.float16).reshape((2, 2, 2, 2, 2, 10)))
158 input_x = Tensor(np.arange(192).astype(np.int32).reshape((2, 2, 2, 2, 2, 6)))
180 input_x = Tensor(np.arange(192).astype(np.int64).reshape((2, 2, 2, 2, 2, 6)))
202 input_x = Tensor(np.arange(320).astype(np.uint32).reshape((2, 2, 2, 2, 2, 10)))
235 input_x = Tensor(np.arange(1).astype(np.uint32))
/third_party/boost/libs/python/test/numpy/
Dindexing.py15 x = numpy.arange(0,10)
22 x = numpy.arange(0,10)
28 x = numpy.arange(0,10)
34 x = numpy.arange(0,10)
39 x = numpy.arange(9).reshape(3,3)
44 x = numpy.arange(0,10)
48 x = numpy.arange(9).reshape(3,3)
/third_party/mindspore/tests/ut/python/pipeline/parse/
Dtest_partial.py38 x = Tensor(np.arange(3).reshape((3,)).astype(np.float32))
39 y = Tensor(np.arange(3 * 4).reshape((3, 4)).astype(np.float32))
40 z = Tensor(np.arange(3 * 4 * 5).reshape((3, 4, 5)).astype(np.float32))
57 x = Tensor(np.arange(3).reshape((3,)).astype(np.float32))
58 y = Tensor(np.arange(3 * 4).reshape((3, 4)).astype(np.float32))
59 z = Tensor(np.arange(3 * 4 * 5).reshape((3, 4, 5)).astype(np.float32))
76 x = Tensor(np.arange(3).reshape((3,)).astype(np.float32))
77 y = Tensor(np.arange(3 * 4).reshape((3, 4)).astype(np.float32))
78 z = Tensor(np.arange(3 * 4 * 5).reshape((3, 4, 5)).astype(np.float32))
96 x = Tensor(np.arange(3).reshape((3,)).astype(np.float32))
[all …]
Dtest_enumerate.py66 self.value = Tensor(np.arange(2 * 3).reshape(2, 3))
89 x = Tensor(np.arange(4))
108 x = Tensor(np.arange(4))
126 x = Tensor(np.arange(2 * 3).reshape(2, 3))
153 self.value = Tensor(np.arange(2*3).reshape(2, 3))
181 x = Tensor(np.arange(4))
199 x = Tensor(np.arange(2 * 3).reshape(2, 3))
226 self.value = Tensor(np.arange(2 * 3).reshape(2, 3))
254 x = Tensor(np.arange(4))
272 x = Tensor(np.arange(2 * 3).reshape(2, 3))
[all …]
/third_party/mindspore/tests/ut/python/ops/
Dtest_tensor_getitem.py54 input_np = np.arange(60).reshape(3, 4, 5)
63 input_np = np.arange(60).reshape(3, 4, 5)
72 input_np = np.arange(60).reshape(3, 4, 5)
81 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8)
90 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8)
99 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8)
108 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8)
117 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8)
/third_party/mindspore/tests/ut/python/numpy_native/
Dtest_numpy_ops.py105 a = mnp.arange(10)
106 b = mnp.arange(0, 10)
107 c = mnp.arange(0.1, 9.9)
227 'desc_inputs': [Tensor(np.arange(18, dtype=np.int32).reshape(2, 3, 1, 3)),
228 Tensor(np.arange(9, dtype=np.int32).reshape(1, 3, 3))],
232 'desc_inputs': [Tensor(np.arange(9, dtype=np.int32).reshape(3, 3)),
233 Tensor(np.arange(9, dtype=np.int32).reshape(3, 3)),],
242 'desc_inputs': [Tensor(np.arange(9, dtype=np.float32).reshape(3, 3))],
246 'desc_inputs': [Tensor(np.arange(9, dtype=np.float32).reshape(3, 3))],
254 'desc_inputs': [Tensor(np.arange(1, 7, dtype=np.float32).reshape(2, 3))],
[all …]
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/
Dtest_concat.py34 Tensor(np.arange(2 * 2).reshape(2, 2).astype(np.float32)), [2, 2]), name='x1')
36 Tensor(np.arange(2 * 3).reshape(2, 3).astype(np.float32)), [2, 3]), name='x2')
48 print(np.arange(2 * 2).reshape(2, 2))
49 print(np.arange(2 * 3).reshape(2, 3))

1234567