Tensorflow.js tf.util.now() Function
Tensorflow.js is an open-source library which is being develop by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .util.now() function is used to find the present time in milliseconds which is of high resolution and is relative to an inconsistent time in the past. Moreover, it operates through various platforms namely node.js, browsers.
Syntax:
tf.util.now()
Parameters:
It does not accepts any parameter.
Return Value: It returns number.
Example 1:
Javascript
import * as tf from "@tensorflow/tfjs"
console.log(tf.util.now());
|
Output:
1106999.345
Example 2:
Javascript
import * as tf from "@tensorflow/tfjs"
var res = (tf.sin(tf.util.now()));
console.log(res);
|
Output:
Tensor
0.6055543422698975
Reference: https://js.tensorflow.org/api_node/2.0.1/#util.now
Last Updated :
21 May, 2021
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...