Skip to content
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

paddle如何实现以下操作 #60376

Closed
XueAdas opened this issue Dec 26, 2023 · 2 comments
Closed

paddle如何实现以下操作 #60376

XueAdas opened this issue Dec 26, 2023 · 2 comments
Assignees
Labels
status/developed 开发完成 type/others 其他问题

Comments

@XueAdas
Copy link

XueAdas commented Dec 26, 2023

问题描述 Please describe your issue

                mask_index = [0, 2]
                mask = torch.ones([3, 3])
                img_mask = torch.Tensor([2,2,2])
                print(mask)
                mask[:, mask_index] = mask[:, mask_index] * img_mask.unsqueeze(-1)
                print(mask)
@zoooo0820
Copy link
Contributor

你好,目前这个的确是一个Bug。我们会尽快修复。

短期绕过的话 ,右值mask[:, mask_index] * img_mask.unsqueeze(-1) 可以再额外加一个transpose((1,0))的操作

@XueAdas
Copy link
Author

XueAdas commented Dec 28, 2023 via email

@paddle-bot paddle-bot bot added status/deferred 延期修复 status/developed 开发完成 and removed status/new-issue 新建 labels Jan 2, 2024
@paddle-bot paddle-bot bot closed this as completed Jan 5, 2024
@paddle-bot paddle-bot bot removed the status/deferred 延期修复 label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/developed 开发完成 type/others 其他问题
Projects
None yet
Development

No branches or pull requests

3 participants