Icon

01 Train a Feed Forward Neural Network

01 Train a Feed Forward Neural Network - Exercise

This workflow shows a hands-on exercise in the L4-DL Introduction to Deep Learning self-paced course

Task 1. Build a FFNN network1. Create an input layer using the Keras Input Layer node. The input Shape corresponds tothe number of features of the input data2. Add a Keras Dense Layer node. Set 6 units and ReLU activation function3. Add a second Keras Dense Layer node configured as the previous one4. Create the output layer with one more Keras Dense Layer node. This time select 1 unitand Sigmoid activation function Task 2. Train the network1. Connect the Keras Network Learner node tothe last Keras Dense Layer node and providethe training data2. Use all the double columns as input. Selectthe income column as target column3. Train the network for 20 epochs, leaving allthe other options with the default setting Task 3. Apply and test the trained network1. Connect the Keras Network Executor node to the trained networkproduced by the Keras Network Learner node. Provide the testing data2. Select the last dense layer as the only output3. Transform the network output to a categorical value using the RuleEngine node. The predicted income is ">50K" if the value is greater orequal 0.5. Otherwise, the model predicted "<=50K"4. Evaluate the prediction using the Scorer node Task 0. Read and preprocess dataExecute the provided nodes to read the adult dataset . The income column is the targetcolumn, containing two possible values (<=50K and >50K). These values are integerencoded using the Rule Engine node. adult.csvTarget column: incomeInteger encodingof target values(Training set)top: training (70%)bottom: testing (30%)CSV Reader Rule Engine Data Preparation& Partition Task 1. Build a FFNN network1. Create an input layer using the Keras Input Layer node. The input Shape corresponds tothe number of features of the input data2. Add a Keras Dense Layer node. Set 6 units and ReLU activation function3. Add a second Keras Dense Layer node configured as the previous one4. Create the output layer with one more Keras Dense Layer node. This time select 1 unitand Sigmoid activation function Task 2. Train the network1. Connect the Keras Network Learner node tothe last Keras Dense Layer node and providethe training data2. Use all the double columns as input. Selectthe income column as target column3. Train the network for 20 epochs, leaving allthe other options with the default setting Task 3. Apply and test the trained network1. Connect the Keras Network Executor node to the trained networkproduced by the Keras Network Learner node. Provide the testing data2. Select the last dense layer as the only output3. Transform the network output to a categorical value using the RuleEngine node. The predicted income is ">50K" if the value is greater orequal 0.5. Otherwise, the model predicted "<=50K"4. Evaluate the prediction using the Scorer node Task 0. Read and preprocess dataExecute the provided nodes to read the adult dataset . The income column is the targetcolumn, containing two possible values (<=50K and >50K). These values are integerencoded using the Rule Engine node. adult.csvTarget column: incomeInteger encodingof target values(Training set)top: training (70%)bottom: testing (30%)CSV Reader Rule Engine Data Preparation& Partition

Nodes

Extensions

Links