Fix a inf in benchmark.lua
This commit is contained in:
parent
f61d59d28a
commit
4379d4d0fd
|
@ -110,7 +110,7 @@ local function PSNR(x1, x2, color)
|
|||
return 10 * math.log10((255.0 * 255.0) / mse)
|
||||
end
|
||||
local function MSE2PSNR(mse)
|
||||
return 10 * math.log10((255.0 * 255.0) / mse)
|
||||
return 10 * math.log10((255.0 * 255.0) / math.max(mse, 1))
|
||||
end
|
||||
|
||||
local function transform_jpeg(x, opt)
|
||||
|
|
Loading…
Reference in a new issue