Repository Details
Shared by


HelloGitHub Rating
0 ratings
Free•BSD-3-Clause
Claim
Discuss
Collect
Share
2.2k
Stars
Yes
Chinese
Python
Language
No
Active
16
Contributors
24
Issues
No
Organization
0.5.0
Latest
255
Forks
BSD-3-Clause
License
More
简称 torchnlp 是一个支持快速原型设计(包括数据集和神经网络层)的 PyTorch-NLP 工具包。该库封装好了神经网络层、文本处理模块和数据集库,有利于加速自然语言处理研究和实践。示例代码:
```python
# Load a Dataset
from torchnlp.datasets import imdb_dataset
# Load the imdb training dataset
train = imdb_dataset(train=True)
train[0] # RETURNS: {'text': 'For a movie that gets..', 'sentiment': 'pos'}
# Apply Neural Networks Layers
import torch
from torchnlp.nn import LockedDropout
input_ = torch.randn(6, 3, 10)
dropout = LockedDropout(0.5)
# Apply a LockedDropout to `input_`
dropout(input_) # RETURNS: torch.FloatTensor (6x3x10)
```
Included in:
Vol.39
Comments
Rating:
No comments yet