Farama-Foundation / D4RL-Evaluations

Apache License 2.0
187 stars 27 forks source link

RuntimeError while running Bear #19

Closed Kostell0 closed 3 years ago

Kostell0 commented 3 years ago

I tried to run BEAR algorithm with your example command: python examples/bear_hdf5_d4rl.py --env='halfcheetah-medium-v0' --policy_lr=1e-4 --num_samples=100 already at first epoch i am getting this error

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [256, 6]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

I tried to fix it, but i couldn't. But i realized that with mode != auto it works, but i need mode turned on. But results not so good as expected!

zhaoyingnan179346 commented 3 years ago

Have you solved this problem? I have met the same problem.