/third_party/mindspore/tests/ut/python/pipeline/parse/ |
D | test_graph_return_const_param.py | 54 tensor_y = Tensor(np.ones(2), dtype=mstype.int32) 55 out = choose(tensor_x, tensor_y) 62 tensor_y = Tensor(2, dtype=mstype.int32) 63 out = choose(tensor_x, tensor_y) 64 assert np.allclose(tensor_y.asnumpy(), out.asnumpy()) 69 tensor_y = Tensor(np.ones(2), dtype=mstype.int32) 70 choose = ChooseOneConst(0, tensor_x, tensor_y) 77 tensor_y = Tensor(np.ones(2), dtype=mstype.int32) 78 choose = ChooseOneConst(1, tensor_x, tensor_y) 80 assert np.allclose(tensor_y.asnumpy(), out.asnumpy())
|
D | test_ms_function_pass_non_tensor_inputs.py | 41 tensor_y = Tensor(np.ones((2, 3, 4), np.float32) * 2) 45 compute(tensor_x, tensor_y, p, q, w) 49 def tensor_reduce(tensor_x, axis, tensor_y): argument 51 ret = reduce_sum(tensor_x, axis) + tensor_y 58 tensor_y = Tensor(np.ones((4, 5), np.float32) * 2) 59 tensor_reduce(tensor_x, axis, tensor_y)
|
D | test_outermost_net_pass_non_tensor_inputs.py | 31 def construct(self, tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag): argument 33 return tensor_x - tuple_a[2] + list_b[1][1]["x"] - tensor_y + scalar - dict_c["x"] 34 return tensor_x + tuple_a[2] - list_b[1][1]["y"] + tensor_y - scalar + dict_c["y"] 44 def construct(self, tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag): argument 45 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag) 55 def construct(self, tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c): argument 56 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c) 87 def construct(self, tensor_x, tuple_a, list_b, tensor_y, tensor_z, dict_c): argument 88 return tensor_x + tuple_a[2] - list_b[1][1]["y"] + tensor_y - tensor_z + dict_c["y"]
|
/third_party/mindspore/tests/ut/python/pynative_mode/ |
D | test_outermost_non_tensor_input.py | 31 def construct(self, tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag): argument 33 return tensor_x - tuple_a[2] + list_b[1][1]["x"] - tensor_y + scalar - dict_c["x"] 34 return tensor_x + tuple_a[2] - list_b[1][1]["y"] + tensor_y - scalar + dict_c["y"] 44 def construct(self, tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag): argument 45 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, scalar, dict_c, flag) 55 def construct(self, tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c): argument 56 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c) 87 def construct(self, tensor_x, tuple_a, list_b, tensor_y, tensor_z, dict_c): argument 88 return tensor_x + tuple_a[0] - list_b[1][1]["y"] + tensor_y - tensor_z + dict_c["y"]
|
/third_party/mindspore/tests/ut/cpp/ops/ |
D | test_ops_add.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto add_abstract = add->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_pow.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto pow_abstract = pow->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_mul.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto mul_abstract = mul->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_maximum.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto maximum_abstract = maximum->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_squareddifference.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 …auto squareddifference_abstract = squareddifference->Infer({tensor_x->ToAbstract(), tensor_y->ToAb… in TEST_F()
|
D | test_ops_sub.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto sub_abstract = sub->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_div.cc | 36 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{1,… in TEST_F() local 38 MS_EXCEPTION_IF_NULL(tensor_y); in TEST_F() 39 auto div_abstract = div->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
D | test_ops_mfcc.cc | 38 …auto tensor_y = TensorConstructUtils::CreateOnesTensor(kNumberTypeFloat32, std::vector<int64_t>{3}… in TEST_F() local 41 auto mfcc_abstract = mfcc->Infer({tensor_x->ToAbstract(), tensor_y->ToAbstract()}); in TEST_F()
|
/third_party/mindspore/tests/st/pynative/non_tensor_input/ |
D | test_pynative_outermost_non_tensor.py | 34 def construct(self, tensor_x, tuple_a, list_b, tensor_y, tensor_z, dict_c): argument 37 out = self.add(out, tensor_y) 50 def construct(self, tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c): argument 51 … return self.grad_all(self.forward_net)(tuple_a, tensor_x, list_b, tensor_y, tensor_z, dict_c)
|
/third_party/mindspore/mindspore/core/abstract/ |
D | utils.h | 58 …Shape(const std::string &op, const AbstractTensorPtr &tensor_x, const AbstractTensorPtr &tensor_y);
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/mindir/ |
D | sparse_softmax_cross_entropy_with_logits_unify_mindir.cc | 365 …auto tensor_y = std::make_shared<tensor::Tensor>(kNumberTypeFloat32, tensor_shape, tensor_value.da… in CreateMul() local 366 auto y_node = CreateValueNode(tensor_y, kNumberTypeFloat32); in CreateMul()
|