You must feed a value for placeholder tensor 'Placeholder' with dtype float

后端 未结 2 1447
-上瘾入骨i
-上瘾入骨i 2021-01-07 17:35

I\'m a newer to tensorflow, I really don\'t know how to solve the problem.

The code is like:

  1. Feed the train with values:

    sess.run(tr         
    
    
            
相关标签:
2条回答
  • 2021-01-07 18:08

    I saw one problem with the code. There are two variables with the same name label. One of them refers to a Tensor, and the other one refers to some data. When you set label: label in the feed_dict, you need to distinguish between the two variables. Maybe you can try changing the name for one of the variables?

    0 讨论(0)
  • 2021-01-07 18:13

    Some questions

    first
    why you use sess = tf.InteractiveSession() and with tf.Session() as sess: at same time, just curious

    second what is your placeholder name x or images?
    if name is x, {images: x_data...} won't feed x_data to x, it override(?) images
    I think feed_dict should be {x: x_data...}

    if name is images,do you have two images in your program, placeholder and shuffle data, try to modify name of variable

    0 讨论(0)
提交回复
热议问题