Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DType ¶
type DType C.Torch_DataType
DType tensor scalar data type
const ( // Byte byte tensors (go type uint8) Byte DType = C.Torch_Byte // Char char tensor (go type int8) Char DType = C.Torch_Char // Int int tensor (go type int32) Int DType = C.Torch_Int // Long long tensor (go type int64) Long DType = C.Torch_Long // Float tensor (go type float32) Float DType = C.Torch_Float // Double tensor (go type float64) Double DType = C.Torch_Double )
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error errors returned by torch functions
type JITModule ¶
type JITModule struct {
// contains filtered or unexported fields
}
JITModule is a jit compiled PyTorch module
func LoadJITModule ¶
LoadJITModule loads module from file
type JITModuleMethod ¶
type JITModuleMethod struct { Module *JITModule Name string // contains filtered or unexported fields }
JITModuleMethod is single method from a JITModule
func (*JITModuleMethod) Run ¶
func (m *JITModuleMethod) Run(inputs ...interface{}) (interface{}, error)
Run executes given method with tensors as input
type JITModuleMethodArgument ¶
JITModuleMethodArgument contains information of a single method argument
type Tensor ¶
type Tensor struct {
// contains filtered or unexported fields
}
Tensor holds a multi-dimensional array of elements of a single data type.
func NewTensor ¶
NewTensor converts from a Go value to a Tensor. Valid values are scalars, slices, and arrays. Every element of a slice must have the same length so that the resulting Tensor has a valid shape.
func NewTensorWithShape ¶
NewTensorWithShape converts a single dimensional Go array or slice into a Tensor with given shape