(labels, blank_index, num_class=None)
return labels
Change the value of blank_label elements from num_classes - 1 to blank_index,
      after removing blank_index by decoder.
Change the value of blank_label elements from num_classes - 1 to blank_index,
      after removing blank_index by decoder.
Change the value of blank_label elements from num_classes - 1 to blank_index after removing blank_index by decoder .
def labels_last_to_blankid(labels, blank_index, num_class=None):
  ''' Change the value of blank_label elements from num_classes - 1 to blank_index,
      after removing blank_index by decoder. '''
  labels = transform_preprocess(
      labels=labels, blank_index=blank_index, num_class=num_class)

  labels_values = labels.values
  labels_change_blank_id = tf.where(labels_values >= blank_index,
                                    labels_values + 1, labels_values)

  labels = tf.SparseTensor(
      indices=labels.indices,
      values=labels_change_blank_id,
      dense_shape=labels.dense_shape)

  return labels
def labels_last_to_blankid ( labels , blank_index , num_class = None ) : labels = transform_preprocess ( labels = labels , blank_index = blank_index , num_class = num_class ) labels_values = labels . values labels_change_blank_id = tf . where ( labels_values >= blank_index , labels_values + 1 , labels_values ) labels = tf . SparseTensor ( indices = labels . indices , values = labels_change_blank_id , dense_shape = labels . dense_shape ) return labels