Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CudaOptions ¶
type CudnnConvAlgoSearch ¶
type CudnnConvAlgoSearch int
const ( OrtCudnnConvAlgoSearchExhaustive CudnnConvAlgoSearch = iota // expensive exhaustive benchmarking using cudnnFindConvolutionForwardAlgorithmEx OrtCudnnConvAlgoSearchHeuristic // lightweight heuristic based search using cudnnGetConvolutionForwardAlgorithm_v7 OrtCudnnConvAlgoSearchDefault // default algorithm using CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM )
type ORTEnv ¶
type ORTEnv struct {
// contains filtered or unexported fields
}
func NewORTEnv ¶
func NewORTEnv(loggingLevel ORTLoggingLevel, logEnv string) (ortEnv *ORTEnv)
NewORTEnv Create onnxruntime environment
type ORTLoggingLevel ¶
type ORTLoggingLevel int
const ( ORT_LOGGING_LEVEL_VERBOSE ORTLoggingLevel = iota // Verbose informational messages (least severe). ORT_LOGGING_LEVEL_INFO // Informational messages. ORT_LOGGING_LEVEL_WARNING // Warning messages. ORT_LOGGING_LEVEL_ERROR // Error messages. ORT_LOGGING_LEVEL_FATAL // Fatal error messages (most severe). )
type ORTSession ¶
type ORTSession struct {
// contains filtered or unexported fields
}
func NewORTSession ¶
func NewORTSession(ortEnv *ORTEnv, modelLocation string, sessionOptions *ORTSessionOptions) (ortSession *ORTSession, err error)
NewORTSession return new onnxruntime session
func (*ORTSession) Predict ¶
func (ortSession *ORTSession) Predict(inputTensorValues []TensorValue) (result []TensorValue, err error)
Predict do prediction from input data
type ORTSessionOptions ¶
type ORTSessionOptions struct {
// contains filtered or unexported fields
}
func NewORTSessionOptions ¶
func NewORTSessionOptions() *ORTSessionOptions
NewORTSessionOptions return empty onnxruntime session options.
func (ORTSessionOptions) AppendExecutionProviderCUDA ¶
func (so ORTSessionOptions) AppendExecutionProviderCUDA(cudaOptions CudaOptions)
AppendExecutionProviderCUDA append cuda device to the session options.
type OnnxTensorElementDataType ¶
type OnnxTensorElementDataType int
const ( ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED OnnxTensorElementDataType = iota ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8 ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16 ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32 ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64 ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 )
type TensorValue ¶
type TensorValue struct { Value interface{} Shape []int64 }
Click to show internal directories.
Click to hide internal directories.