Add code for randomly initlializing the weights