How to do it...

  1. Run an Adam optimizer with the objective of minimizing the cost for a given learning_rate:
optimizer = tf$train$AdamOptimizer(learning_rate=1e-4)$minimize(cost)
  1. Extract the number of correct_predictions and calculate the mean percentage accuracy:
correct_prediction = tf$equal(y_pred_cls, y_true_cls)
accuracy = tf$reduce_mean(tf$cast(correct_prediction, tf$float32))
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset