def normalize_videos(videos: tf.Tensor,
                     target_resolution: Tuple[int, int],
                     inter_resolution: Tuple[int, int] = (64, 64)):
  """Normalizes the videos.

  Args:
    videos: a tensor of shape [batch_size, num_frames, height, width, depth]
      ranging between 0 and 255.
    target_resolution: target video resolution of [width, height]
    inter_resolution: intermediate resolution before the target resolution.
  Returns:
    videos: a tensor of shape [batch_size, num_frames, height, width, depth]
  """
  videos_shape = videos.shape.as_list()
  all_frames = tf.reshape(videos, [-1] + videos_shape[-3:])
  if tuple(videos_shape[-3:-1]) != inter_resolution:
    all_frames = tf.image.resize_bilinear(all_frames, size=inter_resolution)
  resized_videos = tf.image.resize_bilinear(all_frames, size=target_resolution)
  target_shape = [videos_shape[0], -1] + list(target_resolution) + [3]
  output_videos = tf.reshape(resized_videos, target_shape)
  scaled_videos = 2. * tf.cast(output_videos, tf.float32) / 255. - 1
  return scaled_videos
Normalizes the videos.

  Args:
    videos: a tensor of shape [batch_size, num_frames, height, width, depth]
      ranging between 0 and 255.
    target_resolution: target video resolution of [width, height]
    inter_resolution: intermediate resolution before the target resolution.
  Returns:
    videos: a tensor of shape [batch_size, num_frames, height, width, depth]
  
videogvt/tools/compute_fvd.py