(logits, blank_index)
return logits
Moves the blank_label cloumn to the end of the logit matrix
Moves the blank_label cloumn to the end of the logit matrix
Moves the blank_label cloumn to the end of the logit matrix
def logits_blankid_to_last(logits, blank_index):
  ''' Moves the blank_label cloumn to the end of the logit matrix '''
  num_class = logits.shape[2]
  transform_preprocess(blank_index=blank_index, num_class=num_class)

  if blank_index != (num_class - 1):
    logits = tf.concat([
        logits[:, :, :blank_index], logits[:, :, blank_index + 1:],
        logits[:, :, blank_index:blank_index + 1]
    ],
                       axis=2)

  return logits
def logits_blankid_to_last ( logits , blank_index ) : num_class = logits . shape [ 2 ] transform_preprocess ( blank_index = blank_index , num_class = num_class ) if blank_index != ( num_class - 1 ) : logits = tf . concat ( [ logits [ : , : , : blank_index ] , logits [ : , : , blank_index + 1 : ] , logits [ : , : , blank_index : blank_index + 1 ] ] , axis = 2 ) return logits