createGLTexture({ type = '2d', format = 'float', supportsTextureFragments = false }) {
    let shape = []
    if (this.tensor.shape.length === 1) {
      shape = [1, this.tensor.shape[0]]
      this.is1D = true
    } else if (this.tensor.shape.length === 2) {
      shape = this.tensor.shape
    } else if (this.tensor.shape.length === 3 && (type === '2d_array' || type === '3d')) {
      shape = this.tensor.shape
    } else {
      throw new Error('[Tensor] cannot create WebGL2 texture.')
    }

    this.glTextureShape = shape
    this.glTextureType = type
    this.glTextureFormat = format

    if (type === '2d') {
      if (this.glTextureShape[0] > MAX_TEXTURE_SIZE && supportsTextureFragments) {
        this._create2DRowFragmentedGLTexture()
      } else {
        this._create2DGLTexture()
      }
    } else if (type === '2d_array' || type === '3d') {
      this._create3DGLTexture()
    } else {
      throw new Error(`[Tensor] invalid type ${type}.`)
    }
  }
Creates WebGL2 texture

Without args, defaults to gl.TEXTURE_2D and gl.R32F

@param {string} [opts.type]
@param {string} [opts.format]
@param {boolean} [opts.supportsTextureFragments]