constructor(attrs = {}) {
    super(attrs)
    this.layerClass = '_GlobalPooling2D'

    const { data_format = 'channels_last' } = attrs
    this.dataFormat = data_format

    // default pooling function
    // can be `max` or `average`
    this.poolingFunc = 'max'

    // GPU setup
    if (this.gpu) {
      this.poolingProgram = webgl2.compileProgram(poolingProgramSource)
    }
  }
Creates a _GlobalPooling2D layer

@param {Object} [attrs] - layer config attributes