function encodeOutputDateStrings(dateStrings, oneHot = false) {
  const n = dateStrings.length;
  const x = tf.buffer([n, OUTPUT_LENGTH], 'int32');
  for (let i = 0; i < n; ++i) {
    tf.util.assert(
        dateStrings[i].length === OUTPUT_LENGTH,
        `Date string is not in ISO format: "${dateStrings[i]}"`);
    for (let j = 0; j < OUTPUT_LENGTH; ++j) {
      const char = dateStrings[i][j];
      const index = OUTPUT_VOCAB.indexOf(char);
      if (index === -1) {
        throw new Error(`Unknown char: ${char}`);
      }
      x.set(index, i, j);
    }
  }
  return x.toTensor();
}
Encode a number of output date strings as a `tf.Tensor`.

The encoding is a sequence of integer indices.

@param {string[]} dateStrings An array of output date strings, must be in the
  ISO date format (YYYY-MM-DD).
@returns {tf.Tensor} Integer indices of the characters as a `tf.Tensor`, of
  dtype `int32` and shape `[numExamples, outputLength]`, where `outputLength`
  is the length of the standard output format (i.e., `10`).