Device error while working on colab

I’ve encountered the following error while transfer computation to cpu and send back cuda again while working on colab.

RuntimeError: iter.device(arg).is_cuda() INTERNAL ASSERT FAILED at "../aten/src/ATen/native/cuda/Loops.cuh":89, please report a bug to PyTorch. argument 1: expected a CUDA device but found cpu

Could you post a minimal, executable code snippet reproducing the error, please?