Help us shape the future of Go! Take the 2026 Go Developer Survey

options

package
v0.2.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2018 License: NCSA Imports: 11 Imported by: 13

Documentation

Index

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 BatchSize

func BatchSize(n uint32) Option

func Context

func Context(c context.Context) Option

func Device

func Device(deviceType DeviceType, id int) Option

func Graph

func Graph(sym []byte) Option

func InputNode

func InputNode(key string, shape []uint32) Option

func OutputNode

func OutputNode(output string) Option

func PredictorOptions

func PredictorOptions(p *dl.PredictionOptions) Option

func Symbol

func Symbol(sym []byte) Option

func Weights

func Weights(w []byte) Option

func WithOptions

func WithOptions(opts *Options) Option

type Options

type Options struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Options

func (*Options) BatchSize

func (o *Options) BatchSize() uint32

func (*Options) Context

func (o *Options) Context() context.Context

func (*Options) Devices

func (o *Options) Devices() devices

func (*Options) Graph

func (o *Options) Graph() []byte

func (*Options) InputNodes

func (o *Options) InputNodes() []inputNode

func (*Options) OutputNode

func (o *Options) OutputNode() string

func (*Options) Symbol

func (o *Options) Symbol() []byte

func (*Options) TraceLevel

func (o *Options) TraceLevel() tracer.Level

func (*Options) UsesGPU

func (o *Options) UsesGPU() bool

func (*Options) Weights

func (o *Options) Weights() []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL