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

Function trace

tensorflow/python/ops/math_ops.py:1694–1732  ·  view source on GitHub ↗

Compute the trace of a tensor `x`. `trace(x)` returns the sum along the main diagonal of each inner-most matrix in x. If x is of rank `k` with shape `[I, J, K, ..., L, M, N]`, then output is a tensor of rank `k-2` with dimensions `[I, J, K, ..., L]` where `output[i, j, k, ..., l] = trace(x

(x, name=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

name_scopeMethod · 0.80
reduce_sumFunction · 0.70

Tested by

no test coverage detected