You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run the following network with Keras, powered by a TensorFlow backend. It's an adaptation of the "VGG-like" convnet from http://keras.io/examples/. I've linked a very small sample of the data to this issue report, and created scripts on Gist that can be used to reproduce the error (https://gist.github.com/aaronpolhamus/39c7a71151b8560d02dd).
Basically I've adapted the website example to accept an array of greyscale, single-channel images. Seems pretty straightforward, but when I attempt to train the model after compiling it I'm seeing the following error:
ValueError: Cannot feed value of shape (32, 128, 256) for Tensor u'Placeholder_89:0', which has shape '(?, 1, 128, 256)'
I'm puzzled: shouldn't it be no problem to generate 32 convolution filters with dim (32, 128, 256) from a series of input images with dimenstions (1, 128, 256)? It's likely that I'm still a novice with this stuff, but this error just isn't informative enough for me to tell what's going wrong or how to fix it...
Really, all we're doing here is adding a somewhat redundant channel dimension to make the shape of the array (8144, 1, 128, 256) instead of (8144, 128, 256). If we were using an RGB array this wouldn't be redundant at all, since it would be (8144, 3, 128, 256). Bottom line: my input array was missing the channel dimension, which I thought I could get away with omitting for greyscales. Turns out you still need to explicitly define the shape.
Great package. Once fixed the code should execute as-is.
I'm trying to run the following network with Keras, powered by a TensorFlow backend. It's an adaptation of the "VGG-like" convnet from http://keras.io/examples/. I've linked a very small sample of the data to this issue report, and created scripts on Gist that can be used to reproduce the error (https://gist.github.com/aaronpolhamus/39c7a71151b8560d02dd).
Basically I've adapted the website example to accept an array of greyscale, single-channel images. Seems pretty straightforward, but when I attempt to train the model after compiling it I'm seeing the following error:
ValueError: Cannot feed value of shape (32, 128, 256) for Tensor u'Placeholder_89:0', which has shape '(?, 1, 128, 256)'
I'm puzzled: shouldn't it be no problem to generate 32 convolution filters with dim (32, 128, 256) from a series of input images with dimenstions (1, 128, 256)? It's likely that I'm still a novice with this stuff, but this error just isn't informative enough for me to tell what's going wrong or how to fix it...
Here's a link to sample data:
keras_ex_data.zip
Thanks in advance!
The text was updated successfully, but these errors were encountered: