November 2019
Intermediate to advanced
296 pages
7h 52m
English
Operations are programmable units that can be used to manipulate tensors. TensorFlow.js provides various kinds of operations that are suitable for linear algebra and machine learning, just like TensorFlow does. For compatibility purposes, TensorFlow.js supports many of the operations that are implemented by TensorFlow. Due to this, we can import many of the machine learning models that have been implemented by TensorFlow into TensorFlow.js. Operations can be called from the root namespace or the methods of the tensors directly, as follows:
const t1 = tf.tensor([1, 2, 3, 4]);const t2 = tf.tensor([10, 20, 30, 40]);t1.add(t2);// Ortf.add(t1, t2);
All of the operations return the handle of the tensors. When it creates a new tensor, ...
Read now
Unlock full access