Skip to content

Instantly share code, notes, and snippets.

@ilkarman
Created June 30, 2017 10:10
Show Gist options
  • Save ilkarman/eedfca43224c44a360ac151e65294b69 to your computer and use it in GitHub Desktop.
Save ilkarman/eedfca43224c44a360ac151e65294b69 to your computer and use it in GitHub Desktop.
Weight initialisation for nnet
biases <- lapply(seq_along(listb), function(idx){
r <- listb[[idx]]
matrix(rnorm(n=r), nrow=r, ncol=1)
})
weights <- lapply(seq_along(listb), function(idx){
c <- listw[[idx]]
r <- listb[[idx]]
matrix(rnorm(n=r*c), nrow=r, ncol=c)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment