Thanks for the answer. I am trying to double check the code, and the only other place where backward is called is backward pass for policy network. But I can not understand why removing distributions from PolicyNetwork model start causing that error. Is there a way to know what variable causes that issue?