Categories
Mastering Development

Tensorflow with batch size and wrong dimesion

Here are my code: # Model parameters: W and b # tf.reset_default_graph() W = tf.get_variable("weight",shape = [784, 10], dtype=tf.float32) b = tf.get_variable("b", shape=(784,10), dtype= tf.float32) input_X = tf.placeholder(‘float32’, shape = (None,10)) input_y = tf.placeholder(‘float32’, [784, 10]) ogits = W*input_X + b probas = tf.nn.softmax(logits) classes = tf.argmax(probas) loss = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(labels = input_y, logits = logits)) […]

Categories
Development

Cannot feed value of shape (100,) for Tensor ‘Placeholder_1:0’, which has shape ‘(?, 1)’

Tensorflow 1.14 gives me issue “Cannot feed value of shape (100,) for Tensor ‘Placeholder_1:0’, which has shape ‘(?, 1)’” as mentioned in the question. This error occurs in the session segment of the code [last cell of the code]. How do I solve it? Im not able to understand where the bug is lying. The […]