Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CodonTransformer/CodonPrediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ def sample_non_deterministic(
raise ValueError("top_p must be a float between 0 and 1.")

# Compute probabilities using temperature scaling
logits /= temperature
probs = torch.softmax(logits, dim=-1)
probs = torch.softmax(logits / temperature, dim=-1)


# Remove batch dimension if present
if probs.dim() == 3:
Expand Down
Loading