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: Loads parameters from file
  
  .. note::
  
     If using :meth:`pyro.module` on parameters loaded from
     disk, be sure to set the ``update_module_params`` flag::
  
         pyro.get_param_store().load('saved_params.save')
         pyro.module('module', nn, update_module_params=True)
  
  :param filename: file name to load from
  :type filename: str
  :param map_location: specifies how to remap storage locations
  :type map_location: function, torch.device, string or a dict
docstr_tok: ["Loads","parameters","from","file","..","note",":",":","If","using",":","meth",":","`","pyro.module","`","on","parameters","loaded","from","disk",",","be","sure","to","set","the","``","update_module_params","``","flag",":",":","pyro.get_param_store","(",")",".load","(","'saved_params.save","'",")","pyro.module","(","'module","'",",","nn",",","update_module_params=True",")",":","param","filename",":","file","name","to","load","from",":","type","filename",":","str",":","param","map_location",":","specifies","how","to","remap","storage","locations",":","type","map_location",":","function",",","torch.device",",","string","or","a","dict"]
code: def load(
      self, filename: str, map_location: MAP_LOCATION = None
  ) -> None:
      """
      Loads parameters from file
  
      .. note::
  
         If using :meth:`pyro.module` on parameters loaded from
         disk, be sure to set the ``update_module_params`` flag::
  
             pyro.get_param_store().load('saved_params.save')
             pyro.module('module', nn, update_module_params=True)
  
      :param filename: file name to load from
      :type filename: str
      :param map_location: specifies how to remap storage locations
      :type map_location: function, torch.device, string or a dict
      """
      with open(filename, "rb") as input_file:
          state = torch.load(input_file, map_location)
      self.set_state(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 23 for calling the ParamStoreDict obj's underlying member method code with example usage: obj.load(filename, map_location) without return types