Documentation
¶
Index ¶
- Variables
- func CheckMetaHash(version string, infoHash string) error
- func DumpToFile(fname string, data []byte) error
- func ReadImage(inputFilePath string) ([]byte, error)
- type Config
- type NpyReader
- func (rdr *NpyReader) GetBytes() ([]byte, error)
- func (rdr *NpyReader) GetFloat32() ([]float32, error)
- func (rdr *NpyReader) GetFloat64() ([]float64, error)
- func (rdr *NpyReader) GetInt16() ([]int16, error)
- func (rdr *NpyReader) GetInt32() ([]int32, error)
- func (rdr *NpyReader) GetInt64() ([]int64, error)
- func (rdr *NpyReader) GetInt8() ([]int8, error)
- func (rdr *NpyReader) GetUInt8() ([]uint8, error)
- type Synapse
- func (s *Synapse) Close()
- func (s *Synapse) InferByInfoHash(modelInfoHash, inputInfoHash string) (uint64, error)
- func (s *Synapse) InferByInputContent(modelInfoHash string, inputContent []byte) (uint64, error)
- func (s *Synapse) RemoteInferByInfoHash(modelInfoHash, inputInfoHash, uri string) (uint64, error)
- func (s *Synapse) RemoteInferByInputContent(modelInfoHash, uri string, addr string, slot string) (uint64, error)
- func (s *Synapse) VerifyInput(inputInfoHash string) error
- func (s *Synapse) VerifyModel(modelInfoHash string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Model_V1 = "model-v1"
)
Functions ¶
func CheckMetaHash ¶
func DumpToFile ¶
Types ¶
type NpyReader ¶
type NpyReader struct {
// The numpy data type of the array
Dtype string
// The endianness of the binary data
Endian binary.ByteOrder
// The version number of the file format
Version int
// The shape of the array as specified in the file.
Shape []int
// If true, the data are flattened in column-major order,
// otherwise they are flattened in row-major order.
ColumnMajor bool
// contains filtered or unexported fields
}
NpyReader can read data from a Numpy binary array into a Go slice.
func NewFileReader ¶
NewFileReader is a convenience method returning a NpyReader that can be used to obtain array data from the given named file. Call one of the GetXXX methods to obtain the data slice.
func NewReader ¶
NewReader returns a NpyReader that can be used to obtain array data as a Go slice. The Go slice has a type matching the dtype in the Numpy file. Call one of the GetXX methods to obtain the slice.
func (*NpyReader) GetFloat32 ¶
GetFloat32 returns the array data as a slice of float32 values.
func (*NpyReader) GetFloat64 ¶
GetFloat64 returns the array data as a slice of float64 values.
type Synapse ¶
type Synapse struct {
// contains filtered or unexported fields
}
func (*Synapse) InferByInfoHash ¶
func (*Synapse) InferByInputContent ¶
func (*Synapse) RemoteInferByInfoHash ¶
func (*Synapse) RemoteInferByInputContent ¶
func (*Synapse) VerifyInput ¶
func (*Synapse) VerifyModel ¶
Click to show internal directories.
Click to hide internal directories.