Tensorflow.js tf.layers build() Method
Tensorflow.js is an open-source library that is developed by Google for running machine learning models as well as deep learning neural networks in the browser or node environment.
The .build() function is used to create the weights of the layer stated. This method should be applied on every layers that hold weights. Moreover, its invoked when the apply() method is invoked in order to build the weights.
- inputShape: It is the stated shape or an array of shape that is untouched.
Return Value: It returns void.
[null,6,2,6] Tensor [[-0.3726568], [0.7343086 ], [-0.2459907]]
Here, getWeights() method is used to print the weights.
[null,1,2] [null,1.7,2.7,6.5] Tensor [[0.6224715], [1.2144204]] Tensor [[0.8342852, 0.4770206],]