The majority of my computation time is spent on this:
NeuronError is a 100x2000 densematrix.
InputWithBias is a 101x2000 densematrix.
I basically need to find the sum(or average) of all the observation vectors in NeuronError outer-multiplied with their corresponding observation vector in InputWithBias.
This is part of a backpropogation algorithm.
Perhaps it would be faster to first transpose each matrix and then do rowvector outerproducts?
It seems like this operation would have been named/optimized since it is involved in backprop.
Any suggestions?
DeltaEncoder.Clear()
For col = 0 To NumberOfObs - 1
DeltaEncoder += NeuronError.Column(col).OuterProduct(InputWithBias.Column(col))
Next col
DeltaEncoder /= NumberOfObs
The NumberOfObs is 2000.NeuronError is a 100x2000 densematrix.
InputWithBias is a 101x2000 densematrix.
I basically need to find the sum(or average) of all the observation vectors in NeuronError outer-multiplied with their corresponding observation vector in InputWithBias.
This is part of a backpropogation algorithm.
Perhaps it would be faster to first transpose each matrix and then do rowvector outerproducts?
It seems like this operation would have been named/optimized since it is involved in backprop.
Any suggestions?