boschresearch / PR-SSM

Python implementation of the PR-SSM.
MIT License
51 stars 19 forks source link

Restore model #1

Open jonas1721 opened 6 years ago

jonas1721 commented 6 years ago

Dear all, I'd like to load the offline saved GP. I am fairly new to Tensorflow and struggle finding the right syntax. It looks like I can import the saved graph quite easily but I am not able to get a full prediction out of a saver.

with tf.Session() as sess:

  new_saver = tf.train.import_meta_graph('final_model.ckpt.meta')
  new_saver.restore(sess, 'final_model.ckpt')

  graph = tf.get_default_graph()       

  ydata = graph.get_operation_by_name('Y_data').outputs[0]
  udata = graph.get_operation_by_name('U_data').outputs[0]

  value = graph.get_operation_by_name('Y_value').outputs[0]  
#doesn't exists but I guess this is what I need..

  mean = sess.run(value ,feed_dict={ydata:[[[1,2,3,4]]],udata:[[[1,2,3,4,5,6]]]})

Any suggestions how to fix this? Thanks in advance!