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.11/tensor_attributes.html#torch-dtype
Defined in
torchlive/torch.ts:105
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.11/tensor_attributes.html#torch.torch.memory_format
Defined in
torchlive/torch.ts:131
Scalar
Ƭ Scalar: number
Defined in
torchlive/torch.ts:137
TensorOptions
Ƭ TensorOptions: Object
Type declaration
Name | Type | Description |
---|---|---|
dtype? | Dtype | The desired data type of a tensor. |
Defined in
torchlive/torch.ts:119
Variables
torch
• Const
torch: Torch
Defined in
torchlive/torch.ts:549