Quantcast
Channel: Tensorflow: wrong shape of feed_dict{} - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by Niyamat Ullah for Tensorflow: wrong shape of feed_dict{}

Problem: When you declared your tfkids variable you specify it's shape to [POP_SIZE, DNA_SIZE] which is (10, 1). But when you feeding real data into the placeholder during training you are passing a...

View Article



Answer by nessuno for Tensorflow: wrong shape of feed_dict{}

Your Placeholder:0 is tfkids = tf.placeholder(tf.float32, [POP_SIZE, DNA_SIZE]). As you can see, tfkids shape is [POP_SIZE, DNA_SIZE] = (10, 1). Your kids variable, instead, has shape = (10). Although...

View Article

Answer by Mitiku for Tensorflow: wrong shape of feed_dict{}

You can reshape the kids tensor. kids = sess.run(make_kids) kids = tf.reshape(kids,(None,1)) kids_fit = get_fitness(F(kids)) sess.run(train_op, feed_dict={tfkids: kids, tfkids_fit: kids_fit})

View Article

Tensorflow: wrong shape of feed_dict{}

First time encounter such a problem. The error is about feed_dict={tfkids: kids, tfkids_fit: kids_fit}, seems need to reshape kids_fit. Can anyone help me with this problem? import tensorflow as tf...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images