Skip to content

Commit

Permalink
Update pfrl/utils/batch_states.py
Browse files Browse the repository at this point in the history
The input feature type is checked better way.

Co-authored-by: Yasuhiro Fujita <muupan@gmail.com>
  • Loading branch information
tarokiritani and muupan authored Feb 24, 2021
1 parent 6361123 commit 671b6d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pfrl/utils/batch_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ def batch_states(
features = [phi(s) for s in states]
# return concat_examples(features, device=device)
collated_features = default_collate(features)
if isinstance(collated_features, list):
if isinstance(features[0], tuple):
collated_features = tuple(collated_features)
return _to_recursive(collated_features, device)

0 comments on commit 671b6d6

Please sign in to comment.