dzdws
dzdws

Reputation: 91

Using CUDA in Colab

Is it necessary to convert tensors and models to CUDA with tensor.to in colab when I've chosen runtime type as GPU?

I want use CUDA for training my model

Upvotes: 0

Views: 830

Answers (1)

user15813867
user15813867

Reputation:

  • tensor.to(device) transfer data to the given device.
  • Yes, you need to transfer model, input, labels etc to whatever device you are intending to use

Upvotes: 1

Related Questions