RuntimeError - NPL with transformers book - 02_classification.ipynb
Hi,I’m new to the Hugging Face library and getting started with NPL with transformers book. I’ve run the code in 02_classification.ipynb (section: Training the model) verbatim several times in Colab and got the same RuntimeError: Expected all tensors to be on the same device.chp02-nlp_with_transformers915×595 93.5 KBI can’t find any reference for this error and can’t see where I’m going wrong as the code was run my Colab is identical tonotebooks/02_classification.ipynb at main · nlp-with-transformers/notebooks · GitHub
2022-04-30T04:13:43Z
Hi JayThis is being addressed in this Github issue:When running the Trainer cell, it found two devices (cuda:0 and CPU) · Issue #31 · nlp-with-transformers/notebooks · GitHubThere is a propsed workaround in the thread, hope that helps.CheersHeiko