How to boost PyTorch Dataset using memory-mapped files
We call a memory-mapped file, a file that has its contents directly assigned to a segment of virtual memory, this way we can perform any operations on that segment just like on any other portion of main memory we have access to in the current process. Due to the additional abstraction layer represented by the virtual memory, we can map into memory files that are much larger than the physical capacity of our machine. The segments of memory (called pages) that are required by the running process are fetched from external storage and copied into the main memory automatically by the virtual memory manager.
Jul-26-2022, 19:03:46 GMT
- Technology: