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

Function _scaled_dot_product

tensorflow/contrib/integrate/python/ops/odes.py:69–77  ·  view source on GitHub ↗

Calculate a scaled, vector inner product between lists of Tensors.

(scale, xs, ys, name=None)

Source from the content-addressed store, hash-verified

67
68
69def _scaled_dot_product(scale, xs, ys, name=None):
70 """Calculate a scaled, vector inner product between lists of Tensors."""
71 with ops.name_scope(name, 'scaled_dot_product', [scale, xs, ys]) as scope:
72 # Some of the parameters in our Butcher tableau include zeros. Using
73 # _possibly_nonzero lets us avoid wasted computation.
74 return math_ops.add_n(
75 [(scale * x) * y for x, y in zip(xs, ys)
76 if _possibly_nonzero(x) and _possibly_nonzero(y)],
77 name=scope)
78
79
80def _dot_product(xs, ys, name=None):

Callers 2

_runge_kutta_stepFunction · 0.85
_interp_fit_rkFunction · 0.85

Calls 2

_possibly_nonzeroFunction · 0.85
name_scopeMethod · 0.45

Tested by

no test coverage detected