code: def __init__(
      self,
      denoiser,
      num_sample_steps=50,
      num_train_timesteps=1000,
      r=3,
  ):
      self.r = r
      self.denoiser = denoiser
  
      self.num_train_timesteps, self.num_sample_steps = (
          num_train_timesteps,
          num_sample_steps,
      )
  
      self.stride = num_train_timesteps // num_sample_steps
      self.timesteps = reversed(
          torch.arange(1, num_sample_steps - 1)
      )  # see algo 1, timestep ends at 1 not zero
  
      self.t = np.linspace(1e-3, 1, self.num_sample_steps + r)
      self.c = (
          self.calc_c()
      )  # calculate \mathbf{C} based on Eq. 15, also see table 1
      self.eps_buffer = dict()
  
file_path: diffusion-for-beginners/samplers/exponential_integrator.py
imports: import torch
  import numpy
label_desc: Use image node_id 1 to create a new ExponentialSampler object  with example: obj = ExponentialSampler(denoiser, num_sample_steps, num_train_timesteps, r)