Skip to content

Instantly share code, notes, and snippets.

@chricke
Created March 26, 2019 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chricke/9662fc45c7d66d0776be46069c9687ac to your computer and use it in GitHub Desktop.
Save chricke/9662fc45c7d66d0776be46069c9687ac to your computer and use it in GitHub Desktop.
Get Tensor
def get_tensors(loaded_graph):
input_tensor = loaded_graph.get_tensor_by_name('input:0')
initial_state_tensor = loaded_graph.get_tensor_by_name('initial_state:0')
final_state_tensor = loaded_graph.get_tensor_by_name('final_state:0')
probs_tensor = loaded_graph.get_tensor_by_name('probs:0')
return input_tensor, initial_state_tensor, final_state_tensor, probs_tensor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment