import tensorflow as tf

    beam_width=beam_width, blank_index=blank_index, top_paths=1,
    blank_label=0)
  decoded = tf.sparse.SparseTensor(indices[0], values[0], shape[0])
  decoded = tf.cast(tf.sparse.to_dense(decoded), tf.int32)
  decoded_u = tf.sparse.SparseTensor(indices_u[0], values_u[0], shape_u[0])
  decoded_u = tf.cast(tf.sparse.to_dense(decoded_u), tf.int32)
  # Adjust event vals according to representation
  decoded = tf.where(tf.not_equal(decoded, 0), decoded+shift, decoded)
