/third_party/mindspore/tests/ut/python/ops/ |
D | test_tensor_getitem.py | 54 input_np = np.arange(60).reshape(3, 4, 5) 55 input_me = Tensor(input_np, dtype=mstype.float32) 63 input_np = np.arange(60).reshape(3, 4, 5) 64 input_me = Tensor(input_np, dtype=mstype.float32) 72 input_np = np.arange(60).reshape(3, 4, 5) 73 input_me = Tensor(input_np, dtype=mstype.float32) 81 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8) 82 input_me = Tensor(input_np, dtype=mstype.float32) 90 input_np = np.arange(3*4*5*6*7*8).reshape(3, 4, 5, 6, 7, 8) 91 input_me = Tensor(input_np, dtype=mstype.float32) [all …]
|
/third_party/mindspore/tests/ut/python/exec/ |
D | test_train.py | 32 def me_train_tensor(net, input_np, label_np, epoch_size=2): argument 44 _train_net(Tensor(input_np), Tensor(label_np)) 78 input_np = np.ones([1, 3, 3, 3], np.float32) 80 me_train_tensor(Net(3, bias_init=bias_init), input_np, label_np) 110 input_np = np.ones([1, 3, 32, 32]).astype(np.float32) * 0.01 112 me_train_tensor(net, input_np, label_np) 147 input_np = np.ones([32, 3, 224, 224]).astype(np.float32) * 0.01 149 me_train_tensor(net, input_np, label_np) 177 input_np = np.ones([32, 2048, 1, 1]).astype(np.float32) * 0.01 179 me_train_tensor(net, input_np, label_np)
|
/third_party/mindspore/tests/ut/python/pipeline/parse/ |
D | test_dictionary.py | 68 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 69 input_me = Tensor(input_np) 76 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 77 input_me = Tensor(input_np) 83 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 84 input_me = Tensor(input_np)
|
D | test_list.py | 37 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 38 input_me = Tensor(input_np) 44 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 45 input_me = Tensor(input_np)
|
D | test_for_stmt.py | 59 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 60 input_me = Tensor(input_np) 90 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 91 input_me = Tensor(input_np) 124 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 125 input_me = Tensor(input_np)
|
D | test_fix_bug.py | 59 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 60 input_me = Tensor(input_np) 94 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 95 input_me = Tensor(input_np)
|
D | test_cont_break.py | 28 input_np = np.random.randn(2, 3).astype(np.float32) 29 input_ms = Tensor(input_np) 30 output_np = net.construct(input_np) # run python
|
D | test_celllist.py | 44 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 45 input_me = Tensor(input_np)
|
/third_party/mindspore/tests/st/fusion/ |
D | test_conv_bn1_fusion.py | 41 def me_train_tensor(net, input_np, label_np, epoch_size=2): argument 52 output = _train_net(Tensor(input_np), Tensor(label_np)) 82 input_np = np.ones([batch_size, input_channel, 7, 7]).astype(np.float32) * 0.01 84 me_train_tensor(net, input_np, label_np) 109 input_np = np.ones([batch_size, input_channel, 7, 7]).astype(np.float32) * 0.01 111 me_train_tensor(net, input_np, label_np) 134 input_np = np.ones([batch_size, input_channel, 7, 7]).astype(np.float32) * 0.01 136 me_train_tensor(net, input_np, label_np)
|
/third_party/mindspore/tests/st/pynative/ |
D | test_tensor_getitem.py | 58 input_np = np.arange(6*8*10).reshape(6, 8, 10).astype(np.int32) 59 input_0 = Tensor(input_np) 61 assert np.all(output0.asnumpy() == input_np[3:4:1, 1:5:2, 3:6:1] + np.ones([1, 2, 3])) 62 assert np.all(output1.asnumpy() == input_np[-6:4:1, 0:8:1, ::1] + np.ones([4, 8, 10])) 63 assert np.all(output2.asnumpy() == input_np[::, ::, ::] + np.ones([6, 8, 10])) 64 assert np.all(output3.asnumpy() == input_np[::2] + np.ones([3, 8, 10])) 89 input_np = np.arange(6*7*8*9).reshape(6, 7, 8, 9).astype(np.int32) 90 input_0 = Tensor(input_np) 92 assert np.all(output0.asnumpy() == input_np[0:4:2, ..., 1] + np.ones([2, 7, 8])) 93 assert np.all(output1.asnumpy() == input_np[...] + np.ones([6, 7, 8, 9])) [all …]
|
D | test_pynative_hook_grad.py | 229 input_np = np.ones([1, 1, 224, 224]).astype(np.float32) 234 input_ms = Tensor(input_np) 241 input_np = np.ones([2, 2]).astype(np.float32) 246 input_ms = Tensor(input_np) 262 input_np = np.ones([2, 2]).astype(np.float32) 269 input_ms = Tensor(input_np) 290 input_np = np.ones([2, 2]).astype(np.float32) 295 input_ms = Tensor(input_np) 326 input_np = np.ones([2, 2]).astype(np.float32) 331 input_ms = Tensor(input_np) [all …]
|
D | test_pynative_layernorm_input_and_argmaxwithvalue.py | 98 self.input_np = np.random.randn(*input_shape).astype(dtype=dtype) 109 input_ms = Tensor(self.input_np) 119 input_nn = Tensor(self.input_np) 165 self.input_np = np.random.rand(*input_shape).astype(dtype) 171 input_forward = Tensor(self.input_np) 177 index = np.argmax(self.input_np, axis=self.axis) 178 value = np.amax(self.input_np, axis=self.axis, keepdims=self.keep_dims) 182 input_back = Tensor(self.input_np)
|
D | test_ops.py | 26 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 27 input_x = Tensor(input_np)
|
/third_party/mindspore/tests/st/ops/ascend/test_aicpu_ops/ |
D | test_tensor_setitem.py | 29 input_np = np.zeros(input_shape, dtype) 31 input_tensor = Tensor(input_np) 35 input_np[slice_tuple] = update_np 36 assert (output.asnumpy() == input_np).all()
|
D | test_tensor_copy_slices.py | 52 input_np = np.zeros(input_shape, dtype) 54 input_tensor = Tensor(input_np) 59 input_np[slices] = update_np 60 assert (output.asnumpy() == input_np).all()
|
/third_party/mindspore/tests/st/ops/ascend/test_tbe_ops/ |
D | test_gelu.py | 36 input_np = np.random.randn(*input_shape).astype(data_type) 37 input_me = Tensor(input_np) 43 input_np = np.random.randn() 44 input_me = Tensor(input_np)
|
D | test_pow.py | 46 input_np = np.absolute(np.random.randn()) 48 input_np = np.absolute(np.random.randn(*input_shape).astype(np.float32)) 49 input_me = Tensor(input_np, dtype=ms.float32)
|
D | test_tanh.py | 36 input_np = np.random.randn(*input_shape).astype(np.float32) variable 37 input_me = Tensor(input_np)
|
D | test_tanh_grad.py | 36 input_np = np.random.randn(*input_shape).astype(np.float32) variable 37 input_me = Tensor(input_np)
|
/third_party/mindspore/tests/st/tbe_networks/ |
D | export_geir.py | 25 input_np = np.random.uniform(0.0, 1.0, size=[batch_size, 3, 224, 224]).astype(np.float32) 27 export(net, Tensor(input_np), file_name="./me_resnet50.pb", file_format="AIR")
|
/third_party/mindspore/tests/ut/python/parallel/ |
D | test_auto_parallel_resnet.py | 295 input_np = np.ones([batch_size, 3, 224, 224]).astype(np.float32) 299 dataset = DatasetLenet(Tensor(input_np), Tensor(label_np), 1) 671 input_np = np.ones([batch_size, 3, 224, 224]).astype(np.float32) 675 dataset = DatasetLenet(Tensor(input_np), Tensor(label_np), 1) 699 input_np = np.ones([batch_size, 3, 224, 224]).astype(np.float32) 703 dataset = DatasetLenet(Tensor(input_np), Tensor(label_np), 1) 725 input_np = np.ones([batch_size, 3, 224, 224]).astype(np.float32) 729 dataset = DatasetLenet(Tensor(input_np), Tensor(label_np), 1) 751 input_np = np.ones([batch_size, 3, 224, 224]).astype(np.float32) 755 dataset = DatasetLenet(Tensor(input_np), Tensor(label_np), 1)
|
D | test_auto_parallel_resnet_predict.py | 35 input_np = Tensor(np.ones([batch_size, 3, 224, 224]).astype(np.float32)) 38 model.predict(input_np)
|
/third_party/mindspore/tests/st/control/ |
D | test_if_by_if.py | 64 input_np = np.random.randn(2, 3, 4, 5).astype(np.float32) 66 out_ms = net(Tensor(input_np)) 67 out_np = input_np * 4
|
D | test_cont_break.py | 28 input_np = np.random.randn(2, 3).astype(np.float32) 29 input_ms = Tensor(input_np) 30 output_np = net.construct(input_np) # run python
|
/third_party/mindspore/tests/st/ops/gpu/ |
D | test_lstm_op.py | 41 …input_np = np.array([[[0.6755, -1.6607, 0.1367, -0.9209, -1.7088, 0.3953, 2.7120, 0.1103, 0.1504, … 57 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x') 173 …input_np = np.array([[[-1.7322, 1.6642, -1.1861, 0.2955, -0.7907, 0.2982, -1.3413, 1.0665, -0.0436… 189 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x') 330 …input_np = np.array([[[-0.1887, -0.4144, -0.0235, 0.7489, 0.7522, 0.5969, 0.3342, 1.2198, 0.6786, … 346 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x') 604 …input_np = np.array([[[-0.5907, 1.0557, 1.7283, 0.6706, -1.2550, -0.5298, -0.2290, -0.6735, 0.8555… 620 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x') 878 …input_np = np.array([[[-2.48789445e-01, -2.18991071e-01, -8.41492534e-01, -5.73351622e-01, 8.20644… 904 … self.x = Parameter(initializer(Tensor(input_np), [seq_len, batch_size, input_size]), name='x')
|