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

Function _copy_some_through

tensorflow/python/ops/rnn.py:246–258  ·  view source on GitHub ↗
(flat_new_output, flat_new_state)

Source from the content-addressed store, hash-verified

244 return array_ops.where(copy_cond, output, new_output)
245
246 def _copy_some_through(flat_new_output, flat_new_state):
247 # Use broadcasting select to determine which values should get
248 # the previous state & zero output, and which values should get
249 # a calculated state & output.
250 flat_new_output = [
251 _copy_one_through(zero_output, new_output)
252 for zero_output, new_output in zip(flat_zero_output, flat_new_output)
253 ]
254 flat_new_state = [
255 _copy_one_through(state, new_state)
256 for state, new_state in zip(flat_state, flat_new_state)
257 ]
258 return flat_new_output + flat_new_state
259
260 def _maybe_copy_some_through():
261 """Run RNN step. Pass through either no or some past state."""

Callers 3

_maybe_copy_some_throughFunction · 0.70
_rnn_stepFunction · 0.70
bodyFunction · 0.70

Calls 1

_copy_one_throughFunction · 0.70

Tested by

no test coverage detected