【问题标题】:Get the accuracy of individual test images in image segmentation获取图像分割中单个测试图像的准确性
【发布时间】:2018-05-17 07:04:13
【问题描述】:

我在 Tensorflow 中使用 CNN 进行图像分割。我知道如何计算训练精度

 #compute the accuracy
    correct_prediction  = tf.equal(tf.argmax(flat_logits, 1), tf.argmax(y,1))
    accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))



[train_accuracy] = sess.run([accuracy], feed_dict={x: batch_x, y:batch_y})

是否可以计算每个测试图像的准确度?

【问题讨论】:

    标签: tensorflow machine-learning image-segmentation convolutional-neural-network


    【解决方案1】:

    是的,这是可能的。你可以简单地写:

    test_accuracy = sess.run(accuracy, feed_dict={x: x_test, y:y_test})
    

    其中 x_test 是您的单个测试图像(例如大小 [1, width, height, depth] 和 y_test 是相应的输出。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-03-13
      • 2022-10-17
      • 2023-03-08
      • 2017-07-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-09
      相关资源
      最近更新 更多