Documentation
¶
Overview ¶
Package ml provides some fundamental machine learning primitives.
Package ml provides some fundamental machine learning primitives.
Index ¶
- func ConvertToFloat64Slice(slice interface{}) ([]float64, error)
- func CreateNewTensor(pft *pb.FlatTensor) (*tensor.Dense, error)
- func FormatClassificationOutputs(outNameMap *sync.Map, outMap Tensors, labels []string) (classification.Classifications, error)
- func TensorNames(t Tensors) []string
- type Tensors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToFloat64Slice ¶ added in v0.62.0
ConvertToFloat64Slice converts any numbers or slice of numbers into a float64 slice.
func CreateNewTensor ¶ added in v0.62.0
func CreateNewTensor(pft *pb.FlatTensor) (*tensor.Dense, error)
CreateNewTensor turns a proto FlatTensor into a *tensor.Dense.
func FormatClassificationOutputs ¶ added in v0.62.0
func FormatClassificationOutputs( outNameMap *sync.Map, outMap Tensors, labels []string, ) (classification.Classifications, error)
FormatClassificationOutputs formats the output tensors from a model into classifications.
func TensorNames ¶ added in v0.62.0
TensorNames returns all the names of the tensors.
Types ¶
type Tensors ¶ added in v0.8.0
Tensors are a data structure to hold the input and output map of tensors that will fed into a model, or come from the result of a model.
func ProtoToTensors ¶ added in v0.62.0
func ProtoToTensors(pbft *pb.FlatTensors) (Tensors, error)
ProtoToTensors takes pb.FlatTensors and turns it into a Tensors map.
Click to show internal directories.
Click to hide internal directories.