Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with train_agent and self.get_gaes #18

Open
digifelis opened this issue Nov 20, 2021 · 3 comments
Open

problem with train_agent and self.get_gaes #18

digifelis opened this issue Nov 20, 2021 · 3 comments

Comments

@digifelis
Copy link

deltas = [r + gamma * (1 - d) * nv - v for r, d, nv, v in zip(rewards, dones, next_values, values)]

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

@drhelado
Copy link

drhelado commented Nov 27, 2021

rewards = [0 if reward is None else reward for reward in rewards]

Add this above deltas = [r + ....

@HoaxParagon HoaxParagon mentioned this issue Mar 6, 2022
@crazypythonista
Copy link

deltas = [r + gamma * (1 - d) * nv - v for r, d, nv, v in zip(rewards, dones, next_values, values)]

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

Where you able to solve this?

@crazypythonista
Copy link

rewards = [0 if reward is None else reward for reward in rewards]

Add this above deltas = [r + ....

Mind elaborating a bit more? It didnt solved the issue at my end, any help is highly appreciated. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants