Shortcuts

torch.Tensor.is_contiguous

Tensor.is_contiguous(memory_format=torch.contiguous_format)bool

Returns True if self tensor is contiguous in memory in the order specified by memory format.

Parameters

memory_format (torch.memory_format, optional) – Specifies memory allocation order. Default: torch.contiguous_format.

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