pfnet / pfrl

PFRL: a PyTorch-based deep reinforcement learning library
MIT License
1.2k stars 157 forks source link

fix IndexError due to empty stack #133

Closed lerrytang closed 3 years ago

lerrytang commented 3 years ago

The original method can cause IndexError in some cases.

I stumbled on this bug in my experiments and one way to reproduce the error is to modify the method's inputs to sequences = [sequences[0][:17]] and n_items = 4. The fix in this PR is simple, it may not be the optimal though.

ummavi commented 3 years ago

/test

pfn-ci-bot commented 3 years ago

Successfully created a job for commit 38618ae: