Open wzhangck opened 1 year ago
你好,根据你提供的示例代码,我运行 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”,请问你知道该怎么解决吗?
看这个错误好像是relative_indices计算的有问题?你能详细的说一下你怎么做的么?
你好,根据你提供的示例代码,我运行 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”,请问你知道该怎么解决吗?