Skip to content

Commit

Permalink
directly specify device for range
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoLegends committed Jul 2, 2024
1 parent fefc06a commit ab64625
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion i6_models/parts/factored_hybrid/diphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def forward_joint(self, features: Tensor) -> Tensor:
left_logits = self.left_context_encoder(features) # B, T, C

# here we forward every context to compute p(c, l|x) = p(c|l, x) * p(l|x)
contexts_left = torch.arange(self.n_contexts).to(device=features.device) # C
contexts_left = torch.arange(self.n_contexts, device=features.device) # C
contexts_embedded_left = self.left_context_embedding(contexts_left) # C, E

features = features.expand((self.n_contexts, -1, -1, -1)) # C, B, T, F
Expand Down

0 comments on commit ab64625

Please sign in to comment.