我使用 U-NET 网络来训练我的数据。但是我需要修改它的损失函数来减少1以下像素的损失,以减少负例对网络权重的影响。但是我在pycharm MSELOSS中打开了源代码,看到这个:
class MSELoss(_Loss):
r"""Creates a criterion that measures the mean squared error between
`n` elements in the input `x` and target `y`:
:math:`{loss}(x, y) = 1/n \sum |x_i - y_i|^2`
`x` and `y` arbitrary shapes with a total of `n` elements each.
The sum operation still operates over all the elements, and divides by `n`.
The division by `n` can be avoided if one sets the internal variable
`size_average` to `False`.
"""
pass
我得不到任何有用的东西。