bentrevett / pytorch-pos-tagging

A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
MIT License
177 stars 27 forks source link

fix: move torch FloatTensor to device #5

Closed sejas closed 4 years ago

sejas commented 4 years ago

This resolves the following error:

Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

resolves https://github.com/bentrevett/pytorch-pos-tagging/issues/4