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

Unreachable else statement #3

Open
kvarys opened this issue Aug 9, 2022 · 0 comments
Open

Unreachable else statement #3

kvarys opened this issue Aug 9, 2022 · 0 comments

Comments

@kvarys
Copy link

kvarys commented Aug 9, 2022

Dear Researchers,

In modular_ac.py around line 120 there is the following if statement which always gets executed, making the else unreachable:

`
probs = np.exp(log_probs.detach().cpu().numpy())

for j, (pr, i) in enumerate(zip(probs, indices)):
if self.training or True:
a = np.random.choice(self.n_actions, p=pr)
else:
# print("Choose most probable action")
a = np.argmax(pr)
`
Perhaps would be worth removing it?

Kind regards!

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

1 participant