How can I implement a loss function in Pytorch if some of its operations are not included in torch functions? e.g. I have a network named Net and an input named Input, then we c