/third_party/mindspore/tests/st/numpy_native/ |
D | test_array_ops.py | 27 rand_bool, match_res, run_multi_test, to_tensor, match_all_arrays 139 mnp_array = to_tensor(onp_array) 170 mnp_array = to_tensor(onp_array) 205 mnp_array = to_tensor(onp_array) 211 mnp_array = to_tensor(onp_array) 246 mnp_array = to_tensor(onp_array) 281 mnp_array = to_tensor(onp_array) 324 mnp_array = to_tensor(onp_array) 349 mnp_array = to_tensor(onp_array) 380 mnp_array = to_tensor(onp_array) [all …]
|
D | test_logic_ops.py | 24 match_all_arrays, to_tensor 273 assert mnp.isscalar(to_tensor(True)) == onp.isscalar(onp.array(True)) 290 … match_all_arrays(mnp.isclose(to_tensor(a), to_tensor(b), atol=1e-3), onp.isclose(a, b, atol=1e-3)) 291 match_all_arrays(mnp.isclose(to_tensor(a), to_tensor(b), atol=1e-3, rtol=1e-4), 293 match_all_arrays(mnp.isclose(to_tensor(a), to_tensor(b), atol=1e-2, rtol=1e-6), 298 match_all_arrays(mnp.isclose(to_tensor(a), to_tensor(b)), onp.isclose(a, b)) 402 actual = mnp_logical_not(to_tensor(arr)) 489 mnp_arr = to_tensor(onp_arr)
|
D | test_math_ops.py | 24 run_single_test, match_res, match_array, match_meta, match_all_arrays, to_tensor 608 a = to_tensor(arr, dtype=mnp.float16) 609 b = to_tensor(arr, dtype=mnp.float32) 610 c = to_tensor(arr, dtype=mnp.int32) 633 a = to_tensor(arr, dtype=mnp.float16) 634 b = to_tensor(arr, dtype=mnp.float32) 635 c = to_tensor(arr, dtype=mnp.uint8) 636 d = to_tensor(arr, dtype=mnp.bool_) 703 mnp_arrs = map(to_tensor, arrs) 845 actual = mnp_logaddexp(to_tensor(x1), to_tensor(x2)) [all …]
|
D | test_array_creations.py | 23 match_all_arrays, run_multi_test, to_tensor 367 expected = mnp.linspace(to_tensor(start), to_tensor(stop), num=20, 374 expected = mnp.linspace(to_tensor(start), to_tensor(stop), num=20, 382 expected = mnp.linspace(to_tensor(start), to_tensor(stop), num=20, 504 actual = mnp.full_like(mnp_proto, to_tensor(fill_value)).asnumpy() 510 actual = mnp.full_like(mnp_proto, to_tensor(fill_value)).asnumpy() 515 actual = mnp.full_like(mnp_proto, to_tensor(fill_value)).asnumpy() 637 mnp_arrs = map(to_tensor, arrs) 730 match_array(mnp.geomspace(to_tensor(start), end, num=4).asnumpy(), 732 match_array(mnp.geomspace(to_tensor(start), end, num=4, endpoint=False).asnumpy(), [all …]
|
D | utils.py | 175 def to_tensor(obj, dtype=None): function
|
/third_party/mindspore/tests/ut/python/nn/ |
D | test_transformer.py | 200 to_tensor = Tensor(np.ones((2, 20, 15)), dtype.float16) 203 _cell_graph_executor.compile(model, from_tensor, to_tensor, to_tensor, attention_mask) 213 to_tensor = Tensor(np.ones((3, 20, 15)), dtype.float16) 217 _cell_graph_executor.compile(model, from_tensor, to_tensor, to_tensor, attention_mask)
|
/third_party/mindspore/mindspore/nn/probability/dpn/vae/ |
D | vae.py | 66 self.to_tensor = P.ScalarToArray() 103 …mple_z = self.normal((generate_nums, self.latent_size), self.to_tensor(0.0), self.to_tensor(1.0), …
|
D | cvae.py | 73 self.to_tensor = P.ScalarToArray() 117 …mple_z = self.normal((generate_nums, self.latent_size), self.to_tensor(0.0), self.to_tensor(1.0), …
|
/third_party/mindspore/tests/ut/python/dataset/ |
D | test_decode.py | 107 to_tensor = py_vision.ToTensor(output_type=np.int32) 108 dataset1 = dataset1.map(operations=[decode_op, to_tensor], input_columns=["data"]) 109 dataset2 = dataset2.map(operations=[decode_op, to_tensor], input_columns=["data"])
|
/third_party/mindspore/tests/st/fl/cross_silo_faster_rcnn/src/FasterRcnn/ |
D | rpn.py | 170 weight_conv = initializer('Normal', shape=shp_weight_conv, dtype=self.ms_type).to_tensor() 171 bias_conv = initializer(0, shape=shp_bias_conv, dtype=self.ms_type).to_tensor() 175 weight_cls = initializer('Normal', shape=shp_weight_cls, dtype=self.ms_type).to_tensor() 176 bias_cls = initializer(0, shape=shp_bias_cls, dtype=self.ms_type).to_tensor() 180 weight_reg = initializer('Normal', shape=shp_weight_reg, dtype=self.ms_type).to_tensor() 181 bias_reg = initializer(0, shape=shp_bias_reg, dtype=self.ms_type).to_tensor()
|
D | rcnn.py | 91 … weights_0 = initializer("XavierUniform", shape=shape_0[::-1], dtype=self.ms_type).to_tensor() 93 … weights_1 = initializer("XavierUniform", shape=shape_1[::-1], dtype=self.ms_type).to_tensor() 98 dtype=self.ms_type).to_tensor() 100 dtype=self.ms_type).to_tensor()
|
D | fpn_neck.py | 33 weights = initializer("XavierUniform", shape=shape, dtype=mstype.float32).to_tensor()
|
/third_party/mindspore/tests/mindspore_test_framework/apps/ |
D | bert_attention_submodules.py | 71 def construct(self, from_tensor, to_tensor): argument 73 to_tensor_2d = self.reshape(to_tensor, self.shp_to_2d) 263 def construct(self, to_tensor, attention_scores): argument 264 to_tensor = self.transpose(to_tensor, self.trans_shape_start) 265 to_tensor_2d = self.reshape(to_tensor, self.shp_to_2d)
|
/third_party/mindspore/tests/st/probability/dpn/ |
D | test_gpu_vae_gan.py | 97 self.to_tensor = ops.ScalarToArray() 101 z_p = self.normal(self.shape(mu), self.to_tensor(0.0), self.to_tensor(1.0), seed=0)
|
/third_party/mindspore/mindspore/nn/probability/toolbox/ |
D | uncertainty_evaluation.py | 340 self.to_tensor = P.ScalarToArray() 352 epsilon = self.normal((1, sample_times), self.to_tensor( 353 0.0), self.to_tensor(1.0), 0)
|
/third_party/mindspore/mindspore/ccsrc/backend/optimizer/common/ |
D | helper.h | 178 bool to_tensor = false);
|
D | helper.cc | 504 …ShapeValueNode(const FuncGraphPtr &func_graph, const std::vector<int64_t> &shape, bool to_tensor) { in CreateShapeValueNode() argument 510 if (to_tensor) { in CreateShapeValueNode()
|
/third_party/mindspore/tests/st/networks/models/bert/src/ |
D | bert_model.py | 494 def construct(self, from_tensor, to_tensor, attention_mask): argument 497 to_tensor_2d = self.reshape(to_tensor, self.shape_to_2d)
|
/third_party/mindspore/tests/st/fl/albert/src/ |
D | model.py | 445 def construct(self, from_tensor, to_tensor, attention_mask): argument 449 to_tensor_2d = self.reshape(to_tensor, self.shape_to_2d)
|
/third_party/mindspore/mindspore/dataset/vision/ |
D | py_transforms.py | 102 return util.to_tensor(img, self.output_type)
|
D | py_transforms_util.py | 131 def to_tensor(img, output_type): function
|
/third_party/mindspore/mindspore/nn/layer/ |
D | thor_layer.py | 585 self.init_tensor = self.init_tensor.to_tensor().asnumpy()
|
/third_party/mindspore/mindspore/common/ |
D | tensor.py | 1272 def to_tensor(self, slice_index=None, shape=None, opt_shard_group=None): member in Tensor
|