ó ùµÈ[c@@s’dZddlmZddlZddlZddlmZddlmZm Z m Z m Z de e e ƒfd„ƒYZ e ƒe j_dS( s+Attribute scoping support for symbolic API.i(tabsolute_importN(t defaultdicti(t string_typest classpropertytwith_metaclasst_MXClassPropertyMetaClasst AttrScopecB@skeZdZejƒZeeƒZd„Z d„Z d„Z d„Z e d„ƒZejd„ƒZRS(sÔAttribute manager for scoping. User can also inherit this object to change naming behavior. Parameters ---------- kwargs The attributes to set for all symbol creations in the scope. cK@sKd|_x2|jƒD]$}t|tƒstdƒ‚qqW||_dS(NsAttributes need to be string(tNonet _old_scopetvaluest isinstanceRt ValueErrort_attr(tselftkwargstvalue((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyt__init__(s  cC@sD|jr2|jjƒ}|r.|j|ƒn|S|r<|SiSdS(sq Get the attribute dict given the attribute set by the symbol. Parameters ---------- attr : dict of string to string The attribute passed in by user during symbol creation. Returns ------- attr : dict of string to string Updated attributes to add other scope related attributes. N(R tcopytupdate(R tattrtret((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pytget/s  cC@sqttjdƒs$tƒtj_ntjj|_tjjjjƒ}|j|jƒ||_|tj_|S(NR(thasattrRt_currentRRR RR(R R((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyt __enter__Es  cC@s"|jst‚|jtj_dS(N(RtAssertionErrorRRR(R tptypeRttrace((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyt__exit__PscC@s>tjdtƒttjdƒs4tƒ|j_n|jjS(Ns`AttrScope.current has been deprecated. It is advised to use the `with` statement with AttrScope.R(twarningstwarntDeprecationWarningRRRR(tcls((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pytcurrentUs  cC@s tjdtƒ||j_dS(Ns`AttrScope.current has been deprecated. It is advised to use the `with` statement with AttrScope.(RRRRR(R tval((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyR!^s (t__name__t __module__t__doc__t threadingtlocalRRtintt_subgraph_namesRRRRRR!tsetter(((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyRs       (R%t __future__RR&Rt collectionsRtbaseRRRRtobjectRRR(((sO/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/attribute.pyts  "K