Skip to content

Instantly share code, notes, and snippets.

@arafatkatze
Last active February 28, 2018 04:39
Show Gist options
  • Save arafatkatze/1d1dc12784c6778038b9ef868cb4f325 to your computer and use it in GitHub Desktop.
Save arafatkatze/1d1dc12784c6778038b9ef868cb4f325 to your computer and use it in GitHub Desktop.
# Specify the operations of tensorflow model
feeds_output = saved_model.graph.operation('CAPTCHA/input_image_as_bytes')
fetches = saved_model.graph.operation('CAPTCHA/prediction')
# Run the Model
feeds_tensor_to_output_hash = {feeds_output.output(0) => feeds_tensor}
out_tensor = saved_model.session.run(feeds_tensor_to_output_hash, [fetches.output(0)], [])
#Print the results
puts out_tensor
# QTAJ5Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment