def _extract_shift_values(self):
    """Parses the shift string.

    The hparams should contain the key shift_values, which maps to a
    comma-separated string of integers. These integers specify the number of
    timesteps to predict/reconstruct to compute auxiliary losses.

    For instance, "-4,2,6" means to reconstruct the target 4 steps before and
    predict the targets 2 steps and 6 steps ahead.

    Returns:
      List of int != 0 shift values to compute the auxiliary losses.
    """
    shift_values_str = self._hparams.get("shift_values", "")
    shift_values = [int(x) for x in shift_values_str.split(",")]

    tf.logging.info(
        "Computing auxiliary losses for the following shifts: %s",
        shift_values)

    return shift_values
Parses the shift string.

    The hparams should contain the key shift_values, which maps to a
    comma-separated string of integers. These integers specify the number of
    timesteps to predict/reconstruct to compute auxiliary losses.

    For instance, "-4,2,6" means to reconstruct the target 4 steps before and
    predict the targets 2 steps and 6 steps ahead.

    Returns:
      List of int != 0 shift values to compute the auxiliary losses.
    
tensor2tensor/models/research/transformer_aux.py