我对如何计算模型中的验证损失的想法感到困惑。我在对图像的像素进行分类时遇到了问题。因此,在训练之后,在验证语句中,我可以使用以下代码获取我的预测图像:output_image = sess.run(network,feed_dict={net_input:input_image})但是,如果我运行: cost , output_image = sess.run([loss,network],feed_dict={net_input: input_image, net_output: output_image})我得到这个例外: Cannot feed value of shape (1, 480, 480, 3) for Tensor 'Placeholder_1:0', which has shape '(?, ?, ?, 2)'我不明白为什么,输入和输出图像的形状是相同的(1、480、480、3)。获得验证图像成本的方法是什么?
添加回答
举报
0/150
提交
取消