How to boost PyTorch Dataset using memory-mapped files | by Tudor Surdoiu | Jul, 2022
This article will discuss the reasoning and the steps of implementing a PyTorch dataset that uses memory-mapped filesPhoto by Eléonore Kemmel on UnsplashIntroductionWhen training a neural network one of the most common speed-related bottlenecks is represented by the data loading module. If we are bringing the data over the network, besides prefetching and caching there aren’t any other easy optimizations that we can apply.However, if the data is in a local storage we can optimize the file reading operations by combining…