Tensorflow.js tf.concat() Function
Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment.
The tf.concat() function is used to concatenate the list of specified Tensors along the given axis.
tf.concat (tensors, axis)
Parameters: This function accepts two parameters which are illustrated below:
- tensors: It is a list of specified tensors to concatenate.
- axis: It is the axis along which the concatenation process is being performed. It is an optional parameter and its default value is 0.
Return Value: It returns a Tensor of concatenated tensors.
Tensor [0, 2, 4, 1, 3, 5]
Tensor [[0, 2, 4, 6, 8, 10], [1, 3, 5, 7, 9, 11]]