input

package
v0.0.0-...-1ddc4a4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorFormatRGB = "RGB"
	ColorFormatBGR = "BGR"
	DataFormatNCHW = "NCHW"
	DataFormatNHWC = "NHWC"
)

Variables

This section is empty.

Functions

func Binomial

func Binomial(bn float64, bp float64) float64

Types

type BernoulliInput

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

func NewBernoulliInput

func NewBernoulliInput(trueProb float32) *BernoulliInput

func (*BernoulliInput) CreateInput

func (s *BernoulliInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

type BinomialInput

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

func NewBinomialInput

func NewBinomialInput(num int, trueProb float32) *BinomialInput

func (*BinomialInput) CreateInput

func (s *BinomialInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

type DefaultInput

type DefaultInput struct{}

func NewDefaultInput

func NewDefaultInput() *DefaultInput

func (*DefaultInput) CreateInput

func (s *DefaultInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

type ImageInput

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

func NewImageInput

func NewImageInput(
	filenames []string,
	colorFormat string,
	dataFormat string,
	rng []float32,
	norm [][3]float32) *ImageInput

func (*ImageInput) CreateInput

func (s *ImageInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

func (*ImageInput) Init

func (s *ImageInput) Init(
	filenames []string,
	colorFormat string,
	dataFormat string,
	rng []float32,
	norm [][3]float32)

type InputSource

type InputSource interface {
	CreateInput(dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)
}

type NormalInput

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

func NewNormalInput

func NewNormalInput(mean float32, std float32) *NormalInput

func (*NormalInput) CreateInput

func (s *NormalInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

type UniformInput

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

func NewUniformInput

func NewUniformInput(min float32, max float32) *UniformInput

func (*UniformInput) CreateInput

func (s *UniformInput) CreateInput(
	dtype string, shape []int, allowBiggerBatch bool) (interface{}, []int, error)

Jump to

Keyboard shortcuts

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