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

NMaFaLayer模块中的 WindowAttention类中代码报错 #6

Open
wzhangck opened this issue Feb 2, 2023 · 1 comment
Open

NMaFaLayer模块中的 WindowAttention类中代码报错 #6

wzhangck opened this issue Feb 2, 2023 · 1 comment

Comments

@wzhangck
Copy link

wzhangck commented Feb 2, 2023

你好,根据你提供的示例代码,我运行 WindowAttention类的“ dots += self.pos_embedding[self.relative_indices[:, :, 0],self.relative_indices[:, :, 1],self.relative_indices[:, :, 2]]”这句代码时报错了,显示“tensors used as indices must be long, byte or bool tensors”,请问你知道该怎么解决吗?

@920232796
Copy link
Owner

看这个错误好像是relative_indices计算的有问题?你能详细的说一下你怎么做的么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants