Tensorflow.js tf.time() Function
Tensorflow.js is an open-source library that was developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The tf.time() function is used to execute the stated function, f() as well as return a promise in order that determines along with timing details. The resultant is an object along with the properties like Wall execution time, Kernel execution time, excluding transfer of data. In case the WebGL backend is used as well as query ticker is unavailable then this method will throw an error object. Moreover, the WebGL backend will provide the further properties like uploadWaitMs i.e. blocking time of CPU on texture uploads, and downloadWaitMs i.e. blocking time of CPU on texture downloads.
Parameters: This function accepts a single parameter as mentioned below:
- f: It is the stated function to execute as well as time.
Return Value: It returns a Promise of TimingInfo.
Kernel execution time: 0.048498, Wall execution time: 85.19999992847443
uploadWaitMs: 1.100000023841858, downloadWaitMs: 0
Please Login to comment...