code: def compute_one_decoding_video_metrics(iterator, feed_dict, num_videos):
    
    output, target = iterator.get_next()
    metrics = psnr_and_ssim(output, target)
  
    with tf.Session() as sess:
      sess.run(tf.local_variables_initializer())
      initalizer = iterator._initializer  # pylint: disable=protected-access
      if initalizer is not None:
        sess.run(initalizer, feed_dict=feed_dict)
  
      all_psnr, all_ssim = [], []
      for i in range(num_videos):
        print("Computing video: %d" % i)
        psnr_np, ssim_np = sess.run(metrics)
        all_psnr.append(psnr_np)
        all_ssim.append(ssim_np)
      all_psnr = np.array(all_psnr)
      all_ssim = np.array(all_ssim)
      return all_psnr, all_ssim
docs: Computes the average of all the metric for one decoding.
  
    Args:
      iterator: dataset iterator.
      feed_dict: feed dict to initialize iterator.
      num_videos: number of videos.
  
    Returns:
      all_psnr: 2-D Numpy array, shape=(num_samples, num_frames)
      all_ssim: 2-D Numpy array, shape=(num_samples, num_frames)