Closed sanjeevan1234 closed 6 years ago
Did you try lowering the learning rate? (see my older comment)
Can you share me the training accuracy and validation accuracy code??
Hello, I used this code to get validation and training accuracy.
keep_prob= tf.placeholder(tf.float32, name="keep_probabilty") #Dropout probability
image = tf.placeholder(tf.float32, shape=[None, None, None, 3], name="input_image") #Input image batch first dimension image number second dimension width third dimension height 4 dimension RGB
GTLabel = tf.placeholder(tf.int32, shape=[None, None, None, 1], name="GTLabel")#Ground truth labels for training
Net = BuildNetVgg16.BUILD_NET_VGG16(vgg16_npy_path=model_path) #Create class for the network
Net.build(image, NUM_CLASSES,keep_prob)# Create the net and load intial weights
correct_prediction = tf.equal(tf.argmax(Net.Prob, 3), tf.argmax(GTLabel, 3))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
Thank you.
Closing due to inactivity
I am replicating the same code for binary classification. I added a code to get training accuracy and validation accuracy. But, unfortunately, training accuracy increased to 100% after few iteration but every time, validation accuracy is half of training accuracy.
Can you tell me the possible reason?
Also, I am getting blank prediction image while using inference.
Can you tell me what is the possible reason and solution?