-
Notifications
You must be signed in to change notification settings - Fork 724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
映射文档 No.48 torch.nn.RNNBase mapping #5973
映射文档 No.48 torch.nn.RNNBase mapping #5973
Conversation
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5973.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
docs/guides/model_convert/convert_from_pytorch/api_difference/nn/torch.nn.RNNBase.md
Show resolved
Hide resolved
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| mode | mode | 表示 `RNN` 模型的类型,torch 取值为 `'LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU`,paddle 取值为 `'SimpleRNN', 'LSTM', 'GRU`,需要转写。| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle的mode也是支持 'LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU` 吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle 的 'LSTM', 'GRU'
能正常接受,'RNN_TANH', 'RNN_RELU'
如果传入,会导致 self.activation
未定义出现错误。
d525360
to
e2b3dae
Compare
### 参数映射 | ||
| PyTorch | PaddlePaddle | 备注 | | ||
| ------------- | ------------ | ------------------------------------------------------ | | ||
| mode | mode | 表示 `RNN` 模型的类型,torch 取值为 `'LSTM', 'GRU', 'RNN_TANH', 'RNN_RELU`,paddle 取值为 `'LSTM', 'GRU'`,需要转写。| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的,这里有一个功能bug 应该是要支持'RNN_TANH', 'RNN_RELU'的,我们会修复
将
torch.nn.RNNBase
映射到paddle.nn.layer.rnn.RNNBase
。