async predict(image) {
    const imgFromPixels = tf.fromPixels(image);
    const logits = this.mobilenetModule.infer(imgFromPixels, 'conv_preds');
    const response = await this.classifier.predictClass(logits);
    const newOutput = {
      classIndex: this.mappedButtonIndexes[response.classIndex],
      confidences: {
        0: 0,
        1: 0,
        2: 0
      }
    };
    this.mappedButtonIndexes.forEach((index, count) => {
      newOutput.confidences[index] = response.confidences[count];
    });

    return newOutput;
  }
There is an issue with mobilenetModule/knnClassifier where
 it returns -1 if you don't start with an index of zero

 In these train/predict methods, we remap the index of 0-2.
 This way you can train the third model and have it retain
 the index of 2.
 
 We have these super verbosely named functions
 so it's clear what's happening