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

Function _copy_one_through

tensorflow/python/ops/rnn.py:236–244  ·  view source on GitHub ↗
(output, new_output)

Source from the content-addressed store, hash-verified

234 copy_cond = time >= sequence_length
235
236 def _copy_one_through(output, new_output):
237 # TensorArray and scalar get passed through.
238 if isinstance(output, tensor_array_ops.TensorArray):
239 return new_output
240 if output.shape.rank == 0:
241 return new_output
242 # Otherwise propagate the old or the new value.
243 with ops.colocate_with(new_output):
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

Callers 1

_copy_some_throughFunction · 0.70

Calls 1

colocate_withMethod · 0.80

Tested by

no test coverage detected