Documentation ¶
Index ¶
- Constants
- Variables
- func Run(ctx context.Context, datasetProvider IDatasetProvider, ...) error
- func ValidationCost(output, target float64) float64
- type ActivationFn
- type Gradient
- type Gradients
- type IDatasetProvider
- type Matrix
- type Network
- type Neuron
- type ReLu
- type Sample
- type Sigmoid
- type ThreadData
- type Topology
- type Trainer
Constants ¶
View Source
const ( Beta1 = 0.9 Beta2 = 0.999 )
Variables ¶
View Source
var ( LearningRate = 0.01 BatchSize = 16384 )
Functions ¶
func Run ¶
func Run( ctx context.Context, datasetProvider IDatasetProvider, validationProvider IDatasetProvider, threads int, epochs int, sigmoidScale float64, netFolderPath string, ) error
func ValidationCost ¶
Types ¶
type ActivationFn ¶
type Gradients ¶
func NewGradients ¶
type IDatasetProvider ¶
type IDatasetProvider interface {
Load(ctx context.Context, dataset chan<- domain.DatasetItem) error
}
type Network ¶
Network is a neural network with 3 layers
func (*Network) Save ¶
Binary specification for the NNUE file: - All the data is stored in little-endian layout - All the matrices are written in column-major - The magic number/version consists of 4 bytes (int32):
- 66 (which is the ASCII code for B), uint8
- 90 (which is the ASCII code for Z), uint8
- 2 The major part of the current version number, uint8
- 0 The minor part of the current version number, uint8
- 4 bytes (int32) to denote the network ID - 4 bytes (int32) to denote input size - 4 bytes (int32) to denote output size - 4 bytes (int32) number to represent the number of inputs - 4 bytes (int32) for the size of each layer - All weights for a layer, followed by all the biases of the same layer - Other layers follow just like the above point
type ThreadData ¶
type ThreadData struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.