code: def psnr(img1, img2):
      mse = lp_error(img1, img2, 2)
      if mse == 0:
          return 100
      PIXEL_MAX = 255.0
      # getting the noise in dB
      return 20 * torch.log10(PIXEL_MAX / torch.sqrt(mse))
  
file_path: DALI/docs/examples/use_cases/video_superres/model/model.py
imports: import time
  import scipy.misc
  import numpy
  from math import floor, log
  import torch
  import torch.nn
  from torch.nn import init
  from torch.autograd import Variable
  from torch.nn.functional import upsample
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: psnr(img1, img2) and returns: unknown, int