Documentation ¶
Index ¶
- type Engine
- type Matrix
- func (m *Matrix[E]) Col(j int) []E
- func (m *Matrix[E]) Cols() [][]E
- func (m *Matrix[E]) Dims() (r, c int)
- func (m *Matrix[E]) Equal(other *Matrix[E]) bool
- func (m *Matrix[E]) Norm() *Matrix[E]
- func (m *Matrix[E]) Pad(r, c int, v E) *Matrix[E]
- func (m *Matrix[E]) RawData() []E
- func (m *Matrix[E]) Row(i int) []E
- func (m *Matrix[E]) Rows() [][]E
- func (m *Matrix[E]) Set(rowStart, rowEnd, colStart, colEnd int, value E) *Matrix[E]
- func (m *Matrix[E]) SetAll(value E) *Matrix[E]
- func (m *Matrix[E]) SetAllFunc(f func(E) E) *Matrix[E]
- func (m *Matrix[E]) SetFunc(rowStart, rowEnd, colStart, colEnd int, f func(E) E) *Matrix[E]
- type PredictorPool
- type Tensor
- type TypedTensor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is an inference engine.
type Matrix ¶
func (*Matrix[E]) Equal ¶
Equal implements the Equal method which will be used by go-cmp to determine equality.
func (*Matrix[E]) Pad ¶
Pad creates a new matrix, which expands the receiver m by r rows and c columns, and sets each expanded element to v.
func (*Matrix[E]) SetAllFunc ¶
type PredictorPool ¶
type PredictorPool struct {
// contains filtered or unexported fields
}
PredictorPool is a predictor pool for concurrent inferences.
See also: - https://github.com/PaddlePaddle/Paddle/issues/17288 - https://www.paddlepaddle.org.cn/inference/master/guides/performance_tuning/multi_thread.html
func NewPredictorPool ¶
func NewPredictorPool(config *paddle.Config, size int) *PredictorPool
func (*PredictorPool) Get ¶
func (p *PredictorPool) Get() (predictor *paddle.Predictor, put func())
type Tensor ¶
type Tensor struct { Shape []int32 Data interface{} }
type TypedTensor ¶
func NewTypedTensor ¶
func NewTypedTensor[E xslices.Number](t Tensor) TypedTensor[E]
Click to show internal directories.
Click to hide internal directories.