middleware

package
v0.0.0-...-7085ac6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MyCustomContextMiddleware

func MyCustomContextMiddleware() echo.MiddlewareFunc

カスタムコンテキストを定義するMiddleware

func PredictionModelMiddleware

func PredictionModelMiddleware(modelFile string) echo.MiddlewareFunc

func SQLiteMiddleware

func SQLiteMiddleware(datasource string) echo.MiddlewareFunc

SQLiteを設定するMiddleware

Types

type CustomContext

type CustomContext struct {
	echo.Context
	Session         *dbr.Session
	PredictionModel *PredictionModel
}

カスタムコンテキスト

type PredictionModel

type PredictionModel struct {
	Graph *gorgonnx.Graph
	Model *onnx.Model
}

func LoadPredictionModel

func LoadPredictionModel(model string) (*PredictionModel, error)

func (*PredictionModel) Predict

func (predictionModel *PredictionModel) Predict(input tensor.Tensor) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL