Skip to content

Commit

Permalink
obs_space.keys() returns a view object apparently, which doesn't play…
Browse files Browse the repository at this point in the history
… nicely with `in`. Needs to be converted to a list for this condition to ever be satisfied. (#275)

Co-authored-by: alex404 <alex404@mailbox.org>
  • Loading branch information
alex404 and alex404 authored Jun 30, 2023
1 parent a04a93f commit 7e1e695
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sf_examples/vizdoom/doom/doom_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(self, cfg: Config, obs_space: ObsSpace):
self.encoder_out_size = self.basic_encoder.get_out_size()

self.measurements_head = None
if "measurements" in obs_space.keys():
if "measurements" in list(obs_space.keys()):
self.measurements_head = nn.Sequential(
nn.Linear(obs_space["measurements"].shape[0], 128),
nonlinearity(cfg),
Expand Down

0 comments on commit 7e1e695

Please sign in to comment.