我想在tensorflow python API下面翻译golang API
softmax_tensor = sess.graph.get_tensor_by_name('final_result:0')
predictions = sess.run(softmax_tensor, {'DecodeJpeg/contents:0': image_data})
有人知道吗,谢谢!
答案 0 :(得分:1)
像这样:
output, err := session.Run(
map[tf.Output]*tf.Tensor{
graph.Operation("DecodeJpeg/contents").Output(0): tensor,
}, []tf.Output{
graph.Operation("final_result").Output(0),
},
nil)