for i in reversed(range(self.len_clip)):
# make it as a loop
img_id_temp = img_id - i * d
if img_id_temp < 1:
img_id_temp = 1
elif img_id_temp > max_num:
img_id_temp = max_num
# load a frame
if self.dataset == 'ucf24':
path_tmp = os.path.join(self.data_root, 'rgb-images', img_split[1], img_split[2] ,'{:05d}.jpg'.format(img_id_temp))
elif self.dataset == 'jhmdb21':
path_tmp = os.path.join(self.data_root, 'rgb-images', img_split[1], img_split[2] ,'{:05d}.png'.format(img_id_temp))
frame = Image.open(path_tmp).convert('RGB')
why use img_id_temp and not img_id