setWeights(weightsArr) {
    if (this.dataFormat === 'channels_first') {
      weightsArr[0].tensor = weightsArr[0].tensor.transpose(2, 3, 1, 0)
    }
    super.setWeights(weightsArr, false)

    this._w2row()

    if (this.gpu) {
      this.weights['kernel'] = this.wRowsMat
      this.weights['kernel'].createGLTexture({ type: '2d', format: 'float' })
      if (this.useBias) {
        this.weights['bias'].createGLTexture({ type: '2d', format: 'float' })
      }
    }
  }
Method for setting layer weights. Extends `super` method.

W weight tensor is converted to `channels_last` mode if in `channels_first` mode.

In `channels_last` mode, W weight tensor has shape [nbRow, nbCol, inputChannels, nbFilter]

In `channels_first` mode, W weight tensor has shape [nbFilter, inputChannels, nbRow, nbCol]

@param {Tensor[]} weightsArr - array of weights which are instances of Tensor