Hello,
Normally colab should work exactly as your local machine, the only differences are on the used OS and versions of torch they install. Can you share a complete view of your code and where it breaks? or at least can you show as the class you are calling here