fastnlp / fastNLP

fastNLP: A Modularized and Extensible NLP Framework. Currently still in incubation.
https://gitee.com/fastnlp/fastNLP
Apache License 2.0
3.06k stars 450 forks source link

"bugs:fix lstm rnn.pack_padded_sequence RuntimeError, 详细信息: https://g… #344

Closed johnson7788 closed 3 years ago

johnson7788 commented 3 years ago

…ithub.com/pytorch/pytorch/issues/43227"

Description:简要描述这次PR的内容 一个torch的bug: nn.utils.rnn.pack_padded_sequence: RuntimeError: 'lengths' argument should be a 1D CPU int64 tensor, but got 1D cuda:0 Long tensor 详情查看: https://github.com/pytorch/pytorch/issues/43227

Main reason: 做出这次修改的原因 兼容torch 1.70 GPU版本

Checklist 检查下面各项是否完成

Please feel free to remove inapplicable items for your PR.

Changes: 逐项描述修改的内容

Mention: 找人review你的PR

@修改过这个文件的人 @核心开发人员

yhcc commented 3 years ago

I didn't see you are trying to push to the master branch. Right now, we are developing in the dev branch, can you post a new pr to the dev branch instead of the master branch?

johnson7788 commented 3 years ago

已提交到dev分支; Already PR to dev Branch