tensorflow - 获取图像分割中各个测试图像的准确性

标签 tensorflow machine-learning image-segmentation conv-neural-network

我在 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})

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

最佳答案

是的,这是可能的。您只需编写以下内容即可做到这一点:

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

其中 x_test 是单个测试图像(例如尺寸 [1、宽度、高度、深度]),y_test 是相应的输出。

关于tensorflow - 获取图像分割中各个测试图像的准确性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50385327/

相关文章:

python - 线性判别分析

c++ - 从背景中分割前景

machine-learning - 用于逼近微分方程组所需解的神经网络

python - 使用 tf.data.Dataset 的 Tensorflow 性能降低

python - mac 运行 deepfakes - faceswap ' faceswap.py' 出现错误

python - 带 tensorflow 的单出神经网络

machine-learning - 如何创建决策树(ID3)?

algorithm - 数蜥蜴的鳞片

python - Tensorflow:Sigmoid交叉熵损失不会强制网络输出为0或1

python - 如何在 Tensorflow 中使用 `transform_graph`