code: def compute_all_embeddings(
      self, dataloader, trunk_model, embedder_model
  ):
      s, e = 0, 0
      with torch.no_grad():
          for i, data in enumerate(tqdm.tqdm(dataloader)):
              img, label = self.data_and_label_getter(data)
              label = c_f.process_label(label, "all", self.label_mapper)
              q = self.get_embeddings_for_eval(
                  trunk_model, embedder_model, img
              )
              if label.dim() == 1:
                  label = label.unsqueeze(1)
              if i == 0:
                  labels = torch.zeros(
                      len(dataloader.dataset),
                      label.size(1),
                      device=self.data_device,
                      dtype=label.dtype,
                  )
                  all_q = torch.zeros(
                      len(dataloader.dataset),
                      q.size(1),
                      device=self.data_device,
                      dtype=q.dtype,
                  )
              e = s + q.size(0)
              all_q[s:e] = q
              labels[s:e] = label
              s = e
      return all_q, labels
  
imports: from collections import defaultdict
  import torch
  import tqdm
  from ..utils import common_functions
  from ..utils import inference
  from ..utils.accuracy_calculator import AccuracyCalculator
label_desc: Use image node_id 6 for calling the BaseTester obj's underlying member method code with example usage: obj.compute_all_embeddings(dataloader, trunk_model, embedder_model) and returns: all_q,  labels