Tensors
Tensors are the core data structure of TensorFlow.js
Tensors can also be thought of as containers for numbers.
They are a generalization of vectors and matrices to potentially higher dimensions.
Declaring a tensor
// Pass an array of values to create a vector.
tf.tensor([1, 2, 3, 4]).print();
// Pass a nested array of values to make a matrix or a higher
// dimensional tensor.
tf.tensor([[1, 2], [3, 4]]).print();
//Creates rank-1 tf.Tensor with the provided values, shape and dtype.
tf.tensor1d([1, 2, 3]).print();
//Creates rank-2 tf.Tensor with the provided values, shape and dtype.
// Pass a nested array.
tf.tensor2d([[1, 2], [3, 4]]).print();
(REFERENCE: https://js.tensorflow.org/api/latest/#tensor)
Plotly.js is a charting library that comes with over 40 chart types, 3D charts, statistical graphs, and SVG maps.
(REFERENCE: https://www.w3schools.com/js/js_graphics_plotly.asp )
No comments:
Post a Comment