_createLayer(layerClass, layerConfig, inboundLayerNames) {
    const layer = new layers[layerClass](Object.assign({}, layerConfig, { gpu: this.gpu }))

    // layer weights
    let weightNames = []
    if (layerClass === 'Bidirectional') {
      const forwardWeightNames = layer.forwardLayer.params.map(
        param => `${layerConfig.name}/forward_${layerConfig.layer.config.name}/${param}`
      )
      const backwardWeightNames = layer.backwardLayer.params.map(
        param => `${layerConfig.name}/backward_${layerConfig.layer.config.name}/${param}`
      )
      weightNames = forwardWeightNames.concat(backwardWeightNames)
    } else if (layerClass === 'TimeDistributed') {
      weightNames = layer.layer.params.map(param => `${layerConfig.name}/${param}`)
    } else {
      weightNames = layer.params.map(param => `${layerConfig.name}/${param}`)
    }

    if (weightNames && weightNames.length) {
      const weights = weightNames.map(weightName => {
        const weightDef = _.find(this.modelWeights, w => {
          const weightRE = new RegExp(`^.*${weightName}`)
          return weightRE.test(w.weightName)
        })

        if (!weightDef) {
          throw new Error(`[Model] error loading weights.`)
        }

        const { data, shape, type } = weightDef

        // need to make a copy of underlying ArrayBuffer
        const buf = new ArrayBuffer(data.byteLength)
        const arr = new Uint8Array(buf)
        arr.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength))

        if (type === 'uint8') {
          // weights are quantized
          const { quantizeMin, quantizeMax } = weightDef
          const unquantized = new Float32Array(arr)
          for (let i = 0, len = unquantized.length; i < len; i++) {
            unquantized[i] *= (quantizeMax - quantizeMin) / 255
            unquantized[i] += quantizeMin
          }
          return new Tensor(unquantized, shape)
        } else {
          return new Tensor(new Float32Array(buf), shape)
        }
      })

      layer.setWeights(weights)
    }

    this.modelLayersMap.set(layerConfig.name, layer)

    inboundLayerNames.forEach(layerName => {
      this.modelLayersMap.get(layerConfig.name).inbound.push(layerName)
      this.modelLayersMap.get(layerName).outbound.push(layerConfig.name)
    })
  }
Create single layer

@param {Object} layerClass
@param {Object} layerConfig
@param {string[]} inboundLayerNames