Custom loss function in pyro

I’m implementing a neural network using pytorch. My loss function is a custom negative log likelihood which is easy to implement using pyro plate. How can I incorporate this loss (in pyro) into pytorch?