TensorFlow TypeError: Value passed to parameter input has DataType uint8 not in list of allowed values: float16, float32

前端 未结 1 1918
鱼传尺愫
鱼传尺愫 2021-02-07 08:09

I am trying to get a simple CNN to train for the past 3 days.

First, I have setup an input pipeline/queue configuration that reads images from a directory tree and pre

相关标签:
1条回答
  • 2021-02-07 08:36

    The image from your input pipeline is of type 'uint8', you need to type cast it to 'float32', You can do this after the image jpeg decoder:

    image = tf.image.decode_jpeg(...
    image = tf.cast(image, tf.float32)
    
    0 讨论(0)
提交回复
热议问题