Say I want to train a neural network to approximate a function F that depends on an integer k in [1,N] and a vector r of real numbers. The output of the network is a single real number. Two options come to my mind:
- setup N neural networks, each of then trained with samples (input=r, output=F(k,r)) for a fixed k and multiples r. When I need to test an input (k,r) select the network opportunely.
- train a single neural network with samples (input=[k, r], output=F(k,r)) for multiples k and r
If N gets big option 2 seems more convenient as you get a single neural network to train (consider the same total amount of training samples). Which option do you suggest? Do you have suggestions/references for the two approaches (e.g. normalization of the integer input)?