Home
last modified time | relevance | path

Searched refs:ones_like (Results 1 – 25 of 32) sorted by relevance

12

/third_party/mindspore/tests/st/ops/gpu/
Dtest_oneslike_op.py30 self.ones_like = P.OnesLike()
33 return self.ones_like(x)
49 ones_like = NetOnesLike()
50 output0 = ones_like(x0)
51 expect0 = np.ones_like(x0_np)
57 output1 = ones_like(x1)
58 expect1 = np.ones_like(x1_np)
65 ones_like = NetOnesLike()
66 output0 = ones_like(x0)
67 expect0 = np.ones_like(x0_np)
[all …]
Dtest_batchnorm_fold_op.py120 assert np.allclose(batch_var.asnumpy(), np.ones_like(mean), rtol=1.e-7, atol=1.e-5)
/third_party/mindspore/tests/st/ops/cpu/
Dtest_oneslike_op.py28 self.ones_like = P.OnesLike()
31 return self.ones_like(x)
45 ones_like = NetOnesLike()
46 output0 = ones_like(x0)
47 expect0 = np.ones_like(x0_np)
53 output1 = ones_like(x1)
54 expect1 = np.ones_like(x1_np)
/third_party/mindspore/tests/ut/python/pynative_mode/ops/
Dtest_grad.py61 sens = Tensor(np.ones_like(out.asnumpy()))
82 sens = Tensor(np.ones_like(out.asnumpy()))
102 sens = Tensor(np.ones_like(out.asnumpy()))
121 sens = Tensor(np.ones_like(out.asnumpy()))
141 sens = Tensor(np.ones_like(out.asnumpy()).astype(np.float32))
164 sens = Tensor(np.ones_like(out.asnumpy()))
183 sens = Tensor(np.ones_like(out.asnumpy()))
204 sens = Tensor(np.ones_like(out.asnumpy()) * 3)
/third_party/mindspore/tests/st/pynative/dynamic_shape/
Dtest_pynative_control_flow.py89 grad = torch.from_numpy(np.ones_like(out_good.detach().numpy()).astype(np.float32))
103 grad = torch.from_numpy(np.ones_like(out_good.detach().numpy()).astype(np.float32))
118 grad = torch.from_numpy(np.ones_like(out_good.detach().numpy()).astype(np.float32))
/third_party/mindspore/mindspore/ops/composite/
D__init__.py27 from .multitype_ops.ones_like_impl import ones_like
/third_party/mindspore/mindspore/ops/composite/multitype_ops/
D__init__.py28 from .ones_like_impl import ones_like
Dones_like_impl.py79 ones_like = base.HyperMap(ones_like_leaf) variable
/third_party/mindspore/mindspore/explainer/explanation/_attribution/_perturbation/
Dreplacement.py63 replacement = np.ones_like(inputs, dtype=np.float32)
Docclusion.py127 weights = np.ones_like(inputs)
/third_party/mindspore/mindspore/ops/operations/
Dmath_ops.py412 output_min_shape = np.ones_like(input_shp).tolist()
413 output_max_shape = max_v * np.ones_like(input_shp)
416 out_shape = -1 * np.ones_like(input_shp[:-axis_shape])
418 output_min_shape = np.ones_like(out_shape).tolist()
419 output_max_shape = max_v * np.ones_like(out_shape)
422 out_shape = -1 * np.ones_like(input_shp)
424 output_min_shape = np.ones_like(input_shp).tolist()
425 output_max_shape = max_v * np.ones_like(input_shp)
/third_party/mindspore/mindspore/numpy/
D__init__.py39 ones_like, zeros_like, full_like, diagonal, tril, triu,
/third_party/mindspore/mindspore/nn/wrap/
Dloss_scale.py322 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss))
504 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss))
/third_party/mindspore/tests/ut/python/optimizer/
Dtest_bprop_mindir.py110 ones_like = Net(P.OnesLike())
111 grad = GradNet(ones_like)
/third_party/mindspore/tests/mindspore_test_framework/utils/
Dcheck_gradient.py363 return Tensor(np.ones_like(self.out[i].asnumpy()))
396 return Tensor(np.ones_like(self.out[i].asnumpy()))
/third_party/mindspore/mindspore/nn/metrics/
Dhausdorff_distance.py213 dis = np.inf * np.ones_like(y_edges)
/third_party/mindspore/mindspore/explainer/
D_operators.py119 outputs_np = np.ones_like(inputs[0])
/third_party/mindspore/mindspore/nn/loss/
Dloss.py860 self.ones_like = P.OnesLike()
977 self.ones_like(true_logits) / num_true,
/third_party/mindspore/tests/ut/python/pynative_mode/
Dtest_framstruct.py530 return C.ones_like(x) * y
545 return x * C.ones_like(y)
/third_party/mindspore/mindspore/ops/
Dfunctional.py42 ones_like = P.OnesLike() variable
/third_party/mindspore/mindspore/ops/_op_impl/tbe/
D__init__.py254 from .ones_like import _ones_like_tbe
/third_party/mindspore/mindspore/nn/optim/
Dadafactor.py43 return rel_step_sz * param_scale * F.ones_like(rms)
/third_party/mindspore/mindspore/ops/_grad/
Dgrad_array_ops.py956 ones_like = P.OnesLike()
964 non_zero_data = select(is_zero, ones_like(x), x)
/third_party/mindspore/mindspore/boost/
Dboost_cell_wrapper.py378 scaling_sens_filled = C.ones_like(loss) * F.cast(scaling_sens, F.dtype(loss))
/third_party/mindspore/tests/ut/python/ops/
Dtest_math_ops.py136 expect = np.ones_like(x)

12