class_docstr: A Container holding parameters (weights) of Blocks.
  
  :py:class:`Parameter` holds a copy of the parameter on each :py:class:`Device` after
  it is initialized with ``Parameter.initialize(...)``. If :py:attr:`grad_req` is
  not ``'null'``, it will also hold a gradient array on each :py:class:`Device`::
  
      device = mx.gpu(0)
      x = mx.np.zeros((16, 100), device=device)
      w = mx.gluon.Parameter('fc_weight', shape=(64, 100), init=mx.init.Xavier())
      b = mx.gluon.Parameter('fc_bias', shape=(64,), init=mx.init.Zero())
      w.initialize(device=device)
      b.initialize(device=device)
      out = mx.npx.fully_connected(x, w.data(device), b.data(device), num_hidden=64)
  
  Parameters
  ----------
  name : str, default 'weight'
      Name of this parameter. It decides the corresponding default initializer.
  grad_req : {'write', 'add', 'null'}, default 'write'
      Specifies how to update gradient to grad arrays.
  
      - ``'write'`` means everytime gradient is written to grad :py:class:`NDArray`.
      - ``'add'`` means everytime gradient is added to the grad :py:class:`NDArray`. You need
        to manually call ``zero_grad()`` to clear the gradient buffer before each
        iteration when using this option.
      - 'null' means gradient is not requested for this parameter. gradient arrays
        will not be allocated.
  shape : int or tuple of int, default None
      Shape of this parameter. By default shape is not specified. Parameter with
      unknown shape can be used for :py:class:`Symbol` API, but ``init`` will throw an error
      when using :py:class:`NDArray` API.
  dtype : numpy.dtype or str, default 'float32'
      Data type of this parameter. For example, ``numpy.float32`` or ``'float32'``.
  lr_mult : float, default 1.0
      Learning rate multiplier. Learning rate will be multiplied by lr_mult
      when updating this parameter with optimizer.
  wd_mult : float, default 1.0
      Weight decay multiplier (L2 regularizer coefficient). Works similar to lr_mult.
  init : Initializer, default None
      Initializer of this parameter. Will use the global initializer by default.
  stype: {'default', 'row_sparse', 'csr'}, defaults to 'default'.
      The storage type of the parameter.
  grad_stype: {'default', 'row_sparse', 'csr'}, defaults to 'default'.
      The storage type of the parameter's gradient.
  
  Attributes
  ----------
  grad_req : {'write', 'add', 'null'}
      This can be set before or after initialization. Setting ``grad_req`` to ``'null'``
      with ``x.grad_req = 'null'`` saves memory and computation when you don't
      need gradient w.r.t x.
  lr_mult : float
      Local learning rate multiplier for this Parameter. The actual learning rate
      is calculated with ``learning_rate * lr_mult``. You can set it with
      ``param.lr_mult = 2.0``
  wd_mult : float
      Local weight decay multiplier for this Parameter.
class_docstr_tok: ["A","Container","holding","parameters","(","weights",")","of","Blocks",".",":","py",":","class",":","`","Parameter","`","holds","a","copy","of","the","parameter","on","each",":","py",":","class",":","`","Device","`","after","it","is","initialized","with","``","Parameter.initialize","(","...",")","``",".","If",":","py",":","attr",":","`","grad_req","`","is","not","``","'null","'","``",",","it","will","also","hold","a","gradient","array","on","each",":","py",":","class",":","`","Device","`",":",":","device","=","mx.gpu","(","0",")","x","=","mx.np.zeros","(","(","16",",","100",")",",","device=device",")","w","=","mx.gluon.Parameter","(","'fc_weight","'",",","shape=","(","64",",","100",")",",","init=mx.init.Xavier","(",")",")","b","=","mx.gluon.Parameter","(","'fc_bias","'",",","shape=","(","64",",",")",",","init=mx.init.Zero","(",")",")","w.initialize","(","device=device",")","b.initialize","(","device=device",")","out","=","mx.npx.fully_connected","(","x",",","w.data","(","device",")",",","b.data","(","device",")",",","num_hidden=64",")","Parameters","--","--","--","--","--","name",":","str",",","default","'weight'","Name","of","this","parameter",".","It","decides","the","corresponding","default","initializer",".","grad_req",":","{","'write","'",",","'add","'",",","'null","'","}",",","default","'write'","Specifies","how","to","update","gradient","to","grad","arrays",".","-","``","'write","'","``","means","everytime","gradient","is","written","to","grad",":","py",":","class",":","`","NDArray","`",".","-","``","'add","'","``","means","everytime","gradient","is","added","to","the","grad",":","py",":","class",":","`","NDArray","`",".","You","need","to","manually","call","``","zero_grad","(",")","``","to","clear","the","gradient","buffer","before","each","iteration","when","using","this","option",".","-","'null","'","means","gradient","is","not","requested","for","this","parameter",".","gradient","arrays","will","not","be","allocated",".","shape",":","int","or","tuple","of","int",",","default","None","Shape","of","this","parameter",".","By","default","shape","is","not","specified",".","Parameter","with","unknown","shape","can","be","used","for",":","py",":","class",":","`","Symbol","`","API",",","but","``","init","``","will","throw","an","error","when","using",":","py",":","class",":","`","NDArray","`","API",".","dtype",":","numpy.dtype","or","str",",","default","'float32'","Data","type","of","this","parameter",".","For","example",",","``","numpy.float32","``","or","``","'float32","'","``",".","lr_mult",":","float",",","default","1.0","Learning","rate","multiplier",".","Learning","rate","will","be","multiplied","by","lr_mult","when","updating","this","parameter","with","optimizer",".","wd_mult",":","float",",","default","1.0","Weight","decay","multiplier","(","L2","regularizer","coefficient",")",".","Works","similar","to","lr_mult",".","init",":","Initializer",",","default","None","Initializer","of","this","parameter",".","Will","use","the","global","initializer","by","default",".","stype",":","{","'default","'",",","'row_sparse","'",",","'csr","'","}",",","defaults","to","'default","'",".","The","storage","type","of","the","parameter",".","grad_stype",":","{","'default","'",",","'row_sparse","'",",","'csr","'","}",",","defaults","to","'default","'",".","The","storage","type","of","the","parameter","'s","gradient",".","Attributes","--","--","--","--","--","grad_req",":","{","'write","'",",","'add","'",",","'null","'","}","This","can","be","set","before","or","after","initialization",".","Setting","``","grad_req","``","to","``","'null","'","``","with","``","x.grad_req","=","'null","'","``","saves","memory","and","computation","when","you","don't","need","gradient","w.r.t","x.","lr_mult",":","float","Local","learning","rate","multiplier","for","this","Parameter",".","The","actual","learning","rate","is","calculated","with","``","learning_rate","*","lr_mult","``",".","You","can","set","it","with","``","param.lr_mult","=","2.0","``","wd_mult",":","float","Local","weight","decay","multiplier","for","this","Parameter","."]
docstr: Cast data and gradient of this Parameter to a new data type.
  
  Parameters
  ----------
  dtype : str or numpy.dtype
      The new data type.
code: def cast(self, dtype):
      """Cast data and gradient of this Parameter to a new data type.
  
      Parameters
      ----------
      dtype : str or numpy.dtype
          The new data type.
      """
      self._dtype = dtype
      self._var = None  # Clear Symbol Variable as it caches the dtype
      if self._data is None:
          return
      with autograd.pause():
          self._data = [i.astype(dtype) for i in self._data]
          if self._grad is None:
              return
          self._grad = [i.astype(dtype) for i in self._grad]
          autograd.mark_variables(self._data, self._grad, self.grad_req)
  
imports: import uuid
  import warnings
  import weakref
  import numpy
  from ..base import mx_real_t, MXNetError
  from ..None import symbol, ndarray, initializer, device, _deferred_compute
  from ..device import Device, cpu
  from ..None import autograd
  from .utils import shape_is_known
  from ..util import is_np_shape, is_np_array, wrap_ctx_to_device_func
  from ..None import numpy
label_desc: Use image node_id 32 for calling the Parameter obj's underlying member method code with example usage: obj.cast(dtype) without return types