Documentation ¶
Index ¶
- Variables
- type DeviceType
- type Node
- type Option
- func BatchSize(n int) Option
- func Context(ctx context.Context) Option
- func Device(deviceType DeviceType, id int) Option
- func DisableFrameworkAutoTuning(disabled bool) Option
- func FeatureLimit(num int) Option
- func GPUMetrics(m string) Option
- func Graph(g []byte) Option
- func InputNodes(ins []Node) Option
- func OutputNodes(outs []Node) Option
- func PredictorOptions(p *dl.PredictionOptions) Option
- func TraceLevel(tl dl.ExecutionOptions_TraceLevel) Option
- func Weights(w []byte) Option
- func WithOptions(opts *Options) Option
- type Options
- func (o *Options) Append(opts ...Option) *Options
- func (o *Options) BatchSize() int
- func (o *Options) Context() context.Context
- func (o *Options) Devices() devices
- func (o *Options) DisableFrameworkAutoTuning() bool
- func (o *Options) FeatureLimit() int
- func (o *Options) GPUMetrics() string
- func (o *Options) Graph() []byte
- func (o *Options) InputNodes() []Node
- func (o *Options) OutputIndexes() []int
- func (o *Options) OutputNodes() []Node
- func (o *Options) SetBatchSize(n int)
- func (o *Options) SetContext(ctx context.Context)
- func (o *Options) SetDevice(deviceType DeviceType, id int)
- func (o *Options) SetDisableFrameworkAutoTuning(disabled bool)
- func (o *Options) SetFeatureLimit(n int)
- func (o *Options) SetGPUMetrics(m string)
- func (o *Options) SetGraph(g []byte)
- func (o *Options) SetInputNodes(ins []Node)
- func (o *Options) SetOutputIndexes(outIdxs []int)
- func (o *Options) SetOutputNodes(ins []Node)
- func (o *Options) SetTraceLevel(g tracer.Level)
- func (o *Options) SetWeights(w []byte)
- func (o *Options) TraceLevel() tracer.Level
- func (o *Options) UsesGPU() bool
- func (o *Options) Weights() []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultBatchSize int = 1 DefaultFeatureLimit int = 10 DefaultGPUMetrics string DefaultDevice device )
View Source
var ( Config = &optionsConfig{ done: make(chan struct{}), } )
Functions ¶
This section is empty.
Types ¶
type DeviceType ¶
type DeviceType int
const ( CPU_DEVICE DeviceType = iota + 1 // cpu device type CUDA_DEVICE DeviceType = 2 // cuda device type )
func (DeviceType) String ¶
func (d DeviceType) String() string
type Option ¶
type Option func(*Options)
func Device ¶
func Device(deviceType DeviceType, id int) Option
func FeatureLimit ¶
func GPUMetrics ¶
func InputNodes ¶
func OutputNodes ¶
func PredictorOptions ¶
func PredictorOptions(p *dl.PredictionOptions) Option
func TraceLevel ¶
func TraceLevel(tl dl.ExecutionOptions_TraceLevel) Option
func WithOptions ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func (*Options) DisableFrameworkAutoTuning ¶
func (*Options) FeatureLimit ¶
func (*Options) GPUMetrics ¶
func (*Options) InputNodes ¶
func (*Options) OutputIndexes ¶
func (*Options) OutputNodes ¶
func (*Options) SetBatchSize ¶
func (*Options) SetContext ¶
func (*Options) SetDevice ¶
func (o *Options) SetDevice(deviceType DeviceType, id int)
func (*Options) SetDisableFrameworkAutoTuning ¶
func (*Options) SetFeatureLimit ¶
func (*Options) SetGPUMetrics ¶
func (*Options) SetInputNodes ¶
func (*Options) SetOutputIndexes ¶
func (*Options) SetOutputNodes ¶
func (*Options) SetTraceLevel ¶
func (*Options) SetWeights ¶
func (*Options) TraceLevel ¶
Click to show internal directories.
Click to hide internal directories.