Home
last modified time | relevance | path

Searched full:ones_like (Results 1 – 25 of 343) sorted by relevance

12345678910>>...14

/aosp_15_r20/external/pytorch/test/functorch/
H A Dtest_control_flow.py306 grad_out = torch.ones_like(result)
313 grad_out = torch.ones_like(result)
326 ones_like = torch.ops.aten.ones_like.default(getitem, pin_memory = False); getitem = None
329 …ond(pred_1, true_graph_1, false_graph_1, (ones_like, x_1)); pred_1 = true_graph_1 = false_graph_1…
348 grad_out = torch.ones_like(result)
355 grad_out = torch.ones_like(result)
367 ones_like = torch.ops.aten.ones_like.default(getitem, pin_memory = False); getitem = None
370 …ond(pred_1, true_graph_1, false_graph_1, (ones_like, x_1)); pred_1 = true_graph_1 = false_graph_1…
435 grad_out = torch.ones_like(result)
457 grad_out = torch.ones_like(result)
[all …]
/aosp_15_r20/external/pytorch/test/
H A Dtest_autograd_fallback.py142 self.assertEqual(x.grad, torch.ones_like(x))
159 self.assertEqual(x.grad, torch.ones_like(x))
169 self.assertEqual(x.grad, torch.ones_like(x))
243 y, x, torch.ones_like(y), retain_graph=True
247 expected = torch.ones_like(x)
250 (gx,) = torch.autograd.grad(z, x, torch.ones_like(z))
301 torch.autograd.grad(z, y, torch.ones_like(z), allow_unused=True)
310 torch.autograd.grad(z, x, torch.ones_like(z), allow_unused=True)
409 x, (a, b), torch.ones_like(x), allow_unused=True, retain_graph=True
414 y, (a, b), torch.ones_like(y), allow_unused=True, retain_graph=True
[all …]
H A Dtest_nestedtensor.py722 [torch.ones_like, torch.zeros_like, torch.randn_like],
1063 correct_output[0][-1] = torch.ones_like(correct_output[0][-1])
1087 correct_output[0][3] = torch.ones_like(correct_output[0][3])
1104 next_output = torch.ones_like(ts[2]) * pad
1122 next_output = torch.ones_like(ts[2]) * pad
1140 next_output = torch.ones_like(ts[2]) * pad
2771 mask = torch.ones_like(data[:, :, 0]).bool()
2786 [torch.ones_like(a), torch.zeros_like(b)], device=device
2805 [torch.ones_like(a), torch.zeros_like(b)], device=device
3947 view.backward(torch.ones_like(view))
[all …]
/aosp_15_r20/external/pytorch/torch/masked/maskedtensor/
H A D_ops_refs.py368 @register_dispatch_func([torch.ops.aten.ones_like])
369 def ones_like(func, *args, **kwargs): function
418 mx = MaskedTensor(mx, torch.ones_like(mx, dtype=torch.bool))
420 my = MaskedTensor(my, torch.ones_like(my, dtype=torch.bool))
435 mt = MaskedTensor(mt, torch.ones_like(mt, dtype=torch.bool))
452 mt = MaskedTensor(mt, torch.ones_like(mt).bool())
469 mt = MaskedTensor(mt, torch.ones_like(mt).bool())
482 return MaskedTensor(data, torch.ones_like(data).bool())
491 return MaskedTensor(data, torch.ones_like(data).bool())
503 new_args[-1] = torch.ones_like(new_args[-1])
/aosp_15_r20/external/pytorch/test/nn/
H A Dtest_pruning.py169 self.assertEqual(old_grad_weight, torch.ones_like(m.weight))
171 self.assertEqual(old_grad_bias, torch.ones_like(m.bias))
202 self.assertEqual(old_grad_weight, torch.ones_like(m.weight))
204 self.assertEqual(old_grad_bias, torch.ones_like(m.bias))
213 compute_mask.return_value = torch.ones_like(m.weight)
237 mask = torch.ones_like(m.weight)
252 self.assertEqual(m.bias.grad, torch.ones_like(m.bias))
292 mask = torch.ones_like(m.weight)
510 computed_mask = p.compute_mask(t, default_mask=torch.ones_like(t))
521 computed_mask = p.compute_mask(t, default_mask=torch.ones_like(t))
[all …]
/aosp_15_r20/external/tensorflow/tensorflow/python/eager/
H A Dtape_test.py43 math_ops.matmul(array_ops.ones_like(b * dr), b, transpose_b=True),
45 math_ops.matmul(a, array_ops.ones_like(a) * dr, transpose_b=True)
96 array_ops.ones_like(aa),
110 array_ops.ones_like(aa),
124 array_ops.ones_like(aa),
/aosp_15_r20/external/pytorch/test/distributed/_tensor/
H A Dtest_matrix_ops.py113 grad_dist_res = torch.ones_like(dist_res)
191 # grad_dist_res = torch.ones_like(dist_res)
217 grad_local_res = torch.ones_like(local_result)
231 grad_local_res = torch.ones_like(local_result)
249 grad_dist_res = torch.ones_like(dist_res)
H A Dtest_redistribute.py59 grad_output = torch.ones_like(reshard_dtensor)
89 grad_output = torch.ones_like(reshard_replica_tensor)
111 out.backward(torch.ones_like(out))
153 grad_output = torch.ones_like(reshard_tensor)
193 global_partial_tensor.backward(torch.ones_like(global_partial_tensor))
196 self.assertEqual(partial_local.grad, torch.ones_like(partial_local))
/aosp_15_r20/external/pytorch/torch/distributions/
H A Dcontinuous_bernoulli.py106 self._lims[0] * torch.ones_like(self.probs),
116 torch.ge(cut_probs, 0.5), cut_probs, torch.ones_like(cut_probs)
198 torch.where(torch.ge(value, 1.0), torch.ones_like(value), unbounded_cdfs),
232 out_unst_reg, x, (self._lims[0] - 0.5) * torch.ones_like(x)
/aosp_15_r20/external/pytorch/test/profiler/
H A Dtest_profiler_tree.py283 aten::ones_like
353 aten::ones_like
392 aten::ones_like
496 <built-in method ones_like of type object at 0xXXXXXXXXXXXX>
497 aten::ones_like
801 aten::ones_like
999 <built-in method ones_like of type object at 0xXXXXXXXXXXXX>
1000 aten::ones_like
H A Dtest_memory_profiler.py405 ("aten::ones_like.", (False,) * 6),
447 return {"x0": torch.ones_like(x), "y0": torch.zeros_like(y)}
460 aten::ones_like T0(v1) -> T2(v0)
562 aten::ones_like T3(v0) -> T4(v0)
665 aten::ones_like T7(v0) -> T8(v0)
703 aten::ones_like T7(v0) -> T8(v0)
764 aten::ones_like T7(v0) -> T8(v0)
799 aten::ones_like T7(v0) -> T8(v0)
1158 …aten::ones_like 11 (INPUT) -> 14 (INPU…
1210 …aten::ones_like 11 (ACTIVATION) -> 14 (ACTI…
[all …]
/aosp_15_r20/external/pytorch/test/torch_np/numpy_tests/core/
H A Dtest_scalarmath.py140 exp1 = np.ones_like(inp1)
141 inp1[...] = np.ones_like(inp1)
160 inp1[...] = np.ones_like(inp1)
163 inp2[...] = np.ones_like(inp2)
175 np.add(np.ones_like(d), d, out=o)
176 np.add(d, np.ones_like(d), out=o)
177 np.add(np.ones_like(d), d)
178 np.add(d, np.ones_like(d))
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/
H A Ddefault_gradient.py56 def ones_like(t): function
57 """Like array_ops.ones_like, but respects resource handles."""
61 return array_ops.ones_like(t)
H A Dweights_broadcast_ops.py35 (values_shape_2d, array_ops.ones_like(values_shape_2d)), axis=1)
172 weights, array_ops.ones_like(values), name=scope)
175 weights, array_ops.ones_like(values), name=scope)
/aosp_15_r20/external/tensorflow/tensorflow/c/eager/
H A Dtape.h619 Gradient* ones_like = nullptr; in InitialGradients() local
621 op_it->second.output_tensor_info[j], &ones_like)); in InitialGradients()
622 (*result)[id].push_back(ones_like); in InitialGradients()
637 Gradient* ones_like = nullptr; in InitialGradients() local
639 vspace.BuildOnesLike(source_tensor->second, &ones_like)); in InitialGradients()
640 (*result)[id].push_back(ones_like); in InitialGradients()
931 forwardprop_aids = tf.ones_like(output_tensors) in ForwardpropFromTape()
953 // ones_like for variants. in ForwardpropFromTape()
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/distributions/
H A Dmultinomial.py247 n_draws = array_ops.ones_like(
249 logits = array_ops.ones_like(
291 p = self.probs * array_ops.ones_like(
301 p = self.probs * array_ops.ones_like(
H A Dnormal.py219 scale = self.scale * array_ops.ones_like(self.loc)
223 return self.loc * array_ops.ones_like(self.scale)
229 return self.scale * array_ops.ones_like(self.loc)
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/structured/
H A Dstructured_array_ops.py276 @dispatch.dispatch_for_types(array_ops.ones_like, StructuredTensor)
277 def ones_like(tensor, dtype=None, name=None, optimize=True): function
290 >>> tf.ones_like(st)
293 >>> tf.ones_like(st, dtype=tf.int32)
305 with ops.name_scope(name, 'ones_like', [input]) as name:
/aosp_15_r20/external/tensorflow/tensorflow/python/tpu/tests/
H A Dtpu_embedding_base_test.py211 array_ops.ones_like(sparse.values, dtype=dtypes.float32) * weight)
251 array_ops.ones_like(sparse.values, dtype=dtypes.float32) * weight)
282 array_ops.ones_like(ragged.values, dtype=dtypes.float32) * weight)
317 array_ops.ones_like(t, dtype=dtypes.float32) * weight
346 array_ops.ones_like(t, dtype=dtypes.float32) * weight
/aosp_15_r20/external/pytorch/torch/csrc/autograd/
H A Dautograd.cpp7 #include <ATen/ops/ones_like.h>
44 at::ones_like(output, LEGACY_CONTIGUOUS_MEMORY_FORMAT)); in _make_grads()
68 at::ones_like(output, LEGACY_CONTIGUOUS_MEMORY_FORMAT)); in _make_grads()
/aosp_15_r20/external/executorch/runtime/core/exec_aten/testing_util/test/
H A Dtensor_factory_test.cpp841 Tensor actual = tf.ones_like(input); in run_ones_like_test()
1022 tf.ones_like(ones, TensorShapeDynamism::STATIC)); in TEST_F()
1024 tf.ones_like(ones, TensorShapeDynamism::DYNAMIC_BOUND)); in TEST_F()
1026 tf.ones_like(ones, TensorShapeDynamism::DYNAMIC_UNBOUND)); in TEST_F()
1030 tf.ones_like(ones, TensorShapeDynamism::STATIC), in TEST_F()
1031 tf.ones_like(ones, TensorShapeDynamism::DYNAMIC_BOUND)); in TEST_F()
1033 tf.ones_like(ones, TensorShapeDynamism::STATIC), in TEST_F()
1034 tf.ones_like(ones, TensorShapeDynamism::DYNAMIC_UNBOUND)); in TEST_F()
/aosp_15_r20/external/tensorflow/tensorflow/python/tpu/
H A Dtpu_embedding_v1.py330 array_ops.ones_like(inp.values, dtype=dtypes.float32),
383 array_ops.ones_like(inp.values, dtype=dtypes.float32),
388 weight = array_ops.ones_like(inp, dtype=dtypes.float32)
406 weight = array_ops.ones_like(inp, dtype=dtypes.float32)
/aosp_15_r20/external/pytorch/test/distributed/tensor/parallel/
H A Dtest_tp_style.py376 grad_out = torch.ones_like(sharded_out)
399 grad_out = torch.ones_like(sharded_out)
417 grad_out = torch.ones_like(sharded_out)
430 grad_out = torch.ones_like(sharded_out)
/aosp_15_r20/external/tensorflow/tensorflow/python/eager/benchmarks/resnet50/
H A Dhvp_test.py57 helpers = tf.nest.map_structure(tf.ones_like, grads)
91 vector = [tf.ones_like(v) for v in model.trainable_variables]
123 vector = [tf.ones_like(v) for v in model.trainable_variables]
/aosp_15_r20/external/executorch/examples/models/llama/source_transformation/
H A Dapply_spin_quant_r1_r2.py184 layer.ffn_norm.weight.data = torch.ones_like(W_norm, dtype=torch.float32)
186 layer.attention_norm.weight.data = torch.ones_like(W_norm, dtype=torch.float32)
199 model.norm.weight.data = torch.ones_like(W_norm, dtype=torch.float32)

12345678910>>...14