class_docstr: The encoder for the conditional VAE model
  
  :meta private:
class_docstr_tok: ["The","encoder","for","the","conditional","VAE","model",":","meta","private",":"]
docstr: :param x_dim: The input variable dimension
  :param c_dim: The conditioned variable dimension
  :param hidden_sizes: The hidden layer sizes
  :param latent_size: The latent size
  :param dropout_rate: The dropout rate
  :param activation: The activation function for the hidden layers
docstr_tok: [":","param","x_dim",":","The","input","variable","dimension",":","param","c_dim",":","The","conditioned","variable","dimension",":","param","hidden_sizes",":","The","hidden","layer","sizes",":","param","latent_size",":","The","latent","size",":","param","dropout_rate",":","The","dropout","rate",":","param","activation",":","The","activation","function","for","the","hidden","layers"]
code: def __init__(
      self,
      x_dim,
      c_dim,
      hidden_sizes,
      latent_size,
      dropout_rate,
      activation,
  ):
      """
      :param x_dim: The input variable dimension
      :param c_dim: The conditioned variable dimension
      :param hidden_sizes: The hidden layer sizes
      :param latent_size: The latent size
      :param dropout_rate: The dropout rate
      :param activation: The activation function for the hidden layers
      """
      super().__init__()
      assert len(hidden_sizes) > 0, "hidden sizes cannot be empty"
      self.mlp = build_hidden_layers(
          x_dim + c_dim, hidden_sizes, dropout_rate, activation
      )
      self.linear_means = nn.Linear(hidden_sizes[-1], latent_size)
      self.linear_vars = nn.Linear(hidden_sizes[-1], latent_size)
      self._init_log_var_weights()
  
imports: from typing import Sequence
  import numpy
  import pandas
  from merlion.models.base import NormalizingConfig
  from merlion.models.anomaly.base import DetectorBase, DetectorConfig
  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 1 to create a new Encoder object from inherited base classes: nn with example: obj = Encoder(x_dim, c_dim, hidden_sizes, latent_size, dropout_rate, activation)