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 ArticleAnswer 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 ArticleAnswer 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 ArticleTensorflow: 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
More Pages to Explore .....