Pytorch IO提速


1. 把內存變成硬盤,把需要讀的數據塞到里面去,加快了io。

 

Optimizing PyTorch training code

如何給你PyTorch里的Dataloader打雞血

輕輕松松為你的Linux系統創建RAM Disk

把內存當硬盤,提速你的linux系統

Linux創建使用內存硬盤(RAM DISK)

 

2. 使用英偉達的 NVIDIA/DALI 模塊

A library containing both highly optimized building blocks and an execution engine for data pre-processing in deep learning applications

Pytorch_example

博客: Introducing GPU Instances: Using Deep Learning to Obtain Frontal Rendering of Facial Images

DALI 文檔 : dali-pytorch

 

3. 使用英偉達的 NVIDIA/apex 模塊

 

 

4. 將原始圖像保存為pt或hdf5文件

hdf5: Saving and loading a large number of images (data) into a single HDF5 file  (圖片轉換成HDF5文件(加載,保存))

pt : https://discuss.pytorch.org/t/how-to-speed-up-the-data-loader/13740/3

 

 

5.  將原始數據保存為lmdb格式

博客:Efficiently processing large image datasets in Python

 

 

6.  Python簡易實現並行操作

一行 Python 代碼實現並行 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM