Categories
Misc

after instantiating a graph, data or node needs to pass before it loads the parameters?

Hi,

after reading some materials.

https://cs230.stanford.edu/blog/moretensorflow/

https://www.tensorflow.org/guide/intro_to_graphs

still confused about this

https://github.com/JiahuiYu/generative_inpainting/blob/master/test.py

 with tf.Session(config=sess_config) as sess: input_image = tf.constant(input_image, dtype=tf.float32) output = model.build_server_graph(FLAGS, input_image) output = (output + 1.) * 127.5 

why the data were passed into the graph before the parameters were initialized or assigned?

Maybe his self define graph requires the data to initialize.

but in the train.py,

model.build_graph_with_losses

were used, but in the test.py there is no such stuff. how did it work then?

sess.run(x) 

run() invokes which function actually ? looks like implicit

in this case, it seems it can load the parameters and it also can invoke the build_server_graph()

to infer the results from input??

thanks a lot.

submitted by /u/boydbuilding
[visit reddit] [comments]

Leave a Reply

Your email address will not be published.