original_docstring: Get clip offsets by dense sample strategy in train mode.
  
          It will calculate a sample position and sample interval and set
          start index 0 when sample_pos == 1 or randomly choose from
          [0, sample_pos - 1]. Then it will shift the start index by each
          base offset.
  
          Args:
              num_frames (int): Total number of frame in the video.
  
          Returns:
              np.ndarray: Sampled frame indices in train mode.
          
docstring: Get clip offsets by dense sample strategy in train mode.
  It will calculate a sample position and sample interval and set
  start index 0 when sample_pos == 1 or randomly choose from
  [0, sample_pos - 1]. Then it will shift the start index by each
  base offset.
docstring_tokens: Get clip offsets by dense sample strategy in train mode . It will calculate a sample position and sample interval and set start index 0 when sample_pos == 1 or randomly choose from [ 0 sample_pos - 1 ] . Then it will shift the start index by each base offset .
code: def _get_train_clips(self, num_frames):
          """Get clip offsets by dense sample strategy in train mode.
  
          It will calculate a sample position and sample interval and set
          start index 0 when sample_pos == 1 or randomly choose from
          [0, sample_pos - 1]. Then it will shift the start index by each
          base offset.
  
          Args:
              num_frames (int): Total number of frame in the video.
  
          Returns:
              np.ndarray: Sampled frame indices in train mode.
          """
          sample_position = max(1, 1 + num_frames - self.sample_range)
          interval = self.sample_range // self.num_clips
          start_idx = 0 if sample_position == 1 else np.random.randint(
              0, sample_position - 1)
          base_offsets = np.arange(self.num_clips) * interval
          clip_offsets = (base_offsets + start_idx) % num_frames
          return clip_offsets
code_tokens: def _get_train_clips ( self , num_frames ) : sample_position = max ( 1 , 1 + num_frames - self . sample_range ) interval = self . sample_range // self . num_clips start_idx = 0 if sample_position == 1 else np . random . randint ( 0 , sample_position - 1 ) base_offsets = np . arange ( self . num_clips ) * interval clip_offsets = ( base_offsets + start_idx ) % num_frames return clip_offsets
short_docstring: Get clip offsets by dense sample strategy in train mode.
short_docstring_tokens: Get clip offsets by dense sample strategy in train mode .
comment: """Get clip offsets by dense sample strategy in train mode.
  
          It will calculate a sample position and sample interval and set
          start index 0 when sample_pos == 1 or randomly choose from
          [0, sample_pos - 1]. Then it will shift the start index by each
          base offset.
  
          Args:
              num_frames (int): Total number of frame in the video.
  
          Returns:
              np.ndarray: Sampled frame indices in train mode.
          """