torch

package
v0.0.0-...-7b461c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TORCH_CLASSES = map[string]interface{}{

	"torch._utils._rebuild_tensor_v2": rebuild_tensor_v2,

	"torch.BFloat16Storage": StorageKind{ml.DT_BF16},
}

Functions

This section is empty.

Types

type StorageKind

type StorageKind struct {
	// contains filtered or unexported fields
}

type TorchModelReader

type TorchModelReader struct {
	// contains filtered or unexported fields
}

func NewTorchModelReader

func NewTorchModelReader(modelFilePath string) (*TorchModelReader, error)

func (*TorchModelReader) Close

func (tmr *TorchModelReader) Close() error

func (*TorchModelReader) Load

func (tmr *TorchModelReader) Load() (*pickle.PickleDict[*ml.Tensor], error)

type TorchStorage

type TorchStorage struct {
	// contains filtered or unexported fields
}

func (*TorchStorage) Load

func (ts *TorchStorage) Load(memoryMapper *common.MemoryMapper, elmCount int) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL