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

Method _trace

tensorflow/python/ops/linalg/linear_operator.py:993–994  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

991 return self._diag_part()
992
993 def _trace(self):
994 return math_ops.reduce_sum(self.diag_part(), axis=-1)
995
996 def trace(self, name="trace"):
997 """Trace of the linear operator, equal to sum of `self.diag_part()`.

Callers 1

traceMethod · 0.95

Calls 2

diag_partMethod · 0.95
reduce_sumMethod · 0.80

Tested by

no test coverage detected