concept api in category deep learning

This is an excerpt from Manning's book Deep Learning with JavaScript: Neural networks in TensorFlow.js.
Compatible in API with Python deep-learning frameworks Equipped with built-in support for data ingestion and with an API for visualization
This section is for readers who are interested in performing derivative and gradient calculation in TensorFlow.js. For most deep-learning models in this book, the calculation of derivatives and gradients is taken care of under the hood by model.fit() and model.fitDataset(). However, for certain problem types, such as finding maximally activating images for convolution filters in chapter 7 and RL in chapter 11, it is necessary to calculate derivatives and gradients explicitly. TensorFlow.js provides APIs to support such use cases. Let’s start from the simplest scenario—namely, a function that takes a single input tensor and returns a single output tensor: