MCPcopy Create free account
hub / github.com/benoitsteiner/tensorflow-opencl / count_nonzero

Function count_nonzero

tensorflow/python/ops/math_ops.py:1316–1370  ·  view source on GitHub ↗

Computes number of nonzero elements across dimensions of a tensor. Reduces `input_tensor` along the dimensions given in `axis`. Unless `keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in `axis`. If `keep_dims` is true, the reduced dimensions are retained with lengt

(input_tensor,
                  axis=None,
                  keep_dims=False,
                  dtype=dtypes.int64,
                  name=None,
                  reduction_indices=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

to_int64Function · 0.85
name_scopeMethod · 0.80
as_numpy_dtypeMethod · 0.80
castFunction · 0.70
reduce_sumFunction · 0.70

Tested by

no test coverage detected