class_docstr: A RBF kernel for use in the SVGD inference algorithm. The bandwidth of the kernel is chosen from the
  particles using a simple heuristic as in reference [1].
  
  :param float bandwidth_factor: Optional factor by which to scale the bandwidth, defaults to 1.0.
  :ivar float ~.bandwidth_factor: Property that controls the factor by which to scale the bandwidth
      at each iteration.
  
  References
  
  [1] "Stein Variational Gradient Descent: A General Purpose Bayesian Inference Algorithm,"
      Qiang Liu, Dilin Wang
code: def log_kernel_and_grad(self, particles):
      delta_x = particles.unsqueeze(0) - particles.unsqueeze(1)  # N N D
      assert delta_x.dim() == 3
      norm_sq = delta_x.pow(2.0)  # N N D
      h = self._bandwidth(norm_sq)  # D
      log_kernel = -(norm_sq / h)  # N N D
      grad_term = 2.0 * delta_x / h  # N N D
      assert log_kernel.shape == grad_term.shape
      return log_kernel, grad_term
  
imports: import math
  from abc import ABCMeta, abstractmethod
  import torch
  from torch.distributions import biject_to
  import pyro
  from pyro import poutine
  from pyro.distributions import Delta
  from pyro.distributions.util import copy_docs_from
  from pyro.infer.autoguide.guides import AutoContinuous
  from pyro.infer.autoguide.initialization import init_to_sample
  from pyro.infer.trace_elbo import Trace_ELBO
label_desc: Use image node_id 3 for calling the RBFSteinKernel obj's underlying member method code with example usage: obj.log_kernel_and_grad(particles) and returns: log_kernel,  grad_term