René's URL Explorer Experiment


Title: Tensor Class — PyTorch main documentation

Description: at::Tensor class reference — the primary tensor type in PyTorch C++ with creation, indexing, device, and dtype APIs.

Keywords:

direct link

Domain: docs.pytorch.org


Hey, it has json ld scripts:
    {
       "@context": "https://schema.org",
       "@type": "Article",
       "name": "Tensor Class",
       "headline": "Tensor Class",
       "description": "at::Tensor class reference \u2014 the primary tensor type in PyTorch C++ with creation, indexing, device, and dtype APIs.",
       "url": "/api/aten/tensor.html",
       "articleBody": "Tensor Class# The at::Tensor class is the primary tensor class in ATen, representing a multi-dimensional array with a specific data type and device. Tensor# class at::Tensor# The primary tensor class in ATen. Represents a multi-dimensional array with a specific data type and device. Tensor()# Default constructor. Creates an undefined tensor. int64_t dim() const# Returns the number of dimensions of the tensor. int64_t size(int64_t dim) const# Returns the size of the tensor at the given dimension. IntArrayRef sizes() const# Returns the sizes of all dimensions. IntArrayRef strides() const# Returns the strides of all dimensions. ScalarType scalar_type() const# Returns the data type of the tensor. Device device() const# Returns the device where the tensor is stored. bool is_cuda() const# Returns true if the tensor is on a CUDA device. bool is_cpu() const# Returns true if the tensor is on CPU. bool requires_grad() const# Returns true if gradients need to be computed for this tensor. Tensor \u0026requires_grad_(bool requires_grad = true)# Sets whether gradients should be computed for this tensor. Tensor to(Device device) const# Returns a tensor on the specified device. Tensor to(ScalarType dtype) const# Returns a tensor with the specified data type. Tensor contiguous() const# Returns a contiguous tensor with the same data. void *data_ptr() const# Returns a pointer to the underlying data. Example: #include \u003cATen/ATen.h\u003e at::Tensor a = at::ones({2, 2}, at::kInt); at::Tensor b = at::randn({2, 2}); auto c = a + b.to(at::kInt); TensorOptions# class at::TensorOptions# A class to specify options for tensor creation, including dtype, device, layout, and requires_grad. TensorOptions()# Default constructor. TensorOptions dtype(ScalarType dtype) const# Returns options with the specified data type. TensorOptions device(Device device) const# Returns options with the specified device. TensorOptions layout(Layout layout) const# Returns options with the specified layout. TensorOptions requires_grad(bool requires_grad) const# Returns options with the specified requires_grad setting. Example: auto options = at::TensorOptions() .dtype(at::kFloat) .device(at::kCUDA, 0) .requires_grad(true); at::Tensor tensor = at::zeros({3, 4}, options); Scalar# class at::Scalar# Represents a scalar value that can be converted to various numeric types. Scalar(int64_t v)# Construct from an integer. Scalar(double v)# Construct from a double. template\u003ctypename T\u003eT to() const# Convert to the specified type. bool isIntegral(bool includeBool = false) const# Returns true if the scalar is an integral type. bool isFloatingPoint() const# Returns true if the scalar is a floating point type. ScalarType# enum class at::ScalarType# Enumeration of data types supported by tensors. enumerator Byte# 8-bit unsigned integer (uint8_t) enumerator Char# 8-bit signed integer (int8_t) enumerator Short# 16-bit signed integer (int16_t) enumerator Int# 32-bit signed integer (int32_t) enumerator Long# 64-bit signed integer (int64_t) enumerator Half# 16-bit floating point (float16) enumerator Float# 32-bit floating point (float) enumerator Double# 64-bit floating point (double) enumerator Bool# Boolean type enumerator BFloat16# Brain floating point (bfloat16) Convenience constants: at::kByte, at::kChar, at::kShort, at::kInt, at::kLong at::kHalf, at::kFloat, at::kDouble, at::kBFloat16 at::kBool DeviceGuard# class DeviceGuard# RAII guard that sets a certain default device in its constructor, and changes it back to the device that was originally active upon destruction. The device is always reset to the one that was active at the time of construction of the guard. Even if you set_device after construction, the destructor will still reset the device to the one that was active at construction time. This device guard does NOT have an uninitialized state; it is guaranteed to reset a device on exit. If you are in a situation where you might want to setup a guard (i.e., are looking for the moral equivalent of std::optional\u003cDeviceGuard\u003e), see OptionalDeviceGuard. Public Functions explicit DeviceGuard() = delete# No default constructor; see Note [Omitted default constructor from RAII]. inline explicit DeviceGuard(Device device)# Set the current device to the passed Device. inline explicit DeviceGuard(Device device, const impl::DeviceGuardImplInterface *impl)# This constructor is for testing only. ~DeviceGuard() = default# DeviceGuard(const DeviceGuard\u0026) = delete# Copy is disallowed. DeviceGuard \u0026operator=(const DeviceGuard\u0026) = delete# DeviceGuard(DeviceGuard \u0026\u0026other) = delete# Move is disallowed, as DeviceGuard does not have an uninitialized state, which is required for moves on types with nontrivial destructors. DeviceGuard \u0026operator=(DeviceGuard \u0026\u0026other) = delete# inline void reset_device(at::Device device)# Sets the device to the given one. The specified device must be consistent with the device type originally specified during guard construction. TODO: The consistency check here is inconsistent with StreamGuard\u2019s behavior with set_stream, where a stream on a different device than the original one isn\u2019t an error; we just reset the stream and then switch devices. inline void reset_device(at::Device device, const impl::DeviceGuardImplInterface *impl)# This method is for testing only. inline void set_index(DeviceIndex index)# Sets the device index to the given one. The device type is inferred from the original device type the guard was constructed with. inline Device original_device() const# Returns the device that was set at the time the guard was constructed. inline Device current_device() const# Returns the most recent device that was set using this device guard, either from construction, or via set_device. Example: { c10::DeviceGuard guard(at::Device(at::kCUDA, 1)); // Operations here run on CUDA device 1 auto tensor = at::zeros({2, 2}); } // Previous device is restored Layout# enum class at::Layout# Enumeration of tensor memory layouts. enumerator Strided# Dense tensor with strides. enumerator Sparse# Sparse tensor (COO format). enumerator SparseCsr# Sparse tensor in CSR format. enumerator SparseCsc# Sparse tensor in CSC format.",
       "author": {
         "@type": "Organization",
         "name": "PyTorch Contributors",
         "url": "https://pytorch.org"
       },
       "image": "https://pytorch.org/docs/stable/_static/img/pytorch_seo.png",
       "mainEntityOfPage": {
         "@type": "WebPage",
         "@id": "/api/aten/tensor.html"
       },
       "datePublished": "2023-01-01T00:00:00Z",
       "dateModified": "2023-01-01T00:00:00Z"
     }
 

docsearch:languageen
llm:site-typedocumentation
llm:frameworkPyTorch
llm:descriptionat::Tensor class reference — the primary tensor type in PyTorch C++ with creation, indexing, device, and dtype APIs.
llm:navigation-filehttps://pytorch.org/docs/stable/llms.txt
llm:sitemaphttps://pytorch.org/docs/stable/sitemap.xml
llm:versionmain
llm:projectPyTorch
llm:page-typedocumentation
og:imagehttps://docs.pytorch.org/docs/stable/_static/img/pytorch_seo.png
None3

Links:

Skip to main contenthttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#main-content
Home https://docs.pytorch.org/cppdocs/index.html
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
mainhttps://docs.pytorch.org/cppdocs/index.html
Installing C++ Distributions of PyTorch https://docs.pytorch.org/cppdocs/installing.html
The C++ Frontend https://docs.pytorch.org/cppdocs/frontend.html
C++ API Reference https://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
C10: Core Utilities https://docs.pytorch.org/cppdocs/api/c10/index.html
Autograd: Automatic Differentiation https://docs.pytorch.org/cppdocs/api/autograd/index.html
CUDA Support https://docs.pytorch.org/cppdocs/api/cuda/index.html
XPU Support https://docs.pytorch.org/cppdocs/api/xpu/index.html
Neural Network Modules (torch::nn) https://docs.pytorch.org/cppdocs/api/nn/index.html
Optimizers (torch::optim) https://docs.pytorch.org/cppdocs/api/optim/index.html
Data Loading (torch::data) https://docs.pytorch.org/cppdocs/api/data/index.html
Serialization (torch::serialize) https://docs.pytorch.org/cppdocs/api/serialize/index.html
Torch Library API https://docs.pytorch.org/cppdocs/api/library/index.html
Torch Stable API https://docs.pytorch.org/cppdocs/api/stable/index.html
FAQ https://docs.pytorch.org/cppdocs/faq.html
Go to pytorch.org https://pytorch.org
Xhttps://x.com/PyTorch
GitHubhttps://github.com/pytorch/pytorch
PyTorch Forumhttps://discuss.pytorch.org/
PyPihttps://pypi.org/project/torch/
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
Tensor Classhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html
Tensor Creationhttps://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensor Indexinghttps://docs.pytorch.org/cppdocs/api/aten/indexing.html
Tensor Accessorshttps://docs.pytorch.org/cppdocs/api/aten/accessors.html
C10: Core Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/index.html
Device and DeviceTypehttps://docs.pytorch.org/cppdocs/api/c10/device.html
Device Guardshttps://docs.pytorch.org/cppdocs/api/c10/guards.html
Streamshttps://docs.pytorch.org/cppdocs/api/c10/streams.html
Core Typeshttps://docs.pytorch.org/cppdocs/api/c10/types.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/c10/utilities.html
Autograd: Automatic Differentiationhttps://docs.pytorch.org/cppdocs/api/autograd/index.html
Gradient Computationhttps://docs.pytorch.org/cppdocs/api/autograd/gradient.html
Custom Autograd Functionshttps://docs.pytorch.org/cppdocs/api/autograd/custom_functions.html
Gradient Modeshttps://docs.pytorch.org/cppdocs/api/autograd/modes.html
CUDA Supporthttps://docs.pytorch.org/cppdocs/api/cuda/index.html
CUDA Streamshttps://docs.pytorch.org/cppdocs/api/cuda/streams.html
CUDA Guardshttps://docs.pytorch.org/cppdocs/api/cuda/guards.html
CUDA Utility Functionshttps://docs.pytorch.org/cppdocs/api/cuda/utilities.html
XPU Supporthttps://docs.pytorch.org/cppdocs/api/xpu/index.html
XPU Streamshttps://docs.pytorch.org/cppdocs/api/xpu/streams.html
XPU Utility Functionshttps://docs.pytorch.org/cppdocs/api/xpu/utilities.html
Neural Network Modules (torch::nn)https://docs.pytorch.org/cppdocs/api/nn/index.html
Containershttps://docs.pytorch.org/cppdocs/api/nn/containers.html
Convolution Layershttps://docs.pytorch.org/cppdocs/api/nn/convolution.html
Pooling Layershttps://docs.pytorch.org/cppdocs/api/nn/pooling.html
Linear Layershttps://docs.pytorch.org/cppdocs/api/nn/linear.html
Activation Functionshttps://docs.pytorch.org/cppdocs/api/nn/activation.html
Normalization Layershttps://docs.pytorch.org/cppdocs/api/nn/normalization.html
Dropout Layershttps://docs.pytorch.org/cppdocs/api/nn/dropout.html
Embedding Layershttps://docs.pytorch.org/cppdocs/api/nn/embedding.html
Recurrent Layershttps://docs.pytorch.org/cppdocs/api/nn/recurrent.html
Transformer Layershttps://docs.pytorch.org/cppdocs/api/nn/transformer.html
Loss Functionshttps://docs.pytorch.org/cppdocs/api/nn/loss.html
Functional APIhttps://docs.pytorch.org/cppdocs/api/nn/functional.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/nn/utilities.html
Optimizers (torch::optim)https://docs.pytorch.org/cppdocs/api/optim/index.html
Gradient Descent Optimizershttps://docs.pytorch.org/cppdocs/api/optim/gradient_descent.html
Adaptive Learning Rate Optimizershttps://docs.pytorch.org/cppdocs/api/optim/adaptive.html
Second-Order Optimizershttps://docs.pytorch.org/cppdocs/api/optim/second_order.html
Learning Rate Schedulershttps://docs.pytorch.org/cppdocs/api/optim/schedulers.html
Data Loading (torch::data)https://docs.pytorch.org/cppdocs/api/data/index.html
Datasetshttps://docs.pytorch.org/cppdocs/api/data/datasets.html
DataLoaderhttps://docs.pytorch.org/cppdocs/api/data/dataloader.html
Samplershttps://docs.pytorch.org/cppdocs/api/data/samplers.html
Transformshttps://docs.pytorch.org/cppdocs/api/data/transforms.html
Serialization (torch::serialize)https://docs.pytorch.org/cppdocs/api/serialize/index.html
Saving and Loadinghttps://docs.pytorch.org/cppdocs/api/serialize/save_load.html
Archiveshttps://docs.pytorch.org/cppdocs/api/serialize/archives.html
Checkpointshttps://docs.pytorch.org/cppdocs/api/serialize/checkpoints.html
Torch Library APIhttps://docs.pytorch.org/cppdocs/api/library/index.html
Operator Registrationhttps://docs.pytorch.org/cppdocs/api/library/registration.html
Custom Classeshttps://docs.pytorch.org/cppdocs/api/library/custom_classes.html
Library Versioninghttps://docs.pytorch.org/cppdocs/api/library/versioning.html
Torch Stable APIhttps://docs.pytorch.org/cppdocs/api/stable/index.html
Library Registration Macroshttps://docs.pytorch.org/cppdocs/api/stable/registration.html
Stable Operatorshttps://docs.pytorch.org/cppdocs/api/stable/operators.html
Utilitieshttps://docs.pytorch.org/cppdocs/api/stable/utilities.html
https://docs.pytorch.org/cppdocs/index.html
C++ API Referencehttps://docs.pytorch.org/cppdocs/api/index.html
ATen: Tensor Libraryhttps://docs.pytorch.org/cppdocs/api/aten/index.html
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#tensor-class
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#tensor
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6TensorE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3dimEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK4sizeE7int64_t
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK5sizesEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK7stridesEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK11scalar_typeEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6deviceEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK7is_cudaEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6is_cpuEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK13requires_gradEv
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv414requires_grad_b
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK2toE6Device
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK2toE10ScalarType
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK10contiguousEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK8data_ptrEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#tensoroptions
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at13TensorOptionsE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK5dtypeE10ScalarType
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6deviceE6Device
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6layoutE6Layout
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK13requires_gradEb
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#scalar
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6ScalarE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Scalar7int64_t
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Scalard
Thttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4I0ENK2toE1Tv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4I0ENK2toE1Tv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK10isIntegralEb
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK15isFloatingPointEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#scalartype
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at10ScalarTypeE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Byte
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Char
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv45Short
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv43Int
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Long
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Half
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv45Float
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Double
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Bool
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv48BFloat16
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#deviceguard
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
OptionalDeviceGuardhttps://docs.pytorch.org/cppdocs/api/c10/guards.html#PyTorchclassc10_1_1_optional_device_guard
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardEv
Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#_CPPv4N3c106DeviceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardE6Device
Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#PyTorchstructc10_1_1_device
Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#_CPPv4N3c106DeviceE
implhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardE6DevicePKN4impl24DeviceGuardImplInterfaceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardE6DevicePKN4impl24DeviceGuardImplInterfaceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardD0Ev
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERK11DeviceGuard
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERK11DeviceGuard
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardaSERK11DeviceGuard
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERR11DeviceGuard
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERR11DeviceGuard
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/c10/guards.html#PyTorchclassc10_1_1_device_guard
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardaSERR11DeviceGuard
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard12reset_deviceEN2at6DeviceE
implhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard12reset_deviceEN2at6DeviceEPKN4impl24DeviceGuardImplInterfaceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard12reset_deviceEN2at6DeviceEPKN4impl24DeviceGuardImplInterfaceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard9set_indexE11DeviceIndex
Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#_CPPv4N3c106DeviceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3c1011DeviceGuard15original_deviceEv
Devicehttps://docs.pytorch.org/cppdocs/api/c10/device.html#_CPPv4N3c106DeviceE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3c1011DeviceGuard14current_deviceEv
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#layout
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6LayoutE
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv47Strided
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Sparse
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv49SparseCsr
#https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv49SparseCsc
previous ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
next Tensor Creation https://docs.pytorch.org/cppdocs/api/aten/creation.html
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
previous ATen: Tensor Library https://docs.pytorch.org/cppdocs/api/aten/index.html
next Tensor Creation https://docs.pytorch.org/cppdocs/api/aten/creation.html
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#tensor
Tensorhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6TensorE
Tensor()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Tensorv
dim()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3dimEv
size()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK4sizeE7int64_t
sizes()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK5sizesEv
strides()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK7stridesEv
scalar_type()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK11scalar_typeEv
device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6deviceEv
is_cuda()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK7is_cudaEv
is_cpu()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6is_cpuEv
requires_grad()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK13requires_gradEv
requires_grad_()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv414requires_grad_b
to()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK2toE6Device
to()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK2toE10ScalarType
contiguous()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK10contiguousEv
data_ptr()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK8data_ptrEv
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#tensoroptions
TensorOptionshttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at13TensorOptionsE
TensorOptions()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv413TensorOptionsv
dtype()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK5dtypeE10ScalarType
device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6deviceE6Device
layout()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK6layoutE6Layout
requires_grad()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK13requires_gradEb
Scalarhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#scalar
Scalarhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6ScalarE
Scalar()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Scalar7int64_t
Scalar()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Scalard
to()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4I0ENK2toE1Tv
isIntegral()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK10isIntegralEb
isFloatingPoint()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK15isFloatingPointEv
ScalarTypehttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#scalartype
ScalarTypehttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at10ScalarTypeE
Bytehttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Byte
Charhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Char
Shorthttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv45Short
Inthttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv43Int
Longhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Long
Halfhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Half
Floathttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv45Float
Doublehttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Double
Boolhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv44Bool
BFloat16https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv48BFloat16
DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#deviceguard
c10::DeviceGuardhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardE
DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardEv
DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardE6Device
DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardE6DevicePKN4impl24DeviceGuardImplInterfaceE
~DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardD0Ev
DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERK11DeviceGuard
operator=()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardaSERK11DeviceGuard
DeviceGuard()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard11DeviceGuardERR11DeviceGuard
operator=()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuardaSERR11DeviceGuard
reset_device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard12reset_deviceEN2at6DeviceE
reset_device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard12reset_deviceEN2at6DeviceEPKN4impl24DeviceGuardImplInterfaceE
set_index()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N3c1011DeviceGuard9set_indexE11DeviceIndex
original_device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3c1011DeviceGuard15original_deviceEv
current_device()https://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4NK3c1011DeviceGuard14current_deviceEv
Layouthttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#layout
Layouthttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv4N2at6LayoutE
Stridedhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv47Strided
Sparsehttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv46Sparse
SparseCsrhttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv49SparseCsr
SparseCschttps://docs.pytorch.org/cppdocs/api/aten/tensor.html#_CPPv49SparseCsc
Show Source https://docs.pytorch.org/cppdocs/_sources/api/aten/tensor.md.txt
ExecuTorchhttps://docs.pytorch.org/executorch
Helionhttps://docs.pytorch.org/helion
torchaohttps://docs.pytorch.org/ao
kinetohttps://github.com/pytorch/kineto
torchtitanhttps://github.com/pytorch/torchtitan
TorchRLhttps://docs.pytorch.org/rl
torchvisionhttps://docs.pytorch.org/vision
torchaudiohttps://docs.pytorch.org/audio
tensordicthttps://docs.pytorch.org/tensordict
PyTorch on XLA Deviceshttps://docs.pytorch.org/xla
View Docshttps://docs.pytorch.org/docs/stable/index.html
View Tutorialshttps://docs.pytorch.org/tutorials
View Resourceshttps://pytorch.org/resources
Privacy Policyhttps://www.linuxfoundation.org/privacy/
https://www.facebook.com/pytorch
https://twitter.com/pytorch
https://www.youtube.com/pytorch
https://www.linkedin.com/company/pytorch
https://pytorch.slack.com
https://pytorch.org/wechat
Policieshttps://www.linuxfoundation.org/legal/policies
Trademark Usagehttps://www.linuxfoundation.org/trademark-usage
Privacy Policyhttp://www.linuxfoundation.org/privacy
Cookies Policyhttps://opensource.fb.com/legal/cookie-policy
Sphinxhttps://www.sphinx-doc.org/
PyData Sphinx Themehttps://pydata-sphinx-theme.readthedocs.io/en/stable/index.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.