Functional neural network surrogates trained on scarce data