NLP - Sequence Models for NLP
You are designing a GRU-based model to classify text documents of varying lengths. Which PyTorch utility helps efficiently process batches with padded sequences?
pack_padded_sequence to pack padded sequences and avoid computation on padding tokens.pad_packed_sequence converts packed sequences back to padded tensors.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions