Skip to main content
Version: 0.2.2

Module: torchlive/torch

Interfaces

Type aliases

Dtype

Ƭ Dtype: "double" | "float" | "float32" | "float64" | "int" | "int16" | "int32" | "int64" | "int8" | "long" | "short" | "uint8"

A Dtype is an object that represents the data type of a Tensor.

note

The int64 (a.k.a. long) data types are not fully supported in React Native. For now, use .to({dtype: torch.int32}) to downcast before accessing such methods as .data() and .item().

https://pytorch.org/docs/1.12/tensor_attributes.html#torch-dtype


MemoryFormat

Ƭ MemoryFormat: "channelsLast" | "contiguousFormat" | "preserveFormat"

A MemoryFormat is an object representing the memory format on which a Tensor is or will be allocated.

https://pytorch.org/docs/1.12/tensor_attributes.html#torch.torch.memory_format


Scalar

Ƭ Scalar: number


TensorOptions

Ƭ TensorOptions: Object

Type declaration

NameTypeDescription
dtype?DtypeThe desired data type of a tensor.

Variables

torch

Const torch: Torch