toggleGPU(mode) {
    if (typeof mode === 'undefined') {
      this.gpu = !this.gpu
    } else {
      this.gpu = mode
    }
    this.modelLayersMap.forEach(layer => {
      layer.toggleGPU(this.gpu)
    })
    this.visMap.forEach(visInstance => {
      visInstance.gpu = this.gpu
    })
    this.resetInputTensors()
  }
Toggle GPU mode on/off
Iterate through all layers and set `gpu` attribute
@param {boolean} mode - on/off