Skip to content

Commit

Permalink
fixing a device proble
Browse files Browse the repository at this point in the history
  • Loading branch information
matsen committed Jan 14, 2025
1 parent fddcee1 commit d484895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netam/dcsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def predictions_of_batch(self, batch):
# However, we have to unsqueeze because scatter_ requires the `index`
# tensor and the `src` value(s) to have the same shape for broadcasting.

parent_indices = batch["codon_parents_idxs"] # Shape: [B, L]
parent_indices = batch["codon_parents_idxs"].to(self.device) # Shape: [B, L]

# Create mask for valid (non-ambiguous) codons.
valid_mask = parent_indices != AMBIGUOUS_CODON_IDX # Shape: [B, L]
Expand Down

0 comments on commit d484895

Please sign in to comment.