loss.backward error
Hello when I download the code and run it in my computer, and I met an error in loss.backward() RuntimeError: one of the variables needed for gradient computaion has been modified by an inplace operation:[torch.FloatTensor [32, 64], which is output 0 of AsStrideBackward0, is at version 2; expected version 1 instead]
I didn't modify the code anywhere. my dependencies pytorch 1.3.0 python 3.6.13 tensorboard 2.0.2 gym 0.15.3
@Zhaocka Hi Zhaocka, I have the same problem as you, have you solved the problem?
Hey @Zhaocka, @Shi-YiWei, I am currently (slowly) working on a new version of this repository on the following branch: https://github.com/lweitkamp/option-critic-pytorch/tree/updated_oc. I could not find a way to remove the issue, so the codebase is completely rewritten. That version does converge for Cartpole-v0/v1 but I am trying to get a good parameter setting for Pong. Once that is found, I will merge the branch.
The problem is in actor_loss. There are some problems with it's logp and entropy. But I don't know why.
The issue ended up being how I access the state variable which is a PyTorch tensor. The latest commit fixes the issue!