本文简要介绍python语言中 torchtext.datasets.IWSLT2017 的用法。
- 用法:- torchtext.datasets.IWSLT2017(root='.data', split=('train', 'valid', 'test'), language_pair=('de', 'en'))
- root-保存数据集的目录。默认值:“.data” 
- split-要返回的拆分或拆分。可以是字符串或字符串元组。默认值:(‘train’, ‘valid’, ‘test’) 
- language_pair-包含 src 和 tgt 语言的元组或列表 
 
- IWSLT2017 数据集 - 可用的数据集包括: - 语言对: - ‘en’ - ‘nl’ - ‘de’ - ‘it’ - ‘ro’ - ‘en’ - x - x - x - x - ‘nl’ - x - x - x - x - ‘de’ - x - x - x - x - ‘it’ - x - x - x - x - ‘ro’ - x - x - x - x - 有关更多详细信息,请参阅源网站:https://wit3.fbk.eu/2017-01 - 例子 - >>> from torchtext.datasets import IWSLT2017 >>> train_iter, valid_iter, test_iter = IWSLT2017() >>> src_sentence, tgt_sentence = next(train_iter)
参数:
相关用法
- Python PyTorch IWSLT2016用法及代码示例
- 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.IWSLT2017。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
