class_docstr: Smooth distribution with Laplace-like tail behavior.
  
  This distribution corresponds to the log-convex density::
  
      z = (value - loc) / scale
      log_prob = log(2 / pi) - log(scale) - logaddexp(z, -z)
  
  Like the Laplace density, this density has the heaviest possible tails
  (asymptotically) while still being log-convex. Unlike the Laplace
  distribution, this distribution is infinitely differentiable everywhere,
  and is thus suitable for constructing Laplace approximations.
  
  :param loc: Location parameter.
  :param scale: Scale parameter.
class_docstr_tok: ["Smooth","distribution","with","Laplace-like","tail","behavior",".","This","distribution","corresponds","to","the","log-convex","density",":",":","z","=","(","value","-","loc",")","\/","scale","log_prob","=","log","(","2","\/","pi",")","-","log","(","scale",")","-","logaddexp","(","z",",","-z",")","Like","the","Laplace","density",",","this","density","has","the","heaviest","possible","tails","(","asymptotically",")","while","still","being","log-convex",".","Unlike","the","Laplace","distribution",",","this","distribution","is","infinitely","differentiable","everywhere",",","and","is","thus","suitable","for","constructing","Laplace","approximations",".",":","param","loc",":","Location","parameter",".",":","param","scale",":","Scale","parameter","."]
code: def __init__(self, loc, scale, *, validate_args=None):
      self.loc, self.scale = broadcast_all(loc, scale)
      super().__init__(self.loc.shape, validate_args=validate_args)
  
file_path: pyro/pyro/distributions/softlaplace.py
imports: import math
  import torch
  from torch.distributions import constraints
  from torch.distributions.utils import broadcast_all
  from .torch_distribution import TorchDistribution
label_desc: Use image node_id 1 to create a new SoftLaplace object from inherited base classes: TorchDistribution with example: obj = SoftLaplace(loc, scale)