本文簡要介紹python語言中 torchdata.datapipes.iter.IoPathFileOpener 的用法。
- 用法:- class torchdata.datapipes.iter.IoPathFileOpener(source_datapipe: IterDataPipe[str], mode: str = 'r', pathmgr=None)
- source_datapipe-提供路徑名或 URL 的可迭代DataPipe 
- mode-指定文件打開模式的可選字符串(默認為 - "r")
- pathmgr-自定義 - iopath.PathManager。如果未指定,則創建默認- PathManager。
 
- 從包含路徑名或 URL 的輸入數據管道打開文件,並生成路徑名和打開的文件流的元組(函數名稱: - open_file_by_iopath)。- 注意 - 默認 - PathManager當前支持本地文件路徑、普通HTTP URL和OneDrive URL。僅當- iopath>=0.1.9 時才支持 S3 URL。- 示例 - >>> from torchdata.datapipes.iter import IoPathFileLister >>> datapipe = IoPathFileLister(root=S3URL) >>> file_dp = datapipe.open_file_by_iopath()
參數:
相關用法
- Python PyTorch IoPathFileLister用法及代碼示例
- Python PyTorch IoPathSaver用法及代碼示例
- Python PyTorch InMemoryCacheHolder用法及代碼示例
- Python PyTorch IterDataPipe用法及代碼示例
- Python PyTorch IndexAdder用法及代碼示例
- Python PyTorch IterableDataset用法及代碼示例
- Python PyTorch InMemoryBinaryCriteoIterDataPipe用法及代碼示例
- Python PyTorch Identity用法及代碼示例
- Python PyTorch Independent用法及代碼示例
- Python PyTorch Interpreter用法及代碼示例
- Python PyTorch InstanceNorm2d用法及代碼示例
- Python PyTorch InstanceNorm3d用法及代碼示例
- Python PyTorch ImageFolder用法及代碼示例
- Python PyTorch IWSLT2016用法及代碼示例
- Python PyTorch IterKeyZipper用法及代碼示例
- Python PyTorch InteractionArch用法及代碼示例
- Python PyTorch InstanceNorm1d用法及代碼示例
- Python PyTorch InProjContainer.forward用法及代碼示例
- Python PyTorch InverseSpectrogram用法及代碼示例
- Python PyTorch IterableWrapper用法及代碼示例
- Python PyTorch IWSLT2017用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
- Python PyTorch vdot用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torchdata.datapipes.iter.IoPathFileOpener。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
