class_docstr: :class:`AutoMessenger` with mean-field normal posterior conditional on all dependencies.
  
  The mean-field posterior at any site is a transformed normal distribution,
  the mean of which depends on the value of that site given its dependencies in the model::
  
      loc_total = loc + transform.inv(prior.mean) * weight
  
  Where the value of ``prior.mean`` is conditional on upstream sites in the model,
  ``loc`` is independent component of the mean in the untransformed space,
  ``weight`` is element-wise factor that scales the prior mean.
  This approach doesn't work for distributions that don't have the mean.
  
  Derived classes may override particular sites and use this simply as a
  default, see :class:`AutoNormalMessenger` documentation for example.
  
  :param callable model: A Pyro model.
  :param callable init_loc_fn: A per-site initialization function.
      See :ref:`autoguide-initialization` section for available functions.
  :param float init_scale: Initial scale for the standard deviation of each
      (unconstrained transformed) latent variable.
  :param float init_weight: Initial value for the weight of the contribution
      of hierarchical sites to posterior mean for each latent variable.
  :param list hierarchical_sites: List of latent variables (model sites)
      that have hierarchical dependencies.
      If None, all sites are assumed to have hierarchical dependencies. If None, for the sites
      that don't have upstream sites, the loc and weight of the guide
      are representing/learning deviation from the prior.
class_docstr_tok: [":","class",":","`","AutoMessenger","`","with","mean-field","normal","posterior","conditional","on","all","dependencies",".","The","mean-field","posterior","at","any","site","is","a","transformed","normal","distribution",",","the","mean","of","which","depends","on","the","value","of","that","site","given","its","dependencies","in","the","model",":",":","loc_total","=","loc","+","transform.inv","(","prior.mean",")","*","weight","Where","the","value","of","``","prior.mean","``","is","conditional","on","upstream","sites","in","the","model",",","``","loc","``","is","independent","component","of","the","mean","in","the","untransformed","space",",","``","weight","``","is","element-wise","factor","that","scales","the","prior","mean",".","This","approach","does","n't","work","for","distributions","that","do","n't","have","the","mean",".","Derived","classes","may","override","particular","sites","and","use","this","simply","as","a","default",",","see",":","class",":","`","AutoNormalMessenger","`","documentation","for","example",".",":","param","callable","model",":","A","Pyro","model",".",":","param","callable","init_loc_fn",":","A","per-site","initialization","function",".","See",":","ref",":","`","autoguide-initialization","`","section","for","available","functions",".",":","param","float","init_scale",":","Initial","scale","for","the","standard","deviation","of","each","(","unconstrained","transformed",")","latent","variable",".",":","param","float","init_weight",":","Initial","value","for","the","weight","of","the","contribution","of","hierarchical","sites","to","posterior","mean","for","each","latent","variable",".",":","param","list","hierarchical_sites",":","List","of","latent","variables","(","model","sites",")","that","have","hierarchical","dependencies",".","If","None",",","all","sites","are","assumed","to","have","hierarchical","dependencies",".","If","None",",","for","the","sites","that","do","n't","have","upstream","sites",",","the","loc","and","weight","of","the","guide","are","representing\/learning","deviation","from","the","prior","."]
code: def median(self, *args, **kwargs):
      self._computing_median = True
      try:
          return self(*args, **kwargs)
      finally:
          self._computing_median = False
  
imports: from typing import Callable, Optional, Tuple, Union
  import torch
  from torch.distributions import biject_to, constraints
  import pyro.distributions
  from pyro.distributions.distribution import Distribution
  from pyro.nn.module import PyroModule, PyroParam, pyro_method
  from pyro.ops.tensor_utils import periodic_repeat
  from pyro.poutine.guide import GuideMessenger
  from pyro.poutine.runtime import get_plates
  from .initialization import init_to_feasible, init_to_mean
  from .utils import deep_getattr, deep_setattr, helpful_support_errors
label_desc: Use image node_id 4 for calling the AutoHierarchicalNormalMessenger obj's underlying member method code with example usage: obj.median() and returns: self