Tensorflow.js tf.GraphModel Class
Introduction: Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment. Tensorflow.js tf.GraphModel class is used to build an acyclic graph from SavedModel and made it inference execution. tf.GraphModel is created by tf.loadGraphModel() method.
- args: Different methods accept different parameters.
Returns: Different method returns different data values, etc.
Below we will see some of the examples of tf.GraphModel class:
Example 1: In this example, we will see executeAsync() method which is used to implement implication in favor of the model. It takes tensor as a parameter input and output node name as a string. It returns the promise of tensor.
[[-0.1800359, -0.4059841, 0.8190171, ..., -0.895331,
Example 2: In this example, we will see dispose() method which is used to dispose of the tensor. It doesn’t take any parameters. it returns void.
Tensor is disposed.