on-internet
← Community

Getting InvalidArgumentError in Tensorflow

Stack Overflow ·

I created a CNN for predicting the labels of an image. I trained it. Now i want to use my model for predicting the labels for new image. My code for CNN is this:- def LeNet(x): # Arguments used for tf.truncated_normal, randomly defines variables for the weights and biases for each layer mu = 0 sigma = 0.1 # SOLUTION: Layer 1: Convolutional. Input = 32x32x3. Output = 28x28x6. conv1_W = tf.Variable(tf.truncated_normal(shape=(5, 5, 3, 6), mean = mu, stddev = sigma)) conv1_b = tf.Variable(tf.zeros(6)) conv1 = tf.nn.conv2d(x, conv1_W, strides=[1, 1, 1, 1], padding='VALID') + conv1_b # SOLUTION: Act

Comments

Sign in or sign up to comment and upvote.

No comments yet.