nr3d_lib
nr3d_lib copied to clipboard
fix calculation of PSNR(if only_in_mask)
If only_in_mask is True, the PSNR is too small, because the shape of mask does not match x (or y).
For example, when x(or y) is (W, H, 3) and mask is (W, H, 1), the sum of error should be divided by not mask.sum(), but mask.sum()*3.