MCPcopy Create free account
hub / github.com/alibaba/bigcomputing / copy_fn

Function copy_fn

DIEN/rnn.py:1073–1075  ·  view source on GitHub ↗
(cur_i, cand_i)

Source from the content-addressed store, hash-verified

1071 def _copy_some_through(current, candidate):
1072 """Copy some tensors through via array_ops.where."""
1073 def copy_fn(cur_i, cand_i):
1074 with ops.colocate_with(cand_i):
1075 return array_ops.where(elements_finished, cur_i, cand_i)
1076 return nest.map_structure(copy_fn, current, candidate)
1077
1078 emit_output = _copy_some_through(zero_emit, emit_output)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected