graykode / graykode/nlp-tutorial

Problem with BERT batch generation

Đang mở
#45 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
14.9k
Fork
3.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

There is a problem with padding on [line 73-75 ](https://github.com/graykode/nlp-tutorial/blob/cb4881ebf6683dc6970c53a2cf50d5fd01edf118/5-2.BERT/BERT-Torch.py#L73). What if the sentence length is larger than [maxlen](https://github.com/graykode/nlp-tutorial/blob/cb4881ebf6683dc6970c53a2cf50d5fd01edf118/5-2.BERT/BERT-Torch.py#L16)? Then we end up with sequences of varying length and [line 214](https://github.com/graykode/nlp-tutorial/blob/cb4881ebf6683dc6970c53a2cf50d5fd01edf118/5-2.BERT/BERT-Torch.py#L214) throws an error.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.