generalizing input to doubles, example with hidden layers