def apply_threshold(y_out, thresh):
  """Threshold the soft output into binary map.
    Args:
      y_out: list of [T, H, W] soft output.
    Returns:
      y_out_thresh: list of [T, H, W] binary map.
    """
  return [(_y > thresh).astype('float32') for _y in y_out]