Session Ready
Exercise

Training neural networks with TensorFlow

In the previous exercise, you defined a model, model(w1, b1, w2, b2, features), and a loss function, loss_function(w1, b1, w2, b2, features, targets), both of which are available to you in this exercise. You will now train the model and then evaluate its performance by predicting default outcomes in a test set, which consists of test_features and test_targets and is available to you. The trainable variables are w1, b1, w2, and b2. Additionally, the following operations have been imported for you: keras.activations.relu() and keras.layers.Dropout().

Instructions
100 XP
  • Set the optimizer to perform minimization.
  • Add the four trainable variables to var_list in the order in which they appear as arguments to loss_function().
  • Use the model and test_features to predict the values for test_targets.