class_docstr: The DAGMM module used in the DAGMM detector.
  
  :meta private:
code: def forward(self, x):
      dec, enc = self.autoencoder(x, return_latent=True)
      a, b = x.view(x.shape[0], -1), dec.view(dec.shape[0], -1)
      cos_distance = F.cosine_similarity(a, b, dim=1).unsqueeze(-1)
      euc_distance = DAGMMModule.relative_euclidean_distance(
          a, b, dim=1
      ).unsqueeze(-1)
      z = torch.cat([enc, euc_distance, cos_distance], dim=1)
      return enc, dec, z, self.estimation(z)
  
imports: import copy
  import random
  from typing import List
  import numpy
  import pandas
  from merlion.utils import TimeSeries
  from merlion.models.base import NormalizingConfig
  from merlion.models.anomaly.base import DetectorBase, DetectorConfig, MultipleTimeseriesDetectorMixin
  from merlion.post_process.threshold import AggregateAlarms
  from merlion.utils.misc import ProgressBar, initializer
  from merlion.models.utils.rolling_window_dataset import RollingWindowDataset
label_desc: Use image node_id 3 for calling the DAGMMModule obj's underlying member method code with example usage: obj.forward(x) and returns: enc,  dec,  z,  self