class_docstr: Base class for samplers used to generate from the VAEs models.
  
  Args:
      model (BaseAE): The vae model to sample from.
      sampler_config (BaseSamplerConfig): An instance of BaseSamplerConfig in which any sampler's
          parameters is made available. If None a default configuration is used. Default: None
class_docstr_tok: ["Base","class","for","samplers","used","to","generate","from","the","VAEs","models",".","Args",":","model","(","BaseAE",")",":","The","vae","model","to","sample","from",".","sampler_config","(","BaseSamplerConfig",")",":","An","instance","of","BaseSamplerConfig","in","which","any","sampler's","parameters","is","made","available",".","If","None","a","default","configuration","is","used",".","Default",":","None"]
code: def __init__(
      self, model: BaseAE, sampler_config: BaseSamplerConfig = None
  ):
      if sampler_config is None:
          sampler_config = BaseSamplerConfig()
  
      self.model = model
      self.model.eval()
      self.sampler_config = sampler_config
      self.is_fitted = False
  
      device = "cuda" if torch.cuda.is_available() else "cpu"
  
      self.device = device
      self.model.device = device
  
      self.model.to(device)
  
file_path: benchmark_VAE/src/pythae/samplers/base/base_sampler.py
imports: import logging
  import os
  from typing import Any, Dict
  import numpy
  import torch
  from imageio import imwrite
  from ...models import BaseAE
  from .base_sampler_config import BaseSamplerConfig
label_desc: Use image node_id 1 to create a new BaseSampler object  with example: obj = BaseSampler(model, sampler_config)