|
@@ -51,7 +51,7 @@ func newBatchWorker(nn *NeuralNetwork) (bw *batchWorker) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func (bw *batchWorker) Run(trainer training.Trainer, startIndex, endIndex int) {
|
|
|
+func (bw *batchWorker) run(trainer training.Trainer, startIndex, endIndex int) {
|
|
|
for i := startIndex; i < endIndex; i++ {
|
|
|
dB, dW := bw.network.backward(trainer.GetDataByIndex(i))
|
|
|
for l := 1; l < bw.network.LayerCount; l++ {
|
|
@@ -62,6 +62,6 @@ func (bw *batchWorker) Run(trainer training.Trainer, startIndex, endIndex int) {
|
|
|
trainer.Reset()
|
|
|
}
|
|
|
|
|
|
-func (bw *batchWorker) Result(layer int) (dB, dW *mat.Dense) {
|
|
|
+func (bw *batchWorker) result(layer int) (dB, dW *mat.Dense) {
|
|
|
return bw.BGradient[layer].Gradients(), bw.WGradient[layer].Gradients()
|
|
|
}
|