Jack10843 / OSR

Repository for the paper: Recovering from Out-of-sample States via Inverse Dynamics in Offline Reinforcement Learning
MIT License
5 stars 0 forks source link

Missing import--has solved #2

Open andaolong opened 9 months ago

andaolong commented 9 months ago

File "/home/adl/Desktop/baseline/OSR-main/conservative_sac.py", line 156, in train osr_loss = torch.mean(kl_divergence(pi_dist, idm_dist)) NameError: name 'kl_divergence' is not defined

Did the author forget to publish some class or function implementation? Or forgot to import it?

andaolong commented 9 months ago

I have solved this problem by adding some imports to conservative_sac.py

added imports: --from torch.distributions import Normal --from torch.distributions import kl_divergence