class_docstr: speaker task test
class_docstr_tok: ["speaker","task","test"]
docstr: dataset unittest
docstr_tok: ["dataset","unittest"]
code: def test_dataset(self):
      """dataset unittest"""
      batch_size = 4
      self.config["solver"]["optimizer"]["batch_size"] = batch_size
  
      task_name = self.config["data"]["task"]["name"]
      task_class = registers.task[task_name]
      task = task_class(self.config, utils.TRAIN)
  
      dataset = task.input_fn(utils.TRAIN, batch_size, 1)()
  
      features, labels = dataset.make_one_shot_iterator().get_next()
      samples = features["inputs"]
      filenames = features["filepath"]
      clip_ids = features["clipid"]
      soft_labels = features["soft_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,
                  batch_soft_labels,
              ) = sess.run(
                  [
                      samples,
                      labels,
                      filenames,
                      clip_ids,
                      tf.one_hot(labels, 2),
                      soft_labels,
                  ]
              )
  
              del labels_onehot
              logging.info("feat shape: {}".format(batch_inputs.shape))
              logging.info("labels: {}".format(batch_labels))
              logging.info("filename: {}".format(batch_files))
              logging.info("clip id: {}".format(batch_clipids))
              logging.info("soft_labels: {}".format(batch_soft_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 6 for calling the SpeakerClsTaskTest obj's underlying member method code with example usage: obj.test_dataset() without return types