class_docstr: Global store for parameters in Pyro. This is basically a key-value store.
  The typical user interacts with the ParamStore primarily through the
  primitive `pyro.param`.
  
  See `Introduction <http://pyro.ai/examples/intro_long.html>`_ for further discussion
  and `SVI Part I <http://pyro.ai/examples/svi_part_i.html>`_ for some examples.
  
  Some things to bear in mind when using parameters in Pyro:
  
  - parameters must be assigned unique names
  - the `init_tensor` argument to `pyro.param` is only used the first time that a given (named)
    parameter is registered with Pyro.
  - for this reason, a user may need to use the `clear()` method if working in a REPL in order to
    get the desired behavior. this method can also be invoked with `pyro.clear_param_store()`.
  - the internal name of a parameter within a PyTorch `nn.Module` that has been registered with
    Pyro is prepended with the Pyro name of the module. so nothing prevents the user from having
    two different modules each of which contains a parameter named `weight`. by contrast, a user
    can only have one top-level parameter named `weight` (outside of any module).
  - parameters can be saved and loaded from disk using `save` and `load`.
  - in general parameters are associated with both *constrained* and *unconstrained* values. for
    example, under the hood a parameter that is constrained to be positive is represented as an
    unconstrained tensor in log space.
class_docstr_tok: ["Global","store","for","parameters","in","Pyro",".","This","is","basically","a","key-value","store",".","The","typical","user","interacts","with","the","ParamStore","primarily","through","the","primitive","`","pyro.param","`",".","See","`","Introduction","<","http",":","\/\/pyro.ai\/examples\/intro_long.html",">","`","_","for","further","discussion","and","`","SVI","Part","I","<","http",":","\/\/pyro.ai\/examples\/svi_part_i.html",">","`","_","for","some","examples",".","Some","things","to","bear","in","mind","when","using","parameters","in","Pyro",":","-","parameters","must","be","assigned","unique","names","-","the","`","init_tensor","`","argument","to","`","pyro.param","`","is","only","used","the","first","time","that","a","given","(","named",")","parameter","is","registered","with","Pyro",".","-","for","this","reason",",","a","user","may","need","to","use","the","`","clear","(",")","`","method","if","working","in","a","REPL","in","order","to","get","the","desired","behavior",".","this","method","can","also","be","invoked","with","`","pyro.clear_param_store","(",")","`",".","-","the","internal","name","of","a","parameter","within","a","PyTorch","`","nn.Module","`","that","has","been","registered","with","Pyro","is","prepended","with","the","Pyro","name","of","the","module",".","so","nothing","prevents","the","user","from","having","two","different","modules","each","of","which","contains","a","parameter","named","`","weight","`",".","by","contrast",",","a","user","can","only","have","one","top-level","parameter","named","`","weight","`","(","outside","of","any","module",")",".","-","parameters","can","be","saved","and","loaded","from","disk","using","`","save","`","and","`","load","`",".","-","in","general","parameters","are","associated","with","both","*","constrained","*","and","*","unconstrained","*","values",".","for","example",",","under","the","hood","a","parameter","that","is","constrained","to","be","positive","is","represented","as","an","unconstrained","tensor","in","log","space","."]
docstr: Get the ParamStore state.
docstr_tok: ["Get","the","ParamStore","state","."]
code: def get_state(self) -> StateDict:
      """
      Get the ParamStore state.
      """
      params = self._params.copy()
      # Remove weakrefs in preparation for pickling.
      for param in params.values():
          param.__dict__.pop("unconstrained", None)
      state: StateDict = {
          "params": params,
          "constraints": self._constraints.copy(),
      }
      return state
  
imports: import re
  import warnings
  import weakref
  from contextlib import contextmanager
  from typing import Callable, Dict, ItemsView, Iterator, KeysView, Optional, Tuple, Union
  import torch
  from torch.distributions import constraints, transform_to
  from torch.serialization import MAP_LOCATION
  from typing_extensions import TypedDict
label_desc: Use image node_id 20 for calling the ParamStoreDict obj's underlying member method code with example usage: obj.get_state() and returns: state