Documentation ¶
Index ¶
- Variables
- type DeviceType
- type Option
- func BatchSize(n uint32) Option
- func Context(c context.Context) Option
- func Device(deviceType DeviceType, id int) Option
- func Graph(sym []byte) Option
- func InputNode(key string, shape []uint32) Option
- func OutputNode(output string) Option
- func PredictorOptions(p *dl.PredictionOptions) Option
- func Symbol(sym []byte) Option
- func TraceLevel(tl dl.ExecutionOptions_TraceLevel) Option
- func Weights(w []byte) Option
- func WithOptions(opts *Options) Option
- type Options
- func (o *Options) BatchSize() uint32
- func (o *Options) Context() context.Context
- func (o *Options) Devices() devices
- func (o *Options) Graph() []byte
- func (o *Options) InputNodes() []inputNode
- func (o *Options) OutputNode() string
- func (o *Options) Symbol() []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 uint32 = 1 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 OutputNode ¶
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) InputNodes ¶
func (o *Options) InputNodes() []inputNode
func (*Options) OutputNode ¶
func (*Options) TraceLevel ¶
Click to show internal directories.
Click to hide internal directories.