Skip to content

Instantly share code, notes, and snippets.

@emedvedev
Last active January 4, 2018 21:34
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 emedvedev/97a4b846ca7a3308321d462ed253068f to your computer and use it in GitHub Desktop.
Save emedvedev/97a4b846ca7a3308321d462ed253068f to your computer and use it in GitHub Desktop.
feedsOutput := tf.Output{
Op: savedModel.Graph.Operation("CAPTCHA/input_image_as_bytes"),
Index: 0,
}
// `buf` is a Buffer with the captcha image fetched from the website
feedsTensor, err := tf.NewTensor(string(buf.String()))
if err != nil {
log.Fatal(err)
}
feeds := map[tf.Output]*tf.Tensor{feedsOutput: feedsTensor}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment