Tensorflow - 总变异损失 - reduce_sum vs reduce_mean?
Tensorflow - Total Variation Loss - reduce_sum vs reduce_mean?
为什么Total Variation Loss in Tensorflow建议使用reduce_sum
而不是reduce_mean
作为损失函数?
This can be used as a loss-function during optimization so as to
suppress noise in images. If you have a batch of images, then you
should calculate the scalar loss-value as the sum:
loss = tf.reduce_sum(tf.image.total_variation(images))
我联系了作者,似乎根本没有什么重要的原因。他提到也许 reduce_sum
对于他的测试用例比 reduce_mean
更有效,但鼓励我测试这两种情况并选择能给我最好结果的那个。
为什么Total Variation Loss in Tensorflow建议使用reduce_sum
而不是reduce_mean
作为损失函数?
This can be used as a loss-function during optimization so as to suppress noise in images. If you have a batch of images, then you should calculate the scalar loss-value as the sum:
loss = tf.reduce_sum(tf.image.total_variation(images))
我联系了作者,似乎根本没有什么重要的原因。他提到也许 reduce_sum
对于他的测试用例比 reduce_mean
更有效,但鼓励我测试这两种情况并选择能给我最好结果的那个。