Hi All. I have a model written in Pytorch; however, I would like to calculate loss function by using Numba. I have searched online and could not find any appropriate solution. What I made up is to calculate loss by using a loss function written for Pytorch variables, let’ s say MSE loss, and then change “loss.data” to what I calculate with my loss function in Numba.    I do want to ask if there is any more elegant way to incorporate my loss function to Pytorch.