Hello, I'm trying to migrate the dynamic attention network in your code to my testing network,but there is an error in the function of "dynamic_attention" at running time。
def dynamic_attention(query, key, value, k):
......
error message: Index put requires the source and destination detypes match, got Double for the destination and Float for the source.
prob[B,H,N,K] = S
........
return torch.einsum('bhnm,bdhm->bdhn', prob, value), prob
Can you tell me how to fix the problem? Thank you very much!!!
Hello, I'm trying to migrate the dynamic attention network in your code to my testing network,but there is an error in the function of "dynamic_attention" at running time。 def dynamic_attention(query, key, value, k): ......
error message: Index put requires the source and destination detypes match, got Double for the destination and Float for the source.
Can you tell me how to fix the problem? Thank you very much!!!