code: def test_ecapa_enc_dec(self):
      preprocessor = {
          "_target_": "nemo.collections.asr.modules.AudioToMelSpectrogramPreprocessor",
      }
      encoder = {
          "_target_": "nemo.collections.asr.modules.ECAPAEncoder",
          "feat_in": 80,
          "filters": [4, 4, 4, 4, 3],
          "kernel_sizes": [5, 3, 3, 3, 1],
          "dilations": [1, 1, 1, 1, 1],
          "scale": 2,
      }
  
      decoder = {
          "_target_": "nemo.collections.asr.modules.SpeakerDecoder",
          "feat_in": 3,
          "num_classes": 2,
          "pool_mode": "attention",
          "emb_sizes": 192,
      }
  
      modelConfig = DictConfig(
          {
              "preprocessor": DictConfig(preprocessor),
              "encoder": DictConfig(encoder),
              "decoder": DictConfig(decoder),
          }
      )
      speaker_model = EncDecSpeakerLabelModel(cfg=modelConfig)
      speaker_model.train()
      # TODO: make proper config and assert correct number of weights
  
      # Check to/from config_dict:
      confdict = speaker_model.to_config_dict()
      instance2 = EncDecSpeakerLabelModel.from_config_dict(confdict)
      self.assertTrue(isinstance(instance2, EncDecSpeakerLabelModel))
  
file_path: NeMo/tests/collections/asr/test_speaker_label_models.py
imports: import json
  import os
  import tempfile
  from unittest import TestCase
  import pytest
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.models import EncDecSpeakerLabelModel
label_desc: Use image node_id 2 for calling the EncDecSpeechLabelModelTest obj's underlying member method code with example usage: obj.test_ecapa_enc_dec() without return types