_createIndexMap(indicesForReshaped) {
    if (this.indexMap) {
      return
    }

    let [inputDim1, inputDim2, inputDim3, inputChannels] = this.inputShape

    let indices = new Tensor(indicesForReshaped.data, indicesForReshaped.shape, { type: Int32Array })

    // padding for border mode 'same'
    if (this.padding === 'same') {
      const [
        paddingDim1Before,
        paddingDim1After,
        paddingDim2Before,
        paddingDim2After,
        paddingDim3Before,
        paddingDim3After
      ] = this.inputPadding
      inputDim1 = inputDim1 + paddingDim1Before + paddingDim1After
      inputDim2 = inputDim2 + paddingDim2Before + paddingDim2After
      inputDim3 = inputDim3 + paddingDim3Before + paddingDim3After
      const padValue = -1
      indices = this._padInput(indices, padValue)
    }

    const kernelDim1 = this.kernelShape[1]
    const kernelDim2 = this.kernelShape[2]
    const kernelDim3 = this.kernelShape[3]
    const outputDim1 = this.outputShape[0]
    const outputDim2 = this.outputShape[1]
    const outputDim3 = this.outputShape[2]
    const nbPatches = outputDim1 * outputDim2 * outputDim3
    const patchLen = kernelDim1 * kernelDim2 * kernelDim3 * inputChannels

    // effective shape after filter dilation
    const kernelDim1Dilated = kernelDim1 + (kernelDim1 - 1) * (this.dilationRate[0] - 1)
    const kernelDim2Dilated = kernelDim2 + (kernelDim2 - 1) * (this.dilationRate[1] - 1)
    const kernelDim3Dilated = kernelDim3 + (kernelDim3 - 1) * (this.dilationRate[2] - 1)

    this.indexMap = new Tensor([], [nbPatches, patchLen], { type: Int32Array })

    const indicesPatch = new Tensor([], [kernelDim1, kernelDim2, kernelDim3, inputChannels])
    let offset = 0
    for (let i = 0, limit = inputDim1 - kernelDim1Dilated; i <= limit; i += this.strides[0]) {
      for (let j = 0, limit = inputDim2 - kernelDim2Dilated; j <= limit; j += this.strides[1]) {
        for (let k = 0, limit = inputDim3 - kernelDim3Dilated; k <= limit; k += this.strides[2]) {
          ops.assign(
            indicesPatch.tensor,
            indices.tensor
              .hi(i + kernelDim1Dilated, j + kernelDim2Dilated, k + kernelDim3Dilated, inputChannels)
              .lo(i, j, k, 0)
              .step(this.dilationRate[0], this.dilationRate[1], this.dilationRate[2], 1)
          )
          this.indexMap.tensor.data.set(indicesPatch.tensor.data, offset)
          offset += patchLen
        }
      }
    }

    this.indexMap.createGLTexture({ type: '2d', format: 'int', supportsTextureFragments: true })
  }
Creates a index mapping from the 2D-reshaped input tensor with associated 3D tensor shape to the representation
required prior to the matrix multiply. This allows us to work directly on the 2D reshaped tensor representations
rather than needing to reshape to the 3D reprentation and calling im2col.

@param {Object} indicesForReshaped