安装
# install with pypi
pip install pytorch-pqrnn
# or install locally with poetry
poetry install
环境
由于, pytorch-qrnn不再与pytorch兼容,并且也没有得到积极维护。 如果要在此模型中使用QRNN层,请先安装torch <= 1.4 pytorch-qrnn 。
用法
from pytorch_pqrnn . dataset import create_dataloaders
from pytorch_pqrnn . model import PQRNN
model = PQRNN (
b = 128 ,
d = 96 ,
lr = 1e-3 ,
num_layers = 2 ,
dropout = 0.5 ,
output_size = 5 ,
1