• Guillem Orellana Trullols's avatar
    Update ucf101.py (#2186) · 14af9de6
    Guillem Orellana Trullols authored
    Now the dataset is not working properly because of this line of code `indices = [i for i in range(len(video_list)) if video_list[i][len(self.root) + 1:] in selected_files]`. 
    Performing the `len(self.root) + 1` only make sense if there is no training / to root
    
    ```
    >>> root = 'data/ucf-101/videos'
    >>> video_path = 'data/ucf-101/videos/activity/video.avi'
    >>> video_path [len(root ):]
    '/activity/video.avi'
    >>> video_path [len(root ) + 1:]
    'activity/video.avi'
    ```
    
    Appending the root path also to the selected files is a simple solution and make the dataset works with and without a trailing slash.
    14af9de6
ucf101.py 4.31 KB