Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jun 24, 2024
1 parent 7c7079a commit 554fb15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensordict/nn/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __init__(

def clear(self):
self.init_fm(self.embedding.weight)
self.flag = torch.zeros(size=(self.embedding.num_embeddings, 1)).to(torch.int64)
self.flag = torch.zeros((self.embedding.num_embeddings, 1), dtype=torch.int64)

def to_index(self, item: torch.Tensor) -> torch.Tensor:
return torch.remainder(item.to(torch.int64), self.num_embedding).to(torch.int64)
Expand Down

0 comments on commit 554fb15

Please sign in to comment.