def __init__(self, target, step_size, gamma=1.0, sigma=1.0): self.device = target.device self.momentum = distributions.Normal( torch.zeros(target.dim, device=self.device), sigma, self.device) self.target = target self.eps = step_size self.gamma = gamma
def __init__(self, target, step_size, beta=0.95, sigma=1.0, alpha=1.0): self.device = target.device self.momentum = distributions.Normal( torch.zeros(target.dim, device=self.device), sigma, self.device) self.target = target self.max_eps = step_size self.pos_beta = beta self.alpha = alpha
def __init__(self, target, trajectory_length=None, step_size=None, alpha=1.0, jitter=True): self.device = target.device self.momentum = distributions.Normal( torch.zeros(target.dim, device=self.device), 1.0, self.device) self.target = target self.eps = step_size self.T_max = trajectory_length self.alpha = alpha self.jitter = jitter
def __init__(self, target, trajectory_length, step_size, gamma=0.0, sigma=1.0, alpha=1.0, jitter=False): self.device = target.device self.momentum = distributions.Normal( torch.zeros(target.dim, device=self.device), sigma, self.device) self.target = target self.eps = step_size self.gamma = gamma self.T_max = trajectory_length self.alpha = alpha self.jitter = jitter