Documentation ¶
Index ¶
- Variables
- type Base
- type ImagePredictor
- func (p ImagePredictor) Close() error
- func (p ImagePredictor) GetColorMode(defaultMode types.Mode) types.Mode
- func (p ImagePredictor) GetFeaturesChecksum() string
- func (p ImagePredictor) GetFeaturesPath() string
- func (p ImagePredictor) GetFeaturesUrl() string
- func (p ImagePredictor) GetGraphChecksum() string
- func (p ImagePredictor) GetGraphPath() string
- func (p ImagePredictor) GetGraphUrl() string
- func (p ImagePredictor) GetImageDimensions() ([]uint32, error)
- func (p ImagePredictor) GetInputLayerName(defaultValue string) string
- func (p ImagePredictor) GetLayerName(typeParameters map[string]*dlframework.ModelManifest_Type_Parameter) (string, error)
- func (p ImagePredictor) GetLayout(defaultLayout image.Layout) image.Layout
- func (p ImagePredictor) GetMeanImage() ([]float32, error)
- func (p ImagePredictor) GetMeanPath() string
- func (p ImagePredictor) GetOutputLayerName(defaultValue string) string
- func (p ImagePredictor) GetPreprocessOptions(ctx context.Context) (PreprocessOptions, error)
- func (p ImagePredictor) GetScale() (float32, error)
- func (p ImagePredictor) GetWeightsChecksum() string
- func (p ImagePredictor) GetWeightsPath() string
- func (p ImagePredictor) GetWeightsUrl() string
- func (p ImagePredictor) Reset(ctx context.Context) error
- type Predictor
- type PreprocessOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultInputLayerName = "input" DefaultOutputLayerName = "output" )
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { Framework dlframework.FrameworkManifest Model dlframework.ModelManifest Options *options.Options }
func (Base) GetPredictionOptions ¶ added in v0.2.19
func (Base) Info ¶ added in v0.2.16
func (b Base) Info() (dlframework.FrameworkManifest, dlframework.ModelManifest, error)
func (Base) TraceLevel ¶ added in v0.2.19
type ImagePredictor ¶
func (ImagePredictor) Close ¶ added in v0.2.16
func (p ImagePredictor) Close() error
func (ImagePredictor) GetColorMode ¶ added in v0.2.19
func (p ImagePredictor) GetColorMode(defaultMode types.Mode) types.Mode
func (ImagePredictor) GetFeaturesChecksum ¶ added in v0.2.19
func (p ImagePredictor) GetFeaturesChecksum() string
func (ImagePredictor) GetFeaturesPath ¶
func (p ImagePredictor) GetFeaturesPath() string
func (ImagePredictor) GetFeaturesUrl ¶
func (p ImagePredictor) GetFeaturesUrl() string
func (ImagePredictor) GetGraphChecksum ¶ added in v0.2.19
func (p ImagePredictor) GetGraphChecksum() string
func (ImagePredictor) GetGraphPath ¶
func (p ImagePredictor) GetGraphPath() string
func (ImagePredictor) GetGraphUrl ¶
func (p ImagePredictor) GetGraphUrl() string
func (ImagePredictor) GetImageDimensions ¶
func (p ImagePredictor) GetImageDimensions() ([]uint32, error)
func (ImagePredictor) GetInputLayerName ¶ added in v0.2.19
func (p ImagePredictor) GetInputLayerName(defaultValue string) string
func (ImagePredictor) GetLayerName ¶ added in v0.2.19
func (p ImagePredictor) GetLayerName(typeParameters map[string]*dlframework.ModelManifest_Type_Parameter) (string, error)
func (ImagePredictor) GetLayout ¶ added in v0.2.19
func (p ImagePredictor) GetLayout(defaultLayout image.Layout) image.Layout
func (ImagePredictor) GetMeanImage ¶
func (p ImagePredictor) GetMeanImage() ([]float32, error)
func (ImagePredictor) GetMeanPath ¶
func (p ImagePredictor) GetMeanPath() string
func (ImagePredictor) GetOutputLayerName ¶ added in v0.2.19
func (p ImagePredictor) GetOutputLayerName(defaultValue string) string
func (ImagePredictor) GetPreprocessOptions ¶ added in v0.2.19
func (p ImagePredictor) GetPreprocessOptions(ctx context.Context) (PreprocessOptions, error)
func (ImagePredictor) GetScale ¶
func (p ImagePredictor) GetScale() (float32, error)
func (ImagePredictor) GetWeightsChecksum ¶ added in v0.2.19
func (p ImagePredictor) GetWeightsChecksum() string
func (ImagePredictor) GetWeightsPath ¶
func (p ImagePredictor) GetWeightsPath() string
func (ImagePredictor) GetWeightsUrl ¶
func (p ImagePredictor) GetWeightsUrl() string
type Predictor ¶
type Predictor interface { // Gets framework and model manifests Info() (dlframework.FrameworkManifest, dlframework.ModelManifest, error) // Load model from manifest Load(ctx context.Context, model dlframework.ModelManifest, opts ...options.Option) (Predictor, error) // Returns the prediction options GetPredictionOptions(ctx context.Context) (*options.Options, error) // Returns the preprocess options GetPreprocessOptions(ctx context.Context) (PreprocessOptions, error) // Returns the features Predict(ctx context.Context, data [][]float32, opts ...options.Option) ([]dlframework.Features, error) // Clears the internal state of a predictor Reset(ctx context.Context) error io.Closer }
Click to show internal directories.
Click to hide internal directories.