Tensorflow.js tf.decodeString() Function
Tensorflow.js is an open-source library which is being developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .decodeString() function is used to decode the stated bytes into a string with the help of the given encoding scheme.
- bytes: It is the stated bytes which is to be decoded. It is of type Uint8Array.
- encoding: It is the encoding scheme which is to be used. And the by default value is utf-8.
Return Value: It returns string.
Example 1: When encoding scheme is provided.
Example 2: When encoding scheme is not provided.