Loading fairseq/modules/adaptive_softmax.py +3 −0 Changes for fairseq/modules/adaptive_softmax.py: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ class AdaptiveSoftmax(nn.Module): if vocab_size > cutoff[-1]: cutoff = cutoff + [vocab_size] else: assert vocab_size == cutoff[ -1], 'cannot specify cutoff smaller than vocab size' output_dim = cutoff[0] + len(cutoff) - 1 Loading Loading
fairseq/modules/adaptive_softmax.py +3 −0 Changes for fairseq/modules/adaptive_softmax.py: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ class AdaptiveSoftmax(nn.Module): if vocab_size > cutoff[-1]: cutoff = cutoff + [vocab_size] else: assert vocab_size == cutoff[ -1], 'cannot specify cutoff smaller than vocab size' output_dim = cutoff[0] + len(cutoff) - 1 Loading