graykode / graykode/nlp-tutorial

Problem with BERT batch generation

Aperta
#45 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Jupyter Notebook
Stelle
14.9k
Fork
3.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.