Implementing random initialized weights for neural network