Skip to content

Commit

Permalink
Make loading device agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-cooney committed Jan 26, 2024
1 parent f55652e commit 39a3d3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sparse_autoencoder/autoencoder/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ def load(
The loaded model.
"""
# Load the file
serialized_state = torch.load(file_path, map_location=torch.device("cpu"))
serialized_state = torch.load(file_path)
state = SparseAutoencoderState.model_validate(serialized_state)

# Initialise the model
Expand Down

0 comments on commit 39a3d3a

Please sign in to comment.