Documentation ¶
Index ¶
- func ConvertCBooleanToGo(b C.bool) bool
- func DecodeTensor(r *bytes.Reader, shape []int32, t reflect.Type, ptr reflect.Value)
- func DeletePredictor(predictor *Predictor)
- func Endian() binary.ByteOrder
- func SizeofDataType(dtype PaddleDType) int32
- func TypeOf(dtype PaddleDType, shape []int32) reflect.Type
- func TypeOfShape(dtype PaddleDType, shape []int32) reflect.Type
- type AnalysisConfig
- func (config *AnalysisConfig) CpuMathLibraryNumThreads() int
- func (config *AnalysisConfig) CudnnEnabled() bool
- func (config *AnalysisConfig) DeletePass(pass string)
- func (config *AnalysisConfig) DisableGlogInfo()
- func (config *AnalysisConfig) DisableGpu()
- func (config *AnalysisConfig) EnableCudnn()
- func (config *AnalysisConfig) EnableMemoryOptim()
- func (config *AnalysisConfig) EnableMkldnn()
- func (config *AnalysisConfig) EnableMkldnnQuantizer()
- func (config *AnalysisConfig) EnableProfile()
- func (config *AnalysisConfig) EnableTensorRtEngine(workspace_size int, max_batch_size int, min_subgraph_size int, ...)
- func (config *AnalysisConfig) EnableUseGpu(memory_pool_init_size_mb int, device_id int)
- func (config *AnalysisConfig) GpuDeviceId() int
- func (config *AnalysisConfig) IrOptim() bool
- func (config *AnalysisConfig) IsValid() bool
- func (config *AnalysisConfig) MemoryOptimEnabled() bool
- func (config *AnalysisConfig) MemoryPoolInitSizeMb() int
- func (config *AnalysisConfig) MkldnnQuantizerEnabled() bool
- func (config *AnalysisConfig) ModelDir() string
- func (config *AnalysisConfig) ParamsFile() string
- func (config *AnalysisConfig) ProfileEnabled() bool
- func (config *AnalysisConfig) ProgFile() string
- func (config *AnalysisConfig) SetCpuMathLibraryNumThreads(n int)
- func (config *AnalysisConfig) SetInValid()
- func (config *AnalysisConfig) SetModel(model, params string)
- func (config *AnalysisConfig) SpecifyInputName() bool
- func (config *AnalysisConfig) SwitchIrDebug(x bool)
- func (config *AnalysisConfig) SwitchIrOptim(x bool)
- func (config *AnalysisConfig) SwitchSpecifyInputNames(x bool)
- func (config *AnalysisConfig) SwitchUseFeedFetchOps(x bool)
- func (config *AnalysisConfig) TensorrtEngineEnabled() bool
- func (config *AnalysisConfig) UseFeedFetchOpsEnabled() bool
- func (config *AnalysisConfig) UseGpu() bool
- type PaddleDType
- type Precision
- type Predictor
- func (predictor *Predictor) GetInputName(n int) string
- func (predictor *Predictor) GetInputNames() []string
- func (predictor *Predictor) GetInputNum() int
- func (predictor *Predictor) GetInputTensors() [](*ZeroCopyTensor)
- func (predictor *Predictor) GetOutputName(n int) string
- func (predictor *Predictor) GetOutputNames() []string
- func (predictor *Predictor) GetOutputNum() int
- func (predictor *Predictor) GetOutputTensors() [](*ZeroCopyTensor)
- func (predictor *Predictor) GetZeroCopyOutput(tensor *ZeroCopyTensor)
- func (predictor *Predictor) SetZeroCopyInput(tensor *ZeroCopyTensor)
- func (predictor *Predictor) ZeroCopyRun()
- type ZeroCopyTensor
- func (tensor *ZeroCopyTensor) DataType() PaddleDType
- func (tensor *ZeroCopyTensor) Lod() []uint
- func (tensor *ZeroCopyTensor) Name() string
- func (tensor *ZeroCopyTensor) Rename(name string)
- func (tensor *ZeroCopyTensor) Reshape(shape []int32)
- func (tensor *ZeroCopyTensor) SetValue(value interface{})
- func (tensor *ZeroCopyTensor) Shape() []int32
- func (tensor *ZeroCopyTensor) Value() interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCBooleanToGo ¶
func DecodeTensor ¶
func DeletePredictor ¶
func DeletePredictor(predictor *Predictor)
func SizeofDataType ¶
func SizeofDataType(dtype PaddleDType) int32
func TypeOfShape ¶
func TypeOfShape(dtype PaddleDType, shape []int32) reflect.Type
Types ¶
type AnalysisConfig ¶
type AnalysisConfig struct {
// contains filtered or unexported fields
}
func NewAnalysisConfig ¶
func NewAnalysisConfig() *AnalysisConfig
func (*AnalysisConfig) CpuMathLibraryNumThreads ¶
func (config *AnalysisConfig) CpuMathLibraryNumThreads() int
func (*AnalysisConfig) CudnnEnabled ¶
func (config *AnalysisConfig) CudnnEnabled() bool
func (*AnalysisConfig) DeletePass ¶
func (config *AnalysisConfig) DeletePass(pass string)
func (*AnalysisConfig) DisableGlogInfo ¶
func (config *AnalysisConfig) DisableGlogInfo()
func (*AnalysisConfig) DisableGpu ¶
func (config *AnalysisConfig) DisableGpu()
func (*AnalysisConfig) EnableCudnn ¶
func (config *AnalysisConfig) EnableCudnn()
func (*AnalysisConfig) EnableMemoryOptim ¶
func (config *AnalysisConfig) EnableMemoryOptim()
func (*AnalysisConfig) EnableMkldnn ¶
func (config *AnalysisConfig) EnableMkldnn()
func (*AnalysisConfig) EnableMkldnnQuantizer ¶
func (config *AnalysisConfig) EnableMkldnnQuantizer()
func (*AnalysisConfig) EnableProfile ¶
func (config *AnalysisConfig) EnableProfile()
func (*AnalysisConfig) EnableTensorRtEngine ¶
func (*AnalysisConfig) EnableUseGpu ¶
func (config *AnalysisConfig) EnableUseGpu(memory_pool_init_size_mb int, device_id int)
func (*AnalysisConfig) GpuDeviceId ¶
func (config *AnalysisConfig) GpuDeviceId() int
func (*AnalysisConfig) IrOptim ¶
func (config *AnalysisConfig) IrOptim() bool
func (*AnalysisConfig) IsValid ¶
func (config *AnalysisConfig) IsValid() bool
func (*AnalysisConfig) MemoryOptimEnabled ¶
func (config *AnalysisConfig) MemoryOptimEnabled() bool
func (*AnalysisConfig) MemoryPoolInitSizeMb ¶
func (config *AnalysisConfig) MemoryPoolInitSizeMb() int
func (*AnalysisConfig) MkldnnQuantizerEnabled ¶
func (config *AnalysisConfig) MkldnnQuantizerEnabled() bool
func (*AnalysisConfig) ModelDir ¶
func (config *AnalysisConfig) ModelDir() string
func (*AnalysisConfig) ParamsFile ¶
func (config *AnalysisConfig) ParamsFile() string
func (*AnalysisConfig) ProfileEnabled ¶
func (config *AnalysisConfig) ProfileEnabled() bool
func (*AnalysisConfig) ProgFile ¶
func (config *AnalysisConfig) ProgFile() string
func (*AnalysisConfig) SetCpuMathLibraryNumThreads ¶
func (config *AnalysisConfig) SetCpuMathLibraryNumThreads(n int)
func (*AnalysisConfig) SetInValid ¶
func (config *AnalysisConfig) SetInValid()
func (*AnalysisConfig) SetModel ¶
func (config *AnalysisConfig) SetModel(model, params string)
func (*AnalysisConfig) SpecifyInputName ¶
func (config *AnalysisConfig) SpecifyInputName() bool
func (*AnalysisConfig) SwitchIrDebug ¶
func (config *AnalysisConfig) SwitchIrDebug(x bool)
func (*AnalysisConfig) SwitchIrOptim ¶
func (config *AnalysisConfig) SwitchIrOptim(x bool)
func (*AnalysisConfig) SwitchSpecifyInputNames ¶
func (config *AnalysisConfig) SwitchSpecifyInputNames(x bool)
func (*AnalysisConfig) SwitchUseFeedFetchOps ¶
func (config *AnalysisConfig) SwitchUseFeedFetchOps(x bool)
func (*AnalysisConfig) TensorrtEngineEnabled ¶
func (config *AnalysisConfig) TensorrtEngineEnabled() bool
func (*AnalysisConfig) UseFeedFetchOpsEnabled ¶
func (config *AnalysisConfig) UseFeedFetchOpsEnabled() bool
func (*AnalysisConfig) UseGpu ¶
func (config *AnalysisConfig) UseGpu() bool
type PaddleDType ¶
type PaddleDType C.PD_DataType
const ( FLOAT32 PaddleDType = C.PD_FLOAT32 INT32 PaddleDType = C.PD_INT32 INT64 PaddleDType = C.PD_INT64 UINT8 PaddleDType = C.PD_UINT8 UNKDTYPE PaddleDType = C.PD_UNKDTYPE )
func ShapeAndTypeOf ¶
func ShapeAndTypeOf(val reflect.Value) (shape []int32, dt PaddleDType)
type Predictor ¶
type Predictor struct {
// contains filtered or unexported fields
}
func NewPredictor ¶
func NewPredictor(config *AnalysisConfig) *Predictor
func (*Predictor) GetInputName ¶
func (*Predictor) GetInputNames ¶
func (*Predictor) GetInputNum ¶
func (*Predictor) GetInputTensors ¶
func (predictor *Predictor) GetInputTensors() [](*ZeroCopyTensor)
func (*Predictor) GetOutputName ¶
func (*Predictor) GetOutputNames ¶
func (*Predictor) GetOutputNum ¶
func (*Predictor) GetOutputTensors ¶
func (predictor *Predictor) GetOutputTensors() [](*ZeroCopyTensor)
func (*Predictor) GetZeroCopyOutput ¶
func (predictor *Predictor) GetZeroCopyOutput(tensor *ZeroCopyTensor)
func (*Predictor) SetZeroCopyInput ¶
func (predictor *Predictor) SetZeroCopyInput(tensor *ZeroCopyTensor)
func (*Predictor) ZeroCopyRun ¶
func (predictor *Predictor) ZeroCopyRun()
type ZeroCopyTensor ¶
type ZeroCopyTensor struct {
// contains filtered or unexported fields
}
func NewZeroCopyTensor ¶
func NewZeroCopyTensor() *ZeroCopyTensor
func (*ZeroCopyTensor) DataType ¶
func (tensor *ZeroCopyTensor) DataType() PaddleDType
func (*ZeroCopyTensor) Lod ¶
func (tensor *ZeroCopyTensor) Lod() []uint
func (*ZeroCopyTensor) Name ¶
func (tensor *ZeroCopyTensor) Name() string
func (*ZeroCopyTensor) Rename ¶
func (tensor *ZeroCopyTensor) Rename(name string)
func (*ZeroCopyTensor) Reshape ¶
func (tensor *ZeroCopyTensor) Reshape(shape []int32)
func (*ZeroCopyTensor) SetValue ¶
func (tensor *ZeroCopyTensor) SetValue(value interface{})
func (*ZeroCopyTensor) Shape ¶
func (tensor *ZeroCopyTensor) Shape() []int32
func (*ZeroCopyTensor) Value ¶
func (tensor *ZeroCopyTensor) Value() interface{}
Click to show internal directories.
Click to hide internal directories.