Closed 10-zin closed 4 years ago
The encode_plus() function accepts pad_to_max_length as an argument. If it is set to true, the input is encoded with automatic padding for ids, mask and token type ids. This can shorten 4 lines of extra code in the BERTDataset class to 1.
encode_plus()
pad_to_max_length
BERTDataset
Great. I didnt know this existed :D Merged!
The
encode_plus()
function acceptspad_to_max_length
as an argument. If it is set to true, the input is encoded with automatic padding for ids, mask and token type ids. This can shorten 4 lines of extra code in theBERTDataset
class to 1.