ó ùµÈ[c@s%dZdddddgZddlmZddlZddlZd d lmZm Z d d l m Z m Z m Z mZd d lmZmZd d l mZddlmZmZe je jfZde fd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(sNeural network parameter.tDeferredInitializationErrort ParametertConstantt ParameterDictt tensor_typesiÿÿÿÿ(t OrderedDictNi(t mx_real_tt MXNetError(tsymboltndarrayt initializertcontext(tContexttcpu(tautogradi(t_indentt_brief_print_listcBseZdZRS(s-Error for unfinished deferred initialization.(t__name__t __module__t__doc__(((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR'sc BsUeZdZddedddeeddd„ Zd„Ze d„ƒZ e j d„ƒZ e d„ƒZ e j d „ƒZ d „Z d „Zd „Zd „Zd„Zd„Zd„Zd„Zddejƒed„Zd„Zd„Zd„Zd„Zdd„Zd„Zdd„Zd„Zd„Z d„Z!d„Z"d„Z#RS( se A Container holding parameters (weights) of Blocks. :py:class:`Parameter` holds a copy of the parameter on each :py:class:`Context` 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:`Context`:: ctx = mx.gpu(0) x = mx.nd.zeros((16, 100), ctx=ctx) 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(ctx=ctx) b.initialize(ctx=ctx) out = mx.nd.FullyConnected(x, w.data(ctx), b.data(ctx), num_hidden=64) Parameters ---------- name : str Name of this parameter. 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. twritegð?tdefaultc Csd|_d|_d|_d|_d|_d|_d|_| |_||_ d|_ t |t ƒru|f}n||_ ||_||_||_||_||_||_dddg} | | ksåtd|| fƒ‚| | kstd|| fƒ‚| |_| |_dS(NRt row_sparsetcsrs\grad_stype for Parameter '%s' must be one of 'default', 'row_sparse', or 'csr', but got '%s'sWstype for Parameter '%s' must be one of 'default', 'row_sparse', or 'csr', but got '%s'((tNonet_vart_datat_gradt _ctx_listt_ctx_mapt_trainert_deferred_initt_differentiablet_allow_deferred_initt _grad_reqt isinstancetintt_shapetnametdtypetlr_multtwd_multtgrad_reqtinittAssertionErrort _grad_stypet_stype( tselfR&R*tshapeR'R(R)R+tallow_deferred_inittdifferentiabletstypet grad_stypet valid_stypes((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt__init__fs4                   cCs+d}|jd|jd|jd|jƒS(Ns/Parameter {name} (shape={shape}, dtype={dtype})R&R0R'(tformatR&R0R'(R/ts((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt__repr__†scCs|jS(N(R"(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR*ŠscCs¶|dkstd|ƒ‚|js.d}n|j|krAdS||_|dkr–|jdk r–d|_g|jD]}|jƒ^qx|_n|jdk r²|jƒndS(NRtaddtnulls?grad_req must be one of 'write', 'add', or 'null', but got '%s'(swritesaddsnull(R,R R"RRRtdetacht _init_grad(R/treqti((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR*Žs     (cCs|jS(N(R%(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR0scCs‹|jdkr||_dSt|jƒt|ƒkrYtd„t||jƒDƒƒs~tdt|ƒt|jƒfƒ‚||_dS(Ncss'|]\}}|d|fkVqdS(iN((t.0R?tj((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pys ¨ss6Expected shape %s is incompatible with given shape %s.(R%RtlentalltzipR,tstr(R/t new_shape((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR0¡s %cCsY|jdkrL|jrL|rL|j|k rLtd|j|jfƒ‚n||_dS(s4 Set the trainer this parameter is associated with. Rs„Failed to set the trainer for Parameter '%s' because it was already set. More than one trainers for a %s Parameter is not supported.N(R.Rt RuntimeErrorR&(R/ttrainer((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt _set_trainer®s -cCs|dk rÌ|tkr|S|dkrQt|ƒdkrB|dStjƒ}n|j|jd@}|jt|ƒkrž||j}|dk rž||Sntd|j t |ƒt |j ƒfƒ‚n|j rët d|j ƒ‚ntd|j ƒ‚dS(NiisPParameter '%s' was not initialized on context %s. It was only initialized on %s.sGParameter '%s' has not been initialized yet because initialization was deferred. Actual initialization happens during the first forward pass. Please pass one batch of data through the network before accessing Parameters. You can also avoid deferred initialization by specifying in_units, num_features, etc., for network layers.sßParameter '%s' has not been initialized. Note that you should initialize parameters and create Trainer with Block.collect_params() instead of Block.params because the later does not include Parameters of nested child Blocks(RtlistRBR tcurrent_contextRt device_typeidt device_idRGR&RERRR(R/tarr_listtctxtctx_listtidx((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt_check_and_get¸s,      ( cCsvt|tjƒs+tdt|ƒƒ‚n|jsJtd|jƒ‚n|j||ƒ}|jj |||ƒ|S(sA Get row_sparse data from row_sparse parameters based on row_id. s.row_id must have NDArray type, but %s is givensQCannot get row_sparse data for Parameter '%s' when no Trainer is created with it.( R#R tNDArrayt TypeErrorttypeRRGR&RRt_row_sparse_pull(R/RNROtrow_idtresults((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt_get_row_sparseØs cCsU|jršxct|j|jƒD]L\}}|d|fkstd|jt|jƒt|jƒfƒ‚qWtd„t|j|jƒDƒƒ|_n|jròtj|jƒj|jksòtd|jt|jƒt|jƒfƒ‚n|j |j kr|j |j ƒ}nt |t ƒr4|g}n|jdkrã|jrµ|dks¥t|ƒt|jdƒks¥td|jt|ƒt|jƒƒfƒ‚|jd}n|dkrÐtƒg}n|j||ƒne|dks;t|ƒt|jƒƒks;td|jt|ƒt|jƒƒfƒ‚|j|ƒd|_dS( s%(Re)initializes by loading from data.is[Failed loading Parameter '%s' from saved params: shape incompatible expected %s vs saved %scss-|]#\}}|dkr!|n|VqdS(iN((R@R?RA((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pys îss[Failed loading Parameter '%s' from saved params: dtype incompatible expected %s vs saved %sisNFailed to load Parameter '%s' on %s because it was previous initialized on %s.N((R0RDR,R&REttupleR'tnpRUR.R3ttostypeR#R RRRtsettlist_ctxR t _init_impltset_data(R/tdataROtself_dimtdata_dim((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt _load_initæs8 ",+ !+  .( -( c Cs |js dS|j\}}}}d |_|jdk rRtj|jƒdksttd|jt|jƒfƒ‚tj ƒƒ|dkrït j d|jd|j dt jƒd|jƒ}tj|ƒtj|ji|d6ƒ|ƒn|j||ƒWdQXdS( s!Finishes deferred initialization.NiszCannot initialize Parameter '%s' because it has invalid shape: %s. Please specify in_units, in_channels, etc for `Block`s.R0R'ROR3R6((RR0RR[tprodR,R&RERtpauseR tzerosR'R R R.R tcreatetInitDescR_(R/R+ROt default_initRa((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt_finish_deferred_init s  *   #cCs¾t|ƒ|_ggg|_xgt|jƒD]V\}}|j|jd@}x&t|ƒ|jkrv|jdƒqQW|||j=siR'tint64ROR3Rtfull_idx( R R R.t list_dataR tadd_nRBtarangeR0RgRRVtTrue(R/tblockRat all_row_ids((ROsU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt_reduce8s  ,%cCs6|jdk r4| r4tjd|jddƒdSd|_|_|dkrbtjƒg}nt|t ƒr}|g}n|dkrª|j dkrž|n|j }n|j sÌt j |j ƒdkr|jrî|||df|_dStd|jt|j ƒfƒ‚n|||df|_|jƒdS(sŒInitializes parameter and gradient arrays. Only used for :py:class:`NDArray` API. Parameters ---------- init : Initializer The initializer to use. Overrides :py:meth:`Parameter.init` and default_init. ctx : Context or list of Context, defaults to :py:meth:`context.current_context()`. Initialize Parameter on given context. If ctx is a list of Context, a copy will be made for each context. .. note:: Copies are independent arrays. User is responsible for keeping their values consistent when updating. Normally :py:class:`gluon.Trainer` does this for you. default_init : Initializer Default initializer is used when both :py:func:`init` and :py:meth:`Parameter.init` are ``None``. force_reinit : bool, default False Whether to force re-initialization if parameter is already initialized. Examples -------- >>> weight = mx.gluon.Parameter('weight', shape=(2, 2)) >>> weight.initialize(ctx=mx.cpu(0)) >>> weight.data() [[-0.01068833 0.01729892] [ 0.02042518 -0.01618656]] >>> weight.grad() [[ 0. 0.] [ 0. 0.]] >>> weight.initialize(ctx=[mx.gpu(0), mx.gpu(1)]) >>> weight.data(mx.gpu(0)) [[-0.00873779 -0.02834515] [ 0.05484822 -0.06206018]] >>> weight.data(mx.gpu(1)) [[-0.00873779 -0.02834515] [ 0.05484822 -0.06206018]] sXParameter '%s' is already initialized, ignoring. Set force_reinit=True to re-initialize.t stackleveliNisBCannot initialize Parameter '%s' because it has invalid shape: %s.(RRtwarningstwarnR&RR RKR#R R+R0R[ReR!Rt ValueErrorRERk(R/R+RORjt force_reinit((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt initializeEs(-     !" cCsÁ|dkrtjƒg}nt|tƒr9|g}n|jrt|jƒ}tjƒ|j ||ƒWdQXnI|j rª|j \}}}}||||f|_ nt d|j ƒ‚dS(s%Re-assign Parameter to other contexts. Parameters ---------- ctx : Context or list of Context, default ``context.current_context()``. Assign Parameter to given context. If ctx is a list of Context, a copy will be made for each context. NsLCannot reset context for Parameter '%s' because it has not been initialized.( RR RKR#R RRzRRfR_RR~R&(R/RORaR+t_Rj((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt reset_ctx‰s      cCsÃ|j|_|jdkrR|js7td|jƒ‚|jd |f|_dS|jr˜|jjr˜|jjr˜||jj kr˜|jj ƒq˜nx$|j |jt ƒD] }||(q®WdS(s,Sets this parameter's value on all contexts.s'Parameter '%s' has not been initializediN( R0RRRR,R&Rt_kv_initializedt_update_on_kvstoret_params_to_initt_reset_kvstoreRRRJ(R/Ratarr((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR`¢s  !cCsG|jdkr.td|j|jfƒ‚n|j|j|j|ƒS(s©Returns a copy of the 'row_sparse' parameter on the same context as row_id's. The copy only retains rows whose ids occur in provided row ids. The parameter must have been initialized on this context before. Parameters ---------- row_id: NDArray Row ids to retain for the 'row_sparse' parameter. Returns ------- NDArray on row_id's context RsuCannot return a copy of Parameter %s via row_sparse_data() because its storage type is %s. Please use data() instead.(R.RGR&RYRR (R/RW((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pytrow_sparse_data´scCsD|jdkr.td|j|jfƒ‚n|j|jt|ƒS(sReturns copies of the 'row_sparse' parameter on all contexts, in the same order as creation. The copy only retains rows whose ids occur in provided row ids. The parameter must have been initialized before. Parameters ---------- row_id: NDArray Row ids to retain for the 'row_sparse' parameter. Returns ------- list of NDArrays RsŒCannot return copies of Parameter '%s' on all contexts via list_row_sparse_data() because its storage type is %s. Please use data() instead.(R.RGR&RYRRJ(R/RW((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pytlist_row_sparse_dataÈscCsJ|jdkr7td|jt|ƒ|jfƒ‚n|j|j|ƒS(sWReturns a copy of this parameter on one context. Must have been initialized on this context before. For sparse parameters, use :py:meth:`Parameter.row_sparse_data` instead. Parameters ---------- ctx : Context Desired context. Returns ------- NDArray on ctx RsCannot return a copy of Parameter '%s' on ctx %s via data() because its storage type is %s. Please use row_sparse_data() instead.(R.RGR&RERRR(R/RO((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyRaÜs"cCsA|jdkr.td|j|jfƒ‚n|j|jtƒS(sñReturns copies of this parameter on all contexts, in the same order as creation. For sparse parameters, use :py:meth:`Parameter.list_row_sparse_data` instead. Returns ------- list of NDArrays RsŒCannot return copies of Parameter '%s' on all contexts via list_data() because its storage type is %s. Please use row_sparse_data() instead.(R.RGR&RRRRJ(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyRtðs cCsG|jdk r4|jdkr4td|jƒ‚n|j|j|ƒS(sŸReturns a gradient buffer for this parameter on one context. Parameters ---------- ctx : Context Desired context. sDCannot get gradient array for Parameter '%s' because grad_req='null'N(RRRRGR&RR(R/RO((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pytgradÿs cCsG|jdk r4|jdkr4td|jƒ‚n|j|jtƒS(sYReturns gradient buffers on all contexts, in the same order as :py:meth:`values`.sDCannot get gradient array for Parameter '%s' because grad_req='null'N(RRRRGR&RRRJ(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt list_grad s cCs@|jdkr9|jr#|jdStd|jƒ‚n|jS(s<Returns a list of contexts this parameter is initialized on.is'Parameter '%s' has not been initializedN(RRRRGR&R(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR^s   cCs>|jdkrdSx$|jD]}tj|d|ƒqWdS(s€Sets gradient buffer on all contexts to 0. No action is taken if parameter is uninitialized or doesn't require gradient.Ntout(RRR t zeros_like(R/R?((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt zero_gradscCsd|jdkr]tj|jd|jd|jd|jd|jd|j d|j ƒ|_n|jS(s-Returns a symbol representing this parameter.R0R'R(R)R+R3N( RRRtvarR&R0R'R(R)R+R.(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR&s !cCs²||_|jdkrdStjƒ„g|jD]}|j|ƒ^q3|_|jdkrddSg|jD]}|j|ƒ^qn|_tj|j|j|jƒWdQXdS(s®Cast data and gradient of this Parameter to a new data type. Parameters ---------- dtype : str or numpy.dtype The new data type. N( R'RRRRftastypeRRpR*(R/R'R?((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pytcast.s  ((N($RRRRRtFalseRwR6R9tpropertyR*tsetterR0RIRRRYRdRkR_R=RzR tUniformR€R‚R`RˆR‰RaRtRŠR‹R^RŽRR‘(((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR+s>:     $   C          cBsAeZdZd„Zd„Zed„ƒZejd„ƒZRS(sÇA constant parameter for holding immutable tensors. `Constant`s are ignored by `autograd` and `Trainer`, thus their values will not change during training. But you can still update their values manually with the `set_data` method. `Constant`s can be created with either:: const = mx.gluon.Constant('const', [[1,2],[3,4]]) or:: class Block(gluon.Block): def __init__(self, **kwargs): super(Block, self).__init__(**kwargs) self.const = self.params.get_constant('const', [[1,2],[3,4]]) Parameters ---------- name : str Name of the parameter. value : array-like Initial value for the constant. c s¯tˆtjƒs$tjˆƒ‰nˆ|_dtjf‡fd†ƒY}dj|t|ƒƒ}tj |ƒ|ƒt t |ƒj |dddˆj dˆjd|ƒdS( NtInitcseZ‡fd†ZRS(csˆj|ƒdS(N(Rn(R/RR‡(tvalue(sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt _init_weight_s(RRR˜((R—(sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR–^ssConstant_{}_{}R*R;R0R'R+(R#R RStarrayR—R t InitializerR7tidtaliastsuperRR6R0R'(R/R&R—R–t init_name((R—sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR6Ys cCs+d}|jd|jd|jd|jƒS(Ns.Constant {name} (shape={shape}, dtype={dtype})R&R0R'(R7R&R0R'(R/R8((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR9hscCsdS(NR;((R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR*lscCs/|dkr+tjdj|j|ƒƒndS(NR;scConstant parameter "{}" does not support grad_req other than "null", and new value "{}" is ignored.(R|R}R7R&(R/R>((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR*ps  (RRRR6R9R“R*R”(((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyRAs   cBsàeZdZddd„Zd„Zd„Zd„Zd„Zd„Z d„Z e d „ƒZ d „Z d „Zdd „Zd „Zejƒdeed„Zd„Zd„Zd„Zdd„Zdeedd„ZRS(s·A dictionary managing a set of parameters. Parameters ---------- prefix : str, default ``''`` The prefix to be prepended to all Parameters' names created by this dict. shared : ParameterDict or None If not ``None``, when this dict's :py:meth:`get` method creates a new parameter, will first try to retrieve it from "shared" dict. Usually used for sharing parameters with another Block. tcCs"||_tƒ|_||_dS(N(t_prefixRt_paramst_shared(R/tprefixtshared((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR6„s  c Csld}|jr|jdnd}|jd|ddjg|jƒD]}tdj|ƒdƒ^qDƒƒS( Ns{name}( {content} )t RŸR&tcontents s {0}i(R R7tjointvaluesR(R/R8R&tv((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR9‰s  cCs |j|S(N(R¡(R/tkey((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt __getitem__scCs t|jƒS(N(titerR¡(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt__iter__“scCs |jjƒS(N(R¡titems(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR®–scCs |jjƒS(N(R¡tkeys(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR¯™scCs |jjƒS(N(R¡R¨(R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR¨œscCs|jS(snPrefix of this dict. It will be prepended to :py:class:`Parameter`s' name created with :py:func:`get`.(R (R/((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyR£ŸscCsd||jkr|j|S|jdk r`||jjkr`|jj||j|<|jj|SdS(N(R¡R¢R(R/R&((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyt _get_impl¥s  !c Ks|j|}|j|ƒ}|dkrGt||}||j|‰s sˆParameter '%s' is missing in file '%s', which contains parameters: %s. Please make sure source and target networks have the same prefix.s¼Parameter '%s' loaded from file '%s' is not present in ParameterDict, choices are: %s. Set ignore_extra to True to ignore. Please make sure source and target networks have the same prefix.N( R¯RÄR,RBR tloadR®RR¡Rd( R/RÆROt allow_missingt ignore_extraRÊR&tlprefixR¶R©tloadedRÈ((RÊsU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyRËos* Y*  &N(RRRRR6R9R«R­R®R¯R¨R“R£R°R¼R¿RÁR R•R’R€RŽR‚R³RÅRË(((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyRxs*         9 (     (Rt__all__t collectionsRR|tnumpyR[tbaseRRRŸRR R R R R RtutilsRRtSymbolRSRRtobjectRRR(((sU/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/gluon/parameter.pyts"    "ÿÿ7