Can NOT use trained neural network as custom deterministic

I tried to use some trained neural network as custom deterministic but the pymc3 gets stuck there. If I comment the part of neural network, it can run. But once I add the nn part, it get stuck. Anyone can help me with that? thanks.

Can you try something like model.check_test_point() to see if the logp is executed?

Thank you for replying. Yes. I run the check_test_point() and the logp is executed as shown in the image.image

However, it gets stuck when sampling for hours without any progress.

And here is the screenshot where it gets stuck

Most likely it is some kind of memory issue or multi-process issue. Could you try:

with basic_model:
    trace = pm.sample(cores=1)

Hi @junpenglao. I tried to set the cores to be 1 and now it works. Thank you very much for the advice!