nlp-with-transformers / notebooks

Jupyter notebooks for the Natural Language Processing with Transformers book
https://transformersbook.com/
Apache License 2.0
3.85k stars 1.19k forks source link

Ensure tensors are on the same device #64

Closed carlos-aguayo closed 1 year ago

carlos-aguayo commented 2 years ago

Without this change, the notebook for chapter 8 breaks, if running on a GPU, when training the distillation model because the inputs are not on a GPU device.

image
review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

carlos-aguayo commented 2 years ago

@lewtun Small fix for chapter 8

lewtun commented 2 years ago

Thanks for the fix @carlos-aguayo ! I was able to reproduce the bug and left a small comment on the changes - apart from that it LGTM!