Rate this Page

device#

classtorch.mtia.device(device)[source]#

Context-manager that changes the selected device.

Parameters:

device (torch.device orint) – device index to select. It’s a no-op ifthis argument is a negative integer orNone.