MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / get_copy_params_op

Function get_copy_params_op

rl2/a3c/worker.py:53–62  ·  view source on GitHub ↗
(src_vars, dst_vars)

Source from the content-addressed store, hash-verified

51
52# Make a Tensorflow op to copy weights from one scope to another
53def get_copy_params_op(src_vars, dst_vars):
54 src_vars = list(sorted(src_vars, key=lambda v: v.name))
55 dst_vars = list(sorted(dst_vars, key=lambda v: v.name))
56
57 ops = []
58 for s, d in zip(src_vars, dst_vars):
59 op = d.assign(s)
60 ops.append(op)
61
62 return ops
63
64
65def make_train_op(local_net, global_net):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected