struct

Torch::Device

Inherits Struct < Value < Object

Constructors

cuda(index : Int32 = 0) : Device
Source
from_c_int(value : Int32) : Device

Wire encoding shared with the shim: CPU = -1, MPS = -2, Vulkan = -3, CUDA: = i.

Source
new(type : Type, index : Int32 = 0)
Source

Instance methods

index
Source
to_c_int
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
type
Source

Nested types