本文簡要介紹python語言中 torchtext.datasets.IWSLT2016 的用法。
- 用法:- torchtext.datasets.IWSLT2016(root='.data', split=('train', 'valid', 'test'), language_pair=('de', 'en'), valid_set='tst2013', test_set='tst2014')
- root-保存數據集的目錄。默認值:“.data” 
- split-要返回的拆分或拆分。可以是字符串或字符串元組。默認值:(‘train’, ‘valid’, ‘test’) 
- language_pair-包含 src 和 tgt 語言的元組或列表 
- valid_set-用於標識驗證集的字符串。 
- test_set-用於標識測試集的字符串。 
 
- IWSLT2016 數據集 - 可用的數據集包括: - 語言對: - ‘en’ - ‘fr’ - ‘de’ - ‘cs’ - ‘ar’ - ‘en’ - x - x - x - x - ‘fr’ - x - ‘de’ - x - ‘cs’ - x - ‘ar’ - x - 有效/測試集:[‘dev2010’, ‘tst2010’、‘tst2011’, ‘tst2012’、‘tst2013’, ‘tst2014’] - 有關更多詳細信息,請參閱源網站:https://wit3.fbk.eu/2016-01 - 例子 - >>> from torchtext.datasets import IWSLT2016 >>> train_iter, valid_iter, test_iter = IWSLT2016() >>> src_sentence, tgt_sentence = next(train_iter)
參數:
相關用法
- Python PyTorch IWSLT2017用法及代碼示例
- Python PyTorch InMemoryCacheHolder用法及代碼示例
- Python PyTorch IterDataPipe用法及代碼示例
- Python PyTorch IndexAdder用法及代碼示例
- Python PyTorch IterableDataset用法及代碼示例
- Python PyTorch IoPathSaver用法及代碼示例
- Python PyTorch InMemoryBinaryCriteoIterDataPipe用法及代碼示例
- Python PyTorch Identity用法及代碼示例
- Python PyTorch IoPathFileOpener用法及代碼示例
- Python PyTorch Independent用法及代碼示例
- Python PyTorch Interpreter用法及代碼示例
- Python PyTorch InstanceNorm2d用法及代碼示例
- Python PyTorch InstanceNorm3d用法及代碼示例
- Python PyTorch IoPathFileLister用法及代碼示例
- Python PyTorch ImageFolder用法及代碼示例
- Python PyTorch IterKeyZipper用法及代碼示例
- Python PyTorch InteractionArch用法及代碼示例
- Python PyTorch InstanceNorm1d用法及代碼示例
- Python PyTorch InProjContainer.forward用法及代碼示例
- Python PyTorch InverseSpectrogram用法及代碼示例
- Python PyTorch IterableWrapper用法及代碼示例
- Python PyTorch frexp用法及代碼示例
- Python PyTorch jvp用法及代碼示例
- Python PyTorch cholesky用法及代碼示例
- Python PyTorch vdot用法及代碼示例
注:本文由純淨天空篩選整理自pytorch.org大神的英文原創作品 torchtext.datasets.IWSLT2016。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
