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

    const { cropping = [[0, 0], [0, 0]], data_format = 'channels_last' } = attrs

    if (Array.isArray(cropping)) {
      if (Array.isArray(cropping[0])) {
        // [[int, int], [int, int]]
        this.cropping = cropping
      } else {
        // [int, int]
        this.cropping = [[cropping[0], cropping[0]], [cropping[1], cropping[1]]]
      }
    } else {
      // int
      this.cropping = [[cropping, cropping], [cropping, cropping]]
    }

    this.dataFormat = data_format

    this.description = `${JSON.stringify(this.cropping)}`

    // GPU setup
    if (this.gpu) {
      this.mapInputProgram = webgl2.compileProgram(mapInputProgramSource)
    }
  }
Creates a Cropping2D layer

@param {Object} [attrs] - layer config attributes
@param {number|number[]|number[][]} [attrs.cropping] - int, or tuple of 2 ints, or tuple of 2 tuples of 2 ints
@param {string} [attrs.data_format] - either 'channels_last' or 'channels_first'