Created
March 7, 2017 20:02
-
-
Save yaroslavvb/63c0459225b176b797607e660022b11f to your computer and use it in GitHub Desktop.
utility to copy initializer for one variable to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def copy_initializer(from_var, to_var): | |
from tensorflow.contrib import graph_editor as ge | |
assert ge.reroute_a2b_ts(from_var.initial_value, to_var.initial_value), "No copy took place" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment