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

Function _nest_where

tensorflow/python/ops/linalg/linalg_impl.py:279–287  ·  view source on GitHub ↗
(vals, cases)

Source from the content-addressed store, hash-verified

277 const = lambda x: constant_op.constant(x, l1_norm.dtype)
278
279 def _nest_where(vals, cases):
280 assert len(vals) == len(cases) - 1
281 if len(vals) == 1:
282 return array_ops.where(
283 math_ops.less(l1_norm, const(vals[0])), cases[0], cases[1])
284 else:
285 return array_ops.where(
286 math_ops.less(l1_norm, const(vals[0])), cases[0],
287 _nest_where(vals[1:], cases[1:]))
288
289 if matrix.dtype in [dtypes.float16, dtypes.float32, dtypes.complex64]:
290 maxnorm = const(3.925724783138660)

Callers 1

matrix_exponentialFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected