Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion fairseq/data/huffman/huffman_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def decode(self, bits: bitarray) -> tp.Iterator["HuffmanNode"]:

class HuffmanCodeBuilder:
"""
build a dictionary with occurence count and then build the Huffman code for it.
build a dictionary with occurrence count and then build the Huffman code for it.
"""

def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion fairseq/optim/dynamic_loss_scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _decrease_loss_scale(self):
def check_overflow(self, grad_norm):
# detect inf and nan
if grad_norm == float("inf") or grad_norm != grad_norm:
# overflow has occured
# overflow has occurred
prev_scale = self.loss_scale
iter_since_rescale = self._iter - self._last_rescale_iter

Expand Down