IndexError: index out of bounds error

and this occurs when i run on cuda on google colab but on my PC with CPU it run ok