New to Tensorflow, and I want to achieve something fairly specific.
I have a csv in which I have images with space separated pixel values between 0 and 255 in a column. So that would look like so:
Image
255 255 ... 255
199 199 ... 199
100 100 ... 100
I want to apply some convolutional neural nets on them. So I'd like to end up with a Tensor like this:
[[255, 255, 255], [199, 199, 199], [100, 100, 100]]
I am sure a possibility would be to read in in a string tensor, and then maybe apply tf.string_to_number(tf.string_split(.., delimiter=' ')),
img = ... // string tensor from csv
img = tf.string_to_number(tf.string_split(img, ' '))
But I get the following error:
Shape must be rank 1 but is rank 2 for 'StringSplit' (op: 'StringSplit') with input shapes: [?,1], [].
I just started TensorFlow, my string tensor is a simple column, so its shape should be (?,) rather no? Otherwise, is it the right way to look at this?
Cheers