Issue
I was wondering if the PyTorch Dataloader can also fetch the complete dataset into RAM so that performance does not suffer if there is enough RAM available
Solution
You can extend torch.util.data.Dataset and create your own Dataset implementation. In the __init__
function of your custom dataset you can then load all data in a list or any other data structure, which will be fully loaded into ram. The __getitem__
will then only access the structure and return a single item.
Answered By - Deusy94
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.