class_docstr: Base class for :class:`~pyro.poutine.guide.GuideMessenger` autoguides.
  
  :param callable model: A Pyro model.
  :param tuple amortized_plates: A tuple of names of plates over which guide
      parameters should be shared. This is useful for subsampling, where a
      guide parameter can be shared across all plates.
class_docstr_tok: ["Base","class","for",":","class",":","`","~pyro.poutine.guide.GuideMessenger","`","autoguides",".",":","param","callable","model",":","A","Pyro","model",".",":","param","tuple","amortized_plates",":","A","tuple","of","names","of","plates","over","which","guide","parameters","should","be","shared",".","This","is","useful","for","subsampling",",","where","a","guide","parameter","can","be","shared","across","all","plates","."]
docstr: Adjusts plates for generating initial values of parameters.
docstr_tok: ["Adjusts","plates","for","generating","initial","values","of","parameters","."]
code: def _adjust_plates(
      self, value: torch.Tensor, event_dim: int
  ) -> torch.Tensor:
      """
      Adjusts plates for generating initial values of parameters.
      """
      for f in get_plates():
          full_size = f.full_size or f.size
          dim = f.dim - event_dim
          if f in self._outer_plates or f.name in self.amortized_plates:
              if -value.dim() <= dim:
                  value = value.mean(dim, keepdim=True)
          elif f.size != full_size:
              value = periodic_repeat(
                  value, full_size, dim
              ).contiguous()
      for dim in range(value.dim() - event_dim):
          value = value.squeeze(0)
      return value
  
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 AutoMessenger obj's underlying member method code with example usage: obj._adjust_plates(value, event_dim) and returns: value