![]() |
Tensorflow.js is a Google-developed open-source toolkit for executing machine learning models and deep learning neural networks in the browser or on the node platform. It also enables developers to create machine learning models in JavaScript and utilize them directly in the browser or with Node.js. The tf.layers.globalAveragePooling1d() function is used for applying global average pooling operation for temporal data. Syntax: tf.layers.globalAveragePooling1d( args ) Parameters:
Returns: It returns GlobalAveragePooling1D. Example 1: Javascript
Output: __________________________________________________________________________________________ Layer (type) Input Shape Output shape Param # ========================================================================================== global_average_pooling1d_Gl [[4,3,3]] [4,3] 0 __________________________________________________________________________________________ dense_Dense7 (Dense) [[4,3]] [4,3] 12 ========================================================================================== Total params: 12 Trainable params: 12 Non-trainable params: 0 __________________________________________________________________________________________ Example 2: Javascript
Output: Tensor [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1]] Reference: https://js.tensorflow.org/api/latest/#layers.globalAveragePooling1d |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |