Documentation ¶
Index ¶
- type Mat
- type Matrix
- type Op
- func (op *Op) Inv(mat *Mat) (*Mat, error)
- func (op *Op) Mul(x, y *Mat) (*Mat, error)
- func (op *Op) New(buf []float64, size ...int) (*Mat, error)
- func (op *Op) Ones(size ...int) (*Mat, error)
- func (op *Op) Print(w io.Writer, mat *Mat) error
- func (op *Op) Qr(mat *Mat) (*Mat, *Mat, error)
- func (op *Op) Rand(size ...int) (*Mat, error)
- func (op *Op) Randn(size ...int) (*Mat, error)
- func (op *Op) Repmat(mat *Mat, dim ...int) (*Mat, error)
- func (op *Op) Reshape(mat *Mat, size ...int) (*Mat, error)
- func (op *Op) Slice(mat *Mat, begin []int, size ...int) (*Mat, error)
- func (op *Op) Transpose(mat *Mat) (*Mat, error)
- func (op *Op) Zeros(size ...int) (*Mat, error)
- type Operator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mat ¶
func (*Mat) IsEqual ¶
IsEqual compares two matrices for their content and size and only returns true if both checks are true.
func (*Mat) IsSameSize ¶
IsSameSize compares two matrices for their size.
type Matrix ¶
type Matrix interface { // Numel computes number of elements in matrix. Numel() int64 // GetSize returns the size of matrix. GetSize() []int // GetRaw returns raw buffer of the matrix GetRaw() []float64 // IsEqual compares two matrices for their content and size and only returns true // if both checks are true. IsEqual(x *Mat) bool // IsSameSize compares two matrices for their size. IsSameSize(x *Mat) bool }
Matrix is an interface defining following methods.
type Op ¶
Op is the operator for TF interface.
func NewOperator ¶
func NewOperator(options *tf.SessionOptions) (*Op, error)
NewOperator provides an instance of new operator for cloud file I/O
type Operator ¶
type Operator interface { io.Closer // New matrix from buffer. New(buf []float64, size ...int) (*Mat, error) // Zeros is a new matrix with all zeros. Zeros(size ...int) (*Mat, error) // Ones is a new matrix with all ones. Ones(size ...int) (*Mat, error) // Rand is a new matrix with random numbers with uniform distribution. Rand(size ...int) (*Mat, error) // Randn is a new matrix with random numbers with normal distribution. Randn(size ...int) (*Mat, error) // Reshape reshapes a given matrix to new size. Reshape(mat *Mat, size ...int) (*Mat, error) // Slice can extract a slice from a matrix. Slice(mat *Mat, begin []int, size ...int) (*Mat, error) // Transpose takes transpose of a matrix. Defined only for a 2D matrix. Transpose(mat *Mat) (*Mat, error) // Repmat repeats a matrix as many times along dimensions as requested. Repmat(mat *Mat, dim ...int) (*Mat, error) // Mul multiples two matrices. Mul(x, y *Mat) (*Mat, error) // Inv takes inverse of a matrix. Inv(mat *Mat) (*Mat, error) // Qr takes QR decomposition of a matrix. Qr(mat *Mat) (*Mat, *Mat, error) // Print will pretty print input matrix. Print(w io.Writer, mat *Mat) error }
Operator is the matrix operator that works on a session which needs to be closed.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.