getTestData(numExamples) {
    let xs = tf.tensor4d(
        this.testImages,
        [this.testImages.length / IMAGE_SIZE, IMAGE_H, IMAGE_W, 1]);
    let labels = tf.tensor2d(
        this.testLabels, [this.testLabels.length / NUM_CLASSES, NUM_CLASSES]);

    if (numExamples != null) {
      xs = xs.slice([0, 0, 0, 0], [numExamples, IMAGE_H, IMAGE_W, 1]);
      labels = labels.slice([0, 0], [numExamples, NUM_CLASSES]);
    }
    return {xs, labels};
  }
Get all test data as a data tensor and a labels tensor.

@param {number} numExamples Optional number of examples to get. If not
    provided,
  all test examples will be returned.
@returns
  xs: The data tensor, of shape `[numTestExamples, 28, 28, 1]`.
  labels: The one-hot encoded labels tensor, of shape
    `[numTestExamples, 10]`.