Versions in this module Expand all Collapse all v0 v0.0.2 Jun 2, 2022 v0.0.1 Jun 2, 2022 Changes in this version + func TypeOf(dt DataType, shape []int64) reflect.Type + func Version() string + type Consumer struct + Index int + Op *Operation + func (p Consumer) DataType() DataType + func (p Consumer) Producer() Output + type Context struct + func NewContext(options *ContextOptions) (*Context, error) + func (c *Context) ListDevices() ([]Device, error) + type ContextOptions struct + Async bool + Config []byte + type DataType C.TF_DataType + const Bfloat16 + const Bool + const Complex + const Complex128 + const Complex64 + const Double + const Float + const Half + const Int16 + const Int32 + const Int64 + const Int8 + const Qint16 + const Qint32 + const Qint8 + const Quint16 + const Quint8 + const String + const Uint16 + const Uint32 + const Uint64 + const Uint8 + type Device struct + MemoryLimitBytes int64 + Name string + Type string + func (d Device) String() string + type Graph struct + func NewGraph() *Graph + func (g *Graph) AddGradients(prefix string, y []Output, x []Output, dx []Output) ([]Output, error) + func (g *Graph) AddOperation(args OpSpec) (*Operation, error) + func (g *Graph) Import(def []byte, prefix string) error + func (g *Graph) ImportWithOptions(def []byte, options GraphImportOptions) error + func (g *Graph) Operation(name string) *Operation + func (g *Graph) Operations() []Operation + func (g *Graph) WriteTo(w io.Writer) (int64, error) + type GraphImportOptions struct + Device string + Prefix string + func (o *GraphImportOptions) AddInputMapping(src string, srcIndex int, dst Output) + type Input interface + type LibraryHandler struct + func LoadLibrary(path string) (*LibraryHandler, error) + type OpSpec struct + Attrs map[string]interface{} + ControlDependencies []*Operation + Device string + Input []Input + Name string + Type string + type Operation struct + func (op *Operation) Attr(name string) (interface{}, error) + func (op *Operation) Device() string + func (op *Operation) Name() string + func (op *Operation) NumInputs() int + func (op *Operation) NumOutputs() int + func (op *Operation) Output(i int) Output + func (op *Operation) OutputListSize(output string) (int, error) + func (op *Operation) Type() string + type Output struct + Index int + Op *Operation + func (p Output) Consumers() []Consumer + func (p Output) DataType() DataType + func (p Output) Shape() Shape + type OutputList []Output + type PartialRun struct + func (pr *PartialRun) Run(feeds map[Output]*Tensor, fetches []Output, targets []*Operation) ([]*Tensor, error) + type SavedModel struct + Graph *Graph + Session *Session + Signatures map[string]Signature + func LoadSavedModel(exportDir string, tags []string, options *SessionOptions) (*SavedModel, error) + type Session struct + func NewSession(graph *Graph, options *SessionOptions) (*Session, error) + func (s *Session) Close() error + func (s *Session) ListDevices() ([]Device, error) + func (s *Session) NewPartialRun(feeds, fetches []Output, targets []*Operation) (*PartialRun, error) + func (s *Session) Run(feeds map[Output]*Tensor, fetches []Output, targets []*Operation) ([]*Tensor, error) + type SessionOptions struct + Config []byte + Target string + type Shape struct + func MakeShape(shape ...int64) Shape + func ScalarShape() Shape + func (s Shape) IsFullySpecified() bool + func (s Shape) NumDimensions() int + func (s Shape) Size(dim int) int64 + func (s Shape) String() string + func (s Shape) ToSlice() ([]int64, error) + type Signature struct + Inputs map[string]TensorInfo + MethodName string + Outputs map[string]TensorInfo + type Tensor struct + func NewTensor(value interface{}) (*Tensor, error) + func ReadTensor(dataType DataType, shape []int64, r io.Reader) (*Tensor, error) + func (t *Tensor) DataType() DataType + func (t *Tensor) Reshape(newShape []int64) error + func (t *Tensor) Shape() []int64 + func (t *Tensor) Value() interface{} + func (t *Tensor) WriteContentsTo(w io.Writer) (int64, error) + type TensorHandle struct + func NewTensorHandle(t *Tensor) (*TensorHandle, error) + func (th *TensorHandle) BackingDeviceName() (string, error) + func (th *TensorHandle) CopyToDevice(c *Context, deviceName string) (*TensorHandle, error) + func (th *TensorHandle) DataType() DataType + func (th *TensorHandle) DeviceName() (string, error) + func (th *TensorHandle) Shape() ([]int64, error) + func (th *TensorHandle) ToTensor() (*Tensor, error) + type TensorInfo struct + DType DataType + Name string + Shape Shape