Documentation ¶
Index ¶
- type GateCache
- type LSTM
- func (network *LSTM) Evaluate(inputSeries [][]float64) []float64
- func (network *LSTM) EvaluateAcrossInterval(inputSeries [][]float64) [][]float64
- func (network *LSTM) FromBytes(bytes []byte)
- func (network *LSTM) Initialize(numInputs int, numOutputs int, ForgetGate []layers.Layer, ...)
- func (network *LSTM) Open(dir string, name string)
- func (network *LSTM) Save(dir string, name string)
- func (network *LSTM) ToBytes() []byte
- func (network *LSTM) Train(trainingData []datasets.DataPoint, testingData []datasets.DataPoint, ...)
- type Sequential
- func (network *Sequential) Evaluate(input []float64) []float64
- func (network *Sequential) FromBytes(bytes []byte)
- func (network *Sequential) GetErrors(dataset []datasets.DataPoint) []datasets.DataPoint
- func (network *Sequential) Initialize(numInputs int, ls ...layers.Layer)
- func (network *Sequential) Open(dir string, name string)
- func (network *Sequential) PrettyPrint() string
- func (network *Sequential) Save(dir string, name string)
- func (network *Sequential) TestOnAndLog(dataset []datasets.DataPoint)
- func (network *Sequential) ToBytes() []byte
- func (network *Sequential) Train(dataset []datasets.DataPoint, testingData []datasets.DataPoint, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GateCache ¶ added in v1.4.0
type GateCache struct {
// contains filtered or unexported fields
}
type LSTM ¶ added in v1.3.0
type LSTM struct { ForgetGate []layers.Layer InputGate []layers.Layer CandidateGate []layers.Layer OutputGate []layers.Layer InterpretGate []layers.Layer BatchSize int SubBatch int LearningRate float64 Optimizer optimizers.Optimizer // contains filtered or unexported fields }
func (*LSTM) EvaluateAcrossInterval ¶ added in v1.3.0
func (*LSTM) Initialize ¶ added in v1.3.0
type Sequential ¶ added in v1.4.0
type Sequential struct { Layers []layers.Layer BatchSize int SubBatch int LearningRate float64 Optimizer optimizers.Optimizer // contains filtered or unexported fields }
The baseline network type, this can be used for generic MLPs and CNNs.
func (*Sequential) Evaluate ¶ added in v1.4.0
func (network *Sequential) Evaluate(input []float64) []float64
Takes in a single input and passes it through the network.
func (*Sequential) FromBytes ¶ added in v1.4.0
func (network *Sequential) FromBytes(bytes []byte)
Essentially the reverse of ToBytes(), this takes the byte array that was put into .lsls file and rebuilds it into the network that was saved.
func (*Sequential) GetErrors ¶ added in v1.4.0
func (network *Sequential) GetErrors(dataset []datasets.DataPoint) []datasets.DataPoint
This is just for some sanity checking. This lets you see the datapoints your network guesses wrong on, cause sometimes it gets things wrong it shouldn't, and sometimes you cannot believe someone wrote a 4 like that (I'm looking at you, random MNIST contributor).
func (*Sequential) Initialize ¶ added in v1.4.0
func (network *Sequential) Initialize(numInputs int, ls ...layers.Layer)
Takes in the number of inputs this network will accept, as well as a list of the layers constructing the network.
func (*Sequential) Open ¶ added in v1.4.0
func (network *Sequential) Open(dir string, name string)
Opens the .lsls file at path [Project Directory]/{dir}/{name}.lsls and populates the network with that saved information.
func (*Sequential) PrettyPrint ¶ added in v1.4.0
func (network *Sequential) PrettyPrint() string
func (*Sequential) Save ¶ added in v1.4.0
func (network *Sequential) Save(dir string, name string)
Saves your Sequential into a .lsls file, with the path [Project Directory]/{dir}/{name}.lsls.
func (*Sequential) TestOnAndLog ¶ added in v1.4.0
func (network *Sequential) TestOnAndLog(dataset []datasets.DataPoint)
Takes in a dataset and prints to Standard Output the loss and accuracy across the dataset.
func (*Sequential) ToBytes ¶ added in v1.4.0
func (network *Sequential) ToBytes() []byte
Compresses all the uniquely identifying information in your network (all the weights, and the layer structure) into a long array of bytes, that can be saved directly to a .lsls file.