class_docstr: ctc utils unittest
class_docstr_tok: ["ctc","utils","unittest"]
docstr: unit test case for the logits_blankid_to_last interface 
docstr_tok: ["unit","test","case","for","the","logits_blankid_to_last","interface"]
code: def test_logits_blankid_to_last(self):
      """unit test case for the logits_blankid_to_last interface"""
      with self.cached_session():
          with self.assertRaises(ValueError) as valueErr:
              logits = ctc_utils.logits_blankid_to_last(
                  logits=tf.constant(self.logits), blank_index=10
              )
          the_exception = valueErr.exception
          self.assertEqual(
              str(the_exception),
              "blank_index must be less than or equal to num_class - 1",
          )
  
          logits = ctc_utils.logits_blankid_to_last(
              logits=tf.constant(self.logits), blank_index=0
          )
          logits_transform = np.asarray(
              [
                  [
                      [
                          0.221185,
                          0.0917319,
                          0.0129757,
                          0.0142857,
                          0.0260553,
                          0.633766,
                      ],
                      [
                          0.588392,
                          0.278779,
                          0.0055756,
                          0.00569609,
                          0.010436,
                          0.111121,
                      ],
                      [
                          0.633813,
                          0.321418,
                          0.00249248,
                          0.00272882,
                          0.0037688,
                          0.0357786,
                      ],
                      [
                          0.643849,
                          0.280111,
                          0.00283995,
                          0.0035545,
                          0.00331533,
                          0.0663296,
                      ],
                      [
                          0.196634,
                          0.123377,
                          0.50648837,
                          0.00903441,
                          0.00623107,
                          0.158235,
                      ],
                  ],
                  [
                      [
                          0.28562,
                          0.0831517,
                          0.0862751,
                          0.0816851,
                          0.161508,
                          0.30176,
                      ],
                      [
                          0.397533,
                          0.0557226,
                          0.0546814,
                          0.0557528,
                          0.19549,
                          0.24082,
                      ],
                      [
                          0.450868,
                          0.0389607,
                          0.038309,
                          0.0391602,
                          0.202456,
                          0.230246,
                      ],
                      [
                          0.429522,
                          0.0326593,
                          0.0339046,
                          0.0326856,
                          0.190345,
                          0.280884,
                      ],
                      [
                          0.315517,
                          0.0338439,
                          0.0393744,
                          0.0339315,
                          0.154046,
                          0.423286,
                      ],
                  ],
              ],
              dtype=np.float32,
          )
          self.assertAllClose(logits.eval(), logits)
  
file_path: delta/delta/utils/ctc_utils_test.py
imports: import numpy
  import delta.compat
  from delta.utils import ctc_utils
label_desc: Use image node_id 4 for calling the CTCUtilTest obj's underlying member method code with example usage: obj.test_logits_blankid_to_last() without return types