Skip to content

Commit

Permalink
reformatted (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangsibo1129 authored Dec 23, 2023
1 parent 6ef785a commit e0dec27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/scripts/ddpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def __init__(self, *, dtype, model_id, model_filename):
cached_path = hf_hub_download(model_id, model_filename)
except EntryNotFoundError:
cached_path = os.path.join(model_id, model_filename)
state_dict = torch.load(cached_path)
state_dict = torch.load(cached_path, map_location=torch.device("cpu"))
self.mlp.load_state_dict(state_dict)
self.dtype = dtype
self.eval()
Expand Down

0 comments on commit e0dec27

Please sign in to comment.