Let's build a simple neural network to demonstrate the effects of various hyperparameters on model performance. We will create a simple neural network that can add two numbers based on the randomly generated training data. The training data has two independent variables, x1 and x2, and an output variable, y1 = x1 + x2. Here is a pictorial view of the network we will generate with the deeplearning4j library:
Here is the utility code for generating the sample data: x1 and x2 as the input independent variables, and y as the output (dependent) variable:
// Method to generate the training data ...