added method to set all values of neurons in a layer