Ejemplo n.º 1
0
// TODO(ariw): Delete any matrix creation in layer operations.
func (self *Layer) Forward(previous *Layer) {
	self.resetForExamples(previous)
	self.Input = previous.Output
	var inputAndBias mat64.Dense
	inputAndBias.Augment(self.Input, self.Ones) // Add bias to input.
	self.Output.Mul(&inputAndBias, self.Weight)
	self.DActivationFunction(self.Output.T(), self.Derivatives)
	self.ActivationFunction(self.Output, self.Output)
}