Back to Browse

Batching inputs together (PyTorch)

27.2K views
Jun 14, 2021
2:52

How can we batch together different sentences of various lengths and make sure we get the same result when going through the model as a batch or as individual sentences. This video is part of the Hugging Face course: http://huggingface.co/course Open in colab to run the code samples: https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/videos/batch_inputs_pt.ipynb TensorFlow version: https://youtu.be/ROxrFOEbsQE Related videos: - The pipeline function: https://youtu.be/tiZFewofSLM - The tokenization pipeline: https://youtu.be/Yffk5aydLzg Have a question? Checkout the forums: https://discuss.huggingface.co/c/course/20 Subscribe to our newsletter: https://huggingface.curated.co/

Download

1 formats

Video Formats

360pmp44.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Batching inputs together (PyTorch) | NatokHD