You’re welcome 
Hmm, commenting out the line is not the solution, since it’s the formula you are looking for. 
Could you please print the shapes of all Tensors?
The quoted code seems to be the __init__ function of your Module?
Try to adapt my code snippet into the forward function.