Documentation ¶
Index ¶
- func LoadEmbeddingMap(f io.Reader) (embMap map[string][]float64, err error)
- func LoadForCmd(cmd *cobra.Command, opts *Options)
- func New(opts ...ModelOption) (model.Model, error)
- func NewForOptions(opts Options) (model.Model, error)
- type EmbeddingMap
- type EmbeddingMap32
- type ModelOption
- func BatchSize(v int) ModelOption
- func Dim(v int) ModelOption
- func DocInMemory() ModelOption
- func Goroutines(v int) ModelOption
- func Initlr(v float64) ModelOption
- func Iter(v int) ModelOption
- func LogBatch(v int) ModelOption
- func MaxCount(v int) ModelOption
- func MaxDepth(v int) ModelOption
- func MinCount(v int) ModelOption
- func MinLR(v float64) ModelOption
- func Model(typ ModelType) ModelOption
- func NegativeSampleSize(v int) ModelOption
- func Optimizer(typ OptimizerType) ModelOption
- func SubsampleThreshold(v float64) ModelOption
- func ToLower() ModelOption
- func UpdateLRBatch(v int) ModelOption
- func Verbose() ModelOption
- func Window(v int) ModelOption
- type ModelType
- type OptimizerType
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadForCmd ¶
Types ¶
type EmbeddingMap ¶
type EmbeddingMap32 ¶ added in v0.3.0
type ModelOption ¶
type ModelOption func(*Options)
func BatchSize ¶
func BatchSize(v int) ModelOption
func Dim ¶
func Dim(v int) ModelOption
func DocInMemory ¶
func DocInMemory() ModelOption
func Goroutines ¶
func Goroutines(v int) ModelOption
func Initlr ¶
func Initlr(v float64) ModelOption
func Iter ¶
func Iter(v int) ModelOption
func LogBatch ¶
func LogBatch(v int) ModelOption
func MaxCount ¶
func MaxCount(v int) ModelOption
func MaxDepth ¶
func MaxDepth(v int) ModelOption
func MinCount ¶
func MinCount(v int) ModelOption
func MinLR ¶
func MinLR(v float64) ModelOption
func Model ¶
func Model(typ ModelType) ModelOption
func NegativeSampleSize ¶
func NegativeSampleSize(v int) ModelOption
func Optimizer ¶
func Optimizer(typ OptimizerType) ModelOption
func SubsampleThreshold ¶
func SubsampleThreshold(v float64) ModelOption
func ToLower ¶
func ToLower() ModelOption
func UpdateLRBatch ¶
func UpdateLRBatch(v int) ModelOption
func Verbose ¶
func Verbose() ModelOption
func Window ¶
func Window(v int) ModelOption
type OptimizerType ¶
type OptimizerType = string
const ( NegativeSampling OptimizerType = "ns" HierarchicalSoftmax OptimizerType = "hs" )
type Options ¶
type Options struct { BatchSize int Dim int DocInMemory bool Goroutines int Initlr float64 Iter int LogBatch int MaxCount int MaxDepth int MinCount int MinLR float64 ModelType ModelType NegativeSampleSize int OptimizerType OptimizerType SubsampleThreshold float64 ToLower bool UpdateLRBatch int Verbose bool Window int }
func DefaultOptions ¶
func DefaultOptions() Options
Click to show internal directories.
Click to hide internal directories.