-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sess.run() with Keras model and TFRecord tensor based images #5368
Comments
I also created a stackoverflow question in case that's more appropriate: |
A first pass of keras support for TFRecords is in #6928, feedback + fixes would be appreciated! Also, if you want to go the other way with mostly TF code and keras layers see https://github.com/ppwwyyxx/tensorpack/blob/master/examples/mnist-keras.py |
I consider this issue resolved. |
There isn't much documentation on how to run a keras model with image tensors loaded from a TFRecord, there is the keras as a simplified interface to tensorflow blog post, but it loads up all the images as a numpy array.
Since I already have TFRecords loaded from a function read_tfrecord_and_decode_into_image_annotation_pair_tensors() and tensors storing my images I don't think I need to go back to a feed dict. However, when I try to call sess.run, Keras expects a numpy array feed_dict for the
keras.model.layers.Input()
as I encountered in this error.How do I use keras models with a keras.layers.Input() node, input tensor images, TFRecords, and queue runners together?
some of the key code lines:
I will update with more details once tf is reinstalled, though I don't think the error is key to these questions as it is primarily about Keras + TF integration.
The text was updated successfully, but these errors were encountered: