Source

AI/Layer/Pooling/generators.js

import { Order } from 'blockly/javascript';
/**
 * @category AI
 * @subcategory Layer
 * @module Pooling
 */
/**
 * Creates a Max pooling operation for temporal data.
 *
 * @param {Number | Number[]} poolSize Size of the window to pool over, should be an integer.
 * @returns {MaPooling1D} tf.layers.maxPooling1d({poolSize}).
 */
function poolingLayer(block, generator) {
    const poolSize = generator.valueToCode(block, 'POOL', Order.NONE) || '';
    return [`tf.layers.maxPooling1d({ poolSize: ${poolSize} })`, Order.VOID];
}
export const layerBlockGenerator = {
    ['add_pooling_layer']: poolingLayer,
};
//# sourceMappingURL=generators.js.map