Closed dmbates closed 3 years ago
I notice that the wh_learn has some matrix multiplications using mul! inside a loop on epochs and that the arguments are slices of matrices. It may be more efficient to use views as they do not require copying. So an expression like
wh_learn
mul!
mul!(pred, X[i:i, :], W)
involves copying the i'th row of X but
X
mul!(pred, view(X, i:i, :), W)
doesn't.
Thank you Prof. Bates! It is done!
I notice that the
wh_learn
has some matrix multiplications usingmul!
inside a loop on epochs and that the arguments are slices of matrices. It may be more efficient to use views as they do not require copying. So an expression likeinvolves copying the i'th row of
X
butdoesn't.