-
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.214 torch.linalg.tensorinv
#6059
映射文档 No.214 torch.linalg.tensorinv
#6059
Conversation
|
||
|
||
```python | ||
# PyTorch 写法: |
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.
这个转写示例过于复杂了,需要写成简单的 映射关系,让人一眼能看明白大致思路来参考即可,伪代码形式也可以
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.
已更新
A_ = paddle.reshape(A, [A_dim_0, A_dim_1]) | ||
A_inv_ = paddle.linalg.inv(A_) | ||
|
||
A_inv = paddle.reshape(A_inv_, A.shape[ind:] + A.shape[:ind]) |
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.
这个返回结果的shape,我试了下和torch好像对不上,麻烦对比一下这两个Tensor的计算结果值
@RedContritio 别忘了这个PR哈 |
526d359
to
a5a7dae
Compare
这个api的与当前的split功能差异较大,组合也较为繁琐,计划后面新增API,因此先按功能缺失来吧,等API开发完成后直接映射到 |
a5a7dae
to
33353dc
Compare
torch.linalg.tensorinv
特点:paddle.linalg.inv
以组合替代实现。