Since it is not possible to use a SavedModel directly from TensorFlow.js, we need to convert it into a compatible version and then load it in the TensorFlow.js runtime. The tensorflowjs_converter command-line application makes the conversion process straightforward. This tool not only performs the conversion between the SavedModel and the TensorFlow.js representation but also automatically quantizes the model, thereby reducing its dimensions when necessary.
Let's say we are interested in converting the SavedModel of the computational graph we exported in the previous section into TensorFlow format via the serialized pow function. Using tensorflowjs_converter, we only need to specify the input ...