Shortcuts

Function at::device_of(TensorList)

Function Documentation

c10::optional<Device> at::device_of(TensorList t)

Return the Device of a TensorList, if the list is non-empty and the first Tensor is defined.

(This function implicitly assumes that all tensors in the list have the same device.)

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources