class_docstr: speaker task test
class_docstr_tok: ["speaker","task","test"]
code: def test_speaker_utt_task_dataset(self):
      task_name = "SpeakerUttTask"
      self.config["data"]["task"]["name"] = task_name
      batch_size = 4
      self.config["solver"]["optimizer"]["batch_size"] = batch_size
  
      task_name = self.config["data"]["task"]["name"]
      task_class = registers.task[task_name]
  
      for mode in (utils.TRAIN, utils.EVAL, utils.INFER):
          task = task_class(self.config, mode)
          dataset = task.input_fn(mode, batch_size, 1)()
          (
              features,
              one_hot_labels,
          ) = dataset.make_one_shot_iterator().get_next()
          samples = features["inputs"]
          filenames = features["filepath"]
          clip_ids = features["clipid"]
          labels = features["labels"]
  
          with self.cached_session(
              use_gpu=False, force_gpu=False
          ) as sess:
              while True:
                  (
                      batch_inputs,
                      batch_labels,
                      batch_files,
                      batch_clipids,
                      labels_onehot,
                  ) = sess.run(
                      [
                          samples,
                          labels,
                          filenames,
                          clip_ids,
                          one_hot_labels,
                      ]
                  )
  
                  del labels_onehot
                  logging.info(
                      "feat shape: {}".format(batch_inputs.shape)
                  )
                  logging.info("filename: {}".format(batch_files))
                  logging.info("clip id: {}".format(batch_clipids))
                  logging.info("labels: {}".format(batch_labels))
                  break
  
imports: import os
  import tempfile
  from pathlib import Path
  import numpy
  import delta.compat
  from absl import logging
  from delta import utils
  from delta.utils.register import registers
  from delta.utils.register import import_all_modules_for_register
  from delta.utils.kaldi import kaldi_dir_utils
label_desc: Use image node_id 7 for calling the SpeakerClsTaskTest obj's underlying member method code with example usage: obj.test_speaker_utt_task_dataset() without return types