How are you creating the weight tensor?
Dynamically based on the current batch or did you somehow precompute it?
Could you post a small code snippet showing this error?
PS: It might be related to this issue 21.