1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-25 13:48:49 +08:00

neural: update to new mat64 API

This commit is contained in:
Richard Townsend 2019-06-18 10:28:07 +01:00
parent 864198dc6c
commit 495bb91a48

View File

@ -115,7 +115,7 @@ func (n *Network) Activate(with *mat.Dense, maxIterations int) {
}
tmp := new(mat.Dense)
tmp.Clone(with)
tmp.CloneFrom(with)
// Main loop
for i := 0; i < maxIterations; i++ {
@ -197,7 +197,7 @@ func (n *Network) Error(outArg, errArg *mat.Dense, maxIterations int) *mat.Dense
// Transpose weights matrix
reverseWeights := mat.DenseCopyOf(n.weights)
reverseWeights.Clone(n.weights.T())
reverseWeights.CloneFrom(n.weights.T())
// We only need a certain number of passes
for i := 0; i < maxIterations; i++ {