Solved by ptrblck in post #7 
              
              
                Since some of the parameters are already containing NaNs, I guess the last update might have created them and you could thus check the gradients for weight_v from the previous iteration(s). 
It also seems that weight_norm is used, but I don’t know if it’s more sensible to gradient explosions etc.