layer

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataType

type DataType string
const (
	Float16    DataType = "tf.float16"
	Float32    DataType = "tf.float32"
	Float64    DataType = "tf.float64"
	Double     DataType = "tf.double"
	Int32      DataType = "tf.int32"
	Uint32     DataType = "tf.uint32"
	Uint8      DataType = "tf.uint8"
	Int16      DataType = "tf.int16"
	Int8       DataType = "tf.int8"
	String     DataType = "tf.string"
	Complex64  DataType = "tf.complex64"
	Complex    DataType = "tf.complex"
	Int64      DataType = "tf.int64"
	Uint64     DataType = "tf.uint64"
	Bool       DataType = "tf.bool"
	Qint8      DataType = "tf.qint8"
	Quint8     DataType = "tf.quint8"
	Qint32     DataType = "tf.qint32"
	Bfloat16   DataType = "tf.bfloat16"
	Qint16     DataType = "tf.qint16"
	Quint16    DataType = "tf.quint16"
	Uint16     DataType = "tf.uint16"
	Complex128 DataType = "tf.complex128"
	Half       DataType = "tf.half"
)

Types of scalar values in the TensorFlow type system.

type Dense

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

func NewDense

func NewDense(units int, dType DataType, optionalConfig ...DenseConfig) *Dense

func (*Dense) GetDtype

func (d *Dense) GetDtype() DataType

func (*Dense) GetImport

func (d *Dense) GetImport() string

func (*Dense) GetPythonDefinitionString

func (d *Dense) GetPythonDefinitionString() string

func (*Dense) GetPythonVariableName

func (d *Dense) GetPythonVariableName() string

func (*Dense) GetShape

func (d *Dense) GetShape() tf.Shape

func (*Dense) SetInput

func (d *Dense) SetInput(inputs []Layer)

type DenseConfig

type DenseConfig struct {
	Name              string
	Activation        string
	UseBias           TfBool
	KernelInitializer string
	BiasInitializer   string
}

type Input

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

func NewInput

func NewInput(shape tf.Shape, dType DataType, optionalConfig ...InputConfig) *Input

func (*Input) GetDtype

func (i *Input) GetDtype() DataType

func (*Input) GetImport

func (i *Input) GetImport() string

func (*Input) GetPythonDefinitionString

func (i *Input) GetPythonDefinitionString() string

func (*Input) GetPythonVariableName

func (i *Input) GetPythonVariableName() string

func (*Input) GetShape

func (i *Input) GetShape() tf.Shape

func (*Input) SetInput

func (i *Input) SetInput(inputs []Layer)

type InputConfig

type InputConfig struct {
	BatchSize int
	Name      string
	Sparse    TfBool
	Ragged    TfBool
}

type Layer

type Layer interface {
	GetShape() tf.Shape
	GetDtype() DataType
	SetInput(inputs []Layer)
	GetImport() string
	GetPythonVariableName() string
	GetPythonDefinitionString() string
}

type TfBool

type TfBool string
var (
	TfTrue    TfBool = "True"
	TfFalse   TfBool = "False"
	TfDefault TfBool = "None"
)

Jump to

Keyboard shortcuts

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