Documentation
¶
Index ¶
- func WithBatchSize(batchSize int) func(*neuralModel)
- func WithDropout(dropout float64) func(*neuralModel)
- func WithL2Regularization(lambd float64) func(*neuralModel)
- func WithLogInterval(interval int) func(*fitConfig)
- func WithSeed(seed uint64) func(*neuralModel)
- func WithShuffle(shuffle bool) func(*fitConfig)
- func WithVerbose(verbose bool) func(*fitConfig)
- type NeuralConfig
- type NeuralModel
- type NeuralNetwork
- type TrainerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithBatchSize ¶
func WithBatchSize(batchSize int) func(*neuralModel)
func WithDropout ¶
func WithDropout(dropout float64) func(*neuralModel)
func WithL2Regularization ¶
func WithL2Regularization(lambd float64) func(*neuralModel)
func WithLogInterval ¶
func WithLogInterval(interval int) func(*fitConfig)
func WithShuffle ¶ added in v1.6.1
func WithShuffle(shuffle bool) func(*fitConfig)
func WithVerbose ¶
func WithVerbose(verbose bool) func(*fitConfig)
Types ¶
type NeuralConfig ¶
type NeuralConfig struct {
NNStructure []int
Activation nncore.ActivationType
Mode nncore.ModeType
}
type NeuralModel ¶
type NeuralModel interface {
// performs model training using the xTrain and yTrain matrices.
// both matrices have shape (nFeatures, nSamples), where each row
// corresponds to a feature and each column corresponds to a training sample.
Fit(xTrain *mat.Dense, yTrain *mat.Dense, options ...func(*fitConfig)) []float64
Predict(x *mat.Dense) *mat.Dense
Evaluate(x *mat.Dense, y *mat.Dense) float64
Save(path string)
Summary()
}
func Load ¶
func Load(path string) NeuralModel
type NeuralNetwork ¶
type NeuralNetwork interface {
NewTrainer(config TrainerConfig, options ...func(*neuralModel)) NeuralModel
}
func NewNeuralNetwork ¶
func NewNeuralNetwork(config NeuralConfig) NeuralNetwork
type TrainerConfig ¶
type TrainerConfig struct {
Optimizer nncore.OptimizerType
LearningRate float64
Epochs int
}
Click to show internal directories.
Click to hide internal directories.