Documentation
¶
Index ¶
- Variables
- func ArgMax(res []byte) uint64
- func CheckBuiltInTorrentFsError(err error) bool
- func CheckMetaHash(version string, infoHash string) error
- func ProcessImage(data []byte) error
- func RLPHashString(x interface{}) string
- func ReadImage(inputFilePath string) ([]byte, error)
- type Config
- type Synapse
- func (s *Synapse) Close()
- func (s *Synapse) InferByInfoHash(modelInfoHash, inputInfoHash string) ([]byte, error)
- func (s *Synapse) InferByInputContent(modelInfoHash string, inputContent []byte) ([]byte, error)
- func (s *Synapse) RemoteInferByInfoHash(modelInfoHash, inputInfoHash, uri string) ([]byte, error)
- func (s *Synapse) RemoteInferByInputContent(modelInfoHash, uri string, inputContent []byte) ([]byte, error)
- func (s *Synapse) VerifyInput(inputInfoHash string) error
- func (s *Synapse) VerifyModel(modelInfoHash string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBuiltInTorrentFsPrefix = "BUILT-IN TORRENT FS ERROR" ErrInputFileNotExistFlag = "[ " + ErrBuiltInTorrentFsPrefix + " ] input file not exist" ErrModelFileNotExistFlag = "[ " + ErrBuiltInTorrentFsPrefix + " ] model file not exist" ErrInputFileNotExist = errors.New(ErrInputFileNotExistFlag) ErrModelFileNotExist = errors.New(ErrModelFileNotExistFlag) ErrFatal = errors.New("fatal") )
View Source
var (
Model_V1 = "model-v1"
)
Functions ¶
func CheckBuiltInTorrentFsError ¶ added in v1.0.0
If infered by local, check struct error is enough. Else infered by remote, must be checked by error's text
func CheckMetaHash ¶
func ProcessImage ¶
func RLPHashString ¶ added in v1.0.0
func RLPHashString(x interface{}) string
Types ¶
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 ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.