Skip to content

Commit

Permalink
add to method
Browse files Browse the repository at this point in the history
  • Loading branch information
jbloom-md committed Feb 28, 2024
1 parent ed8345a commit b3f6dc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sae_training/sae_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def __len__(self):
# Return the number of SparseAutoencoder instances
return len(self.autoencoders)

def to(self, device):
for ae in self.autoencoders:
ae.to(device)

@classmethod
def load_from_pretrained(cls, path: str):
"""
Expand Down

0 comments on commit b3f6dc6

Please sign in to comment.