Tensorflow.js tf.LayersModel class .getLayer() 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 .getLayer() function is used to fetch a layer that is based upon either its name (which must be unique) or else an index. Where, indices are relying on the order of the horizontal graph traversal in bottom-up fashion. Moreover, in case both name as well as index are given, then the index will take priority.
- name: It is the stated name of the layer. It is optional and is of type string.
- index: It is the stated index of the layer. It is optional and is of type number.
Return Value: It returns tf.layers.Layer.
Tensor [[-0.0678914, 0.6647689, -0.3708572, -0.1764591],]
8 10 9