/aosp_15_r20/external/pytorch/test/torch_np/numpy_tests/core/ |
H A D | test_numeric.py | 144 out = np.count_nonzero(arr, axis=1) 1029 assert np.count_nonzero(lst) == 5 1030 assert_array_equal(np.count_nonzero(lst, axis=0), np.array([1, 1, 1, 2])) 1031 assert_array_equal(np.count_nonzero(lst, axis=1), np.array([3, 2])) 1034 assert_equal(np.count_nonzero(np.array([])), 0) 1035 assert_equal(np.count_nonzero(np.array([], dtype="?")), 0) 1038 assert_equal(np.count_nonzero(np.array([0])), 0) 1039 assert_equal(np.count_nonzero(np.array([0], dtype="?")), 0) 1042 assert_equal(np.count_nonzero(np.array([1])), 1) 1043 assert_equal(np.count_nonzero(np.array([1], dtype="?")), 1) [all …]
|
H A D | test_multiarray.py | 1037 assert_equal(np.count_nonzero(d), 0) 1043 assert_equal(np.count_nonzero(d), 0) 1048 assert_equal(np.count_nonzero(d), 0) 1053 assert_equal(np.count_nonzero(d), 0) 1071 assert_equal(np.count_nonzero(d), 0) 1346 assert_equal(np.count_nonzero(a), c) 1349 assert_equal(np.count_nonzero(a), c) 1351 assert_equal(np.count_nonzero(a), c) 1353 assert_equal(np.count_nonzero(a), c) 1371 assert_equal(np.count_nonzero(a), builtins.sum(a.tolist())) [all …]
|
/aosp_15_r20/external/tensorflow/tensorflow/python/debug/lib/ |
H A D | debug_events_monitors.py | 174 num_neg_inf = np.count_nonzero( 176 num_pos_inf = np.count_nonzero( 178 num_nan = np.count_nonzero(np.isnan(tensor_value))
|
/aosp_15_r20/external/pytorch/test/distributed/_composable/fsdp/ |
H A D | test_fully_shard_clip_grad_norm_.py | 81 if torch.count_nonzero(grad): 87 if torch.count_nonzero(grad):
|
H A D | test_fully_shard_state_dict.py | 173 self.assertEqual(torch.count_nonzero(tensor.to_local()).item(), 0)
|
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/ |
H A D | math_ops.py | 2372 @tf_export(v1=["math.count_nonzero", "count_nonzero"]) 2380 def count_nonzero(input_tensor=None, function 2406 tf.math.count_nonzero(x) # 3 2407 tf.math.count_nonzero(x, 0) # [1, 2, 0] 2408 tf.math.count_nonzero(x, 1) # [1, 2] 2409 tf.math.count_nonzero(x, 1, keepdims=True) # [[1], [2]] 2410 tf.math.count_nonzero(x, [0, 1]) # 3 2419 tf.math.count_nonzero(x) # 3, with "a", " ", and "b" as nonzero strings. 2450 @tf_export("math.count_nonzero", v1=[]) 2476 tf.math.count_nonzero(x) # 3 [all …]
|
/aosp_15_r20/external/pytorch/torch/testing/_internal/ |
H A D | common_subclass.py | 89 … if isinstance(e, torch.Tensor) and e.ndim == 2 and e.count_nonzero() == e.diag().count_nonzero():
|
/aosp_15_r20/external/pytorch/torch/_numpy/ |
H A D | _reductions_impl.py | 67 def count_nonzero(a: ArrayLike, axis: AxisLike = None, *, keepdims: KeepDims = False): function 68 return a.count_nonzero(axis)
|
/aosp_15_r20/external/pytorch/aten/src/ATen/native/mps/operations/ |
H A D | Indexing.mm | 28 #include <ATen/ops/count_nonzero.h> 230 int64_t total_nonzero = at::count_nonzero(self).item<int64_t>(); 322 int64_t total_nonzero = at::count_nonzero(self).item<int64_t>();
|
H A D | ReduceOps.mm | 58 COUNT_NONZERO, 242 } else if (reduction_type == MPSReductionType::COUNT_NONZERO) { 1015 MPSReductionType::COUNT_NONZERO,
|
/aosp_15_r20/external/pytorch/test/torch_np/ |
H A D | test_reductions.py | 305 np.count_nonzero, 318 np.count_nonzero,
|
/aosp_15_r20/external/tensorflow/tensorflow/tools/compatibility/ |
H A D | all_renames_v2.py | 276 "tf.count_nonzero": 277 "tf.math.count_nonzero",
|
H A D | tf_upgrade_v2_test.py | 1009 "tf.math.count_nonzero(input_tensor=input, dtype=dtype, name=name, " 1014 "tf.math.count_nonzero(input=input, dtype=dtype, name=name, " 1021 "tf.count_nonzero(input_tensor=input, dtype=dtype, name=name, " 1026 "tf.math.count_nonzero(input=input, dtype=dtype, name=name, "
|
H A D | tf_upgrade.py | 33 "tf.count_nonzero": {
|
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/numpy_ops/ |
H A D | np_math_ops.py | 1163 @np_utils.np_doc('count_nonzero') 1164 def count_nonzero(a, axis=None): function 1165 return math_ops.count_nonzero(np_array_ops.array(a), axis)
|
/aosp_15_r20/external/tensorflow/tensorflow/python/kernel_tests/math_ops/ |
H A D | reduction_ops_test.py | 1091 tf_ans = math_ops.count_nonzero(x, reduction_axes, keepdims) 1152 y = math_ops.count_nonzero(x, [0]) 1158 v = math_ops.count_nonzero(constant_op.constant(["test"]))
|
/aosp_15_r20/external/libopus/dnn/torch/osce/utils/ |
H A D | misc.py | 48 count = torch.count_nonzero(p).item()
|
/aosp_15_r20/external/pytorch/functorch/dim/ |
H A D | __init__.py | 127 _def("count_nonzero")
|
/aosp_15_r20/external/tensorflow/tensorflow/lite/experimental/acceleration/mini_benchmark/metrics/ |
H A D | blazeface_metrics.py | 85 tf.math.count_nonzero(high_scoring_indices, dtype=tf.float32), 1.0))
|
/aosp_15_r20/external/pytorch/functorch/op_analysis/ |
H A D | public_api | 526 count_nonzero
|
H A D | annotated_ops | 82 count_nonzero, reduction
|
/aosp_15_r20/external/pytorch/test/mobile/model_test/ |
H A D | coverage.yaml | 161 - aten::count_nonzero 784 aten::count_nonzero: 4
|
/aosp_15_r20/external/tensorflow/tensorflow/python/ops/numpy_ops/integration_test/benchmarks/ |
H A D | micro_benchmarks.py | 132 self._benchmark_np_and_tf_np_unary('count_nonzero')
|
/aosp_15_r20/external/pytorch/test/distributed/_composable/fully_shard/ |
H A D | test_fully_shard_model_checkpoint.py | 133 if torch.count_nonzero(tensor) == 0:
|
/aosp_15_r20/external/executorch/examples/apple/coreml/scripts/ |
H A D | inspector_utils.py | 394 if torch.count_nonzero(indices) > 0:
|