Closed livc closed 4 years ago
I set k = len(d)
in https://github.com/zysite/biaffine-parser/blob/master/parser/utils/alg.py#L7 to make sure no padding.
I set
k = len(d)
inparser/utils/alg.py
to make sure no padding.
No, this operation can't ensure no padding, since there is no guarantee that all sentences in a batch are in the same bucket.
So any suggestions?
Since sentences are variable-length, there's no way to totally avoid the padding. Actually, using kmeans algorithm can guarantee that all the sentences in a batch are roughly the same length.
Hi, is there a fast way to disable padding to make sure all sentences in a batch have the same length? Thanks.