Home
last modified time | relevance | path

Searched refs:tensor_y (Results 1 – 15 of 15) sorted by relevance

/third_party/mindspore/tests/ut/python/pipeline/parse/
Dtest_graph_return_const_param.py54 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())
Dtest_ms_function_pass_non_tensor_inputs.py41 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)
Dtest_outermost_net_pass_non_tensor_inputs.py31 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/
Dtest_outermost_non_tensor_input.py31 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/
Dtest_ops_add.cc36 …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()
Dtest_ops_pow.cc36 …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()
Dtest_ops_mul.cc36 …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()
Dtest_ops_maximum.cc36 …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()
Dtest_ops_squareddifference.cc36 …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()
Dtest_ops_sub.cc36 …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()
Dtest_ops_div.cc36 …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()
Dtest_ops_mfcc.cc38 …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/
Dtest_pynative_outermost_non_tensor.py34 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/
Dutils.h58 …Shape(const std::string &op, const AbstractTensorPtr &tensor_x, const AbstractTensorPtr &tensor_y);
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/ascend/mindir/
Dsparse_softmax_cross_entropy_with_logits_unify_mindir.cc365 …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()