R/createWeights1.R

createWeights1 <- function(I,H){
  # I number of input neurons
  # H number of hidden neurons
  
  # return random weights
  return(new("Weights", alpha = rnorm(1), alpha_h = rnorm(H), w_h = rnorm(H), 
            w_ih = matrix(nrow=I,ncol=H, data=rnorm(I*H))))
  
}

Try the TeachNet package in your browser

Any scripts or data that you put into this service are public.

TeachNet documentation built on May 2, 2019, 7 a.m.