docstr: Predict an epoch and update metrics.
  
  Parameters
  ----------
  name : str
      Name of the validation set
  loader : torch.utils.data.Dataloader
          DataLoader with validation set
docstr_tok: ["Predict","an","epoch","and","update","metrics",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","validation","set","loader",":","torch.utils.data.Dataloader","DataLoader","with","validation","set"]
code: def _predict_epoch(self, name, loader):
      """
      Predict an epoch and update metrics.
  
      Parameters
      ----------
      name : str
          Name of the validation set
      loader : torch.utils.data.Dataloader
              DataLoader with validation set
      """
      # Setting network on evaluation mode
      self.network.eval()
  
      list_output = []
      list_embedded_x = []
      list_obfuscation = []
      # Main loop
      for batch_idx, X in enumerate(loader):
          output, embedded_x, obf_vars = self._predict_batch(X)
          list_output.append(output.cpu().detach().numpy())
          list_embedded_x.append(embedded_x.cpu().detach().numpy())
          list_obfuscation.append(obf_vars.cpu().detach().numpy())
  
      output, embedded_x, obf_vars = self.stack_batches(
          list_output, list_embedded_x, list_obfuscation
      )
  
      metrics_logs = self._metric_container_dict[name](
          output, embedded_x, obf_vars
      )
      self.network.train()
      self.history.epoch_metrics.update(metrics_logs)
      return
  
imports: import torch
  import numpy
  from torch.utils.data import DataLoader
  from pytorch_tabnet import tab_network
  from pytorch_tabnet.utils import create_explain_matrix, filter_weights, SparsePredictDataset, PredictDataset, check_input, create_group_matrix
  from torch.nn.utils import clip_grad_norm_
  from pytorch_tabnet.pretraining_utils import create_dataloaders, validate_eval_set
  from pytorch_tabnet.metrics import UnsupMetricContainer, check_metrics, UnsupervisedLoss
  from pytorch_tabnet.abstract_model import TabModel
  import scipy
label_desc: Use image node_id 12 for calling the TabNetPretrainer obj's underlying member method code with example usage: obj._predict_epoch(name, loader) without return types