Automatic differentiation

Machine learning models, especially deep learning models, can optimize their own parameters based on the error rate that's calculated by the value of the derivative function. However, generally, it is impossible to derive the derivative function of any function. This means that there's no practical way of calculating the error rates of each parameter for any machine learning model. Around the 1960s, an algorithm was invented to solve this problem, known as backpropagation. Backpropagation is an algorithm that allows us to derive the value to be optimized for each operation node in the graph. This algorithm implements the following steps:

  1. It finds the error rate between the prediction result of the model and the ...

Get Hands-On Machine Learning with TensorFlow.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.