You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to create a VideoClips object from a very large dataset, however during the process my system restarts for some unknown reason.
After looking in here I figured out that I never get into the loop (line 85).
Running torch.get_num_threads() gives me 44, so I changed this to 16 manually and it works fine now.
import torch.utils.data
dl = torch.utils.data.DataLoader(
DS(self.video_paths),
batch_size=16,
num_workers=torch.get_num_threads(), # changed this to 16
collate_fn=lambda x: x)
I think it would be better to let the user choose the num_workers parameter by passing it to VideoClips constructor.
The text was updated successfully, but these errors were encountered:
@fmassa Another option is to use torch.set_num_workers(), but I don't know how this would affect the behavior of other functions. Therefore I think the best thing to do is exposing it to the constructor with the default value as you suggested.
I've been trying to create a VideoClips object from a very large dataset, however during the process my system restarts for some unknown reason.
After looking in here I figured out that I never get into the loop (line 85).
Running
torch.get_num_threads()
gives me 44, so I changed this to 16 manually and it works fine now.I think it would be better to let the user choose the num_workers parameter by passing it to VideoClips constructor.
The text was updated successfully, but these errors were encountered: