Documentation
¶
Index ¶
- func NoMeanImageURLProcessor(ctx context.Context, url string) ([]float32, error)
- type Base
- type ImagePredictor
- func (p ImagePredictor) GetFeaturesPath() string
- func (p ImagePredictor) GetFeaturesUrl() string
- func (p ImagePredictor) GetGraphPath() string
- func (p ImagePredictor) GetGraphUrl() string
- func (p ImagePredictor) GetImageDimensions() ([]int32, error)
- func (p ImagePredictor) GetMeanImage(ctx context.Context, ...) ([]float32, error)
- func (p ImagePredictor) GetMeanPath() string
- func (p ImagePredictor) GetScale() (float32, error)
- func (p ImagePredictor) GetWeightsPath() string
- func (p ImagePredictor) GetWeightsUrl() string
- type Predictor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Base ¶
type Base struct {
Framework dlframework.FrameworkManifest
Model dlframework.ModelManifest
}
func (Base) GetFramework ¶
func (p Base) GetFramework() (dlframework.FrameworkManifest, error)
type ImagePredictor ¶
func (ImagePredictor) GetFeaturesPath ¶
func (p ImagePredictor) GetFeaturesPath() string
func (ImagePredictor) GetFeaturesUrl ¶
func (p ImagePredictor) GetFeaturesUrl() string
func (ImagePredictor) GetGraphPath ¶
func (p ImagePredictor) GetGraphPath() string
func (ImagePredictor) GetGraphUrl ¶
func (p ImagePredictor) GetGraphUrl() string
func (ImagePredictor) GetImageDimensions ¶
func (p ImagePredictor) GetImageDimensions() ([]int32, error)
func (ImagePredictor) GetMeanImage ¶
func (ImagePredictor) GetMeanPath ¶
func (p ImagePredictor) GetMeanPath() string
func (ImagePredictor) GetScale ¶
func (p ImagePredictor) GetScale() (float32, error)
func (ImagePredictor) GetWeightsPath ¶
func (p ImagePredictor) GetWeightsPath() string
func (ImagePredictor) GetWeightsUrl ¶
func (p ImagePredictor) GetWeightsUrl() string
type Predictor ¶
type Predictor interface {
// Gets framework information
GetFramework() (dlframework.FrameworkManifest, error)
// Load model from manifest
Load(ctx context.Context, model dlframework.ModelManifest) (Predictor, error)
// Downloads the features / symbol file / weights
Download(ctx context.Context) error
// Preprocess the data
Preprocess(ctx context.Context, data interface{}) (interface{}, error)
// Returns the features
Predict(ctx context.Context, data interface{}) (*dlframework.PredictionFeatures, error)
io.Closer
}
Click to show internal directories.
Click to hide internal directories.