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
Click to show internal directories.
Click to hide internal directories.