MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _num_elements

Function _num_elements

tensorflow/python/ops/losses/losses_impl.py:132–135  ·  view source on GitHub ↗

Computes the number of elements in `losses` tensor.

(losses)

Source from the content-addressed store, hash-verified

130
131
132def _num_elements(losses):
133 """Computes the number of elements in `losses` tensor."""
134 with ops.name_scope(None, "num_elements", values=[losses]) as scope:
135 return math_ops.cast(array_ops.size(losses, name=scope), dtype=losses.dtype)
136
137
138@tf_export(v1=["losses.compute_weighted_loss"])

Callers 2

_num_presentFunction · 0.70
compute_weighted_lossFunction · 0.70

Calls 3

name_scopeMethod · 0.45
castMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected