Using Pytorch neural network as the custom “black box” likelihood function

Can you post the code you are actually running?