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

    const { rate = 0.5, data_format = 'channels_last' } = attrs

    this.description = `${rate}`

    this.rate = Math.min(Math.max(0, rate), 1)
    this.dataFormat = data_format
  }
Creates an SpatialDropout2D layer

@param {Object} [attrs] - layer config attributes
@param {number} [attrs.rate] - fraction of the input units to drop (between 0 and 1)
@param {string} [attrs.data_format] - channels_first` or `channels_last`