Skip to content

Instantly share code, notes, and snippets.

@arafatkatze
Last active February 28, 2018 04:04
Show Gist options
  • Save arafatkatze/3777cdf2aad3deedd8805ad27022cd4b to your computer and use it in GitHub Desktop.
Save arafatkatze/3777cdf2aad3deedd8805ad27022cd4b to your computer and use it in GitHub Desktop.
require 'tensorflow'
# Loading Saved Model
saved_model = Tensorflow::Savedmodel.new
saved_model.LoadSavedModel(Dir.pwd + '/break-captcha-protobuf', ['serve'], nil)
# Read the image file and specify the image contents in a Tensor
image_file = File.new(Dir.pwd + '/break-captcha-protobuf/captcha-1.png', "r")
feeds_tensor = Tensorflow::Tensor.new(image_file.read)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment