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 DisableFrameworkAutoTuning ¶ added in v0.3.0
func FeatureLimit ¶ added in v0.3.0
func GPUMetrics ¶ added in v0.3.0
func InputNodes ¶ added in v0.3.0
func OutputNodes ¶ added in v0.3.0
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 ¶ added in v0.3.0
func (*Options) FeatureLimit ¶ added in v0.3.0
func (*Options) GPUMetrics ¶ added in v0.3.0
func (*Options) InputNodes ¶
func (*Options) OutputIndexes ¶ added in v0.3.0
func (*Options) OutputNodes ¶ added in v0.3.0
func (*Options) SetBatchSize ¶ added in v0.3.0
func (*Options) SetContext ¶ added in v0.3.0
func (*Options) SetDevice ¶ added in v0.3.0
func (o *Options) SetDevice(deviceType DeviceType, id int)
func (*Options) SetDisableFrameworkAutoTuning ¶ added in v0.3.0
func (*Options) SetFeatureLimit ¶ added in v0.3.0
func (*Options) SetGPUMetrics ¶ added in v0.3.0
func (*Options) SetInputNodes ¶ added in v0.3.0
func (*Options) SetOutputIndexes ¶ added in v0.3.0
func (*Options) SetOutputNodes ¶ added in v0.3.0
func (*Options) SetTraceLevel ¶ added in v0.3.0
func (*Options) SetWeights ¶ added in v0.3.0
func (*Options) TraceLevel ¶
Click to show internal directories.
Click to hide internal directories.