Inversion of parameter given forward simulation function

You don’t need a CustomDist, just an Op to wrap around forward_model, so your case is just a subset of that blackbox likelihood tutorial