View source: R/backward-propogate.R
Performs a forward propogation with current values of Thetas, then performs a backward propogation to calculate gradient needed for optimisation. The usage is to take advantage of the closure to store templates of matrices, the penalty term, and the outcome. The function then only needs to be passed the unrolled parameters as it is called iteratively for optimisation.
1 | backProp(Thetas, a, lambda, outcome)
|
Thetas |
template list of matrices allocated to correct size |
a |
template list of activation matrices (with "zeroth" layer filled in with inputs) |
lambda |
penalty term |
outcome |
matrix of 'dummied' outcomes |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.