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

Function copy_fn

modelzoo/features/multihash_variable/dien/script/rnn.py:1079–1081  ·  view source on GitHub ↗
(cur_i, cand_i)

Source from the content-addressed store, hash-verified

1077 def _copy_some_through(current, candidate):
1078 """Copy some tensors through via array_ops.where."""
1079 def copy_fn(cur_i, cand_i):
1080 with ops.colocate_with(cand_i):
1081 return array_ops.where(elements_finished, cur_i, cand_i)
1082 return nest.map_structure(copy_fn, current, candidate)
1083
1084 emit_output = _copy_some_through(zero_emit, emit_output)

Callers

nothing calls this directly

Calls 1

colocate_withMethod · 0.80

Tested by

no test coverage detected