Tensorflow: How to replace a node in a calculation graph?

前端 未结 4 608
日久生厌
日久生厌 2020-11-27 14:38

If you have two disjoint graphs, and want to link them, turning this:

x = tf.placeholder(\'float\')
y = f(x)

y = tf.placeholder(\'float\')
z = f(y)
<         


        
4条回答
  •  一个人的身影
    2020-11-27 15:23

    It turns out that tf.train.import_meta_graph passes all additional arguments to the underlying import_scoped_meta_graph which has the input_map argument and utilizes it when it gets to it's own (internal) invocation of import_graph_def.

    It is not documented, and took me waaaay toooo much time to find it, but it works!

提交回复
热议问题