repo
stringlengths 7
54
| path
stringlengths 4
223
| func_name
stringlengths 1
134
| original_string
stringlengths 75
104k
| language
stringclasses 1
value | code
stringlengths 75
104k
| code_tokens
listlengths 20
28.4k
| docstring
stringlengths 1
46.3k
| docstring_tokens
listlengths 1
1.66k
| sha
stringlengths 40
40
| url
stringlengths 87
315
| partition
stringclasses 1
value | summary
stringlengths 4
350
| obf_code
stringlengths 7.85k
764k
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
BaseSparseNDArray._aux_types
|
def _aux_types(self):
"""The data types of the aux data for the BaseSparseNDArray.
"""
aux_types = []
num_aux = self._num_aux
for i in range(num_aux):
aux_types.append(self._aux_type(i))
return aux_types
|
python
|
def _aux_types(self):
"""The data types of the aux data for the BaseSparseNDArray.
"""
aux_types = []
num_aux = self._num_aux
for i in range(num_aux):
aux_types.append(self._aux_type(i))
return aux_types
|
[
"def",
"_aux_types",
"(",
"self",
")",
":",
"aux_types",
"=",
"[",
"]",
"num_aux",
"=",
"self",
".",
"_num_aux",
"for",
"i",
"in",
"range",
"(",
"num_aux",
")",
":",
"aux_types",
".",
"append",
"(",
"self",
".",
"_aux_type",
"(",
"i",
")",
")",
"return",
"aux_types"
] |
The data types of the aux data for the BaseSparseNDArray.
|
[
"The",
"data",
"types",
"of",
"the",
"aux",
"data",
"for",
"the",
"BaseSparseNDArray",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L183-L190
|
train
|
The data types of the aux data for the BaseSparseNDArray.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh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InYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1100 + 0o47) + chr(0b1001 + 0o54) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x36' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(51) + '\061' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(1701 - 1653) + chr(111) + chr(50) + chr(130 - 79) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(48) + chr(0b110100), 10306 - 10298), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b1100 + 0o50) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(2162 - 2107) + chr(2493 - 2441), ord("\x08")), ehT0Px3KOsy9(chr(1409 - 1361) + chr(0b11010 + 0o125) + chr(0b110010) + '\x30' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1630 - 1582) + chr(111) + chr(0b10001 + 0o42) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(181 - 130) + '\067' + chr(49), 0b1000), ehT0Px3KOsy9(chr(2091 - 2043) + '\x6f' + chr(0b110011) + chr(53) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(334 - 286) + '\x6f' + chr(49) + '\065', 1272 - 1264), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(7469 - 7358) + chr(1045 - 994) + chr(0b110000) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011 + 0o144) + chr(0b10110 + 0o33) + '\060' + chr(55), 28568 - 28560), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(732 - 621) + chr(51) + '\x36' + '\x32', 30144 - 30136), ehT0Px3KOsy9(chr(0b110000) + chr(10174 - 10063) + chr(54) + chr(52), 13187 - 13179), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b100110 + 0o12) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + chr(0b110000 + 0o2) + chr(0b110110) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(982 - 871) + chr(299 - 249) + chr(2663 - 2608) + chr(0b1011 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b10101 + 0o35) + '\x34' + '\x33', 24541 - 24533), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b111 + 0o52) + '\065' + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + chr(0b100011 + 0o16) + '\063' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(1730 - 1677) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111010 + 0o65) + '\063' + '\063' + chr(1281 - 1226), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(252 - 203) + '\067' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1110 + 0o45) + chr(0b110100), 8), ehT0Px3KOsy9(chr(491 - 443) + chr(0b1001001 + 0o46) + chr(0b10101 + 0o36) + chr(0b111 + 0o55) + chr(50), 36044 - 36036), ehT0Px3KOsy9(chr(48) + chr(3334 - 3223) + chr(0b110010) + chr(568 - 516), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10164 - 10053) + chr(0b110010) + '\x32' + chr(0b1011 + 0o51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10001 + 0o40) + chr(0b100000 + 0o20) + '\062', 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\x33' + chr(1218 - 1168) + chr(0b1100 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(1611 - 1563) + chr(5099 - 4988) + '\063' + chr(0b10100 + 0o35) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b110001) + chr(0b10 + 0o65), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110011 + 0o74) + chr(595 - 546) + chr(0b110111) + chr(54), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(919 - 868) + '\x30' + chr(48), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(1467 - 1418) + chr(1486 - 1431) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\064' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(1797 - 1686) + '\x32' + '\x31' + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1512 - 1464) + '\x6f' + chr(53) + chr(101 - 53), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0'), '\144' + chr(0b1100101) + chr(0b111001 + 0o52) + '\157' + '\144' + '\x65')(chr(0b1110101) + '\164' + chr(7774 - 7672) + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def qPu60WzGo34V(oVre8I6UXc3b):
VYjK46ifZw8X = []
gGS0kjTu2BFX = oVre8I6UXc3b._num_aux
for WVxHKyX45z_L in vQr8gNKaIaWE(gGS0kjTu2BFX):
xafqLlk3kkUe(VYjK46ifZw8X, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xc6\xbe\xff\xe1\xe0'), chr(100) + '\x65' + chr(99) + '\157' + chr(100) + '\x65')(chr(117) + '\x74' + chr(0b11011 + 0o113) + chr(425 - 380) + chr(0b100101 + 0o23)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xd7\xbb\xe2\xd0\xf0Y\x8c\xe4'), '\144' + chr(800 - 699) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(3840 - 3724) + chr(9143 - 9041) + chr(1472 - 1427) + chr(1389 - 1333)))(WVxHKyX45z_L))
return VYjK46ifZw8X
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
BaseSparseNDArray.astype
|
def astype(self, dtype, copy=True):
"""Return a copy of the array after casting to a specified type.
Parameters
----------
dtype : numpy.dtype or str
The type of the returned array.
copy : bool
Default `True`. By default, astype always returns a newly
allocated ndarray on the same context. If this is set to
`False`, and the dtype requested is the same as the ndarray's
dtype, the ndarray is returned instead of a copy.
Examples
--------
>>> x = mx.nd.sparse.zeros('row_sparse', (2,3), dtype='float32')
>>> y = x.astype('int32')
>>> y.dtype
<type 'numpy.int32'>
"""
if not copy and np.dtype(dtype) == self.dtype:
return self
res = zeros(shape=self.shape, ctx=self.context,
dtype=dtype, stype=self.stype)
self.copyto(res)
return res
|
python
|
def astype(self, dtype, copy=True):
"""Return a copy of the array after casting to a specified type.
Parameters
----------
dtype : numpy.dtype or str
The type of the returned array.
copy : bool
Default `True`. By default, astype always returns a newly
allocated ndarray on the same context. If this is set to
`False`, and the dtype requested is the same as the ndarray's
dtype, the ndarray is returned instead of a copy.
Examples
--------
>>> x = mx.nd.sparse.zeros('row_sparse', (2,3), dtype='float32')
>>> y = x.astype('int32')
>>> y.dtype
<type 'numpy.int32'>
"""
if not copy and np.dtype(dtype) == self.dtype:
return self
res = zeros(shape=self.shape, ctx=self.context,
dtype=dtype, stype=self.stype)
self.copyto(res)
return res
|
[
"def",
"astype",
"(",
"self",
",",
"dtype",
",",
"copy",
"=",
"True",
")",
":",
"if",
"not",
"copy",
"and",
"np",
".",
"dtype",
"(",
"dtype",
")",
"==",
"self",
".",
"dtype",
":",
"return",
"self",
"res",
"=",
"zeros",
"(",
"shape",
"=",
"self",
".",
"shape",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"dtype",
",",
"stype",
"=",
"self",
".",
"stype",
")",
"self",
".",
"copyto",
"(",
"res",
")",
"return",
"res"
] |
Return a copy of the array after casting to a specified type.
Parameters
----------
dtype : numpy.dtype or str
The type of the returned array.
copy : bool
Default `True`. By default, astype always returns a newly
allocated ndarray on the same context. If this is set to
`False`, and the dtype requested is the same as the ndarray's
dtype, the ndarray is returned instead of a copy.
Examples
--------
>>> x = mx.nd.sparse.zeros('row_sparse', (2,3), dtype='float32')
>>> y = x.astype('int32')
>>> y.dtype
<type 'numpy.int32'>
|
[
"Return",
"a",
"copy",
"of",
"the",
"array",
"after",
"casting",
"to",
"a",
"specified",
"type",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L197-L223
|
train
|
Return a copy of the array after casting to a specified type.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,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LUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(557 - 509) + chr(1264 - 1153) + chr(0b101011 + 0o6) + '\063' + chr(2692 - 2638), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(48) + '\x33', 0o10), ehT0Px3KOsy9(chr(599 - 551) + chr(0b1010011 + 0o34) + '\x33' + '\060' + chr(0b11100 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b101000 + 0o107) + '\x33' + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\061' + chr(0b100111 + 0o11) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(7857 - 7746) + '\x33' + '\062' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + '\x35' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + chr(319 - 268) + chr(52), 12245 - 12237), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(50) + chr(0b110010) + chr(0b10001 + 0o40), 8), ehT0Px3KOsy9(chr(360 - 312) + '\x6f' + chr(0b110010) + chr(807 - 759) + chr(52), 0b1000), ehT0Px3KOsy9(chr(330 - 282) + chr(111) + '\x33' + '\x32' + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b11101 + 0o122) + chr(0b1 + 0o60) + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\x34' + chr(0b11101 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101100 + 0o5) + '\x33' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4686 - 4575) + '\x32' + '\062' + '\066', 9803 - 9795), ehT0Px3KOsy9(chr(48) + '\x6f' + '\060', 28634 - 28626), ehT0Px3KOsy9(chr(114 - 66) + '\157' + chr(1689 - 1639) + chr(0b100001 + 0o24) + chr(992 - 937), 0o10), ehT0Px3KOsy9(chr(2138 - 2090) + chr(111) + chr(0b110111) + chr(49), 60332 - 60324), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(1601 - 1552) + chr(53), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1869 - 1819) + chr(0b10101 + 0o41) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(53), 45745 - 45737), ehT0Px3KOsy9(chr(1407 - 1359) + chr(0b1101111) + '\062' + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b1111 + 0o140) + '\062' + chr(0b10101 + 0o41) + '\x30', 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\x32' + '\062' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(55) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10101 + 0o34) + '\x33', 42313 - 42305), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(55) + '\x35', 49271 - 49263), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101101 + 0o6) + chr(0b110011) + chr(0b1000 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + '\x32' + chr(0b110111), 38239 - 38231), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(1737 - 1682) + chr(1126 - 1077), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1495 - 1446) + '\x30' + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + '\x36' + chr(1671 - 1619), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(171 - 123) + '\x6f' + '\063' + chr(51) + chr(0b11111 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(55) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b101111 + 0o3) + chr(0b110010 + 0o2), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010101 + 0o32) + chr(49) + chr(55), 0b1000), ehT0Px3KOsy9(chr(390 - 342) + chr(5132 - 5021) + '\x31' + chr(965 - 915) + '\x36', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(0b11110 + 0o22), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'p'), '\x64' + chr(101) + chr(1084 - 985) + chr(111) + chr(100) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(1280 - 1235) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def XF6WakKHWOo5(oVre8I6UXc3b, jSV9IKnemH7K, igThHS4jwVsa=ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(0b110001), 0o10)):
if not igThHS4jwVsa and xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'4\xd0\x95\xf4\x0f\x9eEy\xfc\xd9\xb3\x9e'), '\x64' + chr(8256 - 8155) + chr(0b1100011) + chr(4474 - 4363) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(6438 - 6322) + '\x66' + chr(119 - 74) + chr(0b10011 + 0o45)))(jSV9IKnemH7K) == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'4\xd0\x95\xf4\x0f\x9eEy\xfc\xd9\xb3\x9e'), chr(100) + chr(101) + '\143' + chr(111) + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(814 - 769) + chr(1345 - 1289))):
return oVre8I6UXc3b
MsbwfslwLjRO = _rHwoyvtca4E(shape=oVre8I6UXc3b.nauYfLglTpcb, ctx=oVre8I6UXc3b.context, dtype=jSV9IKnemH7K, stype=oVre8I6UXc3b.stype)
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xec\xb3\xb42\xba'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b100100 + 0o113) + chr(739 - 639) + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38'))(MsbwfslwLjRO)
return MsbwfslwLjRO
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
BaseSparseNDArray.check_format
|
def check_format(self, full_check=True):
"""Check whether the NDArray format is valid.
Parameters
----------
full_check : bool, optional
If `True`, rigorous check, O(N) operations. Otherwise
basic check, O(1) operations (default True).
"""
check_call(_LIB.MXNDArraySyncCheckFormat(self.handle, ctypes.c_bool(full_check)))
|
python
|
def check_format(self, full_check=True):
"""Check whether the NDArray format is valid.
Parameters
----------
full_check : bool, optional
If `True`, rigorous check, O(N) operations. Otherwise
basic check, O(1) operations (default True).
"""
check_call(_LIB.MXNDArraySyncCheckFormat(self.handle, ctypes.c_bool(full_check)))
|
[
"def",
"check_format",
"(",
"self",
",",
"full_check",
"=",
"True",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXNDArraySyncCheckFormat",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"c_bool",
"(",
"full_check",
")",
")",
")"
] |
Check whether the NDArray format is valid.
Parameters
----------
full_check : bool, optional
If `True`, rigorous check, O(N) operations. Otherwise
basic check, O(1) operations (default True).
|
[
"Check",
"whether",
"the",
"NDArray",
"format",
"is",
"valid",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L252-L261
|
train
|
Checks whether the NDArray format is valid.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1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FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(8435 - 8324) + '\x31' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(50) + '\x35', 39813 - 39805), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\x31' + chr(0b1110 + 0o45) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(0b1111 + 0o46) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(968 - 920) + chr(11511 - 11400) + chr(0b0 + 0o66) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + '\x31' + chr(959 - 911) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\062', 41753 - 41745), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + chr(0b110010) + chr(0b110001) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1965 - 1917), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2322 - 2271) + '\061' + chr(2006 - 1953), 29658 - 29650), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(49) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(967 - 919) + chr(0b1101111) + '\x31' + chr(0b100010 + 0o23) + chr(2762 - 2707), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100011 + 0o17) + chr(2382 - 2330) + chr(0b110010), 18104 - 18096), ehT0Px3KOsy9('\060' + chr(111) + chr(1184 - 1135) + chr(0b1110 + 0o43) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1821 - 1770) + chr(2111 - 2061) + chr(0b10000 + 0o45), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11011 + 0o26) + chr(776 - 727) + chr(0b110101 + 0o2), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1469 - 1419) + chr(2370 - 2321) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(11627 - 11516) + chr(0b1 + 0o62) + chr(0b110111) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + chr(51) + chr(442 - 392) + '\x37', 0o10), ehT0Px3KOsy9(chr(296 - 248) + chr(7633 - 7522) + '\064' + chr(741 - 692), 962 - 954), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b110010) + '\064' + chr(1204 - 1151), 7610 - 7602), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b11101 + 0o32) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b100101 + 0o112) + chr(49) + '\063' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(48) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(52) + chr(0b1011 + 0o53), 25856 - 25848), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\064' + chr(0b101001 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(1711 - 1656) + chr(0b11 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3965 - 3854) + '\061' + '\x33', 28485 - 28477), ehT0Px3KOsy9(chr(1195 - 1147) + chr(0b1101111) + chr(0b1111 + 0o43) + chr(886 - 835) + chr(144 - 95), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\065' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1574 - 1525) + '\063', 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101 + 0o142) + '\063' + '\x37' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(0b1001 + 0o52) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1657 - 1609) + '\x6f' + '\x35' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(51) + chr(0b10000 + 0o45), 0b1000), ehT0Px3KOsy9(chr(1751 - 1703) + chr(3976 - 3865) + chr(1204 - 1155) + chr(52) + chr(0b100011 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + chr(9934 - 9823) + '\x36' + chr(0b110 + 0o55), 14718 - 14710), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b11100 + 0o33) + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + '\x35' + chr(48), 10041 - 10033)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'"'), chr(1244 - 1144) + '\145' + chr(99) + chr(0b1000101 + 0o52) + chr(5817 - 5717) + chr(7217 - 7116))(chr(0b111101 + 0o70) + chr(0b101 + 0o157) + '\146' + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def LLR5Cl53gpJJ(oVre8I6UXc3b, iTV35RF5YpWa=ehT0Px3KOsy9(chr(2221 - 2173) + chr(111) + chr(261 - 212), 8)):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'A\r\x16\xeaZsD"{\xday\xa3-,\xca+\xb6$\xcc\x90\xa5L\xc4L'), '\x64' + chr(0b1100101) + chr(817 - 718) + chr(0b1010101 + 0o32) + '\144' + chr(101))(chr(0b1001010 + 0o53) + chr(0b1100011 + 0o21) + '\x66' + chr(0b10011 + 0o32) + chr(153 - 97)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'_-\x0c\xdbVpp\x19f\xf3Z\xb5'), chr(0b10101 + 0o117) + chr(101) + chr(0b1100 + 0o127) + chr(7712 - 7601) + chr(0b1100100) + chr(4479 - 4378))('\x75' + '\164' + chr(0b1100110) + '\055' + '\x38')), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'o\n:\xc1tm'), '\x64' + chr(0b1100101) + '\143' + chr(1423 - 1312) + '\x64' + '\x65')('\165' + chr(0b100011 + 0o121) + chr(0b1100110) + chr(1625 - 1580) + chr(56)))(iTV35RF5YpWa)))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
BaseSparseNDArray._data
|
def _data(self):
"""A deep copy NDArray of the data array associated with the BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
"""
self.wait_to_read()
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayGetDataNDArray(self.handle, ctypes.byref(hdl)))
return NDArray(hdl)
|
python
|
def _data(self):
"""A deep copy NDArray of the data array associated with the BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
"""
self.wait_to_read()
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayGetDataNDArray(self.handle, ctypes.byref(hdl)))
return NDArray(hdl)
|
[
"def",
"_data",
"(",
"self",
")",
":",
"self",
".",
"wait_to_read",
"(",
")",
"hdl",
"=",
"NDArrayHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetDataNDArray",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"hdl",
")",
")",
")",
"return",
"NDArray",
"(",
"hdl",
")"
] |
A deep copy NDArray of the data array associated with the BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
|
[
"A",
"deep",
"copy",
"NDArray",
"of",
"the",
"data",
"array",
"associated",
"with",
"the",
"BaseSparseNDArray",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L263-L271
|
train
|
A deep copy NDArray of the data array associated with the BaseSparseNDArray.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,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aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1100 + 0o143) + chr(166 - 115) + chr(2317 - 2262) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110001) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\063' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(52) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\066' + '\x33', 56590 - 56582), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\060' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110111) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(54) + '\x34', 38662 - 38654), ehT0Px3KOsy9('\060' + chr(10681 - 10570) + chr(0b110001) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1010000 + 0o37) + chr(1464 - 1413) + chr(0b11000 + 0o33) + chr(2535 - 2480), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(1623 - 1573) + chr(51) + chr(48), 6892 - 6884), ehT0Px3KOsy9('\060' + chr(3652 - 3541) + chr(50) + chr(50) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b110010) + chr(2000 - 1948) + chr(0b11000 + 0o31), 60432 - 60424), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101000 + 0o11) + '\x35' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\x36' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(11932 - 11821) + chr(0b11100 + 0o25) + chr(1873 - 1819) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1101 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(1458 - 1410) + chr(9372 - 9261) + chr(51) + chr(1307 - 1255) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(1037 - 989) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(0b110010 + 0o2) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + '\x33' + chr(743 - 694) + chr(0b101101 + 0o6), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(910 - 860) + chr(0b10001 + 0o41) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(516 - 467) + '\x35' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9170 - 9059) + '\061' + chr(0b1111 + 0o45) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(2353 - 2300) + '\x34', 31862 - 31854), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110111) + '\060', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(0b0 + 0o62) + '\x32' + chr(0b11110 + 0o23), 8), ehT0Px3KOsy9('\x30' + chr(11742 - 11631) + chr(50) + '\061' + chr(631 - 581), 0b1000), ehT0Px3KOsy9(chr(2157 - 2109) + chr(2169 - 2058) + chr(50) + chr(308 - 254), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b1 + 0o62) + chr(53) + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(528 - 479) + chr(0b110111) + chr(0b1001 + 0o50), 12811 - 12803), ehT0Px3KOsy9('\x30' + chr(0b101101 + 0o102) + chr(1077 - 1027) + chr(0b110010) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(54) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + chr(0b11010 + 0o33), 0o10), ehT0Px3KOsy9('\060' + chr(274 - 163) + '\062' + chr(50) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + chr(50) + chr(52) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(821 - 772) + '\x32' + '\062', 45978 - 45970), ehT0Px3KOsy9(chr(1945 - 1897) + chr(0b1101111) + chr(0b10010 + 0o40) + chr(1459 - 1410), ord("\x08")), ehT0Px3KOsy9(chr(570 - 522) + '\x6f' + chr(0b110011) + chr(0b100 + 0o56) + chr(0b10001 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b10101 + 0o35) + chr(2551 - 2500) + chr(86 - 38), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100011 + 0o22) + chr(0b10011 + 0o35), 50615 - 50607)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5'), chr(1525 - 1425) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(7355 - 7238) + chr(0b10101 + 0o137) + chr(102) + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nxBQetk9oeQg(oVre8I6UXc3b):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c*h*\xb8G\xacg\x86i\xbe\xfc'), chr(0b111111 + 0o45) + '\x65' + chr(0b100001 + 0o102) + chr(12186 - 12075) + chr(0b1011110 + 0o6) + chr(0b10101 + 0o120))(chr(117) + '\x74' + '\x66' + chr(45) + chr(56)))()
WYHuLDJkKIZM = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\x13O\x1a\xa6A\xb1Y\x8dK\xba\xec\xd3\xc0\x1a\xd5;B\xa5\x92\xb9\xf0\x14'), '\x64' + '\x65' + chr(0b1011010 + 0o11) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(1367 - 1250) + chr(0b1110100) + chr(2523 - 2421) + chr(45) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa83U+\xaaB\x85b\x90v\x85\xe0'), '\144' + '\x65' + chr(99) + '\x6f' + chr(6313 - 6213) + chr(0b110100 + 0o61))(chr(117) + chr(12720 - 12604) + chr(102) + '\x2d' + chr(155 - 99))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x992s;\x81'), '\144' + chr(0b100000 + 0o105) + chr(99) + '\157' + '\x64' + chr(1389 - 1288))(chr(0b111000 + 0o75) + '\164' + chr(102) + '\x2d' + '\070'))(WYHuLDJkKIZM)))
return GdqFjMbtKL7s(WYHuLDJkKIZM)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
BaseSparseNDArray._aux_data
|
def _aux_data(self, i):
""" Get a deep copy NDArray of the i-th aux data array associated with the
BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
"""
self.wait_to_read()
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayGetAuxNDArray(self.handle, i, ctypes.byref(hdl)))
return NDArray(hdl)
|
python
|
def _aux_data(self, i):
""" Get a deep copy NDArray of the i-th aux data array associated with the
BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
"""
self.wait_to_read()
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayGetAuxNDArray(self.handle, i, ctypes.byref(hdl)))
return NDArray(hdl)
|
[
"def",
"_aux_data",
"(",
"self",
",",
"i",
")",
":",
"self",
".",
"wait_to_read",
"(",
")",
"hdl",
"=",
"NDArrayHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetAuxNDArray",
"(",
"self",
".",
"handle",
",",
"i",
",",
"ctypes",
".",
"byref",
"(",
"hdl",
")",
")",
")",
"return",
"NDArray",
"(",
"hdl",
")"
] |
Get a deep copy NDArray of the i-th aux data array associated with the
BaseSparseNDArray.
This function blocks. Do not use it in performance critical code.
|
[
"Get",
"a",
"deep",
"copy",
"NDArray",
"of",
"the",
"i",
"-",
"th",
"aux",
"data",
"array",
"associated",
"with",
"the",
"BaseSparseNDArray",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L274-L283
|
train
|
Get a deep copy NDArray of the i - th aux data array associated with the
BaseSparseNDArray.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIl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ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11110 + 0o25) + '\x35' + chr(0b1 + 0o62), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + '\x35', 2325 - 2317), ehT0Px3KOsy9(chr(0b110000) + chr(5692 - 5581) + chr(0b11010 + 0o30) + '\065' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + chr(0b100111 + 0o14) + '\x35' + chr(1093 - 1040), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\065' + chr(2607 - 2552), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100011 + 0o114) + chr(51) + '\065' + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\064' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(6056 - 5945) + '\x31' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + '\064' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + '\065' + chr(0b1111 + 0o47), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + '\x31' + chr(0b110100) + chr(2319 - 2270), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011111 + 0o20) + '\x33' + chr(1326 - 1278) + chr(1790 - 1742), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\x30' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(53) + '\060', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\x33' + chr(472 - 419) + chr(0b110110), 10992 - 10984), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b111 + 0o57), 48203 - 48195), ehT0Px3KOsy9(chr(0b110000) + chr(7676 - 7565) + chr(0b101001 + 0o11) + chr(53) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2795 - 2684) + '\061' + chr(0b10 + 0o63) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11695 - 11584) + chr(50) + chr(2170 - 2118), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(1959 - 1905) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(402 - 354), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b101 + 0o57) + chr(0b0 + 0o61), 0o10), ehT0Px3KOsy9(chr(1916 - 1868) + chr(0b1101111) + chr(164 - 113) + chr(0b1011 + 0o51) + chr(0b101001 + 0o15), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\066' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(2076 - 2026) + chr(53), 58583 - 58575), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b110001) + chr(230 - 178) + chr(0b101011 + 0o12), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + chr(0b11110 + 0o25) + chr(2184 - 2133) + chr(746 - 698), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7043 - 6932) + '\x33' + '\061', 1775 - 1767), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110100) + chr(53), 8), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(2535 - 2480) + chr(0b110010), 3042 - 3034), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b10 + 0o155) + chr(773 - 720) + '\x36', 8), ehT0Px3KOsy9(chr(1478 - 1430) + '\x6f' + chr(50) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111 + 0o0) + chr(0b101000 + 0o13) + chr(51) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b110110 + 0o71) + chr(0b110011) + chr(50) + '\x36', 36111 - 36103), ehT0Px3KOsy9(chr(48) + chr(4041 - 3930) + '\x33' + chr(2163 - 2114) + chr(2015 - 1965), 18870 - 18862), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + '\063' + '\063' + chr(0b101011 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(4594 - 4483) + chr(1908 - 1855) + chr(0b100111 + 0o16), 8), ehT0Px3KOsy9(chr(671 - 623) + chr(0b0 + 0o157) + chr(0b110111) + '\x35', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2500 - 2447) + '\060', 48456 - 48448)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5'), '\144' + '\145' + '\x63' + chr(1137 - 1026) + '\x64' + chr(0b10001 + 0o124))(chr(117) + '\164' + '\x66' + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def T73w1eCyNXl_(oVre8I6UXc3b, WVxHKyX45z_L):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9cL\xc2\x99\xf0\x9c\rg\x7fCO\x05'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b10110 + 0o131) + '\x64' + chr(0b1100101))(chr(117) + chr(8792 - 8676) + chr(10097 - 9995) + chr(45) + chr(0b111000)))()
WYHuLDJkKIZM = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6u\xe5\xa9\xee\x9a\x10YtaK\x15\x81\xb2\x10\xa0B\xef\x1ffUq'), chr(0b11010 + 0o112) + '\x65' + chr(5586 - 5487) + '\x6f' + chr(4990 - 4890) + chr(101))(chr(0b1110101) + '\x74' + chr(102) + chr(1141 - 1096) + chr(3086 - 3030)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8U\xff\x98\xe2\x99$bi\\t\x19'), chr(100) + '\x65' + chr(99) + '\x6f' + chr(6280 - 6180) + '\x65')('\165' + '\164' + '\146' + '\x2d' + chr(0b10110 + 0o42))), WVxHKyX45z_L, xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x89T\xd9\x88\xc9'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(439 - 339) + chr(0b1001 + 0o134))(chr(0b10000 + 0o145) + chr(9222 - 9106) + '\x66' + chr(0b101101) + '\070'))(WYHuLDJkKIZM)))
return GdqFjMbtKL7s(WYHuLDJkKIZM)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
CSRNDArray.asscipy
|
def asscipy(self):
"""Returns a ``scipy.sparse.csr.csr_matrix`` object with value copied from this array
Examples
--------
>>> x = mx.nd.sparse.zeros('csr', (2,3))
>>> y = x.asscipy()
>>> type(y)
<type 'scipy.sparse.csr.csr_matrix'>
>>> y
<2x3 sparse matrix of type '<type 'numpy.float32'>'
with 0 stored elements in Compressed Sparse Row format>
"""
data = self.data.asnumpy()
indices = self.indices.asnumpy()
indptr = self.indptr.asnumpy()
if not spsp:
raise ImportError("scipy is not available. \
Please check if the scipy python bindings are installed.")
return spsp.csr_matrix((data, indices, indptr), shape=self.shape, dtype=self.dtype)
|
python
|
def asscipy(self):
"""Returns a ``scipy.sparse.csr.csr_matrix`` object with value copied from this array
Examples
--------
>>> x = mx.nd.sparse.zeros('csr', (2,3))
>>> y = x.asscipy()
>>> type(y)
<type 'scipy.sparse.csr.csr_matrix'>
>>> y
<2x3 sparse matrix of type '<type 'numpy.float32'>'
with 0 stored elements in Compressed Sparse Row format>
"""
data = self.data.asnumpy()
indices = self.indices.asnumpy()
indptr = self.indptr.asnumpy()
if not spsp:
raise ImportError("scipy is not available. \
Please check if the scipy python bindings are installed.")
return spsp.csr_matrix((data, indices, indptr), shape=self.shape, dtype=self.dtype)
|
[
"def",
"asscipy",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"data",
".",
"asnumpy",
"(",
")",
"indices",
"=",
"self",
".",
"indices",
".",
"asnumpy",
"(",
")",
"indptr",
"=",
"self",
".",
"indptr",
".",
"asnumpy",
"(",
")",
"if",
"not",
"spsp",
":",
"raise",
"ImportError",
"(",
"\"scipy is not available. \\\n Please check if the scipy python bindings are installed.\"",
")",
"return",
"spsp",
".",
"csr_matrix",
"(",
"(",
"data",
",",
"indices",
",",
"indptr",
")",
",",
"shape",
"=",
"self",
".",
"shape",
",",
"dtype",
"=",
"self",
".",
"dtype",
")"
] |
Returns a ``scipy.sparse.csr.csr_matrix`` object with value copied from this array
Examples
--------
>>> x = mx.nd.sparse.zeros('csr', (2,3))
>>> y = x.asscipy()
>>> type(y)
<type 'scipy.sparse.csr.csr_matrix'>
>>> y
<2x3 sparse matrix of type '<type 'numpy.float32'>'
with 0 stored elements in Compressed Sparse Row format>
|
[
"Returns",
"a",
"scipy",
".",
"sparse",
".",
"csr",
".",
"csr_matrix",
"object",
"with",
"value",
"copied",
"from",
"this",
"array"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L539-L558
|
train
|
Returns a scipy. sparse. csr. csr_matrix object with value copied from this array
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnD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_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10010 + 0o41) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(834 - 786) + chr(111) + chr(1968 - 1919) + '\x31' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1896 - 1848) + chr(0b100101 + 0o112) + chr(49) + chr(1345 - 1294) + chr(589 - 535), 0o10), ehT0Px3KOsy9(chr(1669 - 1621) + chr(0b1101010 + 0o5) + '\062' + '\063' + chr(850 - 796), 52657 - 52649), ehT0Px3KOsy9('\060' + '\157' + chr(0b10001 + 0o40) + chr(2426 - 2374) + '\x30', 25590 - 25582), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\x31' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(51) + chr(49) + chr(2035 - 1983), 0b1000), ehT0Px3KOsy9(chr(833 - 785) + '\x6f' + chr(0b100000 + 0o23) + chr(971 - 923) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b1011 + 0o46) + chr(792 - 742), 17332 - 17324), ehT0Px3KOsy9(chr(1073 - 1025) + chr(0b1100 + 0o143) + chr(2409 - 2359) + chr(2007 - 1957) + '\x33', 16932 - 16924), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(715 - 664) + chr(0b1111 + 0o47) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1454 - 1404) + chr(49) + '\061', 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(0b110001) + chr(0b101100 + 0o10) + chr(1740 - 1686), ord("\x08")), ehT0Px3KOsy9(chr(1694 - 1646) + chr(0b110100 + 0o73) + chr(49) + chr(0b1010 + 0o51), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(52) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1351 - 1298) + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(462 - 412) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\063' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101100 + 0o103) + '\x32' + chr(0b11101 + 0o27) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x33' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(1912 - 1863) + '\x34', 8), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101001 + 0o6) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + '\062' + '\063' + chr(0b111 + 0o60), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101 + 0o54), 1816 - 1808), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b10111 + 0o31) + chr(50), 0b1000), ehT0Px3KOsy9(chr(2046 - 1998) + '\x6f' + chr(0b1010 + 0o47) + chr(0b11111 + 0o24) + '\x34', 38083 - 38075), ehT0Px3KOsy9(chr(479 - 431) + chr(9760 - 9649) + chr(328 - 278) + '\x31' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(5475 - 5364) + '\x33' + chr(49) + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(0b110011) + chr(55), 22783 - 22775), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100011 + 0o17) + '\x34' + '\065', 53194 - 53186), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(49) + '\x36' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(363 - 315) + chr(111) + '\063' + chr(52) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x31', 6869 - 6861), ehT0Px3KOsy9(chr(0b110000) + chr(1490 - 1379) + chr(49) + chr(0b101011 + 0o13) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\x31' + chr(49) + chr(51), 1706 - 1698), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1 + 0o156) + '\x32' + chr(835 - 782) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x34' + chr(0b101111 + 0o3), 8), ehT0Px3KOsy9('\060' + chr(10331 - 10220) + chr(1724 - 1675) + '\065' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x33' + chr(55), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1001 + 0o52) + chr(53) + chr(0b110011 + 0o0), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + '\x35' + chr(48), 24355 - 24347)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'7'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(99) + '\x6f' + chr(0b1000000 + 0o44) + '\x65')('\165' + chr(0b1110100) + chr(8985 - 8883) + '\055' + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def p1Ca6c84DR08(oVre8I6UXc3b):
ULnjp6D6efFH = oVre8I6UXc3b.data.asnumpy()
pIcoaXENl5Pw = oVre8I6UXc3b.indices.asnumpy()
zzopX3ZKAk_R = oVre8I6UXc3b.indptr.asnumpy()
if not ja04wlJz6Qus:
raise yROw0HWBk0Qc(xafqLlk3kkUe(SXOLrMavuUCe(b"j+7\xee\x19.\xa5\xb5\xea\xfd\x9c\xfdFjTH\xbe\xf7\xc0\xbe\xa0a\xb1!b|\xab\xea\x7f\x85R\xc71Wk\x8e\x02O\x7f\xcb9h~\xbe@.\xec\xe6\xea\xb3\xd3\xa9F+\x02y\xbb\xfe\xc0\xaf\xa9$\xfci'?\xe0\xea6\xc3R\x93y\x12k\xddA\x06/\x9298'\xea\x08a\xa2\xe6\xa8\xfa\x9d\xed\x0feEZ\xf7\xfa\xd3\xb9\xecm\xf1r6=\xe7\xa6:\xc1\\"), chr(100) + chr(0b1100101) + chr(0b1100000 + 0o3) + chr(0b10111 + 0o130) + chr(0b111010 + 0o52) + chr(0b11001 + 0o114))(chr(117) + chr(12834 - 12718) + chr(0b1000010 + 0o44) + '\x2d' + chr(56)))
return xafqLlk3kkUe(ja04wlJz6Qus, xafqLlk3kkUe(SXOLrMavuUCe(b'z;,\xc1\ro\xb8\xb4\xa3\xeb'), '\144' + '\x65' + '\x63' + chr(111) + '\144' + chr(0b1010000 + 0o25))(chr(117) + '\164' + chr(9042 - 8940) + chr(45) + chr(1438 - 1382)))((ULnjp6D6efFH, pIcoaXENl5Pw, zzopX3ZKAk_R), shape=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'w)+\xc7\x06B\xab\xaa\x9e\xe3\x90\xeb'), chr(0b1 + 0o143) + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(13074 - 12957) + '\x74' + chr(10040 - 9938) + chr(0b100011 + 0o12) + '\070')), dtype=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b's\x1b\x08\xa7)E\xa2\xa3\xa7\xdb\xc4\xc2'), '\x64' + chr(0b1001011 + 0o32) + chr(0b11001 + 0o112) + chr(111) + '\144' + '\x65')(chr(0b1100000 + 0o25) + '\x74' + '\x66' + chr(847 - 802) + chr(0b1001 + 0o57))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
RowSparseNDArray.tostype
|
def tostype(self, stype):
"""Return a copy of the array with chosen storage type.
Returns
-------
NDArray or RowSparseNDArray
A copy of the array with the chosen storage stype
"""
# pylint: disable= no-member, protected-access
if stype == 'csr':
raise ValueError("cast_storage from row_sparse to csr is not supported")
return op.cast_storage(self, stype=stype)
|
python
|
def tostype(self, stype):
"""Return a copy of the array with chosen storage type.
Returns
-------
NDArray or RowSparseNDArray
A copy of the array with the chosen storage stype
"""
# pylint: disable= no-member, protected-access
if stype == 'csr':
raise ValueError("cast_storage from row_sparse to csr is not supported")
return op.cast_storage(self, stype=stype)
|
[
"def",
"tostype",
"(",
"self",
",",
"stype",
")",
":",
"# pylint: disable= no-member, protected-access",
"if",
"stype",
"==",
"'csr'",
":",
"raise",
"ValueError",
"(",
"\"cast_storage from row_sparse to csr is not supported\"",
")",
"return",
"op",
".",
"cast_storage",
"(",
"self",
",",
"stype",
"=",
"stype",
")"
] |
Return a copy of the array with chosen storage type.
Returns
-------
NDArray or RowSparseNDArray
A copy of the array with the chosen storage stype
|
[
"Return",
"a",
"copy",
"of",
"the",
"array",
"with",
"chosen",
"storage",
"type",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L740-L751
|
train
|
Return a copy of the array with chosen storage type. Returns ------- NDArray or RowSparseNDArray
A copy of the array with chosen storage type.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,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okenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(0b111 + 0o52) + chr(0b110010) + chr(419 - 367), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10110 + 0o40) + chr(53), 56123 - 56115), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\065' + chr(1507 - 1458), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101110 + 0o3) + chr(0b10011 + 0o37) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110110) + chr(0b110011), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2659 - 2606) + chr(1137 - 1086), ord("\x08")), ehT0Px3KOsy9(chr(337 - 289) + chr(111) + chr(49) + chr(52) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1832 - 1784) + chr(3246 - 3135) + chr(0b10 + 0o60) + '\065', 2789 - 2781), ehT0Px3KOsy9('\060' + '\157' + '\065' + '\x35', 19311 - 19303), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(807 - 756) + '\067' + chr(0b101101 + 0o11), 0o10), ehT0Px3KOsy9('\x30' + chr(2494 - 2383) + chr(540 - 489) + '\064' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b101011 + 0o104) + '\061', 57795 - 57787), ehT0Px3KOsy9(chr(836 - 788) + '\x6f' + chr(50) + '\064' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(3871 - 3760) + '\x31' + chr(48) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\x34' + chr(0b110001), 1501 - 1493), ehT0Px3KOsy9(chr(507 - 459) + chr(2142 - 2031) + chr(0b110001 + 0o1) + chr(0b110000 + 0o0) + chr(0b110000), 17839 - 17831), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\067' + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\064' + '\x35', 16808 - 16800), ehT0Px3KOsy9('\x30' + chr(11102 - 10991) + chr(51) + chr(792 - 739) + chr(0b110000 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + chr(4383 - 4272) + chr(681 - 632) + '\x37' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\064' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o44) + '\x37' + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(2001 - 1949) + chr(146 - 92), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(49) + chr(0b111 + 0o53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10100 + 0o35) + chr(49), 1105 - 1097), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(48) + chr(0b1111 + 0o41), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100000 + 0o22) + '\066', 2859 - 2851), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(2164 - 2113) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\x32' + chr(50) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1000 + 0o51) + chr(874 - 825) + chr(0b1010 + 0o47), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\067' + chr(0b1011 + 0o54), 0o10), ehT0Px3KOsy9('\x30' + chr(7927 - 7816) + chr(0b110001) + chr(55) + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(49) + chr(0b100011 + 0o23), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(6245 - 6134) + '\061' + chr(50) + chr(1980 - 1929), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(0b110011) + '\062' + chr(0b110 + 0o55), 30363 - 30355), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(54) + chr(0b11010 + 0o27), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3013 - 2902) + chr(0b101110 + 0o5) + chr(614 - 561) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1303 - 1255) + chr(8562 - 8451) + chr(51) + chr(0b11100 + 0o25) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(3733 - 3622) + chr(0b110010) + chr(1946 - 1892) + chr(0b110100), 53088 - 53080)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2127 - 2079) + chr(111) + '\x35' + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'z'), '\144' + chr(101) + chr(1842 - 1743) + chr(3463 - 3352) + '\144' + chr(101))(chr(117) + '\164' + chr(5272 - 5170) + '\055' + chr(541 - 485)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def lUM92A0BsiW9(oVre8I6UXc3b, x6ekJyEqYIT6):
if x6ekJyEqYIT6 == xafqLlk3kkUe(SXOLrMavuUCe(b'7F\xdb'), chr(100) + '\x65' + chr(3018 - 2919) + '\157' + chr(1110 - 1010) + chr(0b1011 + 0o132))(chr(117) + chr(0b1101010 + 0o12) + '\x66' + chr(45) + chr(469 - 413)):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'7T\xda$lX\x17z_\x9f\x87k!\xc56\x8e\xed\x98W\x83\x08\xfb\x8dV\xab{\xb3s|\xe7&\xdf\x19\xfd!\xf3X\x9a\xed\xda;A\x89#F[\x13z_\x8a\x85j'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(6178 - 6067) + chr(0b1100100) + chr(0b110011 + 0o62))('\165' + chr(2561 - 2445) + chr(0b1100100 + 0o2) + chr(0b101101) + chr(380 - 324)))
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'7T\xda$lX\x17z_\x9f\x87k'), chr(0b10010 + 0o122) + '\145' + chr(5684 - 5585) + '\x6f' + chr(9501 - 9401) + chr(4754 - 4653))('\x75' + chr(0b101110 + 0o106) + chr(0b10101 + 0o121) + chr(0b11001 + 0o24) + '\x38'))(oVre8I6UXc3b, stype=x6ekJyEqYIT6)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/sparse.py
|
RowSparseNDArray.copyto
|
def copyto(self, other):
"""Copies the value of this array to another array.
If ``other`` is a ``NDArray`` or ``RowSparseNDArray`` object, then ``other.shape``
and ``self.shape`` should be the same. This function copies the value from
``self`` to ``other``.
If ``other`` is a context, a new ``RowSparseNDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or RowSparseNDArray or Context
The destination array or context.
Returns
-------
NDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray`` or ``RowSparseNDArray``, then the
return value and ``other`` will point to the same ``NDArray`` or ``RowSparseNDArray``.
"""
if isinstance(other, Context):
return super(RowSparseNDArray, self).copyto(other)
elif isinstance(other, NDArray):
stype = other.stype
if stype in ('default', 'row_sparse'):
return super(RowSparseNDArray, self).copyto(other)
else:
raise TypeError('copyto does not support destination NDArray stype ' + str(stype))
else:
raise TypeError('copyto does not support type ' + str(type(other)))
|
python
|
def copyto(self, other):
"""Copies the value of this array to another array.
If ``other`` is a ``NDArray`` or ``RowSparseNDArray`` object, then ``other.shape``
and ``self.shape`` should be the same. This function copies the value from
``self`` to ``other``.
If ``other`` is a context, a new ``RowSparseNDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or RowSparseNDArray or Context
The destination array or context.
Returns
-------
NDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray`` or ``RowSparseNDArray``, then the
return value and ``other`` will point to the same ``NDArray`` or ``RowSparseNDArray``.
"""
if isinstance(other, Context):
return super(RowSparseNDArray, self).copyto(other)
elif isinstance(other, NDArray):
stype = other.stype
if stype in ('default', 'row_sparse'):
return super(RowSparseNDArray, self).copyto(other)
else:
raise TypeError('copyto does not support destination NDArray stype ' + str(stype))
else:
raise TypeError('copyto does not support type ' + str(type(other)))
|
[
"def",
"copyto",
"(",
"self",
",",
"other",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"Context",
")",
":",
"return",
"super",
"(",
"RowSparseNDArray",
",",
"self",
")",
".",
"copyto",
"(",
"other",
")",
"elif",
"isinstance",
"(",
"other",
",",
"NDArray",
")",
":",
"stype",
"=",
"other",
".",
"stype",
"if",
"stype",
"in",
"(",
"'default'",
",",
"'row_sparse'",
")",
":",
"return",
"super",
"(",
"RowSparseNDArray",
",",
"self",
")",
".",
"copyto",
"(",
"other",
")",
"else",
":",
"raise",
"TypeError",
"(",
"'copyto does not support destination NDArray stype '",
"+",
"str",
"(",
"stype",
")",
")",
"else",
":",
"raise",
"TypeError",
"(",
"'copyto does not support type '",
"+",
"str",
"(",
"type",
"(",
"other",
")",
")",
")"
] |
Copies the value of this array to another array.
If ``other`` is a ``NDArray`` or ``RowSparseNDArray`` object, then ``other.shape``
and ``self.shape`` should be the same. This function copies the value from
``self`` to ``other``.
If ``other`` is a context, a new ``RowSparseNDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or RowSparseNDArray or Context
The destination array or context.
Returns
-------
NDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray`` or ``RowSparseNDArray``, then the
return value and ``other`` will point to the same ``NDArray`` or ``RowSparseNDArray``.
|
[
"Copies",
"the",
"value",
"of",
"this",
"array",
"to",
"another",
"array",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/sparse.py#L754-L784
|
train
|
Copies the value of this array to another array.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0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9iu2kLpS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b10000 + 0o45) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(1408 - 1360), 28751 - 28743), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x37' + '\x30', 12626 - 12618), ehT0Px3KOsy9(chr(2105 - 2057) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(50), 49395 - 49387), ehT0Px3KOsy9('\060' + chr(111) + chr(119 - 69) + '\x33' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1355 - 1307) + '\x6f' + chr(241 - 187), 51143 - 51135), ehT0Px3KOsy9('\060' + chr(3945 - 3834) + chr(0b11001 + 0o30) + '\x31' + chr(0b11000 + 0o36), 64826 - 64818), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + '\x32' + chr(1238 - 1190) + chr(50), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b1101 + 0o51) + chr(0b110000), 1145 - 1137), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b10 + 0o155) + chr(50) + '\x33' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b0 + 0o63) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110010) + '\060', 13326 - 13318), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b110110) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001000 + 0o47) + '\062' + chr(2381 - 2330) + '\x33', 8), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\066' + chr(0b110000 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4147 - 4036) + '\x33' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x36', 38571 - 38563), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(54) + chr(489 - 440), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101101 + 0o4) + '\x37' + chr(0b100100 + 0o21), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111 + 0o150) + chr(0b10110 + 0o33) + chr(245 - 196) + chr(50), 64369 - 64361), ehT0Px3KOsy9(chr(0b110000) + chr(11241 - 11130) + chr(0b11110 + 0o23) + chr(2001 - 1948) + chr(1213 - 1163), 56762 - 56754), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\x36' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000 + 0o6) + chr(114 - 59), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b111 + 0o53) + chr(0b110001) + chr(1604 - 1554), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(0b1110 + 0o44) + chr(0b110111) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(699 - 650) + chr(52) + chr(1558 - 1506), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\x33' + chr(0b110011) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(9799 - 9688) + chr(0b11011 + 0o26) + chr(1248 - 1198) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(568 - 520) + chr(11541 - 11430) + chr(0b110001) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b11110 + 0o25) + chr(0b110011) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + '\x33' + chr(49) + '\060', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b100101 + 0o14) + '\066', 8), ehT0Px3KOsy9(chr(1068 - 1020) + '\x6f' + '\x31' + '\x37' + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(633 - 582) + chr(0b100001 + 0o20) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o61) + '\066' + chr(0b110000 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + chr(49) + chr(0b101010 + 0o11) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(8719 - 8608) + chr(0b110010) + chr(0b110000 + 0o4) + chr(0b110100), 64926 - 64918), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10111 + 0o32) + '\067' + '\063', 9522 - 9514), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(0b110001) + '\x30' + chr(53), 0b1000), ehT0Px3KOsy9(chr(2146 - 2098) + chr(0b1101111) + chr(597 - 546) + chr(0b10000 + 0o40) + chr(54), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(2058 - 2010), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x06'), chr(100) + chr(5895 - 5794) + chr(0b1000101 + 0o36) + chr(0b1101111) + chr(100) + chr(101))(chr(7644 - 7527) + '\164' + chr(0b1000011 + 0o43) + chr(1541 - 1496) + chr(1180 - 1124)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CwJbtgNJtD2J(oVre8I6UXc3b, KK0ERS7DqYrY):
if PlSM16l2KDPD(KK0ERS7DqYrY, OQ5n2iUDAxKy):
return xafqLlk3kkUe(KNx0Ujaz9UM0(RwEGWXdf9TZ4, oVre8I6UXc3b), xafqLlk3kkUe(SXOLrMavuUCe(b'K\x87H\x1b\xefi'), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(5908 - 5807))(chr(7247 - 7130) + chr(10348 - 10232) + '\146' + '\055' + chr(0b111000)))(KK0ERS7DqYrY)
elif PlSM16l2KDPD(KK0ERS7DqYrY, GdqFjMbtKL7s):
x6ekJyEqYIT6 = KK0ERS7DqYrY.stype
if x6ekJyEqYIT6 in (xafqLlk3kkUe(SXOLrMavuUCe(b'L\x8d^\x03\xeej:'), '\144' + chr(0b1110 + 0o127) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b100010 + 0o103))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b11001 + 0o24) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'Z\x87O=\xe8v/\xf0\x83\xfa'), chr(100) + chr(0b10010 + 0o123) + chr(6863 - 6764) + '\157' + chr(6806 - 6706) + '\x65')(chr(0b11 + 0o162) + chr(0b1000111 + 0o55) + '\146' + '\x2d' + chr(0b111000))):
return xafqLlk3kkUe(KNx0Ujaz9UM0(RwEGWXdf9TZ4, oVre8I6UXc3b), xafqLlk3kkUe(SXOLrMavuUCe(b'K\x87H\x1b\xefi'), '\x64' + chr(101) + chr(3695 - 3596) + '\x6f' + '\144' + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b100001 + 0o27)))(KK0ERS7DqYrY)
else:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'K\x87H\x1b\xefin\xe6\x9f\xfa*\xf0\x9a\xf4\x879m\x84\r:\x05\x84C\xaa\xdd\x01\xa8#e\xb3\xa9:\x17\xa3\x1c{\xea?\x04\xb4Z\x89AB\xe8r7\xf2\x95\xbf'), chr(2245 - 2145) + chr(0b1100101) + '\x63' + chr(7726 - 7615) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(6520 - 6404) + '\x66' + '\055' + chr(0b100111 + 0o21)) + M8_cKLkHVB2V(x6ekJyEqYIT6))
else:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'K\x87H\x1b\xefin\xe6\x9f\xfa*\xf0\x9a\xf4\x879m\x84\r:\x05\x84C\xaa\xcd\x1d\xab2,'), '\144' + chr(101) + chr(0b1100011) + chr(1018 - 907) + '\144' + chr(101))('\165' + chr(3343 - 3227) + chr(3054 - 2952) + '\x2d' + chr(56)) + M8_cKLkHVB2V(wmQmyeWBmUpv(KK0ERS7DqYrY)))
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/mx2onnx/export_model.py
|
export_model
|
def export_model(sym, params, input_shape, input_type=np.float32,
onnx_file_path='model.onnx', verbose=False):
"""Exports the MXNet model file, passed as a parameter, into ONNX model.
Accepts both symbol,parameter objects as well as json and params filepaths as input.
Operator support and coverage -
https://cwiki.apache.org/confluence/display/MXNET/MXNet-ONNX+Integration
Parameters
----------
sym : str or symbol object
Path to the json file or Symbol object
params : str or symbol object
Path to the params file or params dictionary. (Including both arg_params and aux_params)
input_shape : List of tuple
Input shape of the model e.g [(1,3,224,224)]
input_type : data type
Input data type e.g. np.float32
onnx_file_path : str
Path where to save the generated onnx file
verbose : Boolean
If true will print logs of the model conversion
Returns
-------
onnx_file_path : str
Onnx file path
Notes
-----
This method is available when you ``import mxnet.contrib.onnx``
"""
try:
from onnx import helper, mapping
except ImportError:
raise ImportError("Onnx and protobuf need to be installed. "
+ "Instructions to install - https://github.com/onnx/onnx")
converter = MXNetGraph()
data_format = np.dtype(input_type)
# if input parameters are strings(file paths), load files and create symbol parameter objects
if isinstance(sym, string_types) and isinstance(params, string_types):
logging.info("Converting json and weight file to sym and params")
sym_obj, params_obj = load_module(sym, params)
onnx_graph = converter.create_onnx_graph_proto(sym_obj, params_obj, input_shape,
mapping.NP_TYPE_TO_TENSOR_TYPE[data_format],
verbose=verbose)
elif isinstance(sym, symbol.Symbol) and isinstance(params, dict):
onnx_graph = converter.create_onnx_graph_proto(sym, params, input_shape,
mapping.NP_TYPE_TO_TENSOR_TYPE[data_format],
verbose=verbose)
else:
raise ValueError("Input sym and params should either be files or objects")
# Create the model (ModelProto)
onnx_model = helper.make_model(onnx_graph)
# Save model on disk
with open(onnx_file_path, "wb") as file_handle:
serialized = onnx_model.SerializeToString()
file_handle.write(serialized)
logging.info("Input shape of the model %s ", input_shape)
logging.info("Exported ONNX file %s saved to disk", onnx_file_path)
return onnx_file_path
|
python
|
def export_model(sym, params, input_shape, input_type=np.float32,
onnx_file_path='model.onnx', verbose=False):
"""Exports the MXNet model file, passed as a parameter, into ONNX model.
Accepts both symbol,parameter objects as well as json and params filepaths as input.
Operator support and coverage -
https://cwiki.apache.org/confluence/display/MXNET/MXNet-ONNX+Integration
Parameters
----------
sym : str or symbol object
Path to the json file or Symbol object
params : str or symbol object
Path to the params file or params dictionary. (Including both arg_params and aux_params)
input_shape : List of tuple
Input shape of the model e.g [(1,3,224,224)]
input_type : data type
Input data type e.g. np.float32
onnx_file_path : str
Path where to save the generated onnx file
verbose : Boolean
If true will print logs of the model conversion
Returns
-------
onnx_file_path : str
Onnx file path
Notes
-----
This method is available when you ``import mxnet.contrib.onnx``
"""
try:
from onnx import helper, mapping
except ImportError:
raise ImportError("Onnx and protobuf need to be installed. "
+ "Instructions to install - https://github.com/onnx/onnx")
converter = MXNetGraph()
data_format = np.dtype(input_type)
# if input parameters are strings(file paths), load files and create symbol parameter objects
if isinstance(sym, string_types) and isinstance(params, string_types):
logging.info("Converting json and weight file to sym and params")
sym_obj, params_obj = load_module(sym, params)
onnx_graph = converter.create_onnx_graph_proto(sym_obj, params_obj, input_shape,
mapping.NP_TYPE_TO_TENSOR_TYPE[data_format],
verbose=verbose)
elif isinstance(sym, symbol.Symbol) and isinstance(params, dict):
onnx_graph = converter.create_onnx_graph_proto(sym, params, input_shape,
mapping.NP_TYPE_TO_TENSOR_TYPE[data_format],
verbose=verbose)
else:
raise ValueError("Input sym and params should either be files or objects")
# Create the model (ModelProto)
onnx_model = helper.make_model(onnx_graph)
# Save model on disk
with open(onnx_file_path, "wb") as file_handle:
serialized = onnx_model.SerializeToString()
file_handle.write(serialized)
logging.info("Input shape of the model %s ", input_shape)
logging.info("Exported ONNX file %s saved to disk", onnx_file_path)
return onnx_file_path
|
[
"def",
"export_model",
"(",
"sym",
",",
"params",
",",
"input_shape",
",",
"input_type",
"=",
"np",
".",
"float32",
",",
"onnx_file_path",
"=",
"'model.onnx'",
",",
"verbose",
"=",
"False",
")",
":",
"try",
":",
"from",
"onnx",
"import",
"helper",
",",
"mapping",
"except",
"ImportError",
":",
"raise",
"ImportError",
"(",
"\"Onnx and protobuf need to be installed. \"",
"+",
"\"Instructions to install - https://github.com/onnx/onnx\"",
")",
"converter",
"=",
"MXNetGraph",
"(",
")",
"data_format",
"=",
"np",
".",
"dtype",
"(",
"input_type",
")",
"# if input parameters are strings(file paths), load files and create symbol parameter objects",
"if",
"isinstance",
"(",
"sym",
",",
"string_types",
")",
"and",
"isinstance",
"(",
"params",
",",
"string_types",
")",
":",
"logging",
".",
"info",
"(",
"\"Converting json and weight file to sym and params\"",
")",
"sym_obj",
",",
"params_obj",
"=",
"load_module",
"(",
"sym",
",",
"params",
")",
"onnx_graph",
"=",
"converter",
".",
"create_onnx_graph_proto",
"(",
"sym_obj",
",",
"params_obj",
",",
"input_shape",
",",
"mapping",
".",
"NP_TYPE_TO_TENSOR_TYPE",
"[",
"data_format",
"]",
",",
"verbose",
"=",
"verbose",
")",
"elif",
"isinstance",
"(",
"sym",
",",
"symbol",
".",
"Symbol",
")",
"and",
"isinstance",
"(",
"params",
",",
"dict",
")",
":",
"onnx_graph",
"=",
"converter",
".",
"create_onnx_graph_proto",
"(",
"sym",
",",
"params",
",",
"input_shape",
",",
"mapping",
".",
"NP_TYPE_TO_TENSOR_TYPE",
"[",
"data_format",
"]",
",",
"verbose",
"=",
"verbose",
")",
"else",
":",
"raise",
"ValueError",
"(",
"\"Input sym and params should either be files or objects\"",
")",
"# Create the model (ModelProto)",
"onnx_model",
"=",
"helper",
".",
"make_model",
"(",
"onnx_graph",
")",
"# Save model on disk",
"with",
"open",
"(",
"onnx_file_path",
",",
"\"wb\"",
")",
"as",
"file_handle",
":",
"serialized",
"=",
"onnx_model",
".",
"SerializeToString",
"(",
")",
"file_handle",
".",
"write",
"(",
"serialized",
")",
"logging",
".",
"info",
"(",
"\"Input shape of the model %s \"",
",",
"input_shape",
")",
"logging",
".",
"info",
"(",
"\"Exported ONNX file %s saved to disk\"",
",",
"onnx_file_path",
")",
"return",
"onnx_file_path"
] |
Exports the MXNet model file, passed as a parameter, into ONNX model.
Accepts both symbol,parameter objects as well as json and params filepaths as input.
Operator support and coverage -
https://cwiki.apache.org/confluence/display/MXNET/MXNet-ONNX+Integration
Parameters
----------
sym : str or symbol object
Path to the json file or Symbol object
params : str or symbol object
Path to the params file or params dictionary. (Including both arg_params and aux_params)
input_shape : List of tuple
Input shape of the model e.g [(1,3,224,224)]
input_type : data type
Input data type e.g. np.float32
onnx_file_path : str
Path where to save the generated onnx file
verbose : Boolean
If true will print logs of the model conversion
Returns
-------
onnx_file_path : str
Onnx file path
Notes
-----
This method is available when you ``import mxnet.contrib.onnx``
|
[
"Exports",
"the",
"MXNet",
"model",
"file",
"passed",
"as",
"a",
"parameter",
"into",
"ONNX",
"model",
".",
"Accepts",
"both",
"symbol",
"parameter",
"objects",
"as",
"well",
"as",
"json",
"and",
"params",
"filepaths",
"as",
"input",
".",
"Operator",
"support",
"and",
"coverage",
"-",
"https",
":",
"//",
"cwiki",
".",
"apache",
".",
"org",
"/",
"confluence",
"/",
"display",
"/",
"MXNET",
"/",
"MXNet",
"-",
"ONNX",
"+",
"Integration"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/mx2onnx/export_model.py#L35-L101
|
train
|
Exports the MXNet model file passed as a parameter into ONNX model file.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Z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kL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b10101 + 0o41) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2136 - 2087) + '\065' + chr(0b101111 + 0o2), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b110101 + 0o2) + chr(1973 - 1920), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10101 + 0o37) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + '\061' + chr(0b110001) + chr(624 - 572), 42667 - 42659), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110000 + 0o7) + '\x35', 0o10), ehT0Px3KOsy9(chr(688 - 640) + chr(0b1101111) + chr(1028 - 978) + chr(0b1111 + 0o41) + chr(1397 - 1342), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + chr(0b100011 + 0o17) + '\060' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1316 - 1266) + chr(50) + chr(501 - 450), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(53) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(51) + chr(52) + chr(142 - 93), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + chr(51) + chr(0b11100 + 0o27) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(0b11010 + 0o30) + '\x32' + '\066', 12037 - 12029), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(0b110010), 27107 - 27099), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + chr(0b110010) + chr(0b1101 + 0o45) + chr(0b110110), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101001 + 0o10) + chr(51) + chr(423 - 371), 0b1000), ehT0Px3KOsy9(chr(1291 - 1243) + chr(0b1101111) + '\x31' + chr(0b101011 + 0o13) + chr(0b101101 + 0o11), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\066', 0o10), ehT0Px3KOsy9(chr(1044 - 996) + chr(0b1101111) + chr(49) + chr(485 - 431) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(0b11000 + 0o37) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(1542 - 1492) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1011010 + 0o25) + chr(53) + chr(0b10001 + 0o43), 0b1000), ehT0Px3KOsy9('\x30' + chr(2045 - 1934) + '\066' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b100111 + 0o14) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1426 - 1372) + '\067', 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(351 - 297), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x32' + chr(72 - 17) + chr(55), 65 - 57), ehT0Px3KOsy9(chr(1901 - 1853) + chr(111) + '\062' + chr(51) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1011000 + 0o27) + '\067' + chr(227 - 179), 37793 - 37785), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x34' + '\060', 46990 - 46982), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + '\x31' + '\064' + chr(471 - 419), 0o10), ehT0Px3KOsy9(chr(1747 - 1699) + chr(0b1101111) + chr(49) + chr(1105 - 1052) + chr(0b110010 + 0o5), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(835 - 786) + chr(0b110 + 0o54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(644 - 533) + '\x33' + chr(1033 - 979) + chr(1276 - 1224), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110101) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101011 + 0o4) + '\x32' + '\062' + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2145 - 2095) + chr(0b110110) + chr(0b101011 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(2591 - 2480) + chr(0b110011) + '\067' + '\x32', 23868 - 23860), ehT0Px3KOsy9('\x30' + '\157' + '\065' + chr(0b110100), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110101) + chr(1533 - 1485), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'Z'), '\144' + '\145' + chr(2529 - 2430) + '\x6f' + chr(0b10001 + 0o123) + chr(0b110 + 0o137))(chr(13320 - 13203) + '\164' + chr(0b1000000 + 0o46) + chr(618 - 573) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _fXJt9bhyOLQ(I7QF3KlS7cYz, nEbJZ4wfte2w, tANyZeuTfu5y, vsugdZNHo5OD=xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12\x05\xd2F8\xce\xb5'), chr(0b1100100) + chr(101) + chr(7559 - 7460) + chr(0b1101111) + chr(0b111111 + 0o45) + chr(101))(chr(4566 - 4449) + chr(0b1001001 + 0o53) + chr(9471 - 9369) + '\x2d' + '\070')), g65dP1hHWz5l=xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\x06\xd9B \xd3\xe8\xed\xfd\x91'), chr(8913 - 8813) + '\145' + '\143' + chr(0b1101111) + chr(4342 - 4242) + chr(2336 - 2235))(chr(0b100001 + 0o124) + '\x74' + chr(102) + chr(490 - 445) + chr(0b111000)), j5jgrsOGZdZ4=ehT0Px3KOsy9(chr(48) + chr(9753 - 9642) + '\060', 0b1000)):
try:
(D2UHT2N78p3Y, lDyiwdy_JhxC) = (xafqLlk3kkUe(NPPHb59961Bv(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\x07\xd3_'), chr(0b100001 + 0o103) + '\145' + '\143' + chr(2080 - 1969) + chr(100) + chr(101))('\165' + '\x74' + chr(0b1100110) + '\055' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\x0c\xd1W)\x8f'), chr(0b1011011 + 0o11) + chr(794 - 693) + '\143' + chr(111) + '\x64' + chr(8335 - 8234))('\x75' + chr(1143 - 1027) + '\x66' + chr(0b101101) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\x0c\xd1W)\x8f'), chr(100) + '\x65' + chr(0b100110 + 0o75) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(1320 - 1264))), xafqLlk3kkUe(NPPHb59961Bv(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\x07\xd3_'), '\144' + chr(101) + '\x63' + chr(111) + '\x64' + chr(101))('\165' + chr(116) + chr(10094 - 9992) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\x08\xcdW%\x93\xe0'), '\x64' + '\145' + chr(99) + '\x6f' + '\x64' + chr(0b1011100 + 0o11))(chr(0b100 + 0o161) + '\164' + '\146' + '\055' + chr(56))), xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\x08\xcdW%\x93\xe0'), '\x64' + chr(0b1100101) + chr(8002 - 7903) + '\157' + chr(0b100 + 0o140) + chr(0b1100101))(chr(117) + chr(596 - 480) + chr(0b101011 + 0o73) + chr(0b101101) + '\x38')))
except yROw0HWBk0Qc:
raise yROw0HWBk0Qc(xafqLlk3kkUe(SXOLrMavuUCe(b';\x07\xd3_l\x9c\xe9\xe7\xb3\x99\x93\xb1\xe2\xfd\xf4)\x10.\x1c\x9e0H\x17\xacX>\xdd\xff\x18\x89\n\x1c~\x95o\x02\xf5\xd4\xd4\x0c'), chr(100) + chr(0b1100101) + '\143' + chr(1117 - 1006) + '\144' + chr(0b11101 + 0o110))(chr(3509 - 3392) + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)) + xafqLlk3kkUe(SXOLrMavuUCe(b'=\x07\xceS>\x88\xe4\xf7\xfa\x86\x8f\xad\xb6\xe6\xf9|\x1f`\x01\x8f4@[\xf8\x1a>\xd7\xeeL\x90\x17U%\xdbd\x07\xe4\xd8\x8fNZ\n\xd2Jc\x92\xe9\xed\xeb\xc6\x8e\xb0\xf8\xea'), chr(0b1100100) + chr(0b1000110 + 0o37) + chr(1827 - 1728) + chr(0b101100 + 0o103) + chr(100) + '\145')('\x75' + chr(116) + '\x66' + chr(0b101101) + '\070'))
wru4WosnIa3D = T0T9J07KBYza()
ydIN5gIUKwpW = WqUC3KWvYVup.jSV9IKnemH7K(vsugdZNHo5OD)
if PlSM16l2KDPD(I7QF3KlS7cYz, sInLJQno9SRQ) and PlSM16l2KDPD(nEbJZ4wfte2w, sInLJQno9SRQ):
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b"'^\xf5_9\x9e\xe0\xb4\xf9\x85\xbb\xb5"), chr(100) + chr(101) + chr(0b1010011 + 0o20) + '\x6f' + '\x64' + '\145')('\165' + '\164' + '\x66' + chr(45) + chr(0b1000 + 0o60)))(xafqLlk3kkUe(SXOLrMavuUCe(b'7\x06\xd3Q)\x8f\xf3\xea\xfd\x8e\xc1\xb4\xe5\xfd\xf8|\x17`\x16\xdb"I^\xbf_j\x9f\xfcQ\x8c\x01O~\x9b#\x1d\xe9\xdd\xdaM\x1a\r\x9dW-\x8f\xe6\xee\xe0'), chr(0b101100 + 0o70) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(0b1110100) + chr(0b11011 + 0o113) + chr(45) + chr(56)))
(cPqDlTE6I4EZ, mOJXQBYVXQja) = W0yTvbnzZllC(I7QF3KlS7cYz, nEbJZ4wfte2w)
YvH8mH0BHcrA = wru4WosnIa3D.create_onnx_graph_proto(cPqDlTE6I4EZ, mOJXQBYVXQja, tANyZeuTfu5y, lDyiwdy_JhxC.NP_TYPE_TO_TENSOR_TYPE[ydIN5gIUKwpW], verbose=j5jgrsOGZdZ4)
elif PlSM16l2KDPD(I7QF3KlS7cYz, xafqLlk3kkUe(Usr5ykvL2UZF, xafqLlk3kkUe(SXOLrMavuUCe(b"'\x10\xd0E#\x91"), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b100000 + 0o117) + chr(0b1100100) + chr(101))(chr(0b1110000 + 0o5) + chr(0b1110100) + chr(0b1100110) + chr(1238 - 1193) + chr(0b111000)))) and PlSM16l2KDPD(nEbJZ4wfte2w, wLqBDw8l0eIm):
YvH8mH0BHcrA = wru4WosnIa3D.create_onnx_graph_proto(I7QF3KlS7cYz, nEbJZ4wfte2w, tANyZeuTfu5y, lDyiwdy_JhxC.NP_TYPE_TO_TENSOR_TYPE[ydIN5gIUKwpW], verbose=j5jgrsOGZdZ4)
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'=\x07\xcdR8\xdd\xf4\xfa\xfe\xc9\x80\xb0\xf2\xb2\xe6=\x04o\x1f\x88u__\xb7Br\xdb\xba]\x89\x10\x07o\x86#\x0c\xf5\x90\x9cE\x18\x0c\xce\x07#\x8f\xa7\xec\xf1\x83\x84\xbd\xe2\xe1'), '\144' + chr(7057 - 6956) + chr(0b1100001 + 0o2) + '\157' + '\x64' + chr(0b1011100 + 0o11))(chr(8669 - 8552) + chr(0b1011100 + 0o30) + chr(102) + chr(45) + chr(0b101001 + 0o17)))
lNGC65wPCPfF = D2UHT2N78p3Y.make_model(YvH8mH0BHcrA)
with _fwkIVCGgtAN(g65dP1hHWz5l, xafqLlk3kkUe(SXOLrMavuUCe(b'\x03\x0b'), chr(0b1100100) + chr(101) + '\143' + chr(111) + '\x64' + '\145')(chr(117) + '\164' + chr(0b111101 + 0o51) + chr(0b100100 + 0o11) + chr(907 - 851))) as AeMiztGb7Fhc:
_8xRn8xo59Yl = lNGC65wPCPfF.SerializeToString()
xafqLlk3kkUe(AeMiztGb7Fhc, xafqLlk3kkUe(SXOLrMavuUCe(b'\x03\x1b\xd4S)'), chr(0b1100100) + chr(2647 - 2546) + chr(0b111100 + 0o47) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1101010 + 0o13) + '\x74' + chr(0b1100110) + '\x2d' + chr(56)))(_8xRn8xo59Yl)
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b"'^\xf5_9\x9e\xe0\xb4\xf9\x85\xbb\xb5"), '\144' + chr(7454 - 7353) + '\143' + chr(416 - 305) + chr(6960 - 6860) + chr(0b1100101))(chr(1218 - 1101) + '\164' + chr(0b111 + 0o137) + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'=\x07\xcdR8\xdd\xf4\xeb\xf2\x99\x84\xfe\xf9\xf4\xb6(\x1ekR\x96:HR\xb4\x17;\xcc\xba'), chr(100) + chr(101) + chr(0b1010100 + 0o17) + chr(0b1001100 + 0o43) + chr(100) + '\145')(chr(0b1000111 + 0o56) + chr(0b1001111 + 0o45) + chr(1740 - 1638) + chr(0b11101 + 0o20) + chr(0b100101 + 0o23)), tANyZeuTfu5y)
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b"'^\xf5_9\x9e\xe0\xb4\xf9\x85\xbb\xb5"), chr(0b111001 + 0o53) + chr(0b1100101) + chr(0b100110 + 0o75) + chr(0b1101111) + chr(851 - 751) + '\145')('\x75' + chr(116) + '\x66' + '\x2d' + chr(0b11000 + 0o40)))(xafqLlk3kkUe(SXOLrMavuUCe(b'1\x11\xcdH>\x89\xe2\xe7\xb3\xa6\xaf\x90\xce\xb2\xf05\x1akR\xde&\x0cD\xb9A{\xdb\xbaL\x8fD\x0bc\x87h'), chr(0b1100100) + chr(2549 - 2448) + '\x63' + chr(0b1010110 + 0o31) + '\144' + chr(101))('\165' + '\x74' + '\x66' + chr(0b100001 + 0o14) + '\x38'), g65dP1hHWz5l)
return g65dP1hHWz5l
|
apache/incubator-mxnet
|
benchmark/python/sparse/memory_benchmark.py
|
bench_dot
|
def bench_dot(lhs_row_dim, lhs_col_dim, rhs_col_dim, density,
rhs_density, dot_func, trans_lhs, lhs_stype,
rhs_stype, only_storage, distribution="uniform"):
""" Benchmarking both storage and dot
"""
lhs_nd = rand_ndarray((lhs_row_dim, lhs_col_dim), lhs_stype, density, distribution=distribution)
if not only_storage:
rhs_nd = rand_ndarray((lhs_col_dim, rhs_col_dim), rhs_stype,
density=rhs_density, distribution=distribution)
out = dot_func(lhs_nd, rhs_nd, trans_lhs)
mx.nd.waitall()
|
python
|
def bench_dot(lhs_row_dim, lhs_col_dim, rhs_col_dim, density,
rhs_density, dot_func, trans_lhs, lhs_stype,
rhs_stype, only_storage, distribution="uniform"):
""" Benchmarking both storage and dot
"""
lhs_nd = rand_ndarray((lhs_row_dim, lhs_col_dim), lhs_stype, density, distribution=distribution)
if not only_storage:
rhs_nd = rand_ndarray((lhs_col_dim, rhs_col_dim), rhs_stype,
density=rhs_density, distribution=distribution)
out = dot_func(lhs_nd, rhs_nd, trans_lhs)
mx.nd.waitall()
|
[
"def",
"bench_dot",
"(",
"lhs_row_dim",
",",
"lhs_col_dim",
",",
"rhs_col_dim",
",",
"density",
",",
"rhs_density",
",",
"dot_func",
",",
"trans_lhs",
",",
"lhs_stype",
",",
"rhs_stype",
",",
"only_storage",
",",
"distribution",
"=",
"\"uniform\"",
")",
":",
"lhs_nd",
"=",
"rand_ndarray",
"(",
"(",
"lhs_row_dim",
",",
"lhs_col_dim",
")",
",",
"lhs_stype",
",",
"density",
",",
"distribution",
"=",
"distribution",
")",
"if",
"not",
"only_storage",
":",
"rhs_nd",
"=",
"rand_ndarray",
"(",
"(",
"lhs_col_dim",
",",
"rhs_col_dim",
")",
",",
"rhs_stype",
",",
"density",
"=",
"rhs_density",
",",
"distribution",
"=",
"distribution",
")",
"out",
"=",
"dot_func",
"(",
"lhs_nd",
",",
"rhs_nd",
",",
"trans_lhs",
")",
"mx",
".",
"nd",
".",
"waitall",
"(",
")"
] |
Benchmarking both storage and dot
|
[
"Benchmarking",
"both",
"storage",
"and",
"dot"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/benchmark/python/sparse/memory_benchmark.py#L79-L89
|
train
|
Benchmarks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u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(0b11111 + 0o24) + chr(51) + chr(0b11111 + 0o30), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x31' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(2198 - 2150) + '\157' + '\062' + chr(0b110101) + chr(52), 5620 - 5612), ehT0Px3KOsy9(chr(0b110000) + chr(7094 - 6983) + chr(609 - 558) + chr(0b10100 + 0o37) + chr(0b101011 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4109 - 3998) + '\x32' + chr(0b110010 + 0o4) + chr(0b1011 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(459 - 411) + chr(0b1101111) + chr(1341 - 1290) + chr(52) + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110111) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(1358 - 1309) + chr(0b110001) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1001101 + 0o42) + chr(0b110111) + chr(451 - 401), 0o10), ehT0Px3KOsy9(chr(333 - 285) + chr(0b1101101 + 0o2) + '\063' + chr(2138 - 2089) + chr(2996 - 2941), ord("\x08")), ehT0Px3KOsy9(chr(1948 - 1900) + chr(0b1001110 + 0o41) + '\062' + chr(0b110011) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\x32' + '\062' + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(0b10110 + 0o131) + '\x32' + '\x35' + chr(0b10010 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2322 - 2272) + chr(0b110100) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11 + 0o56) + chr(0b110000) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1001 + 0o50) + chr(2133 - 2085) + '\x32', 27484 - 27476), ehT0Px3KOsy9('\060' + '\x6f' + '\066' + '\x37', 60018 - 60010), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b101 + 0o152) + chr(2236 - 2185) + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + '\x32' + chr(0b100111 + 0o15) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(1888 - 1838) + chr(0b11110 + 0o25) + chr(554 - 504), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x32' + chr(52) + '\x34', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1766 - 1715) + chr(49) + chr(0b11110 + 0o26), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6396 - 6285) + chr(1163 - 1110) + chr(0b110 + 0o55), 29349 - 29341), ehT0Px3KOsy9(chr(2242 - 2194) + '\157' + '\061' + '\x37' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2413 - 2302) + '\062' + '\x34' + chr(0b100010 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(50) + chr(49) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b10100 + 0o133) + chr(0b110001) + '\061' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(2272 - 2224) + '\157' + '\063' + chr(0b100110 + 0o21) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100001 + 0o116) + chr(0b110001) + '\x36' + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2327 - 2216) + chr(0b10100 + 0o43) + chr(0b110011), 55669 - 55661), ehT0Px3KOsy9('\x30' + chr(6145 - 6034) + chr(0b110001) + chr(53) + chr(0b110111), 12519 - 12511), ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + '\x36' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111111 + 0o60) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101011 + 0o4) + chr(0b1001 + 0o51) + chr(49) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(10174 - 10063) + chr(55), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(1878 - 1830) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(2963 - 2852) + chr(234 - 183) + chr(55) + chr(1631 - 1583), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1929 - 1879) + chr(0b110100) + '\x33', 1188 - 1180), ehT0Px3KOsy9(chr(1018 - 970) + chr(111) + chr(49) + chr(0b1101 + 0o44) + chr(0b110010), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1267 - 1219) + chr(0b1010001 + 0o36) + chr(0b101001 + 0o14) + chr(0b110 + 0o52), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1'), chr(1906 - 1806) + '\x65' + chr(0b1000100 + 0o37) + chr(0b111001 + 0o66) + '\x64' + chr(0b1001100 + 0o31))('\165' + chr(116) + chr(6154 - 6052) + chr(1262 - 1217) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def cPrYSPXXTVjU(dspueWLSjkNa, mFWwrJdVUBrl, RwZVLdNsuBPh, opienJznAkre, _zLamC6pUz0K, us3Y_TOkXr6T, j1QywHRcYiPz, gPNnIQx_6T3K, LvlYiXh2emQ9, bx69yYdkb36N, iJvq7pIHWwTP=xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa"b\xca\xb4\xc0\x89'), chr(0b110000 + 0o64) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1001010 + 0o32) + '\145')('\165' + chr(116) + chr(8663 - 8561) + chr(0b100111 + 0o6) + chr(0b110 + 0o62))):
AfjN7soy6r2V = U56auabyHweR((dspueWLSjkNa, mFWwrJdVUBrl), gPNnIQx_6T3K, opienJznAkre, distribution=iJvq7pIHWwTP)
if not bx69yYdkb36N:
bXNBYQOH3fDV = U56auabyHweR((mFWwrJdVUBrl, RwZVLdNsuBPh), LvlYiXh2emQ9, density=_zLamC6pUz0K, distribution=iJvq7pIHWwTP)
UkrMp_I0RDmo = us3Y_TOkXr6T(AfjN7soy6r2V, bXNBYQOH3fDV, j1QywHRcYiPz)
xafqLlk3kkUe(CIVheOt0RKQX.nd, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8-b\xd8\xba\xde\x88'), chr(626 - 526) + '\x65' + chr(7408 - 7309) + chr(11979 - 11868) + chr(100) + chr(1434 - 1333))(chr(0b1000101 + 0o60) + '\164' + chr(0b1000110 + 0o40) + '\x2d' + '\x38'))()
|
apache/incubator-mxnet
|
tools/caffe_converter/convert_mean.py
|
convert_mean
|
def convert_mean(binaryproto_fname, output=None):
"""Convert caffe mean
Parameters
----------
binaryproto_fname : str
Filename of the mean
output : str, optional
Save the mean into mxnet's format
Returns
-------
NDArray
Mean in ndarray
"""
mean_blob = caffe_parser.caffe_pb2.BlobProto()
with open(binaryproto_fname, 'rb') as f:
mean_blob.ParseFromString(f.read())
img_mean_np = np.array(mean_blob.data)
img_mean_np = img_mean_np.reshape(
mean_blob.channels, mean_blob.height, mean_blob.width
)
# swap channels from Caffe BGR to RGB
img_mean_np[[0, 2], :, :] = img_mean_np[[2, 0], :, :]
nd = mx.nd.array(img_mean_np)
if output is not None:
mx.nd.save(output, {"mean_image": nd})
return nd
|
python
|
def convert_mean(binaryproto_fname, output=None):
"""Convert caffe mean
Parameters
----------
binaryproto_fname : str
Filename of the mean
output : str, optional
Save the mean into mxnet's format
Returns
-------
NDArray
Mean in ndarray
"""
mean_blob = caffe_parser.caffe_pb2.BlobProto()
with open(binaryproto_fname, 'rb') as f:
mean_blob.ParseFromString(f.read())
img_mean_np = np.array(mean_blob.data)
img_mean_np = img_mean_np.reshape(
mean_blob.channels, mean_blob.height, mean_blob.width
)
# swap channels from Caffe BGR to RGB
img_mean_np[[0, 2], :, :] = img_mean_np[[2, 0], :, :]
nd = mx.nd.array(img_mean_np)
if output is not None:
mx.nd.save(output, {"mean_image": nd})
return nd
|
[
"def",
"convert_mean",
"(",
"binaryproto_fname",
",",
"output",
"=",
"None",
")",
":",
"mean_blob",
"=",
"caffe_parser",
".",
"caffe_pb2",
".",
"BlobProto",
"(",
")",
"with",
"open",
"(",
"binaryproto_fname",
",",
"'rb'",
")",
"as",
"f",
":",
"mean_blob",
".",
"ParseFromString",
"(",
"f",
".",
"read",
"(",
")",
")",
"img_mean_np",
"=",
"np",
".",
"array",
"(",
"mean_blob",
".",
"data",
")",
"img_mean_np",
"=",
"img_mean_np",
".",
"reshape",
"(",
"mean_blob",
".",
"channels",
",",
"mean_blob",
".",
"height",
",",
"mean_blob",
".",
"width",
")",
"# swap channels from Caffe BGR to RGB",
"img_mean_np",
"[",
"[",
"0",
",",
"2",
"]",
",",
":",
",",
":",
"]",
"=",
"img_mean_np",
"[",
"[",
"2",
",",
"0",
"]",
",",
":",
",",
":",
"]",
"nd",
"=",
"mx",
".",
"nd",
".",
"array",
"(",
"img_mean_np",
")",
"if",
"output",
"is",
"not",
"None",
":",
"mx",
".",
"nd",
".",
"save",
"(",
"output",
",",
"{",
"\"mean_image\"",
":",
"nd",
"}",
")",
"return",
"nd"
] |
Convert caffe mean
Parameters
----------
binaryproto_fname : str
Filename of the mean
output : str, optional
Save the mean into mxnet's format
Returns
-------
NDArray
Mean in ndarray
|
[
"Convert",
"caffe",
"mean"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/tools/caffe_converter/convert_mean.py#L25-L53
|
train
|
Convert caffe mean into ndarray
|
Pu7Z6IJCgH3a,vcEHXBQXuD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4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(1621 - 1510) + chr(1320 - 1271) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101011 + 0o10) + chr(49) + chr(1232 - 1181), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + chr(0b10 + 0o64) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(1743 - 1632) + '\061' + '\x35' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(51) + '\062' + chr(1819 - 1765), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x30' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8293 - 8182) + '\x32' + chr(2365 - 2316) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x30' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1332 - 1284) + chr(111) + chr(49) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o32) + chr(50) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(1869 - 1821) + chr(111) + '\x33' + chr(0b101 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x32' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o30) + chr(0b1111 + 0o44) + '\063', 38909 - 38901), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\x35' + chr(54), 0o10), ehT0Px3KOsy9(chr(232 - 184) + chr(111) + chr(2719 - 2665) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(52) + chr(0b110111), 2675 - 2667), ehT0Px3KOsy9(chr(48) + chr(10761 - 10650) + '\064' + chr(0b101000 + 0o14), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(54) + chr(0b11111 + 0o26), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2110 - 2059) + chr(564 - 515) + chr(0b110110), 28010 - 28002), ehT0Px3KOsy9('\060' + chr(10843 - 10732) + chr(50) + chr(1283 - 1228) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(51) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11918 - 11807) + chr(51) + chr(52) + chr(1985 - 1936), 56323 - 56315), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + chr(51) + chr(0b101110 + 0o2) + chr(49), 62054 - 62046), ehT0Px3KOsy9('\060' + chr(8066 - 7955) + '\063' + '\062', 8), ehT0Px3KOsy9(chr(1591 - 1543) + chr(0b1101111) + chr(50) + chr(0b110011) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(48) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1101 + 0o45) + chr(0b100001 + 0o24), 0b1000), ehT0Px3KOsy9(chr(70 - 22) + chr(0b101010 + 0o105) + chr(50) + chr(270 - 218), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11110 + 0o24) + chr(0b111 + 0o55) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b101011 + 0o14) + chr(0b11001 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1773 - 1724) + chr(0b100011 + 0o22) + '\x35', 60095 - 60087), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b10100 + 0o133) + chr(0b110011) + '\064' + chr(2564 - 2513), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(0b11 + 0o63) + '\067', 61936 - 61928), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(49) + chr(51) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(954 - 903) + '\x33' + chr(0b110011), 8), ehT0Px3KOsy9(chr(1249 - 1201) + '\x6f' + '\x37' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + '\061', 13361 - 13353), ehT0Px3KOsy9('\060' + chr(111) + chr(1603 - 1552) + '\061' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(8818 - 8707) + chr(0b101000 + 0o13) + '\x34' + '\060', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(0b101101 + 0o10) + chr(714 - 666), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b' '), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1000010 + 0o42) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def RudFmUix97Sl(ahTXtQjszUqg, e1jVqMSBZ01Y=None):
tMLFWgwzxKSl = T8Gj9SRAp9oN.caffe_pb2.BlobProto()
with _fwkIVCGgtAN(ahTXtQjszUqg, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xa9'), '\144' + chr(9425 - 9324) + chr(4785 - 4686) + '\x6f' + chr(100) + '\x65')(chr(117) + chr(6378 - 6262) + chr(0b1000000 + 0o46) + chr(315 - 270) + chr(56))) as EGyt1xfPT1P6:
xafqLlk3kkUe(tMLFWgwzxKSl, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xaaD\x1d\xb3\x83\xfa(f\xc5n\xa6\xb2@R'), '\144' + chr(9194 - 9093) + chr(0b1011101 + 0o6) + chr(111) + chr(100) + chr(101))(chr(13038 - 12921) + chr(9077 - 8961) + chr(2622 - 2520) + chr(45) + '\070'))(xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'[\xfd{\x07\x81\xb7\xe02H\xff(\x8d'), chr(6058 - 5958) + chr(4483 - 4382) + '\x63' + chr(1335 - 1224) + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(102) + '\x2d' + chr(56)))())
aWhtx_Qrnp1V = WqUC3KWvYVup.B0ePDhpqxN5n(tMLFWgwzxKSl.ULnjp6D6efFH)
aWhtx_Qrnp1V = aWhtx_Qrnp1V.reshape(tMLFWgwzxKSl.channels, tMLFWgwzxKSl.ehbUULKuygfC, tMLFWgwzxKSl.mPx09rBTrGXR)
aWhtx_Qrnp1V[[ehT0Px3KOsy9(chr(48) + chr(4313 - 4202) + chr(1997 - 1949), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(50), 44326 - 44318)], :, :] = aWhtx_Qrnp1V[[ehT0Px3KOsy9('\060' + '\157' + '\x32', 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(48), 8)], :, :]
Vy_CFRcuYrTj = CIVheOt0RKQX.nd.B0ePDhpqxN5n(aWhtx_Qrnp1V)
if e1jVqMSBZ01Y is not None:
xafqLlk3kkUe(CIVheOt0RKQX.nd, xafqLlk3kkUe(SXOLrMavuUCe(b'}\xaa@\x0b'), chr(1603 - 1503) + chr(611 - 510) + chr(0b1100011) + '\157' + chr(182 - 82) + chr(101))('\x75' + chr(9731 - 9615) + '\146' + '\x2d' + '\x38'))(e1jVqMSBZ01Y, {xafqLlk3kkUe(SXOLrMavuUCe(b'c\xaeW\x00\x89\xac\xe5&l\xf3'), '\144' + chr(6012 - 5911) + chr(99) + chr(3708 - 3597) + chr(9492 - 9392) + '\145')('\165' + chr(3163 - 3047) + chr(0b1100110) + '\x2d' + chr(2815 - 2759)): Vy_CFRcuYrTj})
return Vy_CFRcuYrTj
|
apache/incubator-mxnet
|
python/mxnet/gluon/model_zoo/vision/densenet.py
|
get_densenet
|
def get_densenet(num_layers, pretrained=False, ctx=cpu(),
root=os.path.join(base.data_dir(), 'models'), **kwargs):
r"""Densenet-BC model from the
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ paper.
Parameters
----------
num_layers : int
Number of layers for the variant of densenet. Options are 121, 161, 169, 201.
pretrained : bool, default False
Whether to load the pretrained weights for model.
ctx : Context, default CPU
The context in which to load the pretrained weights.
root : str, default $MXNET_HOME/models
Location for keeping the model parameters.
"""
num_init_features, growth_rate, block_config = densenet_spec[num_layers]
net = DenseNet(num_init_features, growth_rate, block_config, **kwargs)
if pretrained:
from ..model_store import get_model_file
net.load_parameters(get_model_file('densenet%d'%(num_layers), root=root), ctx=ctx)
return net
|
python
|
def get_densenet(num_layers, pretrained=False, ctx=cpu(),
root=os.path.join(base.data_dir(), 'models'), **kwargs):
r"""Densenet-BC model from the
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ paper.
Parameters
----------
num_layers : int
Number of layers for the variant of densenet. Options are 121, 161, 169, 201.
pretrained : bool, default False
Whether to load the pretrained weights for model.
ctx : Context, default CPU
The context in which to load the pretrained weights.
root : str, default $MXNET_HOME/models
Location for keeping the model parameters.
"""
num_init_features, growth_rate, block_config = densenet_spec[num_layers]
net = DenseNet(num_init_features, growth_rate, block_config, **kwargs)
if pretrained:
from ..model_store import get_model_file
net.load_parameters(get_model_file('densenet%d'%(num_layers), root=root), ctx=ctx)
return net
|
[
"def",
"get_densenet",
"(",
"num_layers",
",",
"pretrained",
"=",
"False",
",",
"ctx",
"=",
"cpu",
"(",
")",
",",
"root",
"=",
"os",
".",
"path",
".",
"join",
"(",
"base",
".",
"data_dir",
"(",
")",
",",
"'models'",
")",
",",
"*",
"*",
"kwargs",
")",
":",
"num_init_features",
",",
"growth_rate",
",",
"block_config",
"=",
"densenet_spec",
"[",
"num_layers",
"]",
"net",
"=",
"DenseNet",
"(",
"num_init_features",
",",
"growth_rate",
",",
"block_config",
",",
"*",
"*",
"kwargs",
")",
"if",
"pretrained",
":",
"from",
".",
".",
"model_store",
"import",
"get_model_file",
"net",
".",
"load_parameters",
"(",
"get_model_file",
"(",
"'densenet%d'",
"%",
"(",
"num_layers",
")",
",",
"root",
"=",
"root",
")",
",",
"ctx",
"=",
"ctx",
")",
"return",
"net"
] |
r"""Densenet-BC model from the
`"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ paper.
Parameters
----------
num_layers : int
Number of layers for the variant of densenet. Options are 121, 161, 169, 201.
pretrained : bool, default False
Whether to load the pretrained weights for model.
ctx : Context, default CPU
The context in which to load the pretrained weights.
root : str, default $MXNET_HOME/models
Location for keeping the model parameters.
|
[
"r",
"Densenet",
"-",
"BC",
"model",
"from",
"the",
"Densely",
"Connected",
"Convolutional",
"Networks",
"<https",
":",
"//",
"arxiv",
".",
"org",
"/",
"pdf",
"/",
"1608",
".",
"06993",
".",
"pdf",
">",
"_",
"paper",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/gluon/model_zoo/vision/densenet.py#L125-L146
|
train
|
r Returns a DenseNet object for the given num_layers.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jI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xiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(0b11000 + 0o32) + chr(0b110000) + chr(1681 - 1632), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(2173 - 2125), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(50) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(844 - 794) + '\x31' + chr(2841 - 2787), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(54) + chr(1227 - 1179), 0o10), ehT0Px3KOsy9(chr(48) + chr(3377 - 3266) + chr(0b11100 + 0o26) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + '\067', 17836 - 17828), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(927 - 876) + chr(52) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(5445 - 5334) + chr(0b110011) + chr(0b110000) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + chr(52) + '\x31', 43525 - 43517), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(939 - 888) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\x37' + chr(0b101001 + 0o14), 42498 - 42490), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(2454 - 2404) + chr(0b11010 + 0o35) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b111 + 0o150) + '\063' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b110001) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8258 - 8147) + chr(50) + chr(55) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101000 + 0o13) + chr(0b11101 + 0o27) + chr(0b0 + 0o64), 30174 - 30166), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110100) + chr(1676 - 1623), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + '\x31' + chr(49) + chr(2312 - 2259), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + chr(0b110010) + '\x34' + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x34' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(854 - 805) + '\064' + '\x31', 60826 - 60818), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2503 - 2448), 23826 - 23818), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + '\x32' + chr(0b110100) + chr(2093 - 2040), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o4) + chr(0b110000) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11001 + 0o33) + chr(463 - 408), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\x35', 13596 - 13588), ehT0Px3KOsy9(chr(748 - 700) + chr(111) + chr(0b11000 + 0o33) + chr(51) + '\067', 61425 - 61417), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + '\x32' + chr(48) + chr(0b110101), 19074 - 19066), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\x35' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b1001 + 0o55) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001111 + 0o40) + chr(0b100101 + 0o15) + '\066' + chr(0b10111 + 0o34), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(0b1 + 0o65) + chr(0b100100 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\063' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3116 - 3005) + chr(989 - 938) + chr(55) + '\061', 0o10), ehT0Px3KOsy9(chr(642 - 594) + '\157' + chr(49) + chr(51), 34056 - 34048), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(2107 - 2055) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(483 - 432) + chr(1115 - 1066) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b10110 + 0o40) + '\060', 33313 - 33305), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101100 + 0o5) + '\064' + '\x32', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + '\065' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf'), '\x64' + '\145' + '\x63' + chr(4723 - 4612) + '\x64' + chr(0b1011010 + 0o13))(chr(0b1110101) + chr(4261 - 4145) + chr(0b110100 + 0o62) + chr(45) + chr(2329 - 2273)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def y9AI1ipcEKoY(uftkTXJyNORO, _zRXz3YBqHFs=ehT0Px3KOsy9(chr(2002 - 1954) + '\157' + '\060', ord("\x08")), oM3jLo753XfX=qg7Ot4FCfBgB(), FiL2Xt3u2AMN=xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdeG\x83\xd6Jby\xac\xa8P\x13;'), chr(2487 - 2387) + '\145' + chr(0b111000 + 0o53) + chr(3739 - 3628) + '\x64' + chr(8130 - 8029))('\x75' + chr(10650 - 10534) + chr(102) + chr(0b10010 + 0o33) + chr(0b101010 + 0o16)))(xafqLlk3kkUe(XLXqkmM_0GVx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xea~\x92\xdct#\x1b\xd6\xaeH\x04L'), chr(0b1100100) + chr(101) + chr(0b100101 + 0o76) + '\x6f' + chr(100) + '\145')('\165' + chr(0b1000001 + 0o63) + chr(102) + chr(0b100111 + 0o6) + '\070'))(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xecG\xb0\xeb\\e'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b11 + 0o142))('\165' + chr(512 - 396) + chr(7727 - 7625) + chr(45) + '\x38')), **M8EIoTs2GJXE):
(fveTG0vyuS3B, mxLoR7d4mdei, SniSuWczDiSP) = T_BZ8WTaV642[uftkTXJyNORO]
DyzboKL9cczb = oxCzO8KjJyHb(fveTG0vyuS3B, mxLoR7d4mdei, SniSuWczDiSP, **M8EIoTs2GJXE)
if _zRXz3YBqHFs:
(ommtvGSdVMxm,) = (xafqLlk3kkUe(NPPHb59961Bv(xafqLlk3kkUe(SXOLrMavuUCe(b'\xecG\xb0\xeb\\I\\\x96\xa9S>'), chr(0b110000 + 0o64) + '\x65' + chr(0b100111 + 0o74) + '\157' + '\144' + chr(0b10111 + 0o116))(chr(12707 - 12590) + '\x74' + chr(2783 - 2681) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6M\xa0\xd1]yK\x87\xaa~=\x14\xd2~'), chr(0b1100100) + chr(3588 - 3487) + chr(0b1100011) + '\157' + chr(100) + chr(101))('\x75' + chr(0b11110 + 0o126) + chr(0b1100110) + chr(45) + chr(0b1111 + 0o51))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6M\xa0\xd1]yK\x87\xaa~=\x14\xd2~'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + '\x64' + chr(3290 - 3189))('\165' + chr(0b1101110 + 0o6) + '\146' + chr(0b101101) + '\x38')),)
xafqLlk3kkUe(DyzboKL9cczb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xedG\xb5\xeaofN\x90\xa7L>\t\xdbi\xbe'), chr(0b100101 + 0o77) + chr(0b100000 + 0o105) + chr(99) + '\157' + '\x64' + chr(1051 - 950))('\x75' + chr(116) + chr(102) + '\x2d' + '\070'))(ommtvGSdVMxm(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5M\xba\xfdUxJ\x96\xe3E'), '\144' + '\x65' + '\143' + chr(0b1100000 + 0o17) + chr(0b1100100) + '\x65')('\x75' + chr(942 - 826) + '\x66' + chr(0b101101) + chr(1895 - 1839)) % uftkTXJyNORO, root=FiL2Xt3u2AMN), ctx=oM3jLo753XfX)
return DyzboKL9cczb
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/mx2onnx/_export_helper.py
|
load_module
|
def load_module(sym_filepath, params_filepath):
"""Loads the MXNet model file and
returns MXNet symbol and params (weights).
Parameters
----------
json_path : str
Path to the json file
params_path : str
Path to the params file
Returns
-------
sym : MXNet symbol
Model symbol object
params : params object
Model weights including both arg and aux params.
"""
if not (os.path.isfile(sym_filepath) and os.path.isfile(params_filepath)):
raise ValueError("Symbol and params files provided are invalid")
else:
try:
# reads symbol.json file from given path and
# retrieves model prefix and number of epochs
model_name = sym_filepath.rsplit('.', 1)[0].rsplit('-', 1)[0]
params_file_list = params_filepath.rsplit('.', 1)[0].rsplit('-', 1)
# Setting num_epochs to 0 if not present in filename
num_epochs = 0 if len(params_file_list) == 1 else int(params_file_list[1])
except IndexError:
logging.info("Model and params name should be in format: "
"prefix-symbol.json, prefix-epoch.params")
raise
sym, arg_params, aux_params = mx.model.load_checkpoint(model_name, num_epochs)
# Merging arg and aux parameters
params = {}
params.update(arg_params)
params.update(aux_params)
return sym, params
|
python
|
def load_module(sym_filepath, params_filepath):
"""Loads the MXNet model file and
returns MXNet symbol and params (weights).
Parameters
----------
json_path : str
Path to the json file
params_path : str
Path to the params file
Returns
-------
sym : MXNet symbol
Model symbol object
params : params object
Model weights including both arg and aux params.
"""
if not (os.path.isfile(sym_filepath) and os.path.isfile(params_filepath)):
raise ValueError("Symbol and params files provided are invalid")
else:
try:
# reads symbol.json file from given path and
# retrieves model prefix and number of epochs
model_name = sym_filepath.rsplit('.', 1)[0].rsplit('-', 1)[0]
params_file_list = params_filepath.rsplit('.', 1)[0].rsplit('-', 1)
# Setting num_epochs to 0 if not present in filename
num_epochs = 0 if len(params_file_list) == 1 else int(params_file_list[1])
except IndexError:
logging.info("Model and params name should be in format: "
"prefix-symbol.json, prefix-epoch.params")
raise
sym, arg_params, aux_params = mx.model.load_checkpoint(model_name, num_epochs)
# Merging arg and aux parameters
params = {}
params.update(arg_params)
params.update(aux_params)
return sym, params
|
[
"def",
"load_module",
"(",
"sym_filepath",
",",
"params_filepath",
")",
":",
"if",
"not",
"(",
"os",
".",
"path",
".",
"isfile",
"(",
"sym_filepath",
")",
"and",
"os",
".",
"path",
".",
"isfile",
"(",
"params_filepath",
")",
")",
":",
"raise",
"ValueError",
"(",
"\"Symbol and params files provided are invalid\"",
")",
"else",
":",
"try",
":",
"# reads symbol.json file from given path and",
"# retrieves model prefix and number of epochs",
"model_name",
"=",
"sym_filepath",
".",
"rsplit",
"(",
"'.'",
",",
"1",
")",
"[",
"0",
"]",
".",
"rsplit",
"(",
"'-'",
",",
"1",
")",
"[",
"0",
"]",
"params_file_list",
"=",
"params_filepath",
".",
"rsplit",
"(",
"'.'",
",",
"1",
")",
"[",
"0",
"]",
".",
"rsplit",
"(",
"'-'",
",",
"1",
")",
"# Setting num_epochs to 0 if not present in filename",
"num_epochs",
"=",
"0",
"if",
"len",
"(",
"params_file_list",
")",
"==",
"1",
"else",
"int",
"(",
"params_file_list",
"[",
"1",
"]",
")",
"except",
"IndexError",
":",
"logging",
".",
"info",
"(",
"\"Model and params name should be in format: \"",
"\"prefix-symbol.json, prefix-epoch.params\"",
")",
"raise",
"sym",
",",
"arg_params",
",",
"aux_params",
"=",
"mx",
".",
"model",
".",
"load_checkpoint",
"(",
"model_name",
",",
"num_epochs",
")",
"# Merging arg and aux parameters",
"params",
"=",
"{",
"}",
"params",
".",
"update",
"(",
"arg_params",
")",
"params",
".",
"update",
"(",
"aux_params",
")",
"return",
"sym",
",",
"params"
] |
Loads the MXNet model file and
returns MXNet symbol and params (weights).
Parameters
----------
json_path : str
Path to the json file
params_path : str
Path to the params file
Returns
-------
sym : MXNet symbol
Model symbol object
params : params object
Model weights including both arg and aux params.
|
[
"Loads",
"the",
"MXNet",
"model",
"file",
"and",
"returns",
"MXNet",
"symbol",
"and",
"params",
"(",
"weights",
")",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/mx2onnx/_export_helper.py#L24-L65
|
train
|
Loads the MXNet model file and returns MXNet symbol and params.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAf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_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(973 - 925) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1100 + 0o47) + '\x36' + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + chr(49) + chr(50) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(0b10011 + 0o43) + chr(55), 20348 - 20340), ehT0Px3KOsy9(chr(1063 - 1015) + '\x6f' + '\x32' + chr(2180 - 2131) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(0b101 + 0o62) + chr(0b1000 + 0o55), 0o10), ehT0Px3KOsy9('\x30' + chr(2403 - 2292) + chr(53) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(720 - 669) + chr(48) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(55) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x34' + '\065', 43465 - 43457), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(428 - 377) + '\060', 0o10), ehT0Px3KOsy9(chr(1308 - 1260) + chr(111) + chr(1734 - 1685) + '\x31' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b110001) + chr(0b110111) + chr(55), 17862 - 17854), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\066' + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(0b100110 + 0o111) + chr(0b110111) + chr(0b101111 + 0o1), 8495 - 8487), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1531 - 1481) + '\064' + chr(0b110000 + 0o6), 32529 - 32521), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(49) + '\x36' + chr(0b1110 + 0o44), 8), ehT0Px3KOsy9(chr(1840 - 1792) + chr(0b1010110 + 0o31) + chr(50) + chr(2516 - 2464) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(681 - 630) + '\x30' + '\062', 10379 - 10371), ehT0Px3KOsy9('\x30' + chr(12112 - 12001) + chr(50) + chr(0b110011) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(0b110111) + chr(0b101100 + 0o13), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(929 - 878) + '\060', 0o10), ehT0Px3KOsy9(chr(1266 - 1218) + chr(5616 - 5505) + '\x37' + chr(2535 - 2481), 21956 - 21948), ehT0Px3KOsy9('\060' + chr(9792 - 9681) + chr(677 - 626) + chr(166 - 111) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(2556 - 2503) + chr(819 - 766), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011 + 0o0) + chr(1988 - 1940), 8), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\x35' + chr(50), 15637 - 15629), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + '\x32' + chr(52) + chr(0b110011), 2276 - 2268), ehT0Px3KOsy9('\x30' + chr(0b10001 + 0o136) + chr(796 - 746) + chr(50) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x32', 26651 - 26643), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b10010 + 0o40) + chr(2565 - 2514) + '\x33', 8), ehT0Px3KOsy9('\060' + chr(8974 - 8863) + chr(51) + chr(49) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(1726 - 1674) + chr(705 - 654), 18424 - 18416), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b110100 + 0o3) + chr(0b101111 + 0o10), 51174 - 51166), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(1523 - 1472) + '\064' + chr(52), 5554 - 5546), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100101 + 0o14) + chr(0b1 + 0o62) + '\x37', 9713 - 9705), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10011 + 0o40) + chr(55) + chr(0b1011 + 0o54), 8), ehT0Px3KOsy9(chr(2066 - 2018) + chr(0b1101111) + '\x32' + chr(0b110000) + '\x32', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(51) + '\x34', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(1128 - 1075) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(924 - 824) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1010 + 0o132) + chr(0b1 + 0o144))(chr(2780 - 2663) + chr(116) + '\x66' + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def W0yTvbnzZllC(HpFNjYX2cHHu, gZ19VAjqr89o):
if not (xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x871\xde\xe0\x18'), chr(100) + chr(101) + chr(0b1100011) + '\157' + chr(100) + '\145')(chr(11698 - 11581) + chr(116) + '\x66' + chr(0b101010 + 0o3) + chr(0b111000)))(HpFNjYX2cHHu) and xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x871\xde\xe0\x18'), chr(4706 - 4606) + chr(4607 - 4506) + '\x63' + '\157' + chr(0b1011111 + 0o5) + '\x65')(chr(0b100010 + 0o123) + chr(116) + '\146' + chr(45) + '\070'))(gZ19VAjqr89o)):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6\x8d:\xd5\xe3\x11\x0f\xa0U\x81\xf8?\x1e\x00Y\xcb\x01\x87\xa4\xf2S}M\xd9\xdd\xf0w\x1c\xca\xf5o\xff\xee\x82\x8d\x81\x7f\x96\xec\xea\xe4\x98>\xd3'), '\x64' + chr(0b100 + 0o141) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + '\x66' + '\055' + '\070'))
else:
try:
yJFe33rl9i_r = HpFNjYX2cHHu.rsplit(xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(4309 - 4209) + '\x65' + chr(8597 - 8498) + chr(8512 - 8401) + '\144' + chr(0b1100101))(chr(117) + chr(8997 - 8881) + chr(0b110101 + 0o61) + chr(0b101101) + '\x38'), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110001), ord("\x08")))[ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b110000), 0o10)].rsplit(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8'), chr(100) + chr(0b1100101 + 0o0) + '\143' + chr(7936 - 7825) + chr(0b1100100) + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(0b111101 + 0o67) + chr(0b1100101 + 0o1) + chr(979 - 934) + chr(0b110100 + 0o4)), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(413 - 364), 8))[ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000), 8)]
Zmj93T4vA_eU = gZ19VAjqr89o.rsplit(xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(3184 - 3084) + '\145' + '\x63' + chr(111) + chr(3855 - 3755) + chr(0b1100101))(chr(336 - 219) + chr(0b1110100) + chr(561 - 459) + chr(45) + chr(114 - 58)), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 8))[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x30', 8)].rsplit(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8'), chr(5567 - 5467) + chr(9170 - 9069) + chr(99) + '\157' + '\x64' + '\145')(chr(117) + chr(0b10110 + 0o136) + chr(5839 - 5737) + chr(458 - 413) + chr(0b111000)), ehT0Px3KOsy9('\060' + chr(11915 - 11804) + '\061', 8))
TDYurLqaml52 = ehT0Px3KOsy9('\x30' + '\x6f' + '\060', 8) if c2A0yzQpDQB3(Zmj93T4vA_eU) == ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + '\x31', 8) else ehT0Px3KOsy9(Zmj93T4vA_eU[ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\061', 8)])
except _fsda0v2_OKU:
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6\xc3\x1f\xcf\xf9\x1eH\xf6Q\x89\x82$'), '\144' + chr(0b111111 + 0o46) + '\143' + '\157' + '\x64' + chr(9936 - 9835))(chr(117) + '\164' + chr(7487 - 7385) + chr(0b100111 + 0o6) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8\x9b3\xd2\xe0]N\xaf_\xc5\xa8.\r\x13U\xd5R\xc9\xa3\xf6Z8M\x91\xc2\xf7t\x0e\x83\xf3o\xbb\xa7\x8d\xdf\x820\x8d\xef\xfd\xf1\xcew\xc7\xfe\x18I\xa8C\xc8\xab6\x12\x10W\xca\\\xcd\xb1\xf4Q4\x1e\x89\xdf\xe7~\x03\xdb\xbco\xeb\xa1\x80\x97\xca/\x9e\xf0\xfd\xe8\x87'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(638 - 538) + chr(0b1100101))(chr(0b1000100 + 0o61) + chr(0b1101111 + 0o5) + chr(2166 - 2064) + chr(198 - 153) + chr(0b111000)))
raise
(I7QF3KlS7cYz, GroVdzCONmWS, p9GVyAqRTTRh) = CIVheOt0RKQX.model.load_checkpoint(yJFe33rl9i_r, TDYurLqaml52)
nEbJZ4wfte2w = {}
xafqLlk3kkUe(nEbJZ4wfte2w, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf\x80\x16\xf2\xe53e\xafB\xd1\xbd\x7f'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(12098 - 11981) + chr(116) + chr(0b1010000 + 0o26) + '\055' + '\070'))(GroVdzCONmWS)
xafqLlk3kkUe(nEbJZ4wfte2w, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf\x80\x16\xf2\xe53e\xafB\xd1\xbd\x7f'), chr(100) + chr(0b1100101) + chr(1040 - 941) + chr(6204 - 6093) + chr(100) + chr(0b1100101))(chr(0b1110101 + 0o0) + chr(0b10000 + 0o144) + chr(0b1011100 + 0o12) + '\055' + chr(3038 - 2982)))(p9GVyAqRTTRh)
return (I7QF3KlS7cYz, nEbJZ4wfte2w)
|
apache/incubator-mxnet
|
example/ssd/symbol/symbol_builder.py
|
import_module
|
def import_module(module_name):
"""Helper function to import module"""
import sys, os
import importlib
sys.path.append(os.path.dirname(__file__))
return importlib.import_module(module_name)
|
python
|
def import_module(module_name):
"""Helper function to import module"""
import sys, os
import importlib
sys.path.append(os.path.dirname(__file__))
return importlib.import_module(module_name)
|
[
"def",
"import_module",
"(",
"module_name",
")",
":",
"import",
"sys",
",",
"os",
"import",
"importlib",
"sys",
".",
"path",
".",
"append",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
"__file__",
")",
")",
"return",
"importlib",
".",
"import_module",
"(",
"module_name",
")"
] |
Helper function to import module
|
[
"Helper",
"function",
"to",
"import",
"module"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/symbol/symbol_builder.py#L22-L27
|
train
|
Helper function to import module
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw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ZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\x6f' + chr(1483 - 1432) + chr(52) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + '\x36' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + chr(904 - 855) + '\x30' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\064' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(49) + chr(0b110110) + chr(0b100101 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101010 + 0o11) + '\x33' + chr(202 - 149), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\062' + chr(536 - 482), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1016 - 905) + chr(1760 - 1711) + '\066' + chr(534 - 482), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x32' + chr(0b110000 + 0o5), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(963 - 912) + '\x33' + chr(0b0 + 0o64), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010 + 0o0) + '\062' + chr(760 - 712), 0o10), ehT0Px3KOsy9(chr(1824 - 1776) + chr(1072 - 961) + '\x33' + chr(1635 - 1584) + '\064', 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(0b110111), 41189 - 41181), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(639 - 528) + '\061', 23029 - 23021), ehT0Px3KOsy9(chr(1030 - 982) + chr(111) + chr(0b11011 + 0o30) + chr(0b100000 + 0o25) + chr(1216 - 1167), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(2754 - 2700), 51563 - 51555), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(0b110111) + chr(0b11 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1000010 + 0o55) + '\061' + chr(718 - 669) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(1538 - 1427) + '\063' + '\060' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x31' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\x36' + '\060', 30202 - 30194), ehT0Px3KOsy9('\060' + chr(4899 - 4788) + chr(0b10001 + 0o41) + chr(0b100010 + 0o23), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + '\062' + chr(0b11 + 0o64) + chr(2399 - 2350), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(53) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1883 - 1835) + chr(11303 - 11192) + chr(0b100101 + 0o15) + chr(2022 - 1972) + chr(2504 - 2452), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + '\x32' + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011101 + 0o22) + chr(0b110010) + chr(0b11 + 0o57) + chr(0b110101), 18217 - 18209), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2148 - 2097) + chr(272 - 219) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1000 + 0o57) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x37' + '\x36', 0o10), ehT0Px3KOsy9(chr(808 - 760) + '\157' + '\x33' + chr(0b110101) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + '\061' + chr(0b110001) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b110010) + chr(2459 - 2404) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1010111 + 0o30) + '\x31' + chr(2209 - 2155) + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(0b110010) + chr(0b110011) + chr(0b11100 + 0o25), 0b1000), ehT0Px3KOsy9('\060' + chr(4536 - 4425) + chr(49) + chr(0b11101 + 0o27) + '\060', 4953 - 4945), ehT0Px3KOsy9(chr(1744 - 1696) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + chr(4647 - 4536) + '\063' + chr(0b110110) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110001) + '\063', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(8626 - 8515) + chr(53) + chr(1720 - 1672), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc'), chr(0b1100100) + chr(9462 - 9361) + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b101011 + 0o73) + chr(132 - 87) + chr(0b100110 + 0o22)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def VsP74AYOoLHr(Iu0XkROSvs3d):
(a2SYDDomXDZ2,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\x91J4'), chr(0b111011 + 0o51) + chr(101) + chr(0b11000 + 0o113) + chr(0b1101111) + chr(0b10110 + 0o116) + chr(101))(chr(0b1 + 0o164) + chr(0b1110100) + '\146' + chr(0b1001 + 0o44) + chr(2966 - 2910))),)
(oqhJDdMJfuwx,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d@'), chr(0b1001111 + 0o25) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(2895 - 2779) + '\x66' + chr(0b11001 + 0o24) + chr(0b111000))),)
(q3agYWpOJf7E,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b^7M\x03\xa9:\x1d7'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(7683 - 7566) + chr(0b1110100) + chr(0b1100110) + chr(2010 - 1965) + chr(0b111000))),)
xafqLlk3kkUe(a2SYDDomXDZ2.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x83C7G\x1f\xb9'), chr(0b1001010 + 0o32) + chr(0b1001011 + 0o32) + '\143' + chr(0b1100011 + 0o14) + chr(100) + '\145')(chr(546 - 429) + chr(9576 - 9460) + chr(0b111011 + 0o53) + chr(0b100011 + 0o12) + '\070'))(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86Z5L\x10\xb03'), chr(100) + chr(0b1011 + 0o132) + chr(99) + '\157' + chr(100) + chr(101))(chr(10765 - 10648) + chr(0b101010 + 0o112) + chr(102) + '\055' + chr(0b111000)))(tmzuw0hjv33u))
return xafqLlk3kkUe(q3agYWpOJf7E, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b^7M\x03\xa9\t\x19:\xb8\xe5\xb0\x82'), chr(6037 - 5937) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(9582 - 9466) + chr(102) + '\x2d' + chr(56)))(Iu0XkROSvs3d)
|
apache/incubator-mxnet
|
example/ssd/symbol/symbol_builder.py
|
get_symbol_train
|
def get_symbol_train(network, num_classes, from_layers, num_filters, strides, pads,
sizes, ratios, normalizations=-1, steps=[], min_filter=128,
nms_thresh=0.5, force_suppress=False, nms_topk=400, **kwargs):
"""Build network symbol for training SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
"""
label = mx.sym.Variable('label')
body = import_module(network).get_symbol(num_classes, **kwargs)
layers = multi_layer_feature(body, from_layers, num_filters, strides, pads,
min_filter=min_filter)
loc_preds, cls_preds, anchor_boxes = multibox_layer(layers, \
num_classes, sizes=sizes, ratios=ratios, normalization=normalizations, \
num_channels=num_filters, clip=False, interm_layer=0, steps=steps)
tmp = mx.symbol.contrib.MultiBoxTarget(
*[anchor_boxes, label, cls_preds], overlap_threshold=.5, \
ignore_label=-1, negative_mining_ratio=3, minimum_negative_samples=0, \
negative_mining_thresh=.5, variances=(0.1, 0.1, 0.2, 0.2),
name="multibox_target")
loc_target = tmp[0]
loc_target_mask = tmp[1]
cls_target = tmp[2]
cls_prob = mx.symbol.SoftmaxOutput(data=cls_preds, label=cls_target, \
ignore_label=-1, use_ignore=True, grad_scale=1., multi_output=True, \
normalization='valid', name="cls_prob")
loc_loss_ = mx.symbol.smooth_l1(name="loc_loss_", \
data=loc_target_mask * (loc_preds - loc_target), scalar=1.0)
loc_loss = mx.symbol.MakeLoss(loc_loss_, grad_scale=1., \
normalization='valid', name="loc_loss")
# monitoring training status
cls_label = mx.symbol.MakeLoss(data=cls_target, grad_scale=0, name="cls_label")
det = mx.symbol.contrib.MultiBoxDetection(*[cls_prob, loc_preds, anchor_boxes], \
name="detection", nms_threshold=nms_thresh, force_suppress=force_suppress,
variances=(0.1, 0.1, 0.2, 0.2), nms_topk=nms_topk)
det = mx.symbol.MakeLoss(data=det, grad_scale=0, name="det_out")
# group output
out = mx.symbol.Group([cls_prob, loc_loss, cls_label, det])
return out
|
python
|
def get_symbol_train(network, num_classes, from_layers, num_filters, strides, pads,
sizes, ratios, normalizations=-1, steps=[], min_filter=128,
nms_thresh=0.5, force_suppress=False, nms_topk=400, **kwargs):
"""Build network symbol for training SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
"""
label = mx.sym.Variable('label')
body = import_module(network).get_symbol(num_classes, **kwargs)
layers = multi_layer_feature(body, from_layers, num_filters, strides, pads,
min_filter=min_filter)
loc_preds, cls_preds, anchor_boxes = multibox_layer(layers, \
num_classes, sizes=sizes, ratios=ratios, normalization=normalizations, \
num_channels=num_filters, clip=False, interm_layer=0, steps=steps)
tmp = mx.symbol.contrib.MultiBoxTarget(
*[anchor_boxes, label, cls_preds], overlap_threshold=.5, \
ignore_label=-1, negative_mining_ratio=3, minimum_negative_samples=0, \
negative_mining_thresh=.5, variances=(0.1, 0.1, 0.2, 0.2),
name="multibox_target")
loc_target = tmp[0]
loc_target_mask = tmp[1]
cls_target = tmp[2]
cls_prob = mx.symbol.SoftmaxOutput(data=cls_preds, label=cls_target, \
ignore_label=-1, use_ignore=True, grad_scale=1., multi_output=True, \
normalization='valid', name="cls_prob")
loc_loss_ = mx.symbol.smooth_l1(name="loc_loss_", \
data=loc_target_mask * (loc_preds - loc_target), scalar=1.0)
loc_loss = mx.symbol.MakeLoss(loc_loss_, grad_scale=1., \
normalization='valid', name="loc_loss")
# monitoring training status
cls_label = mx.symbol.MakeLoss(data=cls_target, grad_scale=0, name="cls_label")
det = mx.symbol.contrib.MultiBoxDetection(*[cls_prob, loc_preds, anchor_boxes], \
name="detection", nms_threshold=nms_thresh, force_suppress=force_suppress,
variances=(0.1, 0.1, 0.2, 0.2), nms_topk=nms_topk)
det = mx.symbol.MakeLoss(data=det, grad_scale=0, name="det_out")
# group output
out = mx.symbol.Group([cls_prob, loc_loss, cls_label, det])
return out
|
[
"def",
"get_symbol_train",
"(",
"network",
",",
"num_classes",
",",
"from_layers",
",",
"num_filters",
",",
"strides",
",",
"pads",
",",
"sizes",
",",
"ratios",
",",
"normalizations",
"=",
"-",
"1",
",",
"steps",
"=",
"[",
"]",
",",
"min_filter",
"=",
"128",
",",
"nms_thresh",
"=",
"0.5",
",",
"force_suppress",
"=",
"False",
",",
"nms_topk",
"=",
"400",
",",
"*",
"*",
"kwargs",
")",
":",
"label",
"=",
"mx",
".",
"sym",
".",
"Variable",
"(",
"'label'",
")",
"body",
"=",
"import_module",
"(",
"network",
")",
".",
"get_symbol",
"(",
"num_classes",
",",
"*",
"*",
"kwargs",
")",
"layers",
"=",
"multi_layer_feature",
"(",
"body",
",",
"from_layers",
",",
"num_filters",
",",
"strides",
",",
"pads",
",",
"min_filter",
"=",
"min_filter",
")",
"loc_preds",
",",
"cls_preds",
",",
"anchor_boxes",
"=",
"multibox_layer",
"(",
"layers",
",",
"num_classes",
",",
"sizes",
"=",
"sizes",
",",
"ratios",
"=",
"ratios",
",",
"normalization",
"=",
"normalizations",
",",
"num_channels",
"=",
"num_filters",
",",
"clip",
"=",
"False",
",",
"interm_layer",
"=",
"0",
",",
"steps",
"=",
"steps",
")",
"tmp",
"=",
"mx",
".",
"symbol",
".",
"contrib",
".",
"MultiBoxTarget",
"(",
"*",
"[",
"anchor_boxes",
",",
"label",
",",
"cls_preds",
"]",
",",
"overlap_threshold",
"=",
".5",
",",
"ignore_label",
"=",
"-",
"1",
",",
"negative_mining_ratio",
"=",
"3",
",",
"minimum_negative_samples",
"=",
"0",
",",
"negative_mining_thresh",
"=",
".5",
",",
"variances",
"=",
"(",
"0.1",
",",
"0.1",
",",
"0.2",
",",
"0.2",
")",
",",
"name",
"=",
"\"multibox_target\"",
")",
"loc_target",
"=",
"tmp",
"[",
"0",
"]",
"loc_target_mask",
"=",
"tmp",
"[",
"1",
"]",
"cls_target",
"=",
"tmp",
"[",
"2",
"]",
"cls_prob",
"=",
"mx",
".",
"symbol",
".",
"SoftmaxOutput",
"(",
"data",
"=",
"cls_preds",
",",
"label",
"=",
"cls_target",
",",
"ignore_label",
"=",
"-",
"1",
",",
"use_ignore",
"=",
"True",
",",
"grad_scale",
"=",
"1.",
",",
"multi_output",
"=",
"True",
",",
"normalization",
"=",
"'valid'",
",",
"name",
"=",
"\"cls_prob\"",
")",
"loc_loss_",
"=",
"mx",
".",
"symbol",
".",
"smooth_l1",
"(",
"name",
"=",
"\"loc_loss_\"",
",",
"data",
"=",
"loc_target_mask",
"*",
"(",
"loc_preds",
"-",
"loc_target",
")",
",",
"scalar",
"=",
"1.0",
")",
"loc_loss",
"=",
"mx",
".",
"symbol",
".",
"MakeLoss",
"(",
"loc_loss_",
",",
"grad_scale",
"=",
"1.",
",",
"normalization",
"=",
"'valid'",
",",
"name",
"=",
"\"loc_loss\"",
")",
"# monitoring training status",
"cls_label",
"=",
"mx",
".",
"symbol",
".",
"MakeLoss",
"(",
"data",
"=",
"cls_target",
",",
"grad_scale",
"=",
"0",
",",
"name",
"=",
"\"cls_label\"",
")",
"det",
"=",
"mx",
".",
"symbol",
".",
"contrib",
".",
"MultiBoxDetection",
"(",
"*",
"[",
"cls_prob",
",",
"loc_preds",
",",
"anchor_boxes",
"]",
",",
"name",
"=",
"\"detection\"",
",",
"nms_threshold",
"=",
"nms_thresh",
",",
"force_suppress",
"=",
"force_suppress",
",",
"variances",
"=",
"(",
"0.1",
",",
"0.1",
",",
"0.2",
",",
"0.2",
")",
",",
"nms_topk",
"=",
"nms_topk",
")",
"det",
"=",
"mx",
".",
"symbol",
".",
"MakeLoss",
"(",
"data",
"=",
"det",
",",
"grad_scale",
"=",
"0",
",",
"name",
"=",
"\"det_out\"",
")",
"# group output",
"out",
"=",
"mx",
".",
"symbol",
".",
"Group",
"(",
"[",
"cls_prob",
",",
"loc_loss",
",",
"cls_label",
",",
"det",
"]",
")",
"return",
"out"
] |
Build network symbol for training SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
|
[
"Build",
"network",
"symbol",
"for",
"training",
"SSD"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/symbol/symbol_builder.py#L29-L116
|
train
|
Build a base network symbol for training SSD
|
Pu7Z6IJCgH3a,vc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TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(11745 - 11634) + chr(0b1000 + 0o53) + chr(0b110100) + chr(50), 44706 - 44698), ehT0Px3KOsy9(chr(951 - 903) + '\157' + '\067' + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x30' + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\061' + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010001 + 0o36) + '\x37' + chr(98 - 48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(124 - 70) + '\067', 48057 - 48049), ehT0Px3KOsy9('\060' + chr(4188 - 4077) + chr(51) + '\x36' + chr(1457 - 1402), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100110 + 0o13) + chr(0b101111 + 0o1) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x32' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\x37' + chr(1529 - 1476), 30676 - 30668), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(50) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(8651 - 8540) + chr(1520 - 1471) + '\x30' + chr(1706 - 1658), 8), ehT0Px3KOsy9(chr(1889 - 1841) + chr(4482 - 4371) + '\x31' + '\x30' + chr(372 - 320), 50193 - 50185), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b10 + 0o60) + chr(0b100 + 0o62) + '\063', 0b1000), ehT0Px3KOsy9(chr(1401 - 1353) + chr(3551 - 3440) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b110110) + chr(53), 8727 - 8719), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + '\065' + chr(48), 8451 - 8443), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + chr(0b110010) + chr(0b110000), 43849 - 43841), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(0b11111 + 0o23) + chr(0b11001 + 0o30) + chr(681 - 628), 54407 - 54399), ehT0Px3KOsy9(chr(1326 - 1278) + '\157' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + '\x32' + '\064' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\064' + chr(0b110001 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10 + 0o60) + chr(0b110110) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(11852 - 11741) + chr(0b100010 + 0o21) + chr(130 - 76) + chr(55), 8), ehT0Px3KOsy9(chr(754 - 706) + '\157' + chr(0b110100) + chr(822 - 773), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b10110 + 0o131) + chr(1340 - 1287) + chr(0b110010 + 0o3), 39879 - 39871), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101101 + 0o4) + chr(51) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(3068 - 2957) + chr(0b100010 + 0o23) + chr(2164 - 2113), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + '\062' + '\x31' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(750 - 701) + chr(2604 - 2550) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110110) + '\065', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + '\066' + '\067', 0b1000), ehT0Px3KOsy9(chr(495 - 447) + chr(111) + chr(49) + chr(0b100101 + 0o14) + chr(1514 - 1461), 0o10), ehT0Px3KOsy9(chr(2164 - 2116) + chr(4177 - 4066) + '\063' + '\061' + chr(2898 - 2844), 51325 - 51317), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b100000 + 0o23) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110101) + chr(2892 - 2838), 51197 - 51189), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + chr(933 - 882) + chr(1722 - 1670) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110111) + '\x34', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc'), chr(100) + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Hih03lch9w7E(dg_IyTYgIdux, i6loyAgxUM2t, Cn9XfnGZRXZa, zVkWryy7Pzt7, r8knJmMTTKwv, ClVKbku7IAE0, Q55tUpoH0W5L, I_jsLlYDecis, d0ofCsIARAWm=-ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31', 0o10), v0VhEmlMsO_l=[], QxembNVppnUD=ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(50) + chr(48) + chr(0b100100 + 0o14), ord("\x08")), B1zO81yiJH6n=0.5, e_bjlViiPD4p=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(48), 8), ThWUW9vG0TzH=ehT0Px3KOsy9(chr(2219 - 2171) + '\x6f' + chr(0b110110) + '\062' + chr(48), 38229 - 38221), **M8EIoTs2GJXE):
TRUOLFLuD08x = CIVheOt0RKQX.sym.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e_$\xebV'), chr(5576 - 5476) + '\x65' + chr(99) + '\157' + chr(485 - 385) + '\145')('\x75' + '\x74' + chr(0b1001010 + 0o34) + chr(0b101101) + chr(0b111000)))
TD8C81EGml3n = VsP74AYOoLHr(dg_IyTYgIdux).get_symbol(i6loyAgxUM2t, **M8EIoTs2GJXE)
sGi5Aql23May = ABJyTPfru5j8(TD8C81EGml3n, Cn9XfnGZRXZa, zVkWryy7Pzt7, r8knJmMTTKwv, ClVKbku7IAE0, min_filter=QxembNVppnUD)
(JqvBRyjVyTLN, a7RDDLAau23o, jyxXqeE0OOIS) = wM4TNEBKRe2s(sGi5Aql23May, i6loyAgxUM2t, sizes=Q55tUpoH0W5L, ratios=I_jsLlYDecis, normalization=d0ofCsIARAWm, num_channels=zVkWryy7Pzt7, clip=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), 8), interm_layer=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', 8), steps=v0VhEmlMsO_l)
J8N_NsgU9OIv = CIVheOt0RKQX.symbol.contrib.MultiBoxTarget(*[jyxXqeE0OOIS, TRUOLFLuD08x, a7RDDLAau23o], overlap_threshold=0.5, ignore_label=-ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8), negative_mining_ratio=ehT0Px3KOsy9('\060' + chr(0b1001010 + 0o45) + '\063', ord("\x08")), minimum_negative_samples=ehT0Px3KOsy9(chr(721 - 673) + chr(0b101001 + 0o106) + '\x30', 8), negative_mining_thresh=0.5, variances=(0.1, 0.1, 0.2, 0.2), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8fK*\xfaS\x95\x988\x8e\t\xf72#\xd6v'), chr(100) + chr(3783 - 3682) + '\143' + chr(111) + '\144' + chr(0b1100011 + 0o2))(chr(117) + chr(0b11110 + 0o126) + chr(102) + chr(0b101101) + '\070'))
DfCR6lb5TOnQ = J8N_NsgU9OIv[ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000), 8)]
aatU9BI02453 = J8N_NsgU9OIv[ehT0Px3KOsy9(chr(48) + chr(11602 - 11491) + '\061', 8)]
CCiEZ64ZJDbt = J8N_NsgU9OIv[ehT0Px3KOsy9('\060' + '\x6f' + chr(50), 8)]
TvYGbS1b1DAQ = CIVheOt0RKQX.symbol.SoftmaxOutput(data=a7RDDLAau23o, label=CCiEZ64ZJDbt, ignore_label=-ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(93 - 44), 8), use_ignore=ehT0Px3KOsy9(chr(2238 - 2190) + '\x6f' + '\061', 8), grad_scale=1.0, multi_output=ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b110001), 8), normalization=xafqLlk3kkUe(SXOLrMavuUCe(b'\x94_*\xe7^'), chr(100) + '\145' + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(8724 - 8622) + chr(0b101101) + chr(64 - 8)), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x81R5\xd1J\x85\x98"'), chr(7127 - 7027) + chr(101) + chr(99) + '\157' + '\x64' + '\x65')('\x75' + chr(0b1000111 + 0o55) + chr(0b100 + 0o142) + chr(0b101101) + chr(0b111000)))
mn6sFF75EJi_ = CIVheOt0RKQX.symbol.smooth_l1(name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8eQ%\xd1V\x98\x843\x8e'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(116) + chr(102) + chr(45) + '\x38'), data=aatU9BI02453 * (JqvBRyjVyTLN - DfCR6lb5TOnQ), scalar=1.0)
ZnhkLgDOWWHc = CIVheOt0RKQX.symbol.MakeLoss(mn6sFF75EJi_, grad_scale=1.0, normalization=xafqLlk3kkUe(SXOLrMavuUCe(b'\x94_*\xe7^'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\144' + chr(750 - 649))(chr(0b1110101) + '\x74' + chr(102) + chr(0b10011 + 0o32) + chr(56)), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8eQ%\xd1V\x98\x843'), chr(307 - 207) + chr(1350 - 1249) + chr(0b1100011) + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(56)))
lNTbLNUt6ktU = CIVheOt0RKQX.symbol.MakeLoss(data=CCiEZ64ZJDbt, grad_scale=ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b100011 + 0o114) + chr(0b11100 + 0o24), 8), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x81R5\xd1V\x96\x95%\xbd'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110011 + 0o2) + chr(0b1110100) + chr(102) + chr(0b100100 + 0o11) + chr(0b111000)))
WfUKrzEI6HCc = CIVheOt0RKQX.symbol.contrib.MultiBoxDetection(*[TvYGbS1b1DAQ, JqvBRyjVyTLN, jyxXqeE0OOIS], name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x86[2\xebY\x83\x9e/\xbf'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(0b101001 + 0o73) + chr(101))(chr(7930 - 7813) + '\x74' + chr(7898 - 7796) + '\055' + chr(1429 - 1373)), nms_threshold=B1zO81yiJH6n, force_suppress=e_bjlViiPD4p, variances=(0.1, 0.1, 0.2, 0.2), nms_topk=ThWUW9vG0TzH)
WfUKrzEI6HCc = CIVheOt0RKQX.symbol.MakeLoss(data=WfUKrzEI6HCc, grad_scale=ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + chr(48), 8), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\x86[2\xd1U\x82\x83'), '\144' + '\145' + '\x63' + '\157' + '\x64' + chr(0b10100 + 0o121))(chr(0b111 + 0o156) + chr(0b100001 + 0o123) + chr(102) + chr(0b101101) + '\x38'))
UkrMp_I0RDmo = CIVheOt0RKQX.symbol.Group([TvYGbS1b1DAQ, ZnhkLgDOWWHc, lNTbLNUt6ktU, WfUKrzEI6HCc])
return UkrMp_I0RDmo
|
apache/incubator-mxnet
|
example/ssd/symbol/symbol_builder.py
|
get_symbol
|
def get_symbol(network, num_classes, from_layers, num_filters, sizes, ratios,
strides, pads, normalizations=-1, steps=[], min_filter=128,
nms_thresh=0.5, force_suppress=False, nms_topk=400, **kwargs):
"""Build network for testing SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
"""
body = import_module(network).get_symbol(num_classes, **kwargs)
layers = multi_layer_feature(body, from_layers, num_filters, strides, pads,
min_filter=min_filter)
loc_preds, cls_preds, anchor_boxes = multibox_layer(layers, \
num_classes, sizes=sizes, ratios=ratios, normalization=normalizations, \
num_channels=num_filters, clip=False, interm_layer=0, steps=steps)
cls_prob = mx.symbol.softmax(data=cls_preds, axis=1, name='cls_prob')
out = mx.symbol.contrib.MultiBoxDetection(*[cls_prob, loc_preds, anchor_boxes], \
name="detection", nms_threshold=nms_thresh, force_suppress=force_suppress,
variances=(0.1, 0.1, 0.2, 0.2), nms_topk=nms_topk)
return out
|
python
|
def get_symbol(network, num_classes, from_layers, num_filters, sizes, ratios,
strides, pads, normalizations=-1, steps=[], min_filter=128,
nms_thresh=0.5, force_suppress=False, nms_topk=400, **kwargs):
"""Build network for testing SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
"""
body = import_module(network).get_symbol(num_classes, **kwargs)
layers = multi_layer_feature(body, from_layers, num_filters, strides, pads,
min_filter=min_filter)
loc_preds, cls_preds, anchor_boxes = multibox_layer(layers, \
num_classes, sizes=sizes, ratios=ratios, normalization=normalizations, \
num_channels=num_filters, clip=False, interm_layer=0, steps=steps)
cls_prob = mx.symbol.softmax(data=cls_preds, axis=1, name='cls_prob')
out = mx.symbol.contrib.MultiBoxDetection(*[cls_prob, loc_preds, anchor_boxes], \
name="detection", nms_threshold=nms_thresh, force_suppress=force_suppress,
variances=(0.1, 0.1, 0.2, 0.2), nms_topk=nms_topk)
return out
|
[
"def",
"get_symbol",
"(",
"network",
",",
"num_classes",
",",
"from_layers",
",",
"num_filters",
",",
"sizes",
",",
"ratios",
",",
"strides",
",",
"pads",
",",
"normalizations",
"=",
"-",
"1",
",",
"steps",
"=",
"[",
"]",
",",
"min_filter",
"=",
"128",
",",
"nms_thresh",
"=",
"0.5",
",",
"force_suppress",
"=",
"False",
",",
"nms_topk",
"=",
"400",
",",
"*",
"*",
"kwargs",
")",
":",
"body",
"=",
"import_module",
"(",
"network",
")",
".",
"get_symbol",
"(",
"num_classes",
",",
"*",
"*",
"kwargs",
")",
"layers",
"=",
"multi_layer_feature",
"(",
"body",
",",
"from_layers",
",",
"num_filters",
",",
"strides",
",",
"pads",
",",
"min_filter",
"=",
"min_filter",
")",
"loc_preds",
",",
"cls_preds",
",",
"anchor_boxes",
"=",
"multibox_layer",
"(",
"layers",
",",
"num_classes",
",",
"sizes",
"=",
"sizes",
",",
"ratios",
"=",
"ratios",
",",
"normalization",
"=",
"normalizations",
",",
"num_channels",
"=",
"num_filters",
",",
"clip",
"=",
"False",
",",
"interm_layer",
"=",
"0",
",",
"steps",
"=",
"steps",
")",
"cls_prob",
"=",
"mx",
".",
"symbol",
".",
"softmax",
"(",
"data",
"=",
"cls_preds",
",",
"axis",
"=",
"1",
",",
"name",
"=",
"'cls_prob'",
")",
"out",
"=",
"mx",
".",
"symbol",
".",
"contrib",
".",
"MultiBoxDetection",
"(",
"*",
"[",
"cls_prob",
",",
"loc_preds",
",",
"anchor_boxes",
"]",
",",
"name",
"=",
"\"detection\"",
",",
"nms_threshold",
"=",
"nms_thresh",
",",
"force_suppress",
"=",
"force_suppress",
",",
"variances",
"=",
"(",
"0.1",
",",
"0.1",
",",
"0.2",
",",
"0.2",
")",
",",
"nms_topk",
"=",
"nms_topk",
")",
"return",
"out"
] |
Build network for testing SSD
Parameters
----------
network : str
base network symbol name
num_classes : int
number of object classes not including background
from_layers : list of str
feature extraction layers, use '' for add extra layers
For example:
from_layers = ['relu4_3', 'fc7', '', '', '', '']
which means extract feature from relu4_3 and fc7, adding 4 extra layers
on top of fc7
num_filters : list of int
number of filters for extra layers, you can use -1 for extracted features,
however, if normalization and scale is applied, the number of filter for
that layer must be provided.
For example:
num_filters = [512, -1, 512, 256, 256, 256]
strides : list of int
strides for the 3x3 convolution appended, -1 can be used for extracted
feature layers
pads : list of int
paddings for the 3x3 convolution, -1 can be used for extracted layers
sizes : list or list of list
[min_size, max_size] for all layers or [[], [], []...] for specific layers
ratios : list or list of list
[ratio1, ratio2...] for all layers or [[], [], ...] for specific layers
normalizations : int or list of int
use normalizations value for all layers or [...] for specific layers,
-1 indicate no normalizations and scales
steps : list
specify steps for each MultiBoxPrior layer, leave empty, it will calculate
according to layer dimensions
min_filter : int
minimum number of filters used in 1x1 convolution
nms_thresh : float
non-maximum suppression threshold
force_suppress : boolean
whether suppress different class objects
nms_topk : int
apply NMS to top K detections
Returns
-------
mx.Symbol
|
[
"Build",
"network",
"for",
"testing",
"SSD"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/symbol/symbol_builder.py#L118-L182
|
train
|
Build a base network symbol for testing SSD
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5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ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1677 - 1629) + chr(0b100101 + 0o112) + '\x32' + chr(0b0 + 0o63) + chr(2573 - 2522), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x33' + chr(48) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(11585 - 11474) + '\061' + chr(0b101100 + 0o6) + chr(494 - 439), 0o10), ehT0Px3KOsy9(chr(2102 - 2054) + chr(0b1101111) + chr(0b110010) + chr(0b100111 + 0o12) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110010) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(822 - 774) + '\x6f' + '\062' + chr(2990 - 2935) + chr(545 - 493), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x31' + chr(479 - 424) + chr(0b110000 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(0b100100 + 0o15) + chr(1006 - 954) + chr(0b110010), 63394 - 63386), ehT0Px3KOsy9(chr(1477 - 1429) + chr(111) + '\064' + chr(0b10111 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + '\x33', 58212 - 58204), ehT0Px3KOsy9(chr(1563 - 1515) + chr(0b1101111) + chr(0b110010) + '\067' + '\x31', 57215 - 57207), ehT0Px3KOsy9('\x30' + '\x6f' + chr(52) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011000 + 0o27) + '\x33' + chr(0b110010) + chr(53), 33200 - 33192), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\x35' + '\061', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(287 - 236) + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1232 - 1184) + '\x6f' + chr(50) + '\065', 24978 - 24970), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(49) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\061', 0b1000), ehT0Px3KOsy9(chr(1819 - 1771) + chr(111) + '\062' + '\x37' + '\x36', 37667 - 37659), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(702 - 653) + chr(0b10011 + 0o40) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(4508 - 4397) + '\063' + chr(0b0 + 0o61) + '\x34', 0o10), ehT0Px3KOsy9(chr(2196 - 2148) + chr(5786 - 5675) + '\063' + '\x32' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\x32' + chr(721 - 671), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\x37' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(50) + chr(2604 - 2549) + chr(48), 26078 - 26070), ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + '\063' + chr(2372 - 2321) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b101011 + 0o104) + '\x34' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(5959 - 5848) + chr(0b110011) + '\067' + chr(641 - 589), 54127 - 54119), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1100001 + 0o16) + chr(0b110001) + '\064' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010 + 0o0) + '\063' + chr(1329 - 1280), 18233 - 18225), ehT0Px3KOsy9('\060' + chr(111) + chr(0b111 + 0o60) + chr(0b101110 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b10 + 0o60) + '\066' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\061' + '\066' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110001) + chr(0b1010 + 0o54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\066' + chr(1001 - 949), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\061' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(8605 - 8494) + '\x31' + '\x35' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1111 + 0o140) + chr(49) + chr(0b101000 + 0o11) + chr(0b1000 + 0o51), 43073 - 43065), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1422 - 1372) + chr(1596 - 1548) + chr(1674 - 1619), 26274 - 26266), ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + '\x31' + '\062' + chr(2635 - 2582), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10000 + 0o45) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), '\x64' + chr(3602 - 3501) + chr(0b10001 + 0o122) + '\157' + chr(5662 - 5562) + '\x65')('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(95 - 39)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Rc2yr7B7_1Tw(dg_IyTYgIdux, i6loyAgxUM2t, Cn9XfnGZRXZa, zVkWryy7Pzt7, Q55tUpoH0W5L, I_jsLlYDecis, r8knJmMTTKwv, ClVKbku7IAE0, d0ofCsIARAWm=-ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061', ord("\x08")), v0VhEmlMsO_l=[], QxembNVppnUD=ehT0Px3KOsy9('\060' + chr(0b1010101 + 0o32) + chr(0b110010) + chr(1125 - 1077) + chr(1563 - 1515), 0b1000), B1zO81yiJH6n=0.5, e_bjlViiPD4p=ehT0Px3KOsy9('\x30' + '\x6f' + '\060', 31272 - 31264), ThWUW9vG0TzH=ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x36' + chr(0b110010) + chr(0b110000), 0b1000), **M8EIoTs2GJXE):
TD8C81EGml3n = VsP74AYOoLHr(dg_IyTYgIdux).get_symbol(i6loyAgxUM2t, **M8EIoTs2GJXE)
sGi5Aql23May = ABJyTPfru5j8(TD8C81EGml3n, Cn9XfnGZRXZa, zVkWryy7Pzt7, r8knJmMTTKwv, ClVKbku7IAE0, min_filter=QxembNVppnUD)
(JqvBRyjVyTLN, a7RDDLAau23o, jyxXqeE0OOIS) = wM4TNEBKRe2s(sGi5Aql23May, i6loyAgxUM2t, sizes=Q55tUpoH0W5L, ratios=I_jsLlYDecis, normalization=d0ofCsIARAWm, num_channels=zVkWryy7Pzt7, clip=ehT0Px3KOsy9('\060' + chr(0b110111 + 0o70) + chr(0b1011 + 0o45), 8), interm_layer=ehT0Px3KOsy9(chr(93 - 45) + '\x6f' + chr(48), 8), steps=v0VhEmlMsO_l)
TvYGbS1b1DAQ = CIVheOt0RKQX.symbol.softmax(data=a7RDDLAau23o, axis=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', 8), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\xac$\xd0\xe1\xce\x17\x00'), chr(0b1100100) + chr(101) + chr(0b11000 + 0o113) + chr(0b1011010 + 0o25) + chr(100) + chr(7478 - 7377))(chr(117) + '\164' + chr(0b1010101 + 0o21) + chr(1977 - 1932) + chr(56)))
UkrMp_I0RDmo = CIVheOt0RKQX.symbol.contrib.MultiBoxDetection(*[TvYGbS1b1DAQ, JqvBRyjVyTLN, jyxXqeE0OOIS], name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xa5#\xea\xf2\xc8\x11\rO'), chr(0b1100100) + chr(0b1000111 + 0o36) + '\x63' + '\x6f' + chr(100) + chr(0b111 + 0o136))(chr(0b1101001 + 0o14) + chr(116) + chr(0b1001100 + 0o32) + '\055' + chr(0b111000)), nms_threshold=B1zO81yiJH6n, force_suppress=e_bjlViiPD4p, variances=(0.1, 0.1, 0.2, 0.2), nms_topk=ThWUW9vG0TzH)
return UkrMp_I0RDmo
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
_get_grad
|
def _get_grad(net, image, class_id=None, conv_layer_name=None, image_grad=False):
"""This is an internal helper function that can be used for either of these
but not both at the same time:
1. Record the output and gradient of output of an intermediate convolutional layer.
2. Record the gradients of the image.
Parameters
----------
image : NDArray
Image to visuaize. This is an NDArray with the preprocessed image.
class_id : int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured.
image_grad: bool
Whether to capture gradients of the image."""
if image_grad:
image.attach_grad()
Conv2D.capture_layer_name = None
Activation.set_guided_backprop(True)
else:
# Tell convviz.Conv2D which layer's output and gradient needs to be recorded
Conv2D.capture_layer_name = conv_layer_name
Activation.set_guided_backprop(False)
# Run the network
with autograd.record(train_mode=False):
out = net(image)
# If user didn't provide a class id, we'll use the class that the network predicted
if class_id == None:
model_output = out.asnumpy()
class_id = np.argmax(model_output)
# Create a one-hot target with class_id and backprop with the created target
one_hot_target = mx.nd.one_hot(mx.nd.array([class_id]), 1000)
out.backward(one_hot_target, train_mode=False)
if image_grad:
return image.grad[0].asnumpy()
else:
# Return the recorded convolution output and gradient
conv_out = Conv2D.conv_output
return conv_out[0].asnumpy(), conv_out.grad[0].asnumpy()
|
python
|
def _get_grad(net, image, class_id=None, conv_layer_name=None, image_grad=False):
"""This is an internal helper function that can be used for either of these
but not both at the same time:
1. Record the output and gradient of output of an intermediate convolutional layer.
2. Record the gradients of the image.
Parameters
----------
image : NDArray
Image to visuaize. This is an NDArray with the preprocessed image.
class_id : int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured.
image_grad: bool
Whether to capture gradients of the image."""
if image_grad:
image.attach_grad()
Conv2D.capture_layer_name = None
Activation.set_guided_backprop(True)
else:
# Tell convviz.Conv2D which layer's output and gradient needs to be recorded
Conv2D.capture_layer_name = conv_layer_name
Activation.set_guided_backprop(False)
# Run the network
with autograd.record(train_mode=False):
out = net(image)
# If user didn't provide a class id, we'll use the class that the network predicted
if class_id == None:
model_output = out.asnumpy()
class_id = np.argmax(model_output)
# Create a one-hot target with class_id and backprop with the created target
one_hot_target = mx.nd.one_hot(mx.nd.array([class_id]), 1000)
out.backward(one_hot_target, train_mode=False)
if image_grad:
return image.grad[0].asnumpy()
else:
# Return the recorded convolution output and gradient
conv_out = Conv2D.conv_output
return conv_out[0].asnumpy(), conv_out.grad[0].asnumpy()
|
[
"def",
"_get_grad",
"(",
"net",
",",
"image",
",",
"class_id",
"=",
"None",
",",
"conv_layer_name",
"=",
"None",
",",
"image_grad",
"=",
"False",
")",
":",
"if",
"image_grad",
":",
"image",
".",
"attach_grad",
"(",
")",
"Conv2D",
".",
"capture_layer_name",
"=",
"None",
"Activation",
".",
"set_guided_backprop",
"(",
"True",
")",
"else",
":",
"# Tell convviz.Conv2D which layer's output and gradient needs to be recorded",
"Conv2D",
".",
"capture_layer_name",
"=",
"conv_layer_name",
"Activation",
".",
"set_guided_backprop",
"(",
"False",
")",
"# Run the network",
"with",
"autograd",
".",
"record",
"(",
"train_mode",
"=",
"False",
")",
":",
"out",
"=",
"net",
"(",
"image",
")",
"# If user didn't provide a class id, we'll use the class that the network predicted",
"if",
"class_id",
"==",
"None",
":",
"model_output",
"=",
"out",
".",
"asnumpy",
"(",
")",
"class_id",
"=",
"np",
".",
"argmax",
"(",
"model_output",
")",
"# Create a one-hot target with class_id and backprop with the created target",
"one_hot_target",
"=",
"mx",
".",
"nd",
".",
"one_hot",
"(",
"mx",
".",
"nd",
".",
"array",
"(",
"[",
"class_id",
"]",
")",
",",
"1000",
")",
"out",
".",
"backward",
"(",
"one_hot_target",
",",
"train_mode",
"=",
"False",
")",
"if",
"image_grad",
":",
"return",
"image",
".",
"grad",
"[",
"0",
"]",
".",
"asnumpy",
"(",
")",
"else",
":",
"# Return the recorded convolution output and gradient",
"conv_out",
"=",
"Conv2D",
".",
"conv_output",
"return",
"conv_out",
"[",
"0",
"]",
".",
"asnumpy",
"(",
")",
",",
"conv_out",
".",
"grad",
"[",
"0",
"]",
".",
"asnumpy",
"(",
")"
] |
This is an internal helper function that can be used for either of these
but not both at the same time:
1. Record the output and gradient of output of an intermediate convolutional layer.
2. Record the gradients of the image.
Parameters
----------
image : NDArray
Image to visuaize. This is an NDArray with the preprocessed image.
class_id : int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured.
image_grad: bool
Whether to capture gradients of the image.
|
[
"This",
"is",
"an",
"internal",
"helper",
"function",
"that",
"can",
"be",
"used",
"for",
"either",
"of",
"these",
"but",
"not",
"both",
"at",
"the",
"same",
"time",
":",
"1",
".",
"Record",
"the",
"output",
"and",
"gradient",
"of",
"output",
"of",
"an",
"intermediate",
"convolutional",
"layer",
".",
"2",
".",
"Record",
"the",
"gradients",
"of",
"the",
"image",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L122-L167
|
train
|
This function is used to get the gradients of the image and the output of the intermediate convolutional layer.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrh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fv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(663 - 615) + chr(111) + chr(0b101100 + 0o10) + chr(72 - 24), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(2012 - 1961) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(509 - 461) + chr(7356 - 7245) + '\x34' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(0b11110 + 0o25) + chr(499 - 444), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b110001) + chr(0b110011), 34467 - 34459), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1093 - 1044) + chr(0b110000) + chr(0b110011 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2169 - 2120) + chr(0b110000) + chr(915 - 864), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(55) + chr(0b110010), 50654 - 50646), ehT0Px3KOsy9(chr(48) + '\157' + chr(1305 - 1255) + chr(0b110000) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110011) + chr(0b1110 + 0o50), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110110) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(55), 8834 - 8826), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + '\061' + chr(0b100111 + 0o11) + '\065', 3672 - 3664), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b110010) + chr(0b0 + 0o63), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(2242 - 2189) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b11011 + 0o124) + chr(0b110010) + '\063' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8297 - 8186) + chr(0b110001) + '\x33' + chr(147 - 98), 4375 - 4367), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(1091 - 1041) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(5977 - 5866) + chr(0b110010) + chr(2146 - 2097), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(326 - 275) + chr(2310 - 2259) + chr(0b110011 + 0o1), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + chr(1086 - 1037) + '\062' + '\x36', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(1669 - 1618) + chr(0b11001 + 0o27) + chr(2621 - 2567), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11010 + 0o30) + chr(212 - 164) + chr(50), 0o10), ehT0Px3KOsy9(chr(587 - 539) + chr(9077 - 8966) + '\063' + '\062' + chr(0b1110 + 0o45), 42172 - 42164), ehT0Px3KOsy9(chr(203 - 155) + '\x6f' + chr(0b110001) + chr(0b1101 + 0o52) + chr(0b110100), 50488 - 50480), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(49) + chr(878 - 830), 35998 - 35990), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(49) + '\x35' + chr(1520 - 1471), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(1263 - 1213) + '\061', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(1004 - 893) + '\061' + '\061' + '\061', 0o10), ehT0Px3KOsy9(chr(2168 - 2120) + '\x6f' + '\x32' + chr(2032 - 1979) + '\062', 0b1000), ehT0Px3KOsy9(chr(607 - 559) + chr(10077 - 9966) + chr(50) + '\062' + '\065', 38762 - 38754), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x37' + chr(1281 - 1232), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(2583 - 2529) + chr(0b110011), 36890 - 36882), ehT0Px3KOsy9(chr(741 - 693) + '\157' + '\x32' + '\x36' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(2560 - 2509) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110100) + '\x30', 38188 - 38180), ehT0Px3KOsy9('\x30' + chr(1740 - 1629) + chr(0b101001 + 0o12) + chr(0b11011 + 0o27) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + chr(49) + '\x37', 56623 - 56615), ehT0Px3KOsy9('\x30' + chr(10504 - 10393) + chr(0b110001) + chr(2968 - 2913) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100011 + 0o17) + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x35' + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e'), chr(0b1 + 0o143) + '\145' + '\143' + '\157' + chr(0b1100100) + chr(7616 - 7515))(chr(0b1110101) + chr(0b110001 + 0o103) + chr(102) + chr(0b100 + 0o51) + chr(0b110101 + 0o3)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def qNyZVmkIcnF7(DyzboKL9cczb, IdmAHWfCqrnp, BshyLHM1dmii=None, klJFSzcKSiNA=None, afPBUdpC3DIs=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), ord("\x08"))):
if afPBUdpC3DIs:
xafqLlk3kkUe(IdmAHWfCqrnp, xafqLlk3kkUe(SXOLrMavuUCe(b'A,S\xfe\xe8/\x1c\x1d\xf7\x7f\x95'), chr(7218 - 7118) + chr(0b111101 + 0o50) + chr(0b1100011) + '\x6f' + chr(9768 - 9668) + chr(101))('\165' + chr(116) + chr(102) + chr(0b1010 + 0o43) + '\070'))()
bczOo1A2Z4rT.HbBMGK2haGzc = None
xafqLlk3kkUe(fryd_NnVW5q4, xafqLlk3kkUe(SXOLrMavuUCe(b'S=S\xc0\xec2*\x1e\xe0z\xae=$p\x00\xe9+9a'), '\144' + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(1263 - 1146) + chr(0b111011 + 0o71) + chr(0b1110 + 0o130) + chr(1665 - 1620) + chr(56)))(ehT0Px3KOsy9(chr(1015 - 967) + chr(5062 - 4951) + chr(0b110001), 0b1000))
else:
bczOo1A2Z4rT.HbBMGK2haGzc = klJFSzcKSiNA
xafqLlk3kkUe(fryd_NnVW5q4, xafqLlk3kkUe(SXOLrMavuUCe(b'S=S\xc0\xec2*\x1e\xe0z\xae=$p\x00\xe9+9a'), chr(0b1000010 + 0o42) + '\145' + '\143' + chr(0b1111 + 0o140) + chr(546 - 446) + '\x65')(chr(0b110010 + 0o103) + '\x74' + chr(0b1100110) + '\055' + chr(1944 - 1888)))(ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\x30', 8))
with xafqLlk3kkUe(EGX9rjIuh37Q, xafqLlk3kkUe(SXOLrMavuUCe(b'R=D\xf0\xf9#'), '\x64' + chr(0b1000100 + 0o41) + chr(99) + chr(111) + '\144' + chr(101))(chr(0b10000 + 0o145) + chr(116) + chr(0b1100110) + '\055' + '\x38'))(train_mode=ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b101010 + 0o105) + '\060', 8)):
UkrMp_I0RDmo = DyzboKL9cczb(IdmAHWfCqrnp)
if BshyLHM1dmii is None:
j7gfMTsGRqVp = UkrMp_I0RDmo.asnumpy()
BshyLHM1dmii = WqUC3KWvYVup.argmax(j7gfMTsGRqVp)
yneHtPmatLu4 = CIVheOt0RKQX.nd.Hq3fv4Yp0EhD(CIVheOt0RKQX.nd.B0ePDhpqxN5n([BshyLHM1dmii]), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\x31' + chr(55) + chr(0b100110 + 0o17) + chr(0b10011 + 0o35), 0o10))
xafqLlk3kkUe(UkrMp_I0RDmo, xafqLlk3kkUe(SXOLrMavuUCe(b'B9D\xf4\xfc&1\x1e'), chr(100) + '\145' + chr(99) + chr(0b1101111) + chr(100) + chr(0b1011010 + 0o13))(chr(0b1110101) + chr(0b1011011 + 0o31) + chr(657 - 555) + chr(45) + chr(1089 - 1033)))(yneHtPmatLu4, train_mode=ehT0Px3KOsy9(chr(1866 - 1818) + chr(0b101100 + 0o103) + chr(0b110000), 8))
if afPBUdpC3DIs:
return xafqLlk3kkUe(IdmAHWfCqrnp.grad[ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1011011 + 0o24) + chr(1763 - 1715), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'A+I\xea\xe67:'), chr(0b1100100) + chr(101) + chr(0b110110 + 0o55) + chr(111) + chr(100) + chr(4839 - 4738))(chr(1662 - 1545) + chr(116) + chr(5372 - 5270) + '\055' + '\x38'))()
else:
uiQ1Vjfmpahs = bczOo1A2Z4rT.conv_output
return (xafqLlk3kkUe(uiQ1Vjfmpahs[ehT0Px3KOsy9(chr(48) + chr(4878 - 4767) + chr(48), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'A+I\xea\xe67:'), chr(1503 - 1403) + '\x65' + '\143' + chr(111) + '\x64' + chr(0b11011 + 0o112))(chr(8591 - 8474) + chr(0b1100110 + 0o16) + chr(102) + '\055' + chr(0b111000)))(), xafqLlk3kkUe(uiQ1Vjfmpahs.grad[ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'A+I\xea\xe67:'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b100011 + 0o102))(chr(11302 - 11185) + chr(0b1101000 + 0o14) + chr(0b1100110) + chr(0b101010 + 0o3) + '\070'))())
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
get_conv_out_grad
|
def get_conv_out_grad(net, image, class_id=None, conv_layer_name=None):
"""Get the output and gradients of output of a convolutional layer.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured."""
return _get_grad(net, image, class_id, conv_layer_name, image_grad=False)
|
python
|
def get_conv_out_grad(net, image, class_id=None, conv_layer_name=None):
"""Get the output and gradients of output of a convolutional layer.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured."""
return _get_grad(net, image, class_id, conv_layer_name, image_grad=False)
|
[
"def",
"get_conv_out_grad",
"(",
"net",
",",
"image",
",",
"class_id",
"=",
"None",
",",
"conv_layer_name",
"=",
"None",
")",
":",
"return",
"_get_grad",
"(",
"net",
",",
"image",
",",
"class_id",
",",
"conv_layer_name",
",",
"image_grad",
"=",
"False",
")"
] |
Get the output and gradients of output of a convolutional layer.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used.
conv_layer_name: str
Name of the convolutional layer whose output and output's gradients need to be acptured.
|
[
"Get",
"the",
"output",
"and",
"gradients",
"of",
"output",
"of",
"a",
"convolutional",
"layer",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L169-L183
|
train
|
Get the output and gradients of a convolutional layer.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTx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rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(551 - 503) + chr(111) + chr(49) + '\x32' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b101110 + 0o4) + '\066' + chr(1382 - 1332), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(52) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(217 - 169) + chr(10672 - 10561) + '\x32' + '\064' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(12308 - 12197) + chr(0b110001) + '\x31' + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10100 + 0o35) + '\061' + '\061', 39911 - 39903), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(1905 - 1856) + chr(49), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1358 - 1307) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010 + 0o3) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x34' + chr(0b110110), 32309 - 32301), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x33' + chr(299 - 250), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110100) + chr(2866 - 2812), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(0b110110) + chr(1312 - 1260), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x30' + chr(0b10001 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(207 - 156) + chr(0b110001) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(11906 - 11795) + chr(0b110011) + chr(2309 - 2254) + '\060', 456 - 448), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101111 + 0o3) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7719 - 7608) + chr(2384 - 2335) + chr(51) + '\062', 0b1000), ehT0Px3KOsy9(chr(1403 - 1355) + '\157' + chr(431 - 378), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110001 + 0o0) + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(404 - 356) + chr(12054 - 11943) + chr(1914 - 1864) + chr(51) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11001 + 0o31) + chr(452 - 404) + '\x33', 34270 - 34262), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(49) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b11010 + 0o32) + chr(54), 18187 - 18179), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(55), 45681 - 45673), ehT0Px3KOsy9(chr(963 - 915) + chr(1945 - 1834) + chr(49) + chr(0b1000 + 0o55) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9(chr(331 - 283) + chr(0b1101111) + '\062' + chr(52) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(9372 - 9261) + chr(0b110100) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(602 - 554) + chr(0b1101111) + chr(0b110010) + chr(55) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101100 + 0o103) + chr(1472 - 1417) + chr(52), 55940 - 55932), ehT0Px3KOsy9('\060' + '\157' + chr(0b101100 + 0o5) + chr(0b110001) + '\x35', 8), ehT0Px3KOsy9(chr(514 - 466) + '\157' + chr(947 - 897) + chr(2328 - 2277) + chr(48), 8), ehT0Px3KOsy9(chr(48) + chr(0b110001 + 0o76) + chr(0b110001) + chr(1709 - 1661) + chr(53), 24238 - 24230), ehT0Px3KOsy9(chr(48) + chr(8407 - 8296) + chr(761 - 712) + '\061' + chr(0b101001 + 0o14), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b110101) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + '\061' + chr(197 - 143) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100010 + 0o20) + chr(50) + '\x31', 50284 - 50276), ehT0Px3KOsy9(chr(1567 - 1519) + chr(0b1101111) + '\x32' + chr(0b1001 + 0o47), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\x31' + chr(1036 - 985) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(797 - 749) + chr(111) + chr(0b101011 + 0o10) + '\x37' + '\x35', 17153 - 17145)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(53) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'}'), '\144' + chr(867 - 766) + chr(0b1100011) + chr(0b1010010 + 0o35) + chr(1820 - 1720) + '\x65')(chr(117) + chr(116) + '\x66' + chr(830 - 785) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def MLhrwaJFEugf(DyzboKL9cczb, IdmAHWfCqrnp, BshyLHM1dmii=None, klJFSzcKSiNA=None):
return qNyZVmkIcnF7(DyzboKL9cczb, IdmAHWfCqrnp, BshyLHM1dmii, klJFSzcKSiNA, image_grad=ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 0b1000))
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
get_image_grad
|
def get_image_grad(net, image, class_id=None):
"""Get the gradients of the image.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used."""
return _get_grad(net, image, class_id, image_grad=True)
|
python
|
def get_image_grad(net, image, class_id=None):
"""Get the gradients of the image.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used."""
return _get_grad(net, image, class_id, image_grad=True)
|
[
"def",
"get_image_grad",
"(",
"net",
",",
"image",
",",
"class_id",
"=",
"None",
")",
":",
"return",
"_get_grad",
"(",
"net",
",",
"image",
",",
"class_id",
",",
"image_grad",
"=",
"True",
")"
] |
Get the gradients of the image.
Parameters:
----------
net: Block
Network to use for visualization.
image: NDArray
Preprocessed image to use for visualization.
class_id: int
Category ID this image belongs to. If not provided,
network's prediction will be used.
|
[
"Get",
"the",
"gradients",
"of",
"the",
"image",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L185-L197
|
train
|
Get the gradients of the image.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp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sy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(6385 - 6274) + '\x31' + chr(0b110101) + '\064', 23968 - 23960), ehT0Px3KOsy9(chr(0b110000) + chr(3141 - 3030) + '\061' + chr(973 - 919), 47801 - 47793), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(11356 - 11245) + '\062' + chr(1559 - 1509) + chr(0b100100 + 0o21), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1393 - 1282) + chr(51) + chr(69 - 20) + chr(574 - 520), 0b1000), ehT0Px3KOsy9(chr(1008 - 960) + chr(3110 - 2999) + chr(0b11011 + 0o27) + '\062' + chr(939 - 888), 0o10), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + '\061' + chr(50) + chr(48), 33011 - 33003), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101111 + 0o3) + chr(0b11010 + 0o33), 13533 - 13525), ehT0Px3KOsy9(chr(1672 - 1624) + chr(6951 - 6840) + chr(50) + chr(0b100110 + 0o17) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(823 - 772) + '\060' + '\x34', 30423 - 30415), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1062 - 1013) + '\065' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(49) + chr(0b1100 + 0o45), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x33' + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(474 - 425) + '\x35' + chr(51), 8), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + chr(0b110010) + chr(0b110010) + chr(0b110011), 8), ehT0Px3KOsy9(chr(745 - 697) + chr(1621 - 1510) + chr(0b110001) + chr(49) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b11101 + 0o27) + chr(52), 46297 - 46289), ehT0Px3KOsy9(chr(1817 - 1769) + '\x6f' + chr(2062 - 2011) + '\065' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + chr(51) + chr(1439 - 1390) + chr(0b100011 + 0o23), 8), ehT0Px3KOsy9(chr(1116 - 1068) + chr(111) + chr(0b101100 + 0o11) + chr(0b110 + 0o54), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b101000 + 0o14) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + '\x33' + chr(0b110100) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x36' + chr(54), 45406 - 45398), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(49) + chr(51) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1415 - 1367) + chr(111) + chr(2239 - 2188) + chr(0b101111 + 0o10) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(710 - 657), 8), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + '\x31' + '\x36' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(0b110111) + '\x34', 55926 - 55918), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1111 + 0o44) + chr(0b110110) + '\x35', 0b1000), ehT0Px3KOsy9(chr(184 - 136) + '\157' + chr(49) + chr(49) + '\060', 39561 - 39553), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + '\062' + '\066' + chr(0b11110 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110010) + chr(0b1000 + 0o55), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1011110 + 0o21) + chr(111 - 61) + chr(984 - 935) + '\x30', 61227 - 61219), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(442 - 394), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(433 - 385) + chr(0b10 + 0o64), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b101011 + 0o13) + chr(0b101000 + 0o13), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x37' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o34) + '\x32', 15095 - 15087), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + chr(0b100 + 0o56) + chr(0b101110 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b101001 + 0o12) + chr(0b110101) + chr(0b110111 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(52) + chr(49), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1101 + 0o50) + chr(0b11000 + 0o30), 24567 - 24559)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'B'), chr(100) + '\145' + chr(1579 - 1480) + chr(4880 - 4769) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(7593 - 7491) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def hIm4PRyeQCGl(DyzboKL9cczb, IdmAHWfCqrnp, BshyLHM1dmii=None):
return qNyZVmkIcnF7(DyzboKL9cczb, IdmAHWfCqrnp, BshyLHM1dmii, image_grad=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101100 + 0o3) + chr(1586 - 1537), 51503 - 51495))
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
grad_to_image
|
def grad_to_image(gradient):
"""Convert gradients of image obtained using `get_image_grad`
into image. This shows parts of the image that is most strongly activating
the output neurons."""
gradient = gradient - gradient.min()
gradient /= gradient.max()
gradient = np.uint8(gradient * 255).transpose(1, 2, 0)
gradient = gradient[..., ::-1]
return gradient
|
python
|
def grad_to_image(gradient):
"""Convert gradients of image obtained using `get_image_grad`
into image. This shows parts of the image that is most strongly activating
the output neurons."""
gradient = gradient - gradient.min()
gradient /= gradient.max()
gradient = np.uint8(gradient * 255).transpose(1, 2, 0)
gradient = gradient[..., ::-1]
return gradient
|
[
"def",
"grad_to_image",
"(",
"gradient",
")",
":",
"gradient",
"=",
"gradient",
"-",
"gradient",
".",
"min",
"(",
")",
"gradient",
"/=",
"gradient",
".",
"max",
"(",
")",
"gradient",
"=",
"np",
".",
"uint8",
"(",
"gradient",
"*",
"255",
")",
".",
"transpose",
"(",
"1",
",",
"2",
",",
"0",
")",
"gradient",
"=",
"gradient",
"[",
"...",
",",
":",
":",
"-",
"1",
"]",
"return",
"gradient"
] |
Convert gradients of image obtained using `get_image_grad`
into image. This shows parts of the image that is most strongly activating
the output neurons.
|
[
"Convert",
"gradients",
"of",
"image",
"obtained",
"using",
"get_image_grad",
"into",
"image",
".",
"This",
"shows",
"parts",
"of",
"the",
"image",
"that",
"is",
"most",
"strongly",
"activating",
"the",
"output",
"neurons",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L199-L207
|
train
|
Convert gradients of image obtained using get_image_grad into image.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1uf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Dnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(340 - 229) + '\061' + chr(1656 - 1607) + chr(0b110011), 44897 - 44889), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(1686 - 1636), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000111 + 0o50) + chr(0b1000 + 0o52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b1010 + 0o53) + chr(0b110001), 30738 - 30730), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110100) + chr(0b11100 + 0o30), 38445 - 38437), ehT0Px3KOsy9('\060' + chr(5536 - 5425) + chr(49) + '\060' + '\061', 65410 - 65402), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x36' + chr(0b110101), 60417 - 60409), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + '\061' + chr(0b110111) + chr(964 - 915), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b101011 + 0o13) + chr(281 - 229), 52362 - 52354), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101110 + 0o5) + chr(53) + '\x37', 19520 - 19512), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x37' + chr(0b110101 + 0o2), 17681 - 17673), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(425 - 375) + chr(0b1 + 0o57) + chr(0b110000 + 0o3), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b110001) + '\061' + chr(1254 - 1200), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(0b110001) + '\x36' + chr(0b11100 + 0o26), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2418 - 2367) + chr(54) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10493 - 10382) + '\061' + chr(55) + '\062', 52669 - 52661), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + '\061' + chr(54) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\065' + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(1452 - 1400) + '\x37', 16395 - 16387), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + '\x31' + '\061' + chr(2288 - 2233), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\063' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11000 + 0o32) + '\066', 0b1000), ehT0Px3KOsy9(chr(237 - 189) + chr(0b1101111) + chr(0b10010 + 0o37) + '\064' + chr(48), 23115 - 23107), ehT0Px3KOsy9(chr(0b110000) + chr(3869 - 3758) + '\x37' + chr(2567 - 2512), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x32' + chr(1676 - 1623), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2489 - 2438) + '\x37' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1606 - 1495) + '\x31' + chr(0b10000 + 0o45) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(119 - 64) + '\x37', 0o10), ehT0Px3KOsy9(chr(144 - 96) + chr(3840 - 3729) + chr(0b101011 + 0o7) + chr(53) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + chr(50) + chr(0b110011) + '\x33', 8463 - 8455), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(773 - 724) + chr(50) + chr(209 - 159), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x33' + chr(0b100001 + 0o25), 47511 - 47503), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + '\x37' + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(55) + chr(235 - 183), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\x37' + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b110010 + 0o75) + '\062' + '\060' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(275 - 226) + chr(0b110101) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1642 - 1594) + chr(8520 - 8409) + chr(0b110110) + chr(1376 - 1324), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101001 + 0o6) + chr(0b101 + 0o60) + chr(0b100000 + 0o20), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'e'), chr(3736 - 3636) + chr(0b1100101) + chr(3053 - 2954) + '\x6f' + chr(0b1100100) + chr(5443 - 5342))(chr(3123 - 3006) + chr(116) + chr(0b1100110) + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def afBwsYGhRmWH(_0RkZBUwCSo7):
_0RkZBUwCSo7 = _0RkZBUwCSo7 - _0RkZBUwCSo7.Dx22bkKPdt5d()
_0RkZBUwCSo7 /= _0RkZBUwCSo7.tsdjvlgh9gDP()
_0RkZBUwCSo7 = WqUC3KWvYVup.uint8(_0RkZBUwCSo7 * ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + chr(590 - 539) + chr(55) + '\067', ord("\x08"))).transpose(ehT0Px3KOsy9('\x30' + chr(597 - 486) + chr(267 - 218), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(50), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110000), 0b1000))
_0RkZBUwCSo7 = _0RkZBUwCSo7[..., ::-ehT0Px3KOsy9(chr(1592 - 1544) + chr(111) + '\061', 8)]
return _0RkZBUwCSo7
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
get_cam
|
def get_cam(imggrad, conv_out):
"""Compute CAM. Refer section 3 of https://arxiv.org/abs/1610.02391 for details"""
weights = np.mean(imggrad, axis=(1, 2))
cam = np.ones(conv_out.shape[1:], dtype=np.float32)
for i, w in enumerate(weights):
cam += w * conv_out[i, :, :]
cam = cv2.resize(cam, (imggrad.shape[1], imggrad.shape[2]))
cam = np.maximum(cam, 0)
cam = (cam - np.min(cam)) / (np.max(cam) - np.min(cam))
cam = np.uint8(cam * 255)
return cam
|
python
|
def get_cam(imggrad, conv_out):
"""Compute CAM. Refer section 3 of https://arxiv.org/abs/1610.02391 for details"""
weights = np.mean(imggrad, axis=(1, 2))
cam = np.ones(conv_out.shape[1:], dtype=np.float32)
for i, w in enumerate(weights):
cam += w * conv_out[i, :, :]
cam = cv2.resize(cam, (imggrad.shape[1], imggrad.shape[2]))
cam = np.maximum(cam, 0)
cam = (cam - np.min(cam)) / (np.max(cam) - np.min(cam))
cam = np.uint8(cam * 255)
return cam
|
[
"def",
"get_cam",
"(",
"imggrad",
",",
"conv_out",
")",
":",
"weights",
"=",
"np",
".",
"mean",
"(",
"imggrad",
",",
"axis",
"=",
"(",
"1",
",",
"2",
")",
")",
"cam",
"=",
"np",
".",
"ones",
"(",
"conv_out",
".",
"shape",
"[",
"1",
":",
"]",
",",
"dtype",
"=",
"np",
".",
"float32",
")",
"for",
"i",
",",
"w",
"in",
"enumerate",
"(",
"weights",
")",
":",
"cam",
"+=",
"w",
"*",
"conv_out",
"[",
"i",
",",
":",
",",
":",
"]",
"cam",
"=",
"cv2",
".",
"resize",
"(",
"cam",
",",
"(",
"imggrad",
".",
"shape",
"[",
"1",
"]",
",",
"imggrad",
".",
"shape",
"[",
"2",
"]",
")",
")",
"cam",
"=",
"np",
".",
"maximum",
"(",
"cam",
",",
"0",
")",
"cam",
"=",
"(",
"cam",
"-",
"np",
".",
"min",
"(",
"cam",
")",
")",
"/",
"(",
"np",
".",
"max",
"(",
"cam",
")",
"-",
"np",
".",
"min",
"(",
"cam",
")",
")",
"cam",
"=",
"np",
".",
"uint8",
"(",
"cam",
"*",
"255",
")",
"return",
"cam"
] |
Compute CAM. Refer section 3 of https://arxiv.org/abs/1610.02391 for details
|
[
"Compute",
"CAM",
".",
"Refer",
"section",
"3",
"of",
"https",
":",
"//",
"arxiv",
".",
"org",
"/",
"abs",
"/",
"1610",
".",
"02391",
"for",
"details"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L209-L219
|
train
|
Compute CAM. Refer section 3 of https://arxiv. org / abs / 1610. 02391 for details
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,j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wxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1042 - 994) + chr(0b1101111) + '\063' + chr(0b110011) + chr(0b11000 + 0o30), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(261 - 212) + chr(0b1001 + 0o53) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110000) + '\065', 28078 - 28070), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(270 - 221) + chr(0b110100), 10766 - 10758), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\x32' + chr(0b110000) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1954 - 1843) + chr(1807 - 1756) + chr(0b110000) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x31' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6740 - 6629) + '\062' + chr(0b110101) + chr(0b1111 + 0o43), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b110010) + chr(0b101110 + 0o6), 42363 - 42355), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\067' + chr(54), 26137 - 26129), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\x36' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(1157 - 1108) + chr(49), 49674 - 49666), ehT0Px3KOsy9('\060' + '\157' + chr(0b10 + 0o61) + chr(0b100000 + 0o20) + chr(2008 - 1956), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + chr(55) + '\x32', 19157 - 19149), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(48) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x34' + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(154 - 101), 7008 - 7000), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b11111 + 0o23) + chr(1021 - 973), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + chr(0b110111) + chr(0b1000 + 0o53), 0b1000), ehT0Px3KOsy9(chr(2078 - 2030) + chr(111) + chr(51) + '\063' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\067', 5617 - 5609), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(960 - 907) + chr(606 - 557), 7415 - 7407), ehT0Px3KOsy9('\060' + '\157' + chr(1034 - 984), ord("\x08")), ehT0Px3KOsy9(chr(2125 - 2077) + chr(0b1101111) + '\063' + '\067' + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6192 - 6081) + '\062' + chr(2527 - 2473) + chr(1347 - 1292), 0b1000), ehT0Px3KOsy9(chr(1045 - 997) + chr(0b1101111) + '\x32' + chr(0b110111) + chr(122 - 72), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(1491 - 1439) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2200 - 2147) + '\x30', 0b1000), ehT0Px3KOsy9(chr(1771 - 1723) + chr(111) + chr(0b110011) + '\x37', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b110011 + 0o74) + chr(822 - 773) + chr(0b1101 + 0o44) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9308 - 9197) + chr(0b110001) + chr(0b11 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11121 - 11010) + chr(969 - 920) + '\x36' + chr(0b11 + 0o61), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1101 + 0o51) + '\x30', 58489 - 58481), ehT0Px3KOsy9('\x30' + chr(7873 - 7762) + chr(51) + chr(0b110011) + chr(0b110001), 18407 - 18399), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + '\061' + chr(2609 - 2556) + chr(1304 - 1255), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(54) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + chr(50) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(252 - 141) + chr(53) + chr(0b101001 + 0o10), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b110001) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1001 + 0o146) + chr(0b110001) + '\x32' + '\065', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(8984 - 8873) + '\065' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + '\164' + '\146' + chr(0b101101) + chr(0b110110 + 0o2)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def eVJaQbezdLds(KErW5uKNhRX_, uiQ1Vjfmpahs):
ZurHTci57aXw = WqUC3KWvYVup.aJhItC_Vawlw(KErW5uKNhRX_, axis=(ehT0Px3KOsy9('\060' + '\157' + chr(0b1 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1056 - 1006), 8)))
tAvceeAWxN8p = WqUC3KWvYVup.ones(uiQ1Vjfmpahs.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + '\157' + chr(614 - 565), 8):], dtype=WqUC3KWvYVup.float32)
for (WVxHKyX45z_L, AOfzRywRzEXp) in YlkZvXL8qwsX(ZurHTci57aXw):
tAvceeAWxN8p += AOfzRywRzEXp * uiQ1Vjfmpahs[WVxHKyX45z_L, :, :]
tAvceeAWxN8p = KJXrc9aHu3IJ.resize(tAvceeAWxN8p, (KErW5uKNhRX_.nauYfLglTpcb[ehT0Px3KOsy9('\060' + chr(675 - 564) + chr(49), 8)], KErW5uKNhRX_.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(7631 - 7520) + chr(1729 - 1679), 8)]))
tAvceeAWxN8p = WqUC3KWvYVup.maximum(tAvceeAWxN8p, ehT0Px3KOsy9(chr(1857 - 1809) + '\x6f' + '\x30', ord("\x08")))
tAvceeAWxN8p = (tAvceeAWxN8p - WqUC3KWvYVup.Dx22bkKPdt5d(tAvceeAWxN8p)) / (WqUC3KWvYVup.tsdjvlgh9gDP(tAvceeAWxN8p) - WqUC3KWvYVup.Dx22bkKPdt5d(tAvceeAWxN8p))
tAvceeAWxN8p = WqUC3KWvYVup.uint8(tAvceeAWxN8p * ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + '\x33' + chr(1698 - 1643) + '\x37', ord("\x08")))
return tAvceeAWxN8p
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
get_img_heatmap
|
def get_img_heatmap(orig_img, activation_map):
"""Draw a heatmap on top of the original image using intensities from activation_map"""
heatmap = cv2.applyColorMap(activation_map, cv2.COLORMAP_COOL)
heatmap = cv2.cvtColor(heatmap, cv2.COLOR_BGR2RGB)
img_heatmap = np.float32(heatmap) + np.float32(orig_img)
img_heatmap = img_heatmap / np.max(img_heatmap)
img_heatmap *= 255
return img_heatmap.astype(int)
|
python
|
def get_img_heatmap(orig_img, activation_map):
"""Draw a heatmap on top of the original image using intensities from activation_map"""
heatmap = cv2.applyColorMap(activation_map, cv2.COLORMAP_COOL)
heatmap = cv2.cvtColor(heatmap, cv2.COLOR_BGR2RGB)
img_heatmap = np.float32(heatmap) + np.float32(orig_img)
img_heatmap = img_heatmap / np.max(img_heatmap)
img_heatmap *= 255
return img_heatmap.astype(int)
|
[
"def",
"get_img_heatmap",
"(",
"orig_img",
",",
"activation_map",
")",
":",
"heatmap",
"=",
"cv2",
".",
"applyColorMap",
"(",
"activation_map",
",",
"cv2",
".",
"COLORMAP_COOL",
")",
"heatmap",
"=",
"cv2",
".",
"cvtColor",
"(",
"heatmap",
",",
"cv2",
".",
"COLOR_BGR2RGB",
")",
"img_heatmap",
"=",
"np",
".",
"float32",
"(",
"heatmap",
")",
"+",
"np",
".",
"float32",
"(",
"orig_img",
")",
"img_heatmap",
"=",
"img_heatmap",
"/",
"np",
".",
"max",
"(",
"img_heatmap",
")",
"img_heatmap",
"*=",
"255",
"return",
"img_heatmap",
".",
"astype",
"(",
"int",
")"
] |
Draw a heatmap on top of the original image using intensities from activation_map
|
[
"Draw",
"a",
"heatmap",
"on",
"top",
"of",
"the",
"original",
"image",
"using",
"intensities",
"from",
"activation_map"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L225-L232
|
train
|
Draw a heatmap on top of the original image using intensities from activation_map
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2,LgE_IO_tHXvM,Kk1hd194VKEC,OZYzwAeSQh7N,jFWsnpHp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Ee,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(1911 - 1862) + chr(2443 - 2390), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(48) + chr(2702 - 2649), 2815 - 2807), ehT0Px3KOsy9('\x30' + chr(0b1010111 + 0o30) + '\061' + '\x35' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(1571 - 1460) + '\061' + chr(52) + chr(0b0 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(209 - 161) + chr(0b1101111) + '\062' + chr(0b110001 + 0o6) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\x34' + chr(0b101110 + 0o5), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(11838 - 11727) + chr(49) + chr(0b110011) + '\065', 44239 - 44231), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b110001) + '\x37', 40837 - 40829), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\x35' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10499 - 10388) + chr(0b110010) + chr(52) + chr(0b10111 + 0o31), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11285 - 11174) + chr(0b110001) + '\x31' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(86 - 37) + chr(0b10011 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b101001 + 0o15) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011 + 0o0) + '\x36' + chr(2365 - 2310), ord("\x08")), ehT0Px3KOsy9(chr(1501 - 1453) + '\x6f' + chr(49) + chr(54) + '\061', 24365 - 24357), ehT0Px3KOsy9(chr(0b110000) + chr(4315 - 4204) + chr(50) + chr(0b110011 + 0o1) + chr(2109 - 2058), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001001 + 0o46) + '\061' + chr(2132 - 2082) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000001 + 0o56) + chr(49) + chr(0b110001) + chr(0b100000 + 0o20), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(58 - 6) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2830 - 2719) + chr(51) + chr(0b10101 + 0o36) + chr(1972 - 1917), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101 + 0o60) + chr(0b1101 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1435 - 1382) + chr(0b110011 + 0o2), 55679 - 55671), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + '\x32' + chr(48), 62005 - 61997), ehT0Px3KOsy9('\x30' + chr(3200 - 3089) + '\x31' + '\x33' + chr(0b110101), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10111 + 0o32) + '\067' + chr(2131 - 2079), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8247 - 8136) + '\x31' + chr(0b100011 + 0o20) + chr(1343 - 1289), 59410 - 59402), ehT0Px3KOsy9('\x30' + '\157' + '\066' + chr(2067 - 2013), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111111 + 0o60) + '\062' + '\x35' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b10010 + 0o135) + chr(1850 - 1799) + '\x30' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1725 - 1674) + chr(0b0 + 0o60) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1371 - 1323) + chr(111) + chr(193 - 144) + '\062' + chr(0b0 + 0o61), 20673 - 20665), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + '\x31' + '\064' + chr(0b110001), 50486 - 50478), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110001) + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110010) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111110 + 0o61) + '\x33' + '\x32' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(10893 - 10782) + '\062' + chr(0b1010 + 0o50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1396 - 1285) + '\063' + chr(0b110000) + chr(1173 - 1120), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(9691 - 9580) + chr(2141 - 2041) + chr(2867 - 2766))(chr(117) + '\164' + chr(102) + chr(0b1110 + 0o37) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jqQXOHm1HkvD(NJCIErXFppV3, SOQu5O360LQn):
hUybnOxAmx1Y = KJXrc9aHu3IJ.applyColorMap(SOQu5O360LQn, KJXrc9aHu3IJ.COLORMAP_COOL)
hUybnOxAmx1Y = KJXrc9aHu3IJ.cvtColor(hUybnOxAmx1Y, KJXrc9aHu3IJ.COLOR_BGR2RGB)
Id7bCzWuRxoG = WqUC3KWvYVup.float32(hUybnOxAmx1Y) + WqUC3KWvYVup.float32(NJCIErXFppV3)
Id7bCzWuRxoG = Id7bCzWuRxoG / WqUC3KWvYVup.tsdjvlgh9gDP(Id7bCzWuRxoG)
Id7bCzWuRxoG *= ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b110111) + chr(0b100010 + 0o25), ord("\x08"))
return xafqLlk3kkUe(Id7bCzWuRxoG, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\xb6\x1b\x19\xc8u'), '\x64' + chr(7033 - 6932) + chr(7520 - 7421) + chr(0b1101111) + chr(100) + '\x65')(chr(117) + '\x74' + '\x66' + '\055' + chr(0b101110 + 0o12)))(ehT0Px3KOsy9)
|
apache/incubator-mxnet
|
docs/tutorial_utils/vision/cnn_visualization/gradcam.py
|
to_grayscale
|
def to_grayscale(cv2im):
"""Convert gradients to grayscale. This gives a saliency map."""
# How strongly does each position activate the output
grayscale_im = np.sum(np.abs(cv2im), axis=0)
# Normalize between min and 99th percentile
im_max = np.percentile(grayscale_im, 99)
im_min = np.min(grayscale_im)
grayscale_im = np.clip((grayscale_im - im_min) / (im_max - im_min), 0, 1)
grayscale_im = np.expand_dims(grayscale_im, axis=0)
return grayscale_im
|
python
|
def to_grayscale(cv2im):
"""Convert gradients to grayscale. This gives a saliency map."""
# How strongly does each position activate the output
grayscale_im = np.sum(np.abs(cv2im), axis=0)
# Normalize between min and 99th percentile
im_max = np.percentile(grayscale_im, 99)
im_min = np.min(grayscale_im)
grayscale_im = np.clip((grayscale_im - im_min) / (im_max - im_min), 0, 1)
grayscale_im = np.expand_dims(grayscale_im, axis=0)
return grayscale_im
|
[
"def",
"to_grayscale",
"(",
"cv2im",
")",
":",
"# How strongly does each position activate the output",
"grayscale_im",
"=",
"np",
".",
"sum",
"(",
"np",
".",
"abs",
"(",
"cv2im",
")",
",",
"axis",
"=",
"0",
")",
"# Normalize between min and 99th percentile",
"im_max",
"=",
"np",
".",
"percentile",
"(",
"grayscale_im",
",",
"99",
")",
"im_min",
"=",
"np",
".",
"min",
"(",
"grayscale_im",
")",
"grayscale_im",
"=",
"np",
".",
"clip",
"(",
"(",
"grayscale_im",
"-",
"im_min",
")",
"/",
"(",
"im_max",
"-",
"im_min",
")",
",",
"0",
",",
"1",
")",
"grayscale_im",
"=",
"np",
".",
"expand_dims",
"(",
"grayscale_im",
",",
"axis",
"=",
"0",
")",
"return",
"grayscale_im"
] |
Convert gradients to grayscale. This gives a saliency map.
|
[
"Convert",
"gradients",
"to",
"grayscale",
".",
"This",
"gives",
"a",
"saliency",
"map",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/docs/tutorial_utils/vision/cnn_visualization/gradcam.py#L234-L245
|
train
|
Convert gradients to grayscale. This gives a saliency map.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy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,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\x33', 2947 - 2939), ehT0Px3KOsy9(chr(162 - 114) + chr(111) + chr(1062 - 1013) + chr(51) + chr(587 - 535), ord("\x08")), ehT0Px3KOsy9(chr(122 - 74) + chr(0b1101111) + chr(0b1111 + 0o46) + chr(0b101011 + 0o13), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + chr(0b110011) + '\x34' + chr(0b110110), 43023 - 43015), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b100100 + 0o16) + chr(0b1010 + 0o51) + chr(0b110011), 51719 - 51711), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\x33' + chr(0b100000 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(942 - 894) + chr(10555 - 10444) + '\063' + chr(1985 - 1935), 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1010000 + 0o37) + '\x36' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000101 + 0o52) + '\x36' + chr(0b10101 + 0o34), 45677 - 45669), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + '\x37' + '\065', 20566 - 20558), ehT0Px3KOsy9('\x30' + chr(0b1000011 + 0o54) + chr(0b110001) + chr(233 - 181) + chr(0b110111), 19732 - 19724), ehT0Px3KOsy9('\060' + chr(146 - 35) + chr(2427 - 2376) + chr(1142 - 1094) + chr(0b100010 + 0o25), 21784 - 21776), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + chr(2444 - 2393) + '\x35' + chr(2930 - 2875), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x37' + chr(1053 - 1003), 0b1000), ehT0Px3KOsy9(chr(309 - 261) + chr(1033 - 922) + chr(0b11001 + 0o36) + chr(0b1010 + 0o53), 0o10), ehT0Px3KOsy9(chr(1439 - 1391) + chr(0b1101111) + '\061' + chr(0b11110 + 0o27) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(3668 - 3557) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(51) + chr(0b10000 + 0o40) + '\x31', 55855 - 55847), ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + chr(50) + chr(0b100110 + 0o15) + chr(0b100 + 0o62), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(49) + chr(0b110010) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\x33' + chr(0b11110 + 0o30) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o21) + '\x35' + chr(0b11110 + 0o23), 19171 - 19163), ehT0Px3KOsy9(chr(425 - 377) + '\x6f' + chr(0b110011) + chr(1048 - 993) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(9130 - 9019) + chr(0b101 + 0o54) + chr(600 - 548) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + '\067' + chr(0b101101 + 0o3), 35972 - 35964), ehT0Px3KOsy9('\060' + chr(2601 - 2490) + chr(0b101101 + 0o4) + chr(53) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(2747 - 2636) + chr(0b100100 + 0o21) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(7739 - 7628) + chr(0b1110 + 0o43) + '\x32' + chr(1039 - 988), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110001) + chr(0b110110), 61479 - 61471), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1313 - 1263) + chr(1874 - 1819) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(48) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(5376 - 5265) + chr(53) + chr(0b11001 + 0o27), 3527 - 3519), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100100 + 0o15) + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\067' + chr(860 - 807), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(1853 - 1804) + chr(0b110100) + chr(1761 - 1712), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3284 - 3173) + chr(591 - 541) + chr(51) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110101) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + chr(0b110001) + chr(2173 - 2124) + '\067', 25443 - 25435), ehT0Px3KOsy9('\060' + chr(0b1101100 + 0o3) + chr(111 - 62) + chr(104 - 54), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101100 + 0o13), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1758 - 1710) + chr(111) + chr(0b101111 + 0o6) + chr(0b100011 + 0o15), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'5'), '\x64' + '\145' + chr(0b10100 + 0o117) + '\x6f' + '\x64' + chr(101))('\165' + '\x74' + '\x66' + chr(0b101101) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def U6g4DQF5tQ1P(w9y3gaZbSNYN):
RobNxGupIbjz = WqUC3KWvYVup.xkxBmo49x2An(WqUC3KWvYVup.abs(w9y3gaZbSNYN), axis=ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000), 28919 - 28911))
h89lbcEaWqdS = WqUC3KWvYVup.percentile(RobNxGupIbjz, ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b100011 + 0o21) + chr(0b110011), ord("\x08")))
g4JcBrBri26W = WqUC3KWvYVup.Dx22bkKPdt5d(RobNxGupIbjz)
RobNxGupIbjz = WqUC3KWvYVup.H8HUQmIerer7((RobNxGupIbjz - g4JcBrBri26W) / (h89lbcEaWqdS - g4JcBrBri26W), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + chr(48), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b10 + 0o57), 0o10))
RobNxGupIbjz = WqUC3KWvYVup.expand_dims(RobNxGupIbjz, axis=ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b10000 + 0o40), 8))
return RobNxGupIbjz
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
check_label_shapes
|
def check_label_shapes(labels, preds, wrap=False, shape=False):
"""Helper function for checking shape of label and prediction
Parameters
----------
labels : list of `NDArray`
The labels of the data.
preds : list of `NDArray`
Predicted values.
wrap : boolean
If True, wrap labels/preds in a list if they are single NDArray
shape : boolean
If True, check the shape of labels and preds;
Otherwise only check their length.
"""
if not shape:
label_shape, pred_shape = len(labels), len(preds)
else:
label_shape, pred_shape = labels.shape, preds.shape
if label_shape != pred_shape:
raise ValueError("Shape of labels {} does not match shape of "
"predictions {}".format(label_shape, pred_shape))
if wrap:
if isinstance(labels, ndarray.ndarray.NDArray):
labels = [labels]
if isinstance(preds, ndarray.ndarray.NDArray):
preds = [preds]
return labels, preds
|
python
|
def check_label_shapes(labels, preds, wrap=False, shape=False):
"""Helper function for checking shape of label and prediction
Parameters
----------
labels : list of `NDArray`
The labels of the data.
preds : list of `NDArray`
Predicted values.
wrap : boolean
If True, wrap labels/preds in a list if they are single NDArray
shape : boolean
If True, check the shape of labels and preds;
Otherwise only check their length.
"""
if not shape:
label_shape, pred_shape = len(labels), len(preds)
else:
label_shape, pred_shape = labels.shape, preds.shape
if label_shape != pred_shape:
raise ValueError("Shape of labels {} does not match shape of "
"predictions {}".format(label_shape, pred_shape))
if wrap:
if isinstance(labels, ndarray.ndarray.NDArray):
labels = [labels]
if isinstance(preds, ndarray.ndarray.NDArray):
preds = [preds]
return labels, preds
|
[
"def",
"check_label_shapes",
"(",
"labels",
",",
"preds",
",",
"wrap",
"=",
"False",
",",
"shape",
"=",
"False",
")",
":",
"if",
"not",
"shape",
":",
"label_shape",
",",
"pred_shape",
"=",
"len",
"(",
"labels",
")",
",",
"len",
"(",
"preds",
")",
"else",
":",
"label_shape",
",",
"pred_shape",
"=",
"labels",
".",
"shape",
",",
"preds",
".",
"shape",
"if",
"label_shape",
"!=",
"pred_shape",
":",
"raise",
"ValueError",
"(",
"\"Shape of labels {} does not match shape of \"",
"\"predictions {}\"",
".",
"format",
"(",
"label_shape",
",",
"pred_shape",
")",
")",
"if",
"wrap",
":",
"if",
"isinstance",
"(",
"labels",
",",
"ndarray",
".",
"ndarray",
".",
"NDArray",
")",
":",
"labels",
"=",
"[",
"labels",
"]",
"if",
"isinstance",
"(",
"preds",
",",
"ndarray",
".",
"ndarray",
".",
"NDArray",
")",
":",
"preds",
"=",
"[",
"preds",
"]",
"return",
"labels",
",",
"preds"
] |
Helper function for checking shape of label and prediction
Parameters
----------
labels : list of `NDArray`
The labels of the data.
preds : list of `NDArray`
Predicted values.
wrap : boolean
If True, wrap labels/preds in a list if they are single NDArray
shape : boolean
If True, check the shape of labels and preds;
Otherwise only check their length.
|
[
"Helper",
"function",
"for",
"checking",
"shape",
"of",
"label",
"and",
"prediction"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxn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Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101000 + 0o12) + chr(0b110111) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + '\x35' + chr(0b100111 + 0o11), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(50) + chr(1057 - 1007) + chr(2301 - 2247), 56752 - 56744), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + '\x36' + chr(598 - 548), 0b1000), ehT0Px3KOsy9(chr(1747 - 1699) + chr(9440 - 9329) + chr(52) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\063' + '\x30' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b110100) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6688 - 6577) + chr(2199 - 2149) + chr(972 - 917) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4760 - 4649) + chr(50) + chr(237 - 187) + chr(404 - 351), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\x32' + chr(2566 - 2513) + chr(0b100101 + 0o16), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b110011 + 0o2) + chr(0b1010 + 0o55), 14177 - 14169), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + chr(0b10100 + 0o35), 59271 - 59263), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(0b110010) + '\060' + chr(48), 59305 - 59297), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100 + 0o54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7668 - 7557) + chr(0b110001) + chr(55) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100111 + 0o13) + '\060' + chr(1677 - 1627), 5805 - 5797), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(2773 - 2718), 20188 - 20180), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + '\062' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1695 - 1644) + chr(0b110110) + chr(0b110001 + 0o5), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(1776 - 1723) + chr(0b1111 + 0o43), 0o10), ehT0Px3KOsy9('\060' + chr(6354 - 6243) + '\065' + '\x35', 9499 - 9491), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b11010 + 0o31) + chr(993 - 945) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100000 + 0o21) + '\x33' + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b10111 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10011 + 0o36) + '\x37' + chr(0b110010), 39328 - 39320), ehT0Px3KOsy9(chr(1363 - 1315) + chr(111) + '\x35' + chr(48), 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(49) + chr(54) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(2338 - 2289) + chr(49), 65535 - 65527), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(51) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(49) + chr(277 - 227) + '\x31', 8), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(6424 - 6313) + '\x32' + chr(52) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110000 + 0o2) + chr(491 - 439), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(4185 - 4074) + '\x33' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\064' + chr(54), 19453 - 19445), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(64 - 14) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(8123 - 8012) + chr(0b1110 + 0o47) + chr(2013 - 1964), 40816 - 40808), ehT0Px3KOsy9(chr(2117 - 2069) + chr(0b1101111) + chr(892 - 842) + chr(0b1000 + 0o50) + '\x31', 51246 - 51238), ehT0Px3KOsy9(chr(1515 - 1467) + chr(5754 - 5643) + chr(0b11011 + 0o27) + '\067' + chr(0b110010), 44559 - 44551), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100 + 0o57) + '\x33' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110110) + chr(0b10000 + 0o43), 26870 - 26862)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110101) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x95'), chr(0b110110 + 0o56) + '\x65' + chr(0b1100011) + chr(111) + chr(0b101111 + 0o65) + chr(0b1100101))('\x75' + '\x74' + chr(0b1011011 + 0o13) + chr(239 - 194) + chr(1811 - 1755)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def OdfmKwSBnlWd(uXMK81tmdpTM, rFir39ju85_Z, wwyjX8uRny5c=ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + '\x30', 8), nauYfLglTpcb=ehT0Px3KOsy9(chr(894 - 846) + '\x6f' + '\x30', 8)):
if not nauYfLglTpcb:
(U6Uq0p0KN__A, jHepHKfsO0gS) = (c2A0yzQpDQB3(uXMK81tmdpTM), c2A0yzQpDQB3(rFir39ju85_Z))
else:
(U6Uq0p0KN__A, jHepHKfsO0gS) = (uXMK81tmdpTM.nauYfLglTpcb, rFir39ju85_Z.nauYfLglTpcb)
if U6Uq0p0KN__A != jHepHKfsO0gS:
raise q1QCh3W88sgk(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8@\xf7\x02F\xe7\x89\xde\xb5\xc7\x0eS\xe5l\x0b\xa2t,\xd6\xceB\xa1,*\x14G\x04)\xf10\xd5wv\x86bA\xe0\xca\xbaS\xd4N\xb6\x02Q\xa2\x82\xd1\xf6\xdf\x06^\xeesX\xf9r'), chr(0b1100100) + chr(10143 - 10042) + chr(6444 - 6345) + '\157' + '\144' + '\x65')(chr(11069 - 10952) + '\x74' + chr(4273 - 4171) + chr(0b101101) + chr(1042 - 986)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\x1c\xe4\x1dk\xa6\xb5\x8b\xc5\xdb\n['), chr(4474 - 4374) + chr(0b111111 + 0o46) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))('\x75' + chr(0b1100110 + 0o16) + chr(102) + chr(251 - 206) + chr(990 - 934)))(U6Uq0p0KN__A, jHepHKfsO0gS))
if wwyjX8uRny5c:
if PlSM16l2KDPD(uXMK81tmdpTM, xafqLlk3kkUe(VtU1DncglWAm.ndarray, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5l\xd7\x00Q\xa6\x9f'), chr(0b1011010 + 0o12) + chr(0b1100101) + '\143' + '\x6f' + '\x64' + chr(0b111011 + 0o52))('\165' + chr(0b1010010 + 0o42) + chr(102) + chr(1381 - 1336) + '\070'))):
uXMK81tmdpTM = [uXMK81tmdpTM]
if PlSM16l2KDPD(rFir39ju85_Z, xafqLlk3kkUe(VtU1DncglWAm.ndarray, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5l\xd7\x00Q\xa6\x9f'), chr(0b110001 + 0o63) + chr(0b1100101) + chr(0b1000101 + 0o36) + chr(0b1101111) + chr(0b1 + 0o143) + chr(0b10 + 0o143))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(56)))):
rFir39ju85_Z = [rFir39ju85_Z]
return (uXMK81tmdpTM, rFir39ju85_Z)
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
create
|
def create(metric, *args, **kwargs):
"""Creates evaluation metric from metric names or instances of EvalMetric
or a custom metric function.
Parameters
----------
metric : str or callable
Specifies the metric to create.
This argument must be one of the below:
- Name of a metric.
- An instance of `EvalMetric`.
- A list, each element of which is a metric or a metric name.
- An evaluation function that computes custom metric for a given batch of
labels and predictions.
*args : list
Additional arguments to metric constructor.
Only used when metric is str.
**kwargs : dict
Additional arguments to metric constructor.
Only used when metric is str
Examples
--------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label - pred))
...
>>> metric1 = mx.metric.create('acc')
>>> metric2 = mx.metric.create(custom_metric)
>>> metric3 = mx.metric.create([metric1, metric2, 'rmse'])
"""
if callable(metric):
return CustomMetric(metric, *args, **kwargs)
elif isinstance(metric, list):
composite_metric = CompositeEvalMetric()
for child_metric in metric:
composite_metric.add(create(child_metric, *args, **kwargs))
return composite_metric
return _create(metric, *args, **kwargs)
|
python
|
def create(metric, *args, **kwargs):
"""Creates evaluation metric from metric names or instances of EvalMetric
or a custom metric function.
Parameters
----------
metric : str or callable
Specifies the metric to create.
This argument must be one of the below:
- Name of a metric.
- An instance of `EvalMetric`.
- A list, each element of which is a metric or a metric name.
- An evaluation function that computes custom metric for a given batch of
labels and predictions.
*args : list
Additional arguments to metric constructor.
Only used when metric is str.
**kwargs : dict
Additional arguments to metric constructor.
Only used when metric is str
Examples
--------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label - pred))
...
>>> metric1 = mx.metric.create('acc')
>>> metric2 = mx.metric.create(custom_metric)
>>> metric3 = mx.metric.create([metric1, metric2, 'rmse'])
"""
if callable(metric):
return CustomMetric(metric, *args, **kwargs)
elif isinstance(metric, list):
composite_metric = CompositeEvalMetric()
for child_metric in metric:
composite_metric.add(create(child_metric, *args, **kwargs))
return composite_metric
return _create(metric, *args, **kwargs)
|
[
"def",
"create",
"(",
"metric",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"callable",
"(",
"metric",
")",
":",
"return",
"CustomMetric",
"(",
"metric",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"elif",
"isinstance",
"(",
"metric",
",",
"list",
")",
":",
"composite_metric",
"=",
"CompositeEvalMetric",
"(",
")",
"for",
"child_metric",
"in",
"metric",
":",
"composite_metric",
".",
"add",
"(",
"create",
"(",
"child_metric",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
")",
"return",
"composite_metric",
"return",
"_create",
"(",
"metric",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")"
] |
Creates evaluation metric from metric names or instances of EvalMetric
or a custom metric function.
Parameters
----------
metric : str or callable
Specifies the metric to create.
This argument must be one of the below:
- Name of a metric.
- An instance of `EvalMetric`.
- A list, each element of which is a metric or a metric name.
- An evaluation function that computes custom metric for a given batch of
labels and predictions.
*args : list
Additional arguments to metric constructor.
Only used when metric is str.
**kwargs : dict
Additional arguments to metric constructor.
Only used when metric is str
Examples
--------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label - pred))
...
>>> metric1 = mx.metric.create('acc')
>>> metric2 = mx.metric.create(custom_metric)
>>> metric3 = mx.metric.create([metric1, metric2, 'rmse'])
|
[
"Creates",
"evaluation",
"metric",
"from",
"metric",
"names",
"or",
"instances",
"of",
"EvalMetric",
"or",
"a",
"custom",
"metric",
"function",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L234-L273
|
train
|
Creates an evaluation metric from a metric name or a list of EvalMetric instances.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT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02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + '\062' + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(349 - 300) + chr(1448 - 1394) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + chr(49) + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1022 - 972) + chr(2347 - 2292) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110001 + 0o0) + chr(656 - 602), 10931 - 10923), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(555 - 505) + chr(0b110000) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1040 - 992) + '\x6f' + '\x32' + '\x37' + '\065', 58183 - 58175), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1695 - 1640) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(1023 - 973) + chr(54), 56106 - 56098), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(4889 - 4778) + chr(0b110101), 60391 - 60383), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b110011) + '\x37', 53022 - 53014), ehT0Px3KOsy9(chr(0b110000) + chr(7226 - 7115) + '\062' + chr(0b10001 + 0o37) + '\x33', 4892 - 4884), ehT0Px3KOsy9(chr(0b110000) + chr(8238 - 8127) + chr(0b10011 + 0o36) + chr(50) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b110010) + '\063' + chr(0b110100), 12598 - 12590), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b110110 + 0o71) + chr(51) + '\061' + chr(1102 - 1050), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(50) + '\062' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2244 - 2194) + '\x32' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\x32' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1558 - 1507) + '\x37' + chr(50), 52618 - 52610), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\x32' + '\066', 0b1000), ehT0Px3KOsy9(chr(833 - 785) + chr(0b1101111) + chr(0b101101 + 0o6) + chr(2595 - 2541) + chr(0b101101 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(654 - 604) + chr(0b110010 + 0o0) + '\065', 8), ehT0Px3KOsy9(chr(1423 - 1375) + chr(111) + chr(0b110001) + chr(49) + chr(50), 3442 - 3434), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + '\x32' + '\x34' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(83 - 32) + chr(0b111 + 0o52) + chr(0b10111 + 0o36), 764 - 756), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x32' + chr(0b110000), 11804 - 11796), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\x33' + chr(0b110101) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + '\x33' + '\065' + '\066', 35933 - 35925), ehT0Px3KOsy9(chr(556 - 508) + '\157' + '\063' + '\066' + chr(653 - 599), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(1433 - 1382) + '\067' + chr(1958 - 1905), 40298 - 40290), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\x35' + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011 + 0o144) + chr(0b11010 + 0o31) + chr(0b110000) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(6773 - 6662) + chr(50) + chr(2568 - 2514), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(6760 - 6649) + chr(49) + '\067' + chr(2849 - 2795), 29985 - 29977), ehT0Px3KOsy9(chr(48) + chr(12281 - 12170) + '\063' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b101100 + 0o4) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110101) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + chr(0b10011 + 0o35), 48702 - 48694), ehT0Px3KOsy9(chr(321 - 273) + chr(1762 - 1651) + chr(49) + chr(0b110111) + '\062', 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\x33' + '\060' + '\060', 11092 - 11084)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(0b11111 + 0o21), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x85'), chr(0b1100100) + chr(3047 - 2946) + chr(99) + chr(0b1101111) + chr(9410 - 9310) + '\x65')(chr(10462 - 10345) + '\x74' + chr(0b1001001 + 0o35) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zXm8hKpI6bmL(UyTbk4dY9zDl, *kJDRfRhcZHjS, **M8EIoTs2GJXE):
if tzcpInYwBvYW(UyTbk4dY9zDl):
return jpashw5EaSxW(UyTbk4dY9zDl, *kJDRfRhcZHjS, **M8EIoTs2GJXE)
elif PlSM16l2KDPD(UyTbk4dY9zDl, YyaZ4tpXu4lf):
OxfugDOiRw4t = n8EXoZ9v1jhZ()
for B7coyTkHXeYD in UyTbk4dY9zDl:
xafqLlk3kkUe(OxfugDOiRw4t, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde8n\xcf\xf7\xe5\xfa\n\xccJ\r\xb0'), chr(0b11110 + 0o106) + '\x65' + chr(0b1100011) + chr(6859 - 6748) + chr(100) + chr(101))(chr(9091 - 8974) + chr(13440 - 13324) + '\x66' + chr(0b101101) + chr(0b111000)))(zXm8hKpI6bmL(B7coyTkHXeYD, *kJDRfRhcZHjS, **M8EIoTs2GJXE))
return OxfugDOiRw4t
return GU9fvz_zZnwv(UyTbk4dY9zDl, *kJDRfRhcZHjS, **M8EIoTs2GJXE)
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
np
|
def np(numpy_feval, name=None, allow_extra_outputs=False):
"""Creates a custom evaluation metric that receives its inputs as numpy arrays.
Parameters
----------
numpy_feval : callable(label, pred)
Custom evaluation function that receives labels and predictions for a minibatch
as numpy arrays and returns the corresponding custom metric as a floating point number.
name : str, optional
Name of the custom metric.
allow_extra_outputs : bool, optional
Whether prediction output is allowed to have extra outputs. This is useful in cases
like RNN where states are also part of output which can then be fed back to the RNN
in the next step. By default, extra outputs are not allowed.
Returns
-------
float
Custom metric corresponding to the provided labels and predictions.
Example
-------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label-pred))
...
>>> metric = mx.metric.np(custom_metric)
"""
def feval(label, pred):
"""Internal eval function."""
return numpy_feval(label, pred)
feval.__name__ = numpy_feval.__name__
return CustomMetric(feval, name, allow_extra_outputs)
|
python
|
def np(numpy_feval, name=None, allow_extra_outputs=False):
"""Creates a custom evaluation metric that receives its inputs as numpy arrays.
Parameters
----------
numpy_feval : callable(label, pred)
Custom evaluation function that receives labels and predictions for a minibatch
as numpy arrays and returns the corresponding custom metric as a floating point number.
name : str, optional
Name of the custom metric.
allow_extra_outputs : bool, optional
Whether prediction output is allowed to have extra outputs. This is useful in cases
like RNN where states are also part of output which can then be fed back to the RNN
in the next step. By default, extra outputs are not allowed.
Returns
-------
float
Custom metric corresponding to the provided labels and predictions.
Example
-------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label-pred))
...
>>> metric = mx.metric.np(custom_metric)
"""
def feval(label, pred):
"""Internal eval function."""
return numpy_feval(label, pred)
feval.__name__ = numpy_feval.__name__
return CustomMetric(feval, name, allow_extra_outputs)
|
[
"def",
"np",
"(",
"numpy_feval",
",",
"name",
"=",
"None",
",",
"allow_extra_outputs",
"=",
"False",
")",
":",
"def",
"feval",
"(",
"label",
",",
"pred",
")",
":",
"\"\"\"Internal eval function.\"\"\"",
"return",
"numpy_feval",
"(",
"label",
",",
"pred",
")",
"feval",
".",
"__name__",
"=",
"numpy_feval",
".",
"__name__",
"return",
"CustomMetric",
"(",
"feval",
",",
"name",
",",
"allow_extra_outputs",
")"
] |
Creates a custom evaluation metric that receives its inputs as numpy arrays.
Parameters
----------
numpy_feval : callable(label, pred)
Custom evaluation function that receives labels and predictions for a minibatch
as numpy arrays and returns the corresponding custom metric as a floating point number.
name : str, optional
Name of the custom metric.
allow_extra_outputs : bool, optional
Whether prediction output is allowed to have extra outputs. This is useful in cases
like RNN where states are also part of output which can then be fed back to the RNN
in the next step. By default, extra outputs are not allowed.
Returns
-------
float
Custom metric corresponding to the provided labels and predictions.
Example
-------
>>> def custom_metric(label, pred):
... return np.mean(np.abs(label-pred))
...
>>> metric = mx.metric.np(custom_metric)
|
[
"Creates",
"a",
"custom",
"evaluation",
"metric",
"that",
"receives",
"its",
"inputs",
"as",
"numpy",
"arrays",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L1747-L1778
|
train
|
Creates a custom evaluation metric that receives the inputs of numpy arrays and returns the corresponding custom metric as a floating point number.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4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SM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(54) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(9050 - 8939) + '\061' + chr(0b110010) + chr(0b110110 + 0o1), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7222 - 7111) + chr(0b110011) + chr(0b110100) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + '\x34', 0o10), ehT0Px3KOsy9(chr(422 - 374) + chr(0b1101111) + '\062' + '\x31' + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9(chr(301 - 253) + chr(0b1101111) + chr(0b110010) + chr(1017 - 969) + chr(339 - 291), 21741 - 21733), ehT0Px3KOsy9('\x30' + chr(146 - 35) + chr(0b100001 + 0o20) + '\060', 7610 - 7602), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b111111 + 0o60) + '\063' + chr(0b110001) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(565 - 454) + '\x33' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(6377 - 6266) + '\066' + chr(49), 0b1000), ehT0Px3KOsy9(chr(991 - 943) + chr(9996 - 9885) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\064' + '\063', 0o10), ehT0Px3KOsy9(chr(339 - 291) + chr(0b110 + 0o151) + chr(1456 - 1406) + chr(0b110010) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\063' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6435 - 6324) + chr(1663 - 1613) + '\x34' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101111 + 0o3) + '\x35' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(575 - 526) + '\061' + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + '\063' + chr(0b110101) + chr(816 - 765), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110100) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101110 + 0o1) + chr(2282 - 2232) + chr(49) + chr(1093 - 1043), 0b1000), ehT0Px3KOsy9('\060' + chr(6832 - 6721) + chr(49) + '\x32' + chr(2190 - 2140), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3011 - 2900) + chr(577 - 523) + chr(48), 0b1000), ehT0Px3KOsy9(chr(1945 - 1897) + chr(0b101 + 0o152) + chr(0b110110) + chr(1637 - 1587), 63264 - 63256), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x37' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b110000) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x36' + chr(101 - 46), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b11111 + 0o23) + chr(0b1111 + 0o46), 55936 - 55928), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(4495 - 4384) + '\062' + '\x35' + '\x32', 21651 - 21643), ehT0Px3KOsy9(chr(1500 - 1452) + '\157' + chr(0b10 + 0o60) + chr(0b11011 + 0o25) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(998 - 949) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(2210 - 2162) + '\x6f' + '\x33' + chr(0b110001) + '\064', 8), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + '\x32' + chr(1531 - 1478) + '\x36', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101011 + 0o4) + chr(1874 - 1820) + chr(143 - 93), 8), ehT0Px3KOsy9('\060' + chr(7129 - 7018) + chr(0b110111) + chr(49), 16348 - 16340), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b110100 + 0o2) + chr(2171 - 2120), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\065', 49251 - 49243), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\063', 19465 - 19457), ehT0Px3KOsy9(chr(1638 - 1590) + chr(111) + chr(49) + chr(0b101011 + 0o6) + chr(395 - 343), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + chr(0b11 + 0o60) + chr(52) + chr(2323 - 2270), 63515 - 63507), ehT0Px3KOsy9('\x30' + chr(0b111 + 0o150) + chr(50) + chr(2201 - 2147) + '\x30', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(53) + chr(1249 - 1201), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b'), '\144' + chr(101) + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b11111 + 0o16) + chr(0b0 + 0o70)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def WqUC3KWvYVup(KINmd55Vf0mz, AIvJRzLdDfgF=None, BWnjUn4aI1Wi=ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(1374 - 1263) + '\060', 8)):
def VcFaHHaIedSQ(TRUOLFLuD08x, eyamnrN0elUS):
return KINmd55Vf0mz(TRUOLFLuD08x, eyamnrN0elUS)
VcFaHHaIedSQ.Gbej4oZqKLA6 = KINmd55Vf0mz.Gbej4oZqKLA6
return jpashw5EaSxW(VcFaHHaIedSQ, AIvJRzLdDfgF, BWnjUn4aI1Wi)
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.get_config
|
def get_config(self):
"""Save configurations of metric. Can be recreated
from configs with metric.create(``**config``)
"""
config = self._kwargs.copy()
config.update({
'metric': self.__class__.__name__,
'name': self.name,
'output_names': self.output_names,
'label_names': self.label_names})
return config
|
python
|
def get_config(self):
"""Save configurations of metric. Can be recreated
from configs with metric.create(``**config``)
"""
config = self._kwargs.copy()
config.update({
'metric': self.__class__.__name__,
'name': self.name,
'output_names': self.output_names,
'label_names': self.label_names})
return config
|
[
"def",
"get_config",
"(",
"self",
")",
":",
"config",
"=",
"self",
".",
"_kwargs",
".",
"copy",
"(",
")",
"config",
".",
"update",
"(",
"{",
"'metric'",
":",
"self",
".",
"__class__",
".",
"__name__",
",",
"'name'",
":",
"self",
".",
"name",
",",
"'output_names'",
":",
"self",
".",
"output_names",
",",
"'label_names'",
":",
"self",
".",
"label_names",
"}",
")",
"return",
"config"
] |
Save configurations of metric. Can be recreated
from configs with metric.create(``**config``)
|
[
"Save",
"configurations",
"of",
"metric",
".",
"Can",
"be",
"recreated",
"from",
"configs",
"with",
"metric",
".",
"create",
"(",
"**",
"config",
")"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L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h7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b100111 + 0o11) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1654 - 1605) + chr(0b110000) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(104 - 55) + chr(409 - 361) + '\x32', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + '\x35' + '\065', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\066', 0b1000), ehT0Px3KOsy9(chr(848 - 800) + '\157' + chr(0b110011) + chr(0b110011) + chr(49), 0o10), ehT0Px3KOsy9(chr(231 - 183) + chr(0b111001 + 0o66) + chr(346 - 295) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\062' + '\x34' + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\064' + '\061', 8411 - 8403), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1010100 + 0o33) + chr(0b100110 + 0o17) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1902 - 1852) + chr(0b110010 + 0o4) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(0b110010) + chr(0b110001 + 0o4) + '\x35', 28101 - 28093), ehT0Px3KOsy9('\x30' + chr(9303 - 9192) + chr(0b110011) + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(495 - 446) + '\061' + chr(0b110111), 49894 - 49886), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(1486 - 1375) + chr(50) + chr(0b101110 + 0o4) + chr(1911 - 1861), ord("\x08")), ehT0Px3KOsy9(chr(1292 - 1244) + chr(9515 - 9404) + chr(0b110111) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(3132 - 3021) + chr(0b110001) + chr(49) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b101101 + 0o12) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\063' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(0b110001) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + '\x32' + chr(0b110110) + '\x33', 3812 - 3804), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(195 - 142) + chr(50), 27582 - 27574), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1891 - 1840) + '\064' + chr(472 - 417), 14114 - 14106), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b11 + 0o154) + '\x36' + '\062', 56020 - 56012), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(2277 - 2225) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b100100 + 0o15) + chr(0b100001 + 0o23), 16498 - 16490), ehT0Px3KOsy9(chr(1177 - 1129) + chr(9258 - 9147) + chr(2285 - 2234) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + '\x32', 18726 - 18718), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + chr(0b1000 + 0o51) + '\x30' + '\x32', 8), ehT0Px3KOsy9(chr(48) + chr(6679 - 6568) + chr(0b110010) + chr(54) + '\066', 6113 - 6105), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010 + 0o145) + chr(0b101100 + 0o6) + chr(1404 - 1356) + '\x31', 34856 - 34848), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(1666 - 1616) + chr(0b10111 + 0o37) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110 + 0o55) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(9719 - 9608) + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11110 + 0o24) + chr(54) + '\x35', 34621 - 34613), ehT0Px3KOsy9('\x30' + '\157' + chr(1154 - 1105), ord("\x08")), ehT0Px3KOsy9(chr(857 - 809) + chr(111) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110101) + '\x36', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(2589 - 2536) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xef'), chr(100) + '\145' + '\143' + '\x6f' + '\x64' + chr(0b1100101))(chr(1957 - 1840) + chr(116) + '\146' + chr(0b101101 + 0o0) + chr(1463 - 1407)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def dXVgtxWHb580(oVre8I6UXc3b):
jAj7S20Ct06o = oVre8I6UXc3b._kwargs.igThHS4jwVsa()
xafqLlk3kkUe(jAj7S20Ct06o, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b6\x03(g\x97S\xcf\x98\x1a\xd1\x9d'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(0b1100101))(chr(117) + '\x74' + '\x66' + '\x2d' + '\070'))({xafqLlk3kkUe(SXOLrMavuUCe(b"\xac'6\x1fg\xba"), '\x64' + '\x65' + chr(3594 - 3495) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(116) + chr(102) + chr(45) + '\x38'): xafqLlk3kkUe(oVre8I6UXc3b.__class__, xafqLlk3kkUe(SXOLrMavuUCe(b"\x86 '\x07:\xb6C\xd0\xaab\xf5\x9b"), chr(0b1100100) + chr(0b1010001 + 0o24) + chr(0b1100011) + chr(0b11101 + 0o122) + '\x64' + chr(0b101111 + 0o66))(chr(0b110010 + 0o103) + chr(554 - 438) + '\x66' + chr(45) + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf#/\x08'), chr(100) + chr(6401 - 6300) + chr(99) + '\157' + '\144' + '\145')('\165' + chr(116) + '\146' + chr(0b100110 + 0o7) + chr(0b111000)): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b"\x80\x0b4'\\\xa3U\xc5\xa5H\xd3\xeb"), chr(8114 - 8014) + chr(2104 - 2003) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(3238 - 3122) + chr(102) + '\x2d' + chr(0b111000))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xae76\x1d{\xadF\xcf\x80C\xd1\xde'), '\x64' + chr(101) + chr(0b1100011) + chr(0b111 + 0o150) + chr(8704 - 8604) + '\x65')(chr(117) + '\x74' + '\x66' + chr(0b101 + 0o50) + chr(464 - 408)): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae76\x1d{\xadF\xcf\x80C\xd1\xde'), chr(0b1001101 + 0o27) + '\x65' + chr(0b1000 + 0o133) + chr(0b1100001 + 0o16) + chr(0b1100100) + '\145')(chr(117) + chr(8001 - 7885) + chr(102) + chr(1393 - 1348) + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xad# \x08b\x86w\xc0\x8cK\xc7'), chr(0b111110 + 0o46) + chr(9975 - 9874) + chr(635 - 536) + chr(111) + chr(0b1011001 + 0o13) + '\x65')(chr(7603 - 7486) + '\164' + chr(102) + chr(0b101101) + '\070'): xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xad# \x08b\x86w\xc0\x8cK\xc7'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b100011 + 0o114) + chr(100) + chr(101))(chr(5007 - 4890) + '\x74' + '\x66' + chr(45) + '\x38'))})
return jAj7S20Ct06o
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.update_dict
|
def update_dict(self, label, pred):
"""Update the internal evaluation with named label and pred
Parameters
----------
labels : OrderedDict of str -> NDArray
name to array mapping for labels.
preds : OrderedDict of str -> NDArray
name to array mapping of predicted outputs.
"""
if self.output_names is not None:
pred = [pred[name] for name in self.output_names]
else:
pred = list(pred.values())
if self.label_names is not None:
label = [label[name] for name in self.label_names]
else:
label = list(label.values())
self.update(label, pred)
|
python
|
def update_dict(self, label, pred):
"""Update the internal evaluation with named label and pred
Parameters
----------
labels : OrderedDict of str -> NDArray
name to array mapping for labels.
preds : OrderedDict of str -> NDArray
name to array mapping of predicted outputs.
"""
if self.output_names is not None:
pred = [pred[name] for name in self.output_names]
else:
pred = list(pred.values())
if self.label_names is not None:
label = [label[name] for name in self.label_names]
else:
label = list(label.values())
self.update(label, pred)
|
[
"def",
"update_dict",
"(",
"self",
",",
"label",
",",
"pred",
")",
":",
"if",
"self",
".",
"output_names",
"is",
"not",
"None",
":",
"pred",
"=",
"[",
"pred",
"[",
"name",
"]",
"for",
"name",
"in",
"self",
".",
"output_names",
"]",
"else",
":",
"pred",
"=",
"list",
"(",
"pred",
".",
"values",
"(",
")",
")",
"if",
"self",
".",
"label_names",
"is",
"not",
"None",
":",
"label",
"=",
"[",
"label",
"[",
"name",
"]",
"for",
"name",
"in",
"self",
".",
"label_names",
"]",
"else",
":",
"label",
"=",
"list",
"(",
"label",
".",
"values",
"(",
")",
")",
"self",
".",
"update",
"(",
"label",
",",
"pred",
")"
] |
Update the internal evaluation with named label and pred
Parameters
----------
labels : OrderedDict of str -> NDArray
name to array mapping for labels.
preds : OrderedDict of str -> NDArray
name to array mapping of predicted outputs.
|
[
"Update",
"the",
"internal",
"evaluation",
"with",
"named",
"label",
"and",
"pred"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L112-L133
|
train
|
Update the internal evaluation with named label and pred.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60dj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KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(12114 - 12003) + chr(51) + '\x37' + chr(1724 - 1669), ord("\x08")), ehT0Px3KOsy9(chr(1807 - 1759) + '\x6f' + chr(1959 - 1908) + chr(0b110101) + chr(0b10111 + 0o36), 0b1000), ehT0Px3KOsy9(chr(587 - 539) + chr(0b1101111) + '\x31' + chr(801 - 751) + '\x31', 17907 - 17899), ehT0Px3KOsy9(chr(1743 - 1695) + '\157' + chr(1070 - 1020) + chr(0b1110 + 0o45) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101011 + 0o14) + chr(1788 - 1739), ord("\x08")), ehT0Px3KOsy9(chr(2070 - 2022) + chr(12138 - 12027) + chr(0b1001 + 0o52) + chr(48) + chr(54), 13580 - 13572), ehT0Px3KOsy9(chr(1196 - 1148) + chr(0b1101111) + '\062' + '\x31' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11001 + 0o31) + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + '\062' + chr(0b110010) + chr(53), 30560 - 30552), ehT0Px3KOsy9(chr(0b110000) + chr(2079 - 1968) + chr(0b100101 + 0o16) + '\065' + chr(0b110011 + 0o4), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\067' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + '\061' + '\066' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1425 - 1377) + chr(111) + chr(51) + chr(0b110101) + '\065', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2103 - 2052) + chr(0b110001) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + chr(670 - 619) + chr(0b110010) + '\x37', 0o10), ehT0Px3KOsy9(chr(746 - 698) + chr(8888 - 8777) + chr(50) + chr(51) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + '\061' + chr(636 - 583) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b11011 + 0o124) + chr(0b1101 + 0o44) + chr(0b110010) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(11755 - 11644) + chr(0b110010) + chr(0b1001 + 0o56), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\065' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(12169 - 12058) + chr(0b0 + 0o61) + chr(1492 - 1439) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1324 - 1276) + chr(0b111101 + 0o62) + chr(50) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(683 - 635) + chr(111) + chr(0b110010) + '\065' + '\062', 56255 - 56247), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2410 - 2360) + chr(1230 - 1175) + '\061', 61382 - 61374), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(0b110001) + chr(51) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10110 + 0o33) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b100100 + 0o21), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(4709 - 4598) + chr(0b110100 + 0o3) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110001 + 0o76) + '\x33' + chr(0b110101) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11110 + 0o24) + '\x37' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(4230 - 4119) + chr(0b1010 + 0o50) + chr(178 - 128) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3679 - 3568) + '\063' + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + chr(0b110010) + chr(1075 - 1023) + '\067', 0b1000), ehT0Px3KOsy9(chr(2283 - 2235) + '\x6f' + chr(682 - 633) + chr(0b110110) + chr(1878 - 1829), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1678 - 1567) + chr(0b11010 + 0o31) + chr(2741 - 2686) + chr(0b1111 + 0o44), 0o10), ehT0Px3KOsy9('\x30' + chr(3343 - 3232) + chr(2921 - 2866) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100101 + 0o15) + chr(0b110111 + 0o0) + chr(50), 39859 - 39851), ehT0Px3KOsy9(chr(48) + chr(6739 - 6628) + chr(49) + chr(52) + chr(48), 58786 - 58778), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(762 - 712) + '\x37' + chr(54), 14378 - 14370)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), chr(8236 - 8136) + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(0b1011010 + 0o13))(chr(0b1001001 + 0o54) + chr(0b1100000 + 0o24) + chr(0b1100110) + chr(0b101101) + chr(0b100001 + 0o27)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def xhrM5jS1WAdb(oVre8I6UXc3b, TRUOLFLuD08x, eyamnrN0elUS):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x90\x98%\xedL\xb2\xd3\xea\xf4\x82\xda\x07'), chr(6585 - 6485) + chr(0b1100101) + chr(0b1100 + 0o127) + '\x6f' + chr(9339 - 9239) + '\145')('\165' + chr(116) + '\146' + chr(0b101101) + chr(0b111000))) is not None:
eyamnrN0elUS = [eyamnrN0elUS[AIvJRzLdDfgF] for AIvJRzLdDfgF in oVre8I6UXc3b.output_names]
else:
eyamnrN0elUS = YyaZ4tpXu4lf(eyamnrN0elUS.SPnCNu54H1db())
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\x8c3\xf8U\x99\xe2\xe5\xf8\x8a\xcc'), '\x64' + chr(101) + '\143' + chr(9202 - 9091) + '\x64' + '\145')('\165' + '\164' + chr(8924 - 8822) + chr(0b101101) + chr(0b111000))) is not None:
TRUOLFLuD08x = [TRUOLFLuD08x[AIvJRzLdDfgF] for AIvJRzLdDfgF in oVre8I6UXc3b.label_names]
else:
TRUOLFLuD08x = YyaZ4tpXu4lf(TRUOLFLuD08x.SPnCNu54H1db())
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\x99\x10\xd8P\x88\xc6\xea\xec\xdb\xdaD'), '\144' + '\145' + chr(99) + chr(0b100000 + 0o117) + chr(2754 - 2654) + '\145')('\x75' + '\x74' + chr(102) + chr(45) + chr(0b110100 + 0o4)))(TRUOLFLuD08x, eyamnrN0elUS)
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.reset
|
def reset(self):
"""Resets the internal evaluation result to initial state."""
self.num_inst = 0
self.sum_metric = 0.0
self.global_num_inst = 0
self.global_sum_metric = 0.0
|
python
|
def reset(self):
"""Resets the internal evaluation result to initial state."""
self.num_inst = 0
self.sum_metric = 0.0
self.global_num_inst = 0
self.global_sum_metric = 0.0
|
[
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"num_inst",
"=",
"0",
"self",
".",
"sum_metric",
"=",
"0.0",
"self",
".",
"global_num_inst",
"=",
"0",
"self",
".",
"global_sum_metric",
"=",
"0.0"
] |
Resets the internal evaluation result to initial state.
|
[
"Resets",
"the",
"internal",
"evaluation",
"result",
"to",
"initial",
"state",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L148-L153
|
train
|
Resets the internal evaluation result to initial state.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufV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nh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(7817 - 7706) + chr(0b1111 + 0o44) + chr(0b110001 + 0o3) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\063' + chr(0b110111) + chr(2270 - 2217), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110110 + 0o1) + '\x34', 24688 - 24680), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110000) + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x35' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(691 - 580) + chr(0b101100 + 0o5) + '\065' + '\066', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(1707 - 1656) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(10975 - 10864) + chr(51) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + '\x34' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\065' + chr(1562 - 1509), 0o10), ehT0Px3KOsy9(chr(792 - 744) + chr(0b10100 + 0o133) + chr(0b110001) + chr(0b110110) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(8004 - 7893) + chr(0b11111 + 0o22) + '\x35' + chr(1005 - 957), 0o10), ehT0Px3KOsy9('\x30' + chr(4125 - 4014) + chr(2210 - 2159) + chr(0b110000 + 0o5) + chr(0b110111), 46707 - 46699), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(55) + chr(1767 - 1716), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6723 - 6612) + chr(49) + chr(0b11010 + 0o26) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010110 + 0o31) + '\063' + chr(0b10 + 0o61) + chr(0b11001 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(50) + chr(0b10111 + 0o33), 49672 - 49664), ehT0Px3KOsy9(chr(1151 - 1103) + chr(111) + chr(0b101100 + 0o5) + chr(0b110100) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x35', 10373 - 10365), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + chr(49) + chr(0b110111) + chr(0b110000), 26369 - 26361), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(2087 - 2039) + '\157' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(50) + chr(0b110111) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\062' + chr(1919 - 1867), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(10108 - 9997) + '\x32' + chr(179 - 128) + chr(673 - 624), 63761 - 63753), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(288 - 237) + chr(50) + chr(50), 33252 - 33244), ehT0Px3KOsy9(chr(0b110000) + chr(2122 - 2011) + chr(0b101001 + 0o16), 8), ehT0Px3KOsy9(chr(551 - 503) + chr(3214 - 3103) + chr(2303 - 2254) + chr(0b100010 + 0o16) + '\062', 57954 - 57946), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(100 - 51) + chr(48) + '\x36', 42419 - 42411), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(3085 - 2974) + chr(52) + chr(537 - 482), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + '\x32' + chr(1693 - 1641) + chr(0b110101 + 0o0), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b1111 + 0o43) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\x34' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(51) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + '\062' + chr(52), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(1450 - 1395) + chr(0b110000 + 0o3), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2549 - 2496) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xca'), chr(100) + chr(0b1100011 + 0o2) + chr(0b1100011) + '\157' + chr(147 - 47) + chr(0b1100101))(chr(2231 - 2114) + chr(116) + chr(630 - 528) + chr(0b11010 + 0o23) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def G0V856pwkJmZ(oVre8I6UXc3b):
oVre8I6UXc3b._cdA_ca5MiLS = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(48), 8)
oVre8I6UXc3b.jGUwTiF22LVj = 0.0
oVre8I6UXc3b.uJeeIdB13Dk1 = ehT0Px3KOsy9(chr(1911 - 1863) + chr(111) + chr(0b0 + 0o60), 8)
oVre8I6UXc3b.XwZT6VuOPHR5 = 0.0
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.get
|
def get(self):
"""Gets the current evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
"""
if self.num_inst == 0:
return (self.name, float('nan'))
else:
return (self.name, self.sum_metric / self.num_inst)
|
python
|
def get(self):
"""Gets the current evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
"""
if self.num_inst == 0:
return (self.name, float('nan'))
else:
return (self.name, self.sum_metric / self.num_inst)
|
[
"def",
"get",
"(",
"self",
")",
":",
"if",
"self",
".",
"num_inst",
"==",
"0",
":",
"return",
"(",
"self",
".",
"name",
",",
"float",
"(",
"'nan'",
")",
")",
"else",
":",
"return",
"(",
"self",
".",
"name",
",",
"self",
".",
"sum_metric",
"/",
"self",
".",
"num_inst",
")"
] |
Gets the current evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
|
[
"Gets",
"the",
"current",
"evaluation",
"result",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L161-L174
|
train
|
Gets the current evaluation result.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vw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Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(271 - 223) + '\x6f' + chr(2311 - 2262) + chr(51) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b11 + 0o64) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(54) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110010) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(4373 - 4262) + '\061' + chr(0b110011) + '\066', 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + '\x32' + '\062' + chr(53), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110101) + '\065', 29244 - 29236), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110001 + 0o4), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\066' + chr(1114 - 1064), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b100000 + 0o27) + chr(0b100000 + 0o20), 0b1000), ehT0Px3KOsy9(chr(1497 - 1449) + '\157' + chr(51) + chr(0b110100) + '\066', 0b1000), ehT0Px3KOsy9(chr(1615 - 1567) + chr(111) + chr(0b110010) + chr(0b110100 + 0o1) + chr(0b10010 + 0o45), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\060' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x35' + chr(0b110010), 3198 - 3190), ehT0Px3KOsy9(chr(314 - 266) + chr(0b1101111) + chr(0b110001) + '\062' + '\x36', 1085 - 1077), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(0b1101 + 0o50) + chr(0b1 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + chr(10127 - 10016) + '\061' + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(0b110100) + chr(789 - 738), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x33' + chr(1006 - 956), 21587 - 21579), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b101011 + 0o12) + chr(2182 - 2129), 0o10), ehT0Px3KOsy9('\060' + chr(8019 - 7908) + chr(285 - 236) + chr(53) + chr(0b101010 + 0o13), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(3095 - 2984) + chr(50) + chr(52) + chr(1313 - 1265), 278 - 270), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10101 + 0o36) + '\061' + '\066', 0b1000), ehT0Px3KOsy9(chr(316 - 268) + chr(111) + chr(1597 - 1546) + '\062' + chr(0b11001 + 0o34), 9145 - 9137), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100010 + 0o17) + chr(0b101101 + 0o7) + chr(2097 - 2045), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1850 - 1797) + '\065', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100011 + 0o16) + chr(0b110100) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b1101 + 0o47) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b0 + 0o65) + chr(833 - 784), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b1110 + 0o46), 0o10), ehT0Px3KOsy9(chr(1633 - 1585) + '\x6f' + chr(51) + chr(0b110101 + 0o2) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1106 - 1058) + chr(0b1101111) + chr(0b110011) + chr(51) + '\067', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\061' + chr(406 - 353), 8), ehT0Px3KOsy9(chr(1370 - 1322) + '\x6f' + '\063' + '\066' + chr(2977 - 2922), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8699 - 8588) + chr(1282 - 1231) + chr(48) + chr(49), 63006 - 62998), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(1460 - 1409) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\x35' + chr(0b1101 + 0o50), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b100101 + 0o21) + chr(0b110011), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2419 - 2366) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'p'), chr(0b11000 + 0o114) + chr(0b1100101) + '\x63' + chr(1850 - 1739) + chr(0b1100100) + chr(3045 - 2944))(chr(117) + chr(0b111011 + 0o71) + chr(0b1100110) + chr(649 - 604) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Q8b5UytA0vqH(oVre8I6UXc3b):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x01\x1aUf\x0f=\xf4\x18@\x1bt\xb5'), '\144' + chr(0b101100 + 0o71) + '\x63' + chr(0b1000011 + 0o54) + chr(100) + '\x65')(chr(0b1110101) + chr(0b10101 + 0o137) + chr(0b1100110) + chr(0b101101) + chr(2937 - 2881))) == ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(884 - 836), 0o10):
return (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1f0Gm\x02$\xd9II\x14_\xa0'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b111100 + 0o63) + chr(1488 - 1388) + '\145')(chr(6481 - 6364) + chr(116) + chr(0b1100110) + chr(45) + '\x38')), kkSX4ccExqw4(xafqLlk3kkUe(SXOLrMavuUCe(b'0\x18_'), '\144' + chr(6764 - 6663) + chr(0b1100000 + 0o3) + '\157' + chr(9766 - 9666) + chr(0b111001 + 0o54))(chr(2559 - 2442) + chr(116) + chr(0b1100110) + chr(0b101 + 0o50) + chr(0b101100 + 0o14))))
else:
return (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1f0Gm\x02$\xd9II\x14_\xa0'), '\x64' + chr(0b1000100 + 0o41) + chr(4387 - 4288) + chr(0b101010 + 0o105) + '\x64' + '\x65')('\165' + '\164' + '\x66' + '\x2d' + '\x38')), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'4>dP\x047\xd3\x1f?>n\x8c'), chr(1540 - 1440) + chr(0b1100101) + chr(99) + '\157' + '\144' + chr(8616 - 8515))(chr(0b1110101) + chr(0b1110 + 0o146) + chr(102) + chr(0b101101) + chr(1465 - 1409))) / xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x01\x1aUf\x0f=\xf4\x18@\x1bt\xb5'), chr(7916 - 7816) + chr(0b1000101 + 0o40) + chr(9713 - 9614) + chr(0b1101111) + chr(100) + chr(6160 - 6059))('\165' + '\x74' + chr(102) + chr(0b101101) + chr(56))))
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.get_global
|
def get_global(self):
"""Gets the current global evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
"""
if self._has_global_stats:
if self.global_num_inst == 0:
return (self.name, float('nan'))
else:
return (self.name, self.global_sum_metric / self.global_num_inst)
else:
return self.get()
|
python
|
def get_global(self):
"""Gets the current global evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
"""
if self._has_global_stats:
if self.global_num_inst == 0:
return (self.name, float('nan'))
else:
return (self.name, self.global_sum_metric / self.global_num_inst)
else:
return self.get()
|
[
"def",
"get_global",
"(",
"self",
")",
":",
"if",
"self",
".",
"_has_global_stats",
":",
"if",
"self",
".",
"global_num_inst",
"==",
"0",
":",
"return",
"(",
"self",
".",
"name",
",",
"float",
"(",
"'nan'",
")",
")",
"else",
":",
"return",
"(",
"self",
".",
"name",
",",
"self",
".",
"global_sum_metric",
"/",
"self",
".",
"global_num_inst",
")",
"else",
":",
"return",
"self",
".",
"get",
"(",
")"
] |
Gets the current global evaluation result.
Returns
-------
names : list of str
Name of the metrics.
values : list of float
Value of the evaluations.
|
[
"Gets",
"the",
"current",
"global",
"evaluation",
"result",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L176-L192
|
train
|
Gets the current global evaluation result.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVV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,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1467 - 1419) + '\157' + '\x33' + chr(49) + chr(0b111 + 0o55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1972 - 1923) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(679 - 627) + chr(0b10101 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + '\x33' + chr(1422 - 1368) + '\x36', 48743 - 48735), ehT0Px3KOsy9(chr(0b110000) + chr(11332 - 11221) + chr(0b1111 + 0o42) + '\065' + chr(60 - 5), 18342 - 18334), ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + '\x31' + '\x30' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101101 + 0o6) + chr(0b100111 + 0o20) + chr(0b10011 + 0o36), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(1654 - 1604), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b101111 + 0o100) + chr(0b110011) + '\067' + chr(0b111 + 0o51), 0b1000), ehT0Px3KOsy9('\x30' + chr(6897 - 6786) + chr(0b110011) + chr(0b11100 + 0o25) + chr(0b100011 + 0o23), 5419 - 5411), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(131 - 79) + '\x30', 27078 - 27070), ehT0Px3KOsy9(chr(633 - 585) + chr(0b1101111) + '\063' + chr(2089 - 2041) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1104 - 1056) + chr(0b1101111) + chr(49) + chr(54) + chr(0b100110 + 0o12), 47478 - 47470), ehT0Px3KOsy9(chr(50 - 2) + '\157' + chr(50) + chr(0b110101) + chr(0b11110 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(1424 - 1376) + chr(0b1011011 + 0o24) + chr(49) + chr(0b110101) + '\061', 52983 - 52975), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(0b1110 + 0o44) + chr(0b110110) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b101111 + 0o100) + '\x33' + chr(0b110011) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\065' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6075 - 5964) + chr(50) + '\066' + chr(0b100 + 0o60), 15162 - 15154), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110100) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 43595 - 43587), ehT0Px3KOsy9(chr(462 - 414) + chr(0b1001 + 0o146) + '\x33' + chr(0b110010) + '\x30', 1518 - 1510), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\063', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b110010) + chr(0b10111 + 0o31) + chr(0b101011 + 0o6), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b101111 + 0o100) + chr(51) + chr(48) + chr(566 - 518), 59290 - 59282), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x34' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(1296 - 1248) + '\157' + chr(50), 3057 - 3049), ehT0Px3KOsy9(chr(1105 - 1057) + '\x6f' + chr(50) + chr(52) + chr(1926 - 1875), 23894 - 23886), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b11 + 0o60), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4736 - 4625) + chr(0b10 + 0o61) + '\064' + '\063', 27830 - 27822), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54) + chr(1706 - 1651), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9955 - 9844) + chr(0b110011) + chr(0b1010 + 0o50) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b11001 + 0o27) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(0b110010) + chr(53) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(0b110011) + chr(52) + chr(945 - 896), 52864 - 52856), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(429 - 380) + chr(0b110100) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + chr(0b100111 + 0o16), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1593 - 1542) + '\064' + chr(0b10100 + 0o36), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(54) + chr(2881 - 2826), 8), ehT0Px3KOsy9(chr(48) + chr(7110 - 6999) + '\067' + '\x37', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + chr(0b110000), 28061 - 28053)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2'), chr(517 - 417) + chr(0b1000000 + 0o45) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(5179 - 5077) + chr(1022 - 977) + chr(0b100100 + 0o24)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def vBrCfQ_DdWEJ(oVre8I6UXc3b):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93#D\x850#\x95e\x9a\xaf\x8c\x99\x03\xdd\x08\xc3\xac'), chr(9273 - 9173) + chr(101) + chr(0b1100011) + '\157' + chr(100) + chr(101))(chr(457 - 340) + chr(0b1110100) + chr(6566 - 6464) + chr(0b101101) + chr(0b111000))):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\x01@\x93& \xbb;\xcb\x8a\x8b\xf7'), chr(0b1100000 + 0o4) + '\145' + chr(4656 - 4557) + '\157' + chr(0b10011 + 0o121) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b110100 + 0o62) + chr(0b101 + 0o50) + chr(444 - 388))) == ehT0Px3KOsy9(chr(48) + chr(111) + chr(48), 55959 - 55951):
return (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\x02S\xbc=>\xb5n\xbc\xa8\x87\x80'), chr(3622 - 3522) + '\145' + chr(787 - 688) + chr(111) + '\144' + chr(101))(chr(0b1001001 + 0o54) + chr(8375 - 8259) + chr(102) + chr(1890 - 1845) + chr(2733 - 2677))), kkSX4ccExqw4(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2*K'), chr(7307 - 7207) + '\x65' + chr(0b11100 + 0o107) + '\157' + '\x64' + chr(101))('\x75' + '\164' + '\x66' + chr(0b1000 + 0o45) + '\070')))
else:
return (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\x02S\xbc=>\xb5n\xbc\xa8\x87\x80'), chr(7593 - 7493) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(3460 - 3343) + '\164' + '\146' + chr(1557 - 1512) + '\070')), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94<\x7f\xa2Y\x12\x8cE\xa8\x86\xb2\xf3'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1101110 + 0o6) + '\146' + chr(45) + chr(0b111000))) / xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\x01@\x93& \xbb;\xcb\x8a\x8b\xf7'), '\144' + '\145' + chr(1918 - 1819) + chr(111) + chr(614 - 514) + chr(0b1100001 + 0o4))(chr(12348 - 12231) + chr(0b111011 + 0o71) + chr(0b1100010 + 0o4) + chr(639 - 594) + '\070')))
else:
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xab.Q'), chr(0b10001 + 0o123) + '\x65' + '\143' + chr(111) + chr(4654 - 4554) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1152 - 1107) + '\x38'))()
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.get_name_value
|
def get_name_value(self):
"""Returns zipped name and value pairs.
Returns
-------
list of tuples
A (name, value) tuple list.
"""
name, value = self.get()
if not isinstance(name, list):
name = [name]
if not isinstance(value, list):
value = [value]
return list(zip(name, value))
|
python
|
def get_name_value(self):
"""Returns zipped name and value pairs.
Returns
-------
list of tuples
A (name, value) tuple list.
"""
name, value = self.get()
if not isinstance(name, list):
name = [name]
if not isinstance(value, list):
value = [value]
return list(zip(name, value))
|
[
"def",
"get_name_value",
"(",
"self",
")",
":",
"name",
",",
"value",
"=",
"self",
".",
"get",
"(",
")",
"if",
"not",
"isinstance",
"(",
"name",
",",
"list",
")",
":",
"name",
"=",
"[",
"name",
"]",
"if",
"not",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"[",
"value",
"]",
"return",
"list",
"(",
"zip",
"(",
"name",
",",
"value",
")",
")"
] |
Returns zipped name and value pairs.
Returns
-------
list of tuples
A (name, value) tuple list.
|
[
"Returns",
"zipped",
"name",
"and",
"value",
"pairs",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L194-L207
|
train
|
Returns a list of tuples of name and value pairs.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzM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,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(1117 - 1006) + chr(0b110011) + chr(0b10 + 0o57) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(6190 - 6079) + chr(1653 - 1602) + chr(49) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b101000 + 0o14) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1726 - 1678) + chr(0b1101111) + '\x31' + chr(0b110101) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2818 - 2707) + chr(50) + '\063' + chr(0b100110 + 0o13), 0o10), ehT0Px3KOsy9(chr(801 - 753) + chr(0b1101111) + chr(49) + chr(878 - 824) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100100 + 0o22) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(498 - 447) + '\062' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\067' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8513 - 8402) + chr(0b110001) + chr(239 - 190) + chr(693 - 644), 0b1000), ehT0Px3KOsy9(chr(2271 - 2223) + '\157' + chr(0b11101 + 0o25) + chr(1945 - 1896), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\061' + chr(0b100100 + 0o20), 34274 - 34266), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b11010 + 0o31) + '\064' + chr(50), 37892 - 37884), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + chr(1606 - 1556) + '\x36' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + '\063' + chr(0b11110 + 0o31) + chr(0b10011 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(929 - 818) + '\062' + '\x36' + '\066', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b110101) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1851 - 1800) + '\064' + chr(0b11101 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110100) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b110011 + 0o74) + chr(0b101001 + 0o10) + '\066' + chr(1667 - 1616), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + chr(0b1110 + 0o44) + chr(0b110111) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\062' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1117 - 1069) + '\x6f' + chr(0b10 + 0o61) + chr(0b110010) + chr(49), 0o10), ehT0Px3KOsy9(chr(592 - 544) + chr(0b1101111) + chr(0b110110) + chr(0b100100 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + '\063' + chr(0b1100 + 0o51) + chr(774 - 725), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7896 - 7785) + chr(49) + '\x35' + chr(51), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b110111) + chr(0b101000 + 0o14), 31109 - 31101), ehT0Px3KOsy9('\x30' + chr(1212 - 1101) + '\065' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + '\062' + chr(127 - 77) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1538 - 1488) + chr(0b1011 + 0o51) + chr(0b10110 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(913 - 862) + chr(0b110100) + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110000 + 0o2) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6488 - 6377) + '\x33' + chr(0b110011) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b10000 + 0o137) + chr(0b10001 + 0o41) + chr(1399 - 1350) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(51) + '\064', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b101011 + 0o104) + chr(769 - 720) + chr(0b11 + 0o55), 0o10), ehT0Px3KOsy9(chr(497 - 449) + '\x6f' + chr(54) + chr(1989 - 1941), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b111100 + 0o63) + chr(0b110001) + chr(0b110000), 8), ehT0Px3KOsy9(chr(1408 - 1360) + chr(11680 - 11569) + chr(0b110001) + chr(2148 - 2099) + '\064', 52983 - 52975), ehT0Px3KOsy9(chr(48) + '\157' + chr(509 - 460) + chr(48) + chr(0b110001), 35370 - 35362)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0'), chr(0b1010110 + 0o16) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(405 - 303) + chr(0b101101) + chr(0b10011 + 0o45)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def sznaOGtzSAVV(oVre8I6UXc3b):
(AIvJRzLdDfgF, QmmgWUB13VCJ) = oVre8I6UXc3b.get()
if not PlSM16l2KDPD(AIvJRzLdDfgF, YyaZ4tpXu4lf):
AIvJRzLdDfgF = [AIvJRzLdDfgF]
if not PlSM16l2KDPD(QmmgWUB13VCJ, YyaZ4tpXu4lf):
QmmgWUB13VCJ = [QmmgWUB13VCJ]
return YyaZ4tpXu4lf(pZ0NK2y6HRbn(AIvJRzLdDfgF, QmmgWUB13VCJ))
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
EvalMetric.get_global_name_value
|
def get_global_name_value(self):
"""Returns zipped name and value pairs for global results.
Returns
-------
list of tuples
A (name, value) tuple list.
"""
if self._has_global_stats:
name, value = self.get_global()
if not isinstance(name, list):
name = [name]
if not isinstance(value, list):
value = [value]
return list(zip(name, value))
else:
return self.get_name_value()
|
python
|
def get_global_name_value(self):
"""Returns zipped name and value pairs for global results.
Returns
-------
list of tuples
A (name, value) tuple list.
"""
if self._has_global_stats:
name, value = self.get_global()
if not isinstance(name, list):
name = [name]
if not isinstance(value, list):
value = [value]
return list(zip(name, value))
else:
return self.get_name_value()
|
[
"def",
"get_global_name_value",
"(",
"self",
")",
":",
"if",
"self",
".",
"_has_global_stats",
":",
"name",
",",
"value",
"=",
"self",
".",
"get_global",
"(",
")",
"if",
"not",
"isinstance",
"(",
"name",
",",
"list",
")",
":",
"name",
"=",
"[",
"name",
"]",
"if",
"not",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"[",
"value",
"]",
"return",
"list",
"(",
"zip",
"(",
"name",
",",
"value",
")",
")",
"else",
":",
"return",
"self",
".",
"get_name_value",
"(",
")"
] |
Returns zipped name and value pairs for global results.
Returns
-------
list of tuples
A (name, value) tuple list.
|
[
"Returns",
"zipped",
"name",
"and",
"value",
"pairs",
"for",
"global",
"results",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L209-L225
|
train
|
Returns zipped name and value pairs for global results.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,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Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(53) + chr(971 - 922), ord("\x08")), ehT0Px3KOsy9(chr(2044 - 1996) + chr(111) + '\x32' + chr(48) + chr(52), 0o10), ehT0Px3KOsy9(chr(1414 - 1366) + chr(5117 - 5006) + chr(496 - 447) + chr(1448 - 1394) + chr(2403 - 2350), 0o10), ehT0Px3KOsy9('\x30' + chr(12174 - 12063) + chr(0b10000 + 0o42) + chr(0b110011) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(1958 - 1910) + '\x6f' + '\x32' + chr(54) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(52), 55158 - 55150), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1492 - 1441) + '\x37' + chr(0b110011), 43819 - 43811), ehT0Px3KOsy9(chr(808 - 760) + chr(111) + chr(0b10110 + 0o34) + '\060', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1000 + 0o51) + chr(0b110110) + chr(202 - 150), 0o10), ehT0Px3KOsy9(chr(533 - 485) + chr(111) + chr(0b111 + 0o52) + '\066' + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(49) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(5829 - 5718) + chr(0b110100) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110011) + chr(812 - 762), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b10000 + 0o41) + chr(0b100101 + 0o21), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011001 + 0o26) + chr(49) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(1070 - 1021) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b100010 + 0o17) + chr(1705 - 1655), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1895 - 1846) + chr(576 - 526) + chr(1712 - 1661), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(340 - 290) + chr(0b110101) + chr(836 - 785), 18615 - 18607), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + '\x35' + chr(184 - 133), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + '\067' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(50) + '\x37' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(656 - 606) + chr(909 - 856) + chr(1840 - 1788), 24794 - 24786), ehT0Px3KOsy9('\x30' + chr(10999 - 10888) + chr(0b1011 + 0o47) + chr(2162 - 2110) + chr(0b110000 + 0o3), 63996 - 63988), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110010) + chr(1375 - 1325), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10100 + 0o36) + '\061' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1982 - 1933) + '\061' + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + '\x34' + chr(0b100 + 0o55), 8), ehT0Px3KOsy9(chr(1499 - 1451) + '\157' + chr(50) + '\x33' + chr(2164 - 2112), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + '\063' + chr(550 - 499) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(11554 - 11443) + chr(0b1111 + 0o44) + chr(0b110001) + chr(1078 - 1025), 55223 - 55215), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + '\x33' + '\061' + chr(0b110001 + 0o5), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10100 + 0o35) + chr(0b100 + 0o54) + '\067', 27141 - 27133), ehT0Px3KOsy9(chr(149 - 101) + '\x6f' + '\x33' + chr(1720 - 1670) + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(4042 - 3931) + chr(1685 - 1630) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + '\x32' + chr(48) + chr(1390 - 1340), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1498 - 1447) + '\x37' + chr(0b110110), 5041 - 5033), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(7482 - 7371) + chr(560 - 510) + chr(55) + '\067', 0b1000), ehT0Px3KOsy9(chr(1400 - 1352) + '\x6f' + chr(0b101111 + 0o3) + chr(0b110011) + chr(1356 - 1302), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(2397 - 2344) + '\x30', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(53) + '\060', 14160 - 14152)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x07'), chr(2982 - 2882) + chr(101) + chr(215 - 116) + '\157' + chr(0b111110 + 0o46) + chr(0b1111 + 0o126))(chr(9118 - 9001) + '\x74' + chr(102) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def EsDvoY3IXgH7(oVre8I6UXc3b):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'v\xec\x14\xed\xecK\x97\x7f\x16\x11\xe6~)\xfai\xbf9'), chr(7187 - 7087) + chr(9924 - 9823) + chr(0b111001 + 0o52) + chr(0b1010011 + 0o34) + chr(3052 - 2952) + chr(0b1100101))(chr(7457 - 7340) + '\x74' + chr(0b1111 + 0o127) + chr(45) + chr(193 - 137))):
(AIvJRzLdDfgF, QmmgWUB13VCJ) = oVre8I6UXc3b.get_global()
if not PlSM16l2KDPD(AIvJRzLdDfgF, YyaZ4tpXu4lf):
AIvJRzLdDfgF = [AIvJRzLdDfgF]
if not PlSM16l2KDPD(QmmgWUB13VCJ, YyaZ4tpXu4lf):
QmmgWUB13VCJ = [QmmgWUB13VCJ]
return YyaZ4tpXu4lf(pZ0NK2y6HRbn(AIvJRzLdDfgF, QmmgWUB13VCJ))
else:
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'N\xe1\x01\xc1\xddM\x96u+\x06\xebM/\xeb'), '\144' + '\x65' + chr(99) + '\x6f' + chr(100) + '\145')('\x75' + chr(0b101110 + 0o106) + '\x66' + '\x2d' + chr(2508 - 2452)))()
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
_BinaryClassificationMetrics.update_binary_stats
|
def update_binary_stats(self, label, pred):
"""
Update various binary classification counts for a single (label, pred)
pair.
Parameters
----------
label : `NDArray`
The labels of the data.
pred : `NDArray`
Predicted values.
"""
pred = pred.asnumpy()
label = label.asnumpy().astype('int32')
pred_label = numpy.argmax(pred, axis=1)
check_label_shapes(label, pred)
if len(numpy.unique(label)) > 2:
raise ValueError("%s currently only supports binary classification."
% self.__class__.__name__)
pred_true = (pred_label == 1)
pred_false = 1 - pred_true
label_true = (label == 1)
label_false = 1 - label_true
true_pos = (pred_true * label_true).sum()
false_pos = (pred_true * label_false).sum()
false_neg = (pred_false * label_true).sum()
true_neg = (pred_false * label_false).sum()
self.true_positives += true_pos
self.global_true_positives += true_pos
self.false_positives += false_pos
self.global_false_positives += false_pos
self.false_negatives += false_neg
self.global_false_negatives += false_neg
self.true_negatives += true_neg
self.global_true_negatives += true_neg
|
python
|
def update_binary_stats(self, label, pred):
"""
Update various binary classification counts for a single (label, pred)
pair.
Parameters
----------
label : `NDArray`
The labels of the data.
pred : `NDArray`
Predicted values.
"""
pred = pred.asnumpy()
label = label.asnumpy().astype('int32')
pred_label = numpy.argmax(pred, axis=1)
check_label_shapes(label, pred)
if len(numpy.unique(label)) > 2:
raise ValueError("%s currently only supports binary classification."
% self.__class__.__name__)
pred_true = (pred_label == 1)
pred_false = 1 - pred_true
label_true = (label == 1)
label_false = 1 - label_true
true_pos = (pred_true * label_true).sum()
false_pos = (pred_true * label_false).sum()
false_neg = (pred_false * label_true).sum()
true_neg = (pred_false * label_false).sum()
self.true_positives += true_pos
self.global_true_positives += true_pos
self.false_positives += false_pos
self.global_false_positives += false_pos
self.false_negatives += false_neg
self.global_false_negatives += false_neg
self.true_negatives += true_neg
self.global_true_negatives += true_neg
|
[
"def",
"update_binary_stats",
"(",
"self",
",",
"label",
",",
"pred",
")",
":",
"pred",
"=",
"pred",
".",
"asnumpy",
"(",
")",
"label",
"=",
"label",
".",
"asnumpy",
"(",
")",
".",
"astype",
"(",
"'int32'",
")",
"pred_label",
"=",
"numpy",
".",
"argmax",
"(",
"pred",
",",
"axis",
"=",
"1",
")",
"check_label_shapes",
"(",
"label",
",",
"pred",
")",
"if",
"len",
"(",
"numpy",
".",
"unique",
"(",
"label",
")",
")",
">",
"2",
":",
"raise",
"ValueError",
"(",
"\"%s currently only supports binary classification.\"",
"%",
"self",
".",
"__class__",
".",
"__name__",
")",
"pred_true",
"=",
"(",
"pred_label",
"==",
"1",
")",
"pred_false",
"=",
"1",
"-",
"pred_true",
"label_true",
"=",
"(",
"label",
"==",
"1",
")",
"label_false",
"=",
"1",
"-",
"label_true",
"true_pos",
"=",
"(",
"pred_true",
"*",
"label_true",
")",
".",
"sum",
"(",
")",
"false_pos",
"=",
"(",
"pred_true",
"*",
"label_false",
")",
".",
"sum",
"(",
")",
"false_neg",
"=",
"(",
"pred_false",
"*",
"label_true",
")",
".",
"sum",
"(",
")",
"true_neg",
"=",
"(",
"pred_false",
"*",
"label_false",
")",
".",
"sum",
"(",
")",
"self",
".",
"true_positives",
"+=",
"true_pos",
"self",
".",
"global_true_positives",
"+=",
"true_pos",
"self",
".",
"false_positives",
"+=",
"false_pos",
"self",
".",
"global_false_positives",
"+=",
"false_pos",
"self",
".",
"false_negatives",
"+=",
"false_neg",
"self",
".",
"global_false_negatives",
"+=",
"false_neg",
"self",
".",
"true_negatives",
"+=",
"true_neg",
"self",
".",
"global_true_negatives",
"+=",
"true_neg"
] |
Update various binary classification counts for a single (label, pred)
pair.
Parameters
----------
label : `NDArray`
The labels of the data.
pred : `NDArray`
Predicted values.
|
[
"Update",
"various",
"binary",
"classification",
"counts",
"for",
"a",
"single",
"(",
"label",
"pred",
")",
"pair",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L612-L649
|
train
|
Update the internal statistics for a single label and pred.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4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7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\x37' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(10361 - 10250) + chr(50) + '\x37' + chr(1063 - 1009), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b101 + 0o57) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10001 + 0o44) + chr(0b110000), 49711 - 49703), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1011101 + 0o22) + chr(1242 - 1192) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1691 - 1641) + chr(0b110011) + chr(0b10010 + 0o40), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100000 + 0o27) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011111 + 0o20) + '\x33' + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b110111), 906 - 898), ehT0Px3KOsy9('\060' + chr(10040 - 9929) + chr(0b100000 + 0o23) + '\063' + chr(0b11111 + 0o23), 0b1000), ehT0Px3KOsy9(chr(145 - 97) + chr(111) + '\062' + chr(0b110001) + chr(0b110001), 46389 - 46381), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b111100 + 0o63) + chr(237 - 188) + chr(0b110001) + chr(53), 13066 - 13058), ehT0Px3KOsy9(chr(48) + chr(111) + chr(277 - 226) + chr(138 - 85) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1386 - 1335) + chr(55) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + '\065' + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110101) + '\x34', 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(2029 - 1980) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11391 - 11280) + chr(0b110010) + chr(1461 - 1412) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b1110 + 0o43) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110010) + chr(434 - 385) + chr(0b1001 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b110010) + '\x37' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3258 - 3147) + '\062' + chr(1645 - 1594) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10011 + 0o37) + chr(485 - 433) + '\065', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b110011) + '\x31', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110011) + chr(0b110100), 1713 - 1705), ehT0Px3KOsy9('\x30' + chr(1080 - 969) + '\061' + '\065' + chr(754 - 706), 35453 - 35445), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(389 - 338) + '\061' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + '\062' + '\063' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1394 - 1346) + '\157' + chr(0b1111 + 0o44) + chr(50) + chr(1305 - 1257), 35158 - 35150), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(0b110010) + chr(0b110101) + chr(51), 0b1000), ehT0Px3KOsy9(chr(465 - 417) + '\157' + chr(49) + '\064' + chr(0b110100 + 0o0), 41145 - 41137), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011), 35123 - 35115), ehT0Px3KOsy9(chr(210 - 162) + chr(0b1101 + 0o142) + chr(0b110001) + '\x33' + chr(288 - 233), ord("\x08")), ehT0Px3KOsy9(chr(764 - 716) + '\x6f' + '\063' + '\x30' + chr(0b10110 + 0o33), 0b1000), ehT0Px3KOsy9('\x30' + chr(8389 - 8278) + chr(202 - 151) + '\x31' + chr(2257 - 2205), 44432 - 44424), ehT0Px3KOsy9(chr(222 - 174) + chr(0b11101 + 0o122) + '\061' + chr(0b1101 + 0o51) + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b101110 + 0o6) + chr(0b10001 + 0o41), 10447 - 10439), ehT0Px3KOsy9('\060' + chr(3361 - 3250) + chr(51) + chr(0b110011) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1549 - 1501) + chr(5707 - 5596) + chr(1209 - 1160) + chr(51) + chr(0b110101), 17108 - 17100), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101110 + 0o1) + chr(2045 - 1994) + '\x30' + chr(532 - 481), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(53) + chr(0b11001 + 0o27), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ifkKQQedmShS(oVre8I6UXc3b, TRUOLFLuD08x, eyamnrN0elUS):
eyamnrN0elUS = eyamnrN0elUS.asnumpy()
TRUOLFLuD08x = TRUOLFLuD08x.asnumpy().astype(xafqLlk3kkUe(SXOLrMavuUCe(b"\x90\xd0\x96\x1b'"), chr(536 - 436) + chr(0b1000000 + 0o45) + chr(3973 - 3874) + chr(111) + chr(4370 - 4270) + chr(0b1100101))(chr(678 - 561) + chr(0b11000 + 0o134) + chr(102) + chr(45) + '\x38'))
BS0ONpRSlWAN = n8mpNwkrxOdz.argmax(eyamnrN0elUS, axis=ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b111010 + 0o65) + '\x31', 38719 - 38711))
OdfmKwSBnlWd(TRUOLFLuD08x, eyamnrN0elUS)
if c2A0yzQpDQB3(xafqLlk3kkUe(n8mpNwkrxOdz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c\xd0\x8bY`\xff'), '\144' + chr(101) + '\x63' + chr(8416 - 8305) + '\x64' + chr(101))(chr(5521 - 5404) + chr(0b1110100) + chr(102) + chr(1761 - 1716) + chr(0b111000)))(TRUOLFLuD08x)) > ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32', ord("\x08")):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc\xcd\xc2K`\xe8H\x84a\xae\xe54\xcb\x93B@w\xaf;\xf9\xcd\xe9\xca\xeb(\x1b\xef\xff\xb9\xc5\x05q&\xe1\xaf\x1b\x03\xa8.\xaa\x9f\xd7\x81Ia\xf3U\x8f!'), chr(0b1010010 + 0o22) + '\x65' + chr(6236 - 6137) + chr(111) + chr(0b1111 + 0o125) + chr(2295 - 2194))(chr(117) + '\x74' + chr(102) + '\055' + '\070') % xafqLlk3kkUe(oVre8I6UXc3b.__class__, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xdc\x87B!\xf5`\x90D\x96\xc8{'), chr(0b110011 + 0o61) + chr(0b1100101) + chr(4819 - 4720) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(2326 - 2210) + chr(0b1001000 + 0o36) + chr(0b101001 + 0o4) + chr(0b111000))))
uZDrW5BY6Mw3 = BS0ONpRSlWAN == ehT0Px3KOsy9(chr(0b110000) + chr(12219 - 12108) + chr(49), 8)
mvnKeqsnhuOB = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 8) - uZDrW5BY6Mw3
aCo9rK5d1rAQ = TRUOLFLuD08x == ehT0Px3KOsy9('\x30' + chr(111) + chr(1045 - 996), 8)
eh1hGoHA0_kt = ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001), 8) - aCo9rK5d1rAQ
ERrrVkiB5620 = (uZDrW5BY6Mw3 * aCo9rK5d1rAQ).xkxBmo49x2An()
FDQWw0o3E2es = (uZDrW5BY6Mw3 * eh1hGoHA0_kt).xkxBmo49x2An()
teoAJCXJWJ3w = (mvnKeqsnhuOB * aCo9rK5d1rAQ).xkxBmo49x2An()
B9ZohcZf8SbM = (mvnKeqsnhuOB * eh1hGoHA0_kt).xkxBmo49x2An()
oVre8I6UXc3b.kH63T7vKx98J += ERrrVkiB5620
oVre8I6UXc3b.aZbVQrchUB6N += ERrrVkiB5620
oVre8I6UXc3b.UiOVYyvWmPwv += FDQWw0o3E2es
oVre8I6UXc3b.VOB5vI2afjHG += FDQWw0o3E2es
oVre8I6UXc3b.QOxi25oS74ue += teoAJCXJWJ3w
oVre8I6UXc3b.dvvCyq1n9INq += teoAJCXJWJ3w
oVre8I6UXc3b.MN88ZU75Hryw += B9ZohcZf8SbM
oVre8I6UXc3b.Mip26OP7Cc0i += B9ZohcZf8SbM
|
apache/incubator-mxnet
|
python/mxnet/metric.py
|
_BinaryClassificationMetrics.matthewscc
|
def matthewscc(self, use_global=False):
"""
Calculate the Matthew's Correlation Coefficent
"""
if use_global:
if not self.global_total_examples:
return 0.
true_pos = float(self.global_true_positives)
false_pos = float(self.global_false_positives)
false_neg = float(self.global_false_negatives)
true_neg = float(self.global_true_negatives)
else:
if not self.total_examples:
return 0.
true_pos = float(self.true_positives)
false_pos = float(self.false_positives)
false_neg = float(self.false_negatives)
true_neg = float(self.true_negatives)
terms = [(true_pos + false_pos),
(true_pos + false_neg),
(true_neg + false_pos),
(true_neg + false_neg)]
denom = 1.
for t in filter(lambda t: t != 0., terms):
denom *= t
return ((true_pos * true_neg) - (false_pos * false_neg)) / math.sqrt(denom)
|
python
|
def matthewscc(self, use_global=False):
"""
Calculate the Matthew's Correlation Coefficent
"""
if use_global:
if not self.global_total_examples:
return 0.
true_pos = float(self.global_true_positives)
false_pos = float(self.global_false_positives)
false_neg = float(self.global_false_negatives)
true_neg = float(self.global_true_negatives)
else:
if not self.total_examples:
return 0.
true_pos = float(self.true_positives)
false_pos = float(self.false_positives)
false_neg = float(self.false_negatives)
true_neg = float(self.true_negatives)
terms = [(true_pos + false_pos),
(true_pos + false_neg),
(true_neg + false_pos),
(true_neg + false_neg)]
denom = 1.
for t in filter(lambda t: t != 0., terms):
denom *= t
return ((true_pos * true_neg) - (false_pos * false_neg)) / math.sqrt(denom)
|
[
"def",
"matthewscc",
"(",
"self",
",",
"use_global",
"=",
"False",
")",
":",
"if",
"use_global",
":",
"if",
"not",
"self",
".",
"global_total_examples",
":",
"return",
"0.",
"true_pos",
"=",
"float",
"(",
"self",
".",
"global_true_positives",
")",
"false_pos",
"=",
"float",
"(",
"self",
".",
"global_false_positives",
")",
"false_neg",
"=",
"float",
"(",
"self",
".",
"global_false_negatives",
")",
"true_neg",
"=",
"float",
"(",
"self",
".",
"global_true_negatives",
")",
"else",
":",
"if",
"not",
"self",
".",
"total_examples",
":",
"return",
"0.",
"true_pos",
"=",
"float",
"(",
"self",
".",
"true_positives",
")",
"false_pos",
"=",
"float",
"(",
"self",
".",
"false_positives",
")",
"false_neg",
"=",
"float",
"(",
"self",
".",
"false_negatives",
")",
"true_neg",
"=",
"float",
"(",
"self",
".",
"true_negatives",
")",
"terms",
"=",
"[",
"(",
"true_pos",
"+",
"false_pos",
")",
",",
"(",
"true_pos",
"+",
"false_neg",
")",
",",
"(",
"true_neg",
"+",
"false_pos",
")",
",",
"(",
"true_neg",
"+",
"false_neg",
")",
"]",
"denom",
"=",
"1.",
"for",
"t",
"in",
"filter",
"(",
"lambda",
"t",
":",
"t",
"!=",
"0.",
",",
"terms",
")",
":",
"denom",
"*=",
"t",
"return",
"(",
"(",
"true_pos",
"*",
"true_neg",
")",
"-",
"(",
"false_pos",
"*",
"false_neg",
")",
")",
"/",
"math",
".",
"sqrt",
"(",
"denom",
")"
] |
Calculate the Matthew's Correlation Coefficent
|
[
"Calculate",
"the",
"Matthew",
"s",
"Correlation",
"Coefficent"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/metric.py#L693-L721
|
train
|
Calculate the Matthew s Correlation Coefficent ArcGIS.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVW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ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2011 - 1963) + chr(0b11 + 0o154) + chr(50) + '\061' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(54) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1944 - 1896) + chr(0b1101111) + '\063' + '\x36' + chr(1785 - 1736), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10 + 0o61) + chr(0b11001 + 0o32) + chr(1549 - 1494), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2380 - 2328) + chr(1201 - 1149), 0b1000), ehT0Px3KOsy9(chr(789 - 741) + chr(0b1010101 + 0o32) + '\x31' + chr(0b1110 + 0o43) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(52) + chr(0b100000 + 0o23), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\065' + chr(815 - 765), 0o10), ehT0Px3KOsy9(chr(1060 - 1012) + chr(0b1101111) + '\x31' + chr(2387 - 2332) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100011 + 0o21) + '\063', 8), ehT0Px3KOsy9(chr(1977 - 1929) + chr(8331 - 8220) + chr(50) + chr(0b110111) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\061' + chr(1972 - 1918), 10216 - 10208), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2488 - 2437) + '\x33' + '\x31', 0o10), ehT0Px3KOsy9(chr(672 - 624) + chr(0b11110 + 0o121) + '\062' + '\x32' + chr(0b11101 + 0o32), 48265 - 48257), ehT0Px3KOsy9(chr(744 - 696) + chr(9313 - 9202) + '\061' + chr(48), 56484 - 56476), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x34' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(1054 - 943) + chr(0b110001) + chr(0b10101 + 0o33) + chr(55), 50794 - 50786), ehT0Px3KOsy9(chr(48) + chr(0b1010010 + 0o35) + chr(179 - 130) + '\x34' + '\064', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(149 - 94) + chr(1018 - 966), 46179 - 46171), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + '\062', 62978 - 62970), ehT0Px3KOsy9(chr(230 - 182) + chr(0b11000 + 0o127) + chr(1325 - 1276) + '\x30' + chr(355 - 304), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8663 - 8552) + '\063' + '\061' + chr(0b110011), 32804 - 32796), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + '\x33' + chr(52) + chr(515 - 462), 52273 - 52265), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x36' + chr(1782 - 1729), 0o10), ehT0Px3KOsy9(chr(2031 - 1983) + chr(111) + chr(0b110110) + chr(0b110100 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1819 - 1769) + chr(53) + chr(0b100010 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + '\x33' + chr(0b110100) + chr(1388 - 1340), ord("\x08")), ehT0Px3KOsy9(chr(1546 - 1498) + chr(0b111010 + 0o65) + chr(51) + chr(0b100100 + 0o16) + '\x37', 57211 - 57203), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\x31' + chr(0b1011 + 0o52) + chr(0b10 + 0o57), 13343 - 13335), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1457 - 1407) + chr(49) + chr(53), 8), ehT0Px3KOsy9(chr(331 - 283) + chr(111) + chr(1155 - 1105) + '\062' + '\x32', 27932 - 27924), ehT0Px3KOsy9('\060' + '\157' + chr(59 - 8) + '\x37' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b11011 + 0o27) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011111 + 0o20) + chr(0b110001) + chr(51) + chr(0b101101 + 0o4), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\063' + chr(2287 - 2233), 4176 - 4168), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x34', 42148 - 42140), ehT0Px3KOsy9(chr(1543 - 1495) + chr(0b1101010 + 0o5) + chr(51) + chr(0b110011) + chr(1777 - 1722), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3'), chr(100) + chr(101) + '\143' + chr(111) + chr(0b101001 + 0o73) + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(45) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Obt7EcmbW6hN(oVre8I6UXc3b, Y75Ulrw671NY=ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(48), ord("\x08"))):
if Y75Ulrw671NY:
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\x9c\x9e\xbdE!|m\x85\x0eB\xd3\x11\xbc\xefi\x8a7\x08YY'), chr(0b1100100) + '\145' + chr(99) + chr(7157 - 7046) + chr(0b111101 + 0o47) + chr(0b1011001 + 0o14))(chr(0b1110101) + chr(0b100011 + 0o121) + chr(102) + '\x2d' + '\x38')):
return 0.0
ERrrVkiB5620 = kkSX4ccExqw4(oVre8I6UXc3b.aZbVQrchUB6N)
FDQWw0o3E2es = kkSX4ccExqw4(oVre8I6UXc3b.VOB5vI2afjHG)
teoAJCXJWJ3w = kkSX4ccExqw4(oVre8I6UXc3b.dvvCyq1n9INq)
B9ZohcZf8SbM = kkSX4ccExqw4(oVre8I6UXc3b.Mip26OP7Cc0i)
else:
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\x9f\x85\xbeH\x12Fa\x8b\x17S\xd3+\xaa'), '\144' + chr(0b10011 + 0o122) + chr(8669 - 8570) + chr(111) + chr(100) + '\145')(chr(0b1100001 + 0o24) + chr(13338 - 13222) + chr(0b1100110) + '\055' + chr(56))):
return 0.0
ERrrVkiB5620 = kkSX4ccExqw4(oVre8I6UXc3b.kH63T7vKx98J)
FDQWw0o3E2es = kkSX4ccExqw4(oVre8I6UXc3b.UiOVYyvWmPwv)
teoAJCXJWJ3w = kkSX4ccExqw4(oVre8I6UXc3b.QOxi25oS74ue)
B9ZohcZf8SbM = kkSX4ccExqw4(oVre8I6UXc3b.MN88ZU75Hryw)
XN41EaTdyMxN = [ERrrVkiB5620 + FDQWw0o3E2es, ERrrVkiB5620 + teoAJCXJWJ3w, B9ZohcZf8SbM + FDQWw0o3E2es, B9ZohcZf8SbM + teoAJCXJWJ3w]
fXheFXeFuYd1 = 1.0
for YeT3l7JgTbWR in hi1V0ySZcNds(lambda YeT3l7JgTbWR: YeT3l7JgTbWR != 0.0, XN41EaTdyMxN):
fXheFXeFuYd1 *= YeT3l7JgTbWR
return (ERrrVkiB5620 * B9ZohcZf8SbM - FDQWw0o3E2es * teoAJCXJWJ3w) / xafqLlk3kkUe(yhiZVkosCjBm, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\x81\x83\xab'), '\x64' + chr(101) + '\x63' + chr(0b1001011 + 0o44) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1100100 + 0o20) + '\146' + chr(0b101100 + 0o1) + '\070'))(fXheFXeFuYd1)
|
apache/incubator-mxnet
|
python/mxnet/gluon/data/dataset.py
|
Dataset.transform
|
def transform(self, fn, lazy=True):
"""Returns a new dataset with each sample transformed by the
transformer function `fn`.
Parameters
----------
fn : callable
A transformer function that takes a sample as input and
returns the transformed sample.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
"""
trans = _LazyTransformDataset(self, fn)
if lazy:
return trans
return SimpleDataset([i for i in trans])
|
python
|
def transform(self, fn, lazy=True):
"""Returns a new dataset with each sample transformed by the
transformer function `fn`.
Parameters
----------
fn : callable
A transformer function that takes a sample as input and
returns the transformed sample.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
"""
trans = _LazyTransformDataset(self, fn)
if lazy:
return trans
return SimpleDataset([i for i in trans])
|
[
"def",
"transform",
"(",
"self",
",",
"fn",
",",
"lazy",
"=",
"True",
")",
":",
"trans",
"=",
"_LazyTransformDataset",
"(",
"self",
",",
"fn",
")",
"if",
"lazy",
":",
"return",
"trans",
"return",
"SimpleDataset",
"(",
"[",
"i",
"for",
"i",
"in",
"trans",
"]",
")"
] |
Returns a new dataset with each sample transformed by the
transformer function `fn`.
Parameters
----------
fn : callable
A transformer function that takes a sample as input and
returns the transformed sample.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
|
[
"Returns",
"a",
"new",
"dataset",
"with",
"each",
"sample",
"transformed",
"by",
"the",
"transformer",
"function",
"fn",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/gluon/data/dataset.py#L43-L66
|
train
|
Returns a new dataset with each sample transformed by the the
transformer function fn.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3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,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1100101 + 0o12) + chr(0b100001 + 0o20) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110101) + chr(0b110100), 10093 - 10085), ehT0Px3KOsy9('\x30' + '\x6f' + chr(55) + chr(303 - 250), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(2879 - 2825) + '\x30', 19224 - 19216), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(48) + chr(0b100010 + 0o16), 55549 - 55541), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b110001 + 0o76) + chr(0b0 + 0o61) + chr(0b110101) + chr(1562 - 1507), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\066' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5314 - 5203) + chr(51) + chr(0b110010) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(3656 - 3545) + chr(0b110010) + chr(0b10001 + 0o43) + '\x31', 10292 - 10284), ehT0Px3KOsy9(chr(48) + chr(1372 - 1261) + chr(0b110011) + chr(0b110001) + '\x33', 1709 - 1701), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(51) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100010 + 0o15) + chr(0b10111 + 0o34) + chr(0b110011) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7812 - 7701) + '\063' + chr(0b101001 + 0o11) + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5607 - 5496) + chr(0b110100) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(52) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(1411 - 1300) + chr(50) + '\x32' + chr(0b10101 + 0o37), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + chr(50) + chr(50) + chr(0b101010 + 0o13), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2915 - 2804) + chr(336 - 287), 3270 - 3262), ehT0Px3KOsy9(chr(2116 - 2068) + chr(0b10111 + 0o130) + '\x31' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2484 - 2434) + chr(885 - 835) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(2355 - 2306), 29711 - 29703), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o20) + chr(0b100001 + 0o17) + chr(1336 - 1288), 15671 - 15663), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b110011) + '\061', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100110 + 0o14) + chr(48) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x37' + chr(0b101000 + 0o15), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + '\062' + chr(121 - 71) + chr(54), 0o10), ehT0Px3KOsy9(chr(1501 - 1453) + chr(0b1101111) + chr(2536 - 2485) + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(252 - 202) + chr(0b11 + 0o62) + '\067', 0o10), ehT0Px3KOsy9(chr(513 - 465) + chr(111) + '\x36' + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10100 + 0o40) + chr(0b11111 + 0o23), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b1110 + 0o47) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(49) + chr(643 - 594) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\x33' + '\x37' + chr(1238 - 1190), 7179 - 7171), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + chr(49) + chr(53) + '\x37', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b0 + 0o62) + chr(0b101 + 0o55) + chr(2384 - 2333), 0o10), ehT0Px3KOsy9(chr(1716 - 1668) + chr(0b1011110 + 0o21) + chr(0b101011 + 0o6) + '\062' + chr(0b110110 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101 + 0o142) + '\061' + chr(0b110000) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(2493 - 2443) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(0b110001) + chr(53) + chr(55), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b100110 + 0o111) + chr(0b110011 + 0o4) + chr(1769 - 1720), 44523 - 44515)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\065' + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'&'), chr(100) + chr(1139 - 1038) + chr(0b101000 + 0o73) + chr(4238 - 4127) + chr(100) + chr(101))(chr(146 - 29) + '\x74' + '\146' + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ASNeIOBhze_M(oVre8I6UXc3b, wDsB9Ho570J9, l7fBk51Hp1xn=ehT0Px3KOsy9(chr(48) + chr(0b1101010 + 0o5) + chr(372 - 323), 8)):
CrYgv6GN5mg7 = SAnsWuMAq2Lp(oVre8I6UXc3b, wDsB9Ho570J9)
if l7fBk51Hp1xn:
return CrYgv6GN5mg7
return ppwo74126CUL([WVxHKyX45z_L for WVxHKyX45z_L in CrYgv6GN5mg7])
|
apache/incubator-mxnet
|
python/mxnet/gluon/data/dataset.py
|
Dataset.transform_first
|
def transform_first(self, fn, lazy=True):
"""Returns a new dataset with the first element of each sample
transformed by the transformer function `fn`.
This is useful, for example, when you only want to transform data
while keeping label as is.
Parameters
----------
fn : callable
A transformer function that takes the first elemtn of a sample
as input and returns the transformed element.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
"""
return self.transform(_TransformFirstClosure(fn), lazy)
|
python
|
def transform_first(self, fn, lazy=True):
"""Returns a new dataset with the first element of each sample
transformed by the transformer function `fn`.
This is useful, for example, when you only want to transform data
while keeping label as is.
Parameters
----------
fn : callable
A transformer function that takes the first elemtn of a sample
as input and returns the transformed element.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
"""
return self.transform(_TransformFirstClosure(fn), lazy)
|
[
"def",
"transform_first",
"(",
"self",
",",
"fn",
",",
"lazy",
"=",
"True",
")",
":",
"return",
"self",
".",
"transform",
"(",
"_TransformFirstClosure",
"(",
"fn",
")",
",",
"lazy",
")"
] |
Returns a new dataset with the first element of each sample
transformed by the transformer function `fn`.
This is useful, for example, when you only want to transform data
while keeping label as is.
Parameters
----------
fn : callable
A transformer function that takes the first elemtn of a sample
as input and returns the transformed element.
lazy : bool, default True
If False, transforms all samples at once. Otherwise,
transforms each sample on demand. Note that if `fn`
is stochastic, you must set lazy to True or you will
get the same result on all epochs.
Returns
-------
Dataset
The transformed dataset.
|
[
"Returns",
"a",
"new",
"dataset",
"with",
"the",
"first",
"element",
"of",
"each",
"sample",
"transformed",
"by",
"the",
"transformer",
"function",
"fn",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/gluon/data/dataset.py#L68-L91
|
train
|
Returns a new dataset with the first element of each sample
transformed by the transformer function fn.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,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Error,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b110010) + chr(0b1001 + 0o50), 0b1000), ehT0Px3KOsy9(chr(918 - 870) + '\x6f' + '\x33' + chr(0b110 + 0o55) + chr(0b101 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101111 + 0o2) + chr(0b110101) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(1757 - 1705) + '\x33', 0b1000), ehT0Px3KOsy9(chr(745 - 697) + chr(0b1101111) + '\061' + chr(0b1 + 0o64) + chr(0b110100), 40532 - 40524), ehT0Px3KOsy9(chr(0b110000) + chr(7167 - 7056) + chr(49) + '\x31' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(0b10001 + 0o40) + chr(75 - 26) + chr(0b11110 + 0o25), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b11110 + 0o121) + chr(0b110001 + 0o1) + '\x37' + chr(0b11011 + 0o26), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\x30' + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(3788 - 3677) + chr(0b111 + 0o54) + chr(0b110001 + 0o6) + '\x31', 18034 - 18026), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(51) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + '\067' + chr(55), 0b1000), ehT0Px3KOsy9(chr(167 - 119) + chr(2851 - 2740) + '\x31' + chr(0b110010) + chr(51), 0b1000), ehT0Px3KOsy9(chr(2207 - 2159) + '\157' + chr(0b100110 + 0o15) + chr(54) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(100 - 52) + chr(578 - 467) + '\062' + chr(53) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\062' + chr(0b110110) + chr(0b110001), 32227 - 32219), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(50) + chr(54) + chr(0b100011 + 0o22), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(366 - 316) + chr(0b10011 + 0o35) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\066' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(6261 - 6150) + chr(51) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\x37' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(324 - 213) + '\x33' + chr(2179 - 2129) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(49) + chr(0b110010 + 0o2) + chr(2175 - 2124), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(0b110010) + '\x36' + chr(50), 57025 - 57017), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + chr(1362 - 1313) + chr(0b11100 + 0o25) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10110 + 0o36) + chr(0b1011 + 0o46), 0b1000), ehT0Px3KOsy9(chr(784 - 736) + chr(11208 - 11097) + chr(658 - 607) + chr(55) + chr(244 - 196), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100000 + 0o117) + chr(1202 - 1151) + chr(287 - 237) + chr(0b110100), 32942 - 32934), ehT0Px3KOsy9(chr(2200 - 2152) + chr(0b1101111) + '\061' + chr(0b11111 + 0o26) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(788 - 740) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b110100), 8), ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + chr(1578 - 1528) + chr(513 - 465) + chr(562 - 508), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + '\x32' + chr(757 - 709) + chr(52), 0b1000), ehT0Px3KOsy9(chr(2089 - 2041) + chr(111) + '\063' + '\063' + chr(2111 - 2060), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110010) + '\x32' + chr(0b110001 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(4763 - 4652) + '\061' + chr(0b110110) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(768 - 657) + '\x32' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + chr(0b100011 + 0o22) + chr(48), 11845 - 11837), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\061' + chr(1576 - 1525) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + '\066' + '\x32', 211 - 203), ehT0Px3KOsy9(chr(1829 - 1781) + '\x6f' + chr(53) + chr(0b110010), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(10261 - 10150) + '\065' + chr(0b10111 + 0o31), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xff'), '\x64' + chr(4921 - 4820) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1011001 + 0o14))(chr(0b1110101) + '\164' + '\146' + '\055' + chr(406 - 350)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def cy2UxkDfN2lb(oVre8I6UXc3b, wDsB9Ho570J9, l7fBk51Hp1xn=ehT0Px3KOsy9(chr(48) + chr(0b1111 + 0o140) + chr(0b1101 + 0o44), 0b1000)):
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xa8\x08\x8d\x1f*$\xcb\xab'), '\144' + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1010101 + 0o21) + '\x2d' + '\x38'))(xS_6WUR8XuQq(wDsB9Ho570J9), l7fBk51Hp1xn)
|
apache/incubator-mxnet
|
example/ctc/ocr_predict.py
|
lstm_ocr_model.forward_ocr
|
def forward_ocr(self, img_):
"""Forward the image through the LSTM network model
Parameters
----------
img_: int of array
Returns
----------
label_list: string of list
"""
img_ = cv2.resize(img_, (80, 30))
img_ = img_.transpose(1, 0)
print(img_.shape)
img_ = img_.reshape((1, 80, 30))
print(img_.shape)
# img_ = img_.reshape((80 * 30))
img_ = np.multiply(img_, 1 / 255.0)
self.predictor.forward(data=img_, **self.init_state_dict)
prob = self.predictor.get_output(0)
label_list = []
for p in prob:
print(np.argsort(p))
max_index = np.argsort(p)[::-1][0]
label_list.append(max_index)
return self.__get_string(label_list)
|
python
|
def forward_ocr(self, img_):
"""Forward the image through the LSTM network model
Parameters
----------
img_: int of array
Returns
----------
label_list: string of list
"""
img_ = cv2.resize(img_, (80, 30))
img_ = img_.transpose(1, 0)
print(img_.shape)
img_ = img_.reshape((1, 80, 30))
print(img_.shape)
# img_ = img_.reshape((80 * 30))
img_ = np.multiply(img_, 1 / 255.0)
self.predictor.forward(data=img_, **self.init_state_dict)
prob = self.predictor.get_output(0)
label_list = []
for p in prob:
print(np.argsort(p))
max_index = np.argsort(p)[::-1][0]
label_list.append(max_index)
return self.__get_string(label_list)
|
[
"def",
"forward_ocr",
"(",
"self",
",",
"img_",
")",
":",
"img_",
"=",
"cv2",
".",
"resize",
"(",
"img_",
",",
"(",
"80",
",",
"30",
")",
")",
"img_",
"=",
"img_",
".",
"transpose",
"(",
"1",
",",
"0",
")",
"print",
"(",
"img_",
".",
"shape",
")",
"img_",
"=",
"img_",
".",
"reshape",
"(",
"(",
"1",
",",
"80",
",",
"30",
")",
")",
"print",
"(",
"img_",
".",
"shape",
")",
"# img_ = img_.reshape((80 * 30))",
"img_",
"=",
"np",
".",
"multiply",
"(",
"img_",
",",
"1",
"/",
"255.0",
")",
"self",
".",
"predictor",
".",
"forward",
"(",
"data",
"=",
"img_",
",",
"*",
"*",
"self",
".",
"init_state_dict",
")",
"prob",
"=",
"self",
".",
"predictor",
".",
"get_output",
"(",
"0",
")",
"label_list",
"=",
"[",
"]",
"for",
"p",
"in",
"prob",
":",
"print",
"(",
"np",
".",
"argsort",
"(",
"p",
")",
")",
"max_index",
"=",
"np",
".",
"argsort",
"(",
"p",
")",
"[",
":",
":",
"-",
"1",
"]",
"[",
"0",
"]",
"label_list",
".",
"append",
"(",
"max_index",
")",
"return",
"self",
".",
"__get_string",
"(",
"label_list",
")"
] |
Forward the image through the LSTM network model
Parameters
----------
img_: int of array
Returns
----------
label_list: string of list
|
[
"Forward",
"the",
"image",
"through",
"the",
"LSTM",
"network",
"model"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ctc/ocr_predict.py#L63-L88
|
train
|
Forward the image through the LSTM network model and return the label list of the entries in the label list.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,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R_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110011) + chr(51) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(10859 - 10748) + '\061' + '\066' + chr(1223 - 1170), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\067' + chr(48), 23314 - 23306), ehT0Px3KOsy9('\060' + chr(0b1000 + 0o147) + '\062' + '\066' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + '\x31' + chr(0b110111) + chr(0b1100 + 0o50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110100 + 0o2) + chr(2487 - 2436), 0o10), ehT0Px3KOsy9(chr(295 - 247) + '\157' + '\x33' + '\060' + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(53) + chr(736 - 681), 50637 - 50629), ehT0Px3KOsy9(chr(508 - 460) + chr(0b1011001 + 0o26) + chr(50) + '\x35' + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011011 + 0o24) + chr(0b101101 + 0o5) + '\065', 62785 - 62777), ehT0Px3KOsy9('\x30' + chr(6875 - 6764) + chr(2018 - 1969) + '\x33' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x35' + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x35' + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\065' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11110 + 0o121) + chr(258 - 207) + chr(2660 - 2608) + chr(0b110110), 29276 - 29268), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2201 - 2146) + chr(52), 16581 - 16573), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b10000 + 0o42) + '\067' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b110011) + chr(0b1111 + 0o50) + chr(0b10111 + 0o37), 62482 - 62474), ehT0Px3KOsy9(chr(48) + chr(0b1001100 + 0o43) + chr(49) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6612 - 6501) + chr(2164 - 2114) + '\060' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7721 - 7610) + chr(1385 - 1334) + chr(49) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8902 - 8791) + chr(1342 - 1293) + chr(0b100 + 0o57) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\064' + chr(0b11010 + 0o26), 41450 - 41442), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101000 + 0o17) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001100 + 0o43) + chr(0b110010) + chr(0b110111) + chr(1022 - 971), 0o10), ehT0Px3KOsy9(chr(48) + chr(5936 - 5825) + '\062' + chr(1274 - 1220) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1436 - 1385) + chr(2490 - 2437), 22584 - 22576), ehT0Px3KOsy9(chr(48) + chr(980 - 869) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1949 - 1898) + chr(0b100000 + 0o26) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000 + 0o2) + '\x36' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(2752 - 2641) + '\x36' + chr(54), 8185 - 8177), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(1192 - 1142) + chr(1924 - 1869) + chr(0b110100), 29947 - 29939), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\061' + chr(49) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + '\062' + chr(0b110101) + '\066', 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b100111 + 0o110) + '\063' + '\064' + chr(1053 - 1002), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(562 - 511) + '\065' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + '\064' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(50) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\x32' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + '\x31' + chr(53) + chr(0b110001), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(954 - 906) + '\x6f' + chr(53) + chr(1864 - 1816), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3'), '\x64' + chr(0b11101 + 0o110) + chr(3246 - 3147) + chr(4420 - 4309) + '\x64' + '\145')('\165' + chr(0b111101 + 0o67) + chr(102) + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def hTBAQg0nNONT(oVre8I6UXc3b, wDkOkjTaGAym):
wDkOkjTaGAym = KJXrc9aHu3IJ.resize(wDkOkjTaGAym, (ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(50) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100100 + 0o17) + '\x36', 0o10)))
wDkOkjTaGAym = wDkOkjTaGAym.transpose(ehT0Px3KOsy9(chr(48) + chr(8518 - 8407) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1439 - 1391) + chr(111) + chr(0b110000), ord("\x08")))
zLUzGokYBM2Z(xafqLlk3kkUe(wDkOkjTaGAym, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x14M\xe8\x1a\x7f\xa3\xc3\xfae8\x0f'), chr(100) + chr(101) + chr(8281 - 8182) + '\x6f' + '\144' + chr(0b111101 + 0o50))(chr(0b1110101) + chr(0b111010 + 0o72) + chr(102) + chr(0b101101) + chr(2556 - 2500))))
wDkOkjTaGAym = wDkOkjTaGAym.reshape((ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(6413 - 6302) + '\061' + chr(0b100100 + 0o16) + '\x30', 8), ehT0Px3KOsy9('\x30' + chr(4762 - 4651) + chr(51) + '\x36', 8)))
zLUzGokYBM2Z(xafqLlk3kkUe(wDkOkjTaGAym, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x14M\xe8\x1a\x7f\xa3\xc3\xfae8\x0f'), chr(100) + chr(101) + '\143' + '\157' + '\144' + chr(101))('\x75' + '\164' + chr(2944 - 2842) + chr(0b101100 + 0o1) + chr(56))))
wDkOkjTaGAym = WqUC3KWvYVup.multiply(wDkOkjTaGAym, ehT0Px3KOsy9('\060' + '\x6f' + '\061', 8) / 255.0)
xafqLlk3kkUe(oVre8I6UXc3b.predictor, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\x17Z\xd2?{\x91\xe1\xe8X1X'), chr(2225 - 2125) + '\145' + chr(4173 - 4074) + chr(0b1010001 + 0o36) + chr(100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(56)))(data=wDkOkjTaGAym, **xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4\x1bQ\xc5#@\xb0\xce\xdap\x04\t\xc2\x8e\x92'), '\144' + '\x65' + '\x63' + chr(111) + chr(3348 - 3248) + chr(5202 - 5101))(chr(0b10011 + 0o142) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(583 - 527))))
EmFjc7khMaAc = oVre8I6UXc3b.predictor.get_output(ehT0Px3KOsy9('\060' + chr(111) + '\060', 8))
vfm3yqdi6BGN = []
for UyakMW2IMFEj in EmFjc7khMaAc:
zLUzGokYBM2Z(xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\x07_\xc2\x13A\xb0'), '\144' + chr(0b1100101) + chr(99) + chr(0b1001110 + 0o41) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + '\070'))(UyakMW2IMFEj))
WzS6HyMbnYkc = WqUC3KWvYVup.argsort(UyakMW2IMFEj)[::-ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49), 8)][ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(48), 8)]
xafqLlk3kkUe(vfm3yqdi6BGN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\x05H\xd4\x12W'), chr(100) + chr(2360 - 2259) + chr(99) + chr(0b1001011 + 0o44) + chr(0b1100100) + '\145')(chr(0b111110 + 0o67) + '\164' + chr(0b1100110) + chr(0b10 + 0o53) + '\x38'))(WzS6HyMbnYkc)
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x82*_\xd4\x08l\xb7\xdb\xdc|5\n'), chr(0b1100100) + chr(0b1011001 + 0o14) + chr(3205 - 3106) + '\157' + chr(100) + chr(101))('\x75' + chr(8808 - 8692) + chr(10384 - 10282) + chr(1234 - 1189) + chr(0b111000)))(vfm3yqdi6BGN)
|
apache/incubator-mxnet
|
tools/caffe_converter/caffe_parser.py
|
read_prototxt
|
def read_prototxt(fname):
"""Return a caffe_pb2.NetParameter object that defined in a prototxt file
"""
proto = caffe_pb2.NetParameter()
with open(fname, 'r') as f:
text_format.Merge(str(f.read()), proto)
return proto
|
python
|
def read_prototxt(fname):
"""Return a caffe_pb2.NetParameter object that defined in a prototxt file
"""
proto = caffe_pb2.NetParameter()
with open(fname, 'r') as f:
text_format.Merge(str(f.read()), proto)
return proto
|
[
"def",
"read_prototxt",
"(",
"fname",
")",
":",
"proto",
"=",
"caffe_pb2",
".",
"NetParameter",
"(",
")",
"with",
"open",
"(",
"fname",
",",
"'r'",
")",
"as",
"f",
":",
"text_format",
".",
"Merge",
"(",
"str",
"(",
"f",
".",
"read",
"(",
")",
")",
",",
"proto",
")",
"return",
"proto"
] |
Return a caffe_pb2.NetParameter object that defined in a prototxt file
|
[
"Return",
"a",
"caffe_pb2",
".",
"NetParameter",
"object",
"that",
"defined",
"in",
"a",
"prototxt",
"file"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/tools/caffe_converter/caffe_parser.py#L34-L40
|
train
|
Read a caffe_pb2. NetParameter object that defined in a prototxt file
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn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CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1029 - 981) + chr(0b1101111) + chr(55) + chr(0b101010 + 0o7), 0o10), ehT0Px3KOsy9(chr(1745 - 1697) + chr(0b1101111) + chr(0b110001) + '\065' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1003 - 955) + chr(111) + chr(51) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + '\063' + chr(337 - 288) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x34' + chr(1689 - 1634), 13633 - 13625), ehT0Px3KOsy9('\x30' + chr(9230 - 9119) + '\x32' + chr(0b110010) + chr(0b0 + 0o63), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(993 - 882) + '\062' + chr(1184 - 1134) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x33' + chr(0b110100), 39401 - 39393), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(50) + chr(48), 0o10), ehT0Px3KOsy9(chr(786 - 738) + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b110000 + 0o0) + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b100010 + 0o24) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\x34' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b110000) + chr(50), 0b1000), ehT0Px3KOsy9(chr(355 - 307) + '\157' + chr(51) + chr(0b110101) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(251 - 202) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2304 - 2254) + chr(1323 - 1273) + '\067', 43581 - 43573), ehT0Px3KOsy9(chr(48) + chr(12096 - 11985) + chr(2067 - 2016) + '\x33' + chr(0b11110 + 0o27), 24199 - 24191), ehT0Px3KOsy9('\x30' + chr(3897 - 3786) + chr(2322 - 2271) + chr(54) + chr(0b101000 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110100 + 0o73) + chr(0b110000 + 0o7), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111000 + 0o67) + chr(0b110001) + '\060' + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11010 + 0o27) + chr(0b110111), 723 - 715), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(54) + chr(0b1011 + 0o51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110010) + chr(0b11000 + 0o35) + chr(201 - 151), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b110011) + chr(48), 0b1000), ehT0Px3KOsy9(chr(896 - 848) + chr(111) + '\x33' + '\x36' + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\065' + chr(604 - 551), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + chr(1345 - 1294) + '\x37' + chr(0b10101 + 0o40), 0b1000), ehT0Px3KOsy9(chr(1044 - 996) + '\x6f' + chr(49) + chr(49) + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(1094 - 983) + '\x32' + '\064' + chr(0b110000 + 0o2), 0b1000), ehT0Px3KOsy9(chr(1253 - 1205) + chr(111) + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b10010 + 0o37) + '\x37', 46666 - 46658), ehT0Px3KOsy9('\060' + '\x6f' + chr(2350 - 2300) + chr(0b110001) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10011 + 0o40) + chr(0b11010 + 0o35) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9951 - 9840) + chr(314 - 263) + chr(769 - 716) + '\062', 6174 - 6166), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(50) + '\x33', 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(49) + '\063' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b1001 + 0o50) + '\060' + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + chr(294 - 183) + chr(0b101101 + 0o5) + chr(52) + chr(0b10110 + 0o41), 0o10), ehT0Px3KOsy9(chr(1617 - 1569) + '\157' + chr(50) + chr(0b10011 + 0o35) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1822 - 1774) + chr(111) + chr(0b100010 + 0o25) + '\x37', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(5943 - 5832) + '\x35' + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x17'), chr(0b1011010 + 0o12) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(117) + '\164' + '\x66' + chr(0b11111 + 0o16) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def t0VFX8p01LzF(t3WbF0Ae42Pu):
EjgP3Uo4AYh3 = mZRfXumBxS_C.NetParameter()
with _fwkIVCGgtAN(t3WbF0Ae42Pu, xafqLlk3kkUe(SXOLrMavuUCe(b'K'), '\144' + chr(0b1100101) + chr(99) + chr(8435 - 8324) + chr(0b1011101 + 0o7) + '\x65')(chr(0b10001 + 0o144) + '\164' + chr(0b1100110) + chr(0b101 + 0o50) + chr(1405 - 1349))) as EGyt1xfPT1P6:
xafqLlk3kkUe(nPPIdDq5p8yL, xafqLlk3kkUe(SXOLrMavuUCe(b't\x0ck\xaa\x02'), '\144' + chr(101) + '\143' + chr(9449 - 9338) + chr(100) + chr(101))('\x75' + '\164' + '\146' + '\x2d' + '\x38'))(M8_cKLkHVB2V(xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'l_T\xa40\xe1\xf9\xe9\x93\xac\x85<'), chr(0b1100100) + chr(0b1111 + 0o126) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(3588 - 3487))(chr(117) + '\164' + '\146' + chr(45) + '\070'))()), EjgP3Uo4AYh3)
return EjgP3Uo4AYh3
|
apache/incubator-mxnet
|
tools/caffe_converter/caffe_parser.py
|
get_layers
|
def get_layers(proto):
"""Returns layers in a caffe_pb2.NetParameter object
"""
if len(proto.layer):
return proto.layer
elif len(proto.layers):
return proto.layers
else:
raise ValueError('Invalid proto file.')
|
python
|
def get_layers(proto):
"""Returns layers in a caffe_pb2.NetParameter object
"""
if len(proto.layer):
return proto.layer
elif len(proto.layers):
return proto.layers
else:
raise ValueError('Invalid proto file.')
|
[
"def",
"get_layers",
"(",
"proto",
")",
":",
"if",
"len",
"(",
"proto",
".",
"layer",
")",
":",
"return",
"proto",
".",
"layer",
"elif",
"len",
"(",
"proto",
".",
"layers",
")",
":",
"return",
"proto",
".",
"layers",
"else",
":",
"raise",
"ValueError",
"(",
"'Invalid proto file.'",
")"
] |
Returns layers in a caffe_pb2.NetParameter object
|
[
"Returns",
"layers",
"in",
"a",
"caffe_pb2",
".",
"NetParameter",
"object"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/tools/caffe_converter/caffe_parser.py#L42-L50
|
train
|
Returns layers in a caffe_pb2. NetParameter object
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTst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tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(1161 - 1108), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b11010 + 0o26) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + '\x32' + chr(49) + chr(142 - 94), 5984 - 5976), ehT0Px3KOsy9(chr(48) + '\157' + chr(434 - 384) + chr(0b101100 + 0o6) + '\x33', 22385 - 22377), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(1631 - 1580) + chr(2670 - 2618) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101111 + 0o4) + chr(0b100111 + 0o14) + chr(0b1111 + 0o46), 35966 - 35958), ehT0Px3KOsy9(chr(1082 - 1034) + '\x6f' + '\061' + chr(0b101101 + 0o7), 41192 - 41184), ehT0Px3KOsy9('\060' + '\157' + chr(55) + chr(0b101111 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + chr(0b101000 + 0o107) + chr(0b110010) + '\x35' + chr(0b11111 + 0o24), 36754 - 36746), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b1111 + 0o45) + chr(0b1011 + 0o46), 0b1000), ehT0Px3KOsy9(chr(1792 - 1744) + '\157' + chr(0b11001 + 0o32) + chr(0b110110) + chr(753 - 699), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(49) + chr(0b110100), 10819 - 10811), ehT0Px3KOsy9(chr(2236 - 2188) + chr(111) + chr(0b110010) + chr(54) + chr(0b11011 + 0o32), 60217 - 60209), ehT0Px3KOsy9('\060' + '\157' + chr(52) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(12156 - 12045) + chr(0b110011 + 0o0) + chr(0b110100) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(50) + chr(621 - 567) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + '\x33' + chr(55) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8219 - 8108) + '\x31' + '\x35' + chr(0b110000 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b101001 + 0o106) + chr(51) + chr(51) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(941 - 893) + chr(111) + chr(1498 - 1447) + chr(2400 - 2351) + '\065', 0b1000), ehT0Px3KOsy9(chr(2157 - 2109) + '\157' + chr(0b110000), 51681 - 51673), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1100 + 0o47) + chr(54) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(50) + chr(439 - 390), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o67) + chr(2600 - 2548), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110000) + chr(1317 - 1263), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(0b110010) + chr(101 - 47) + chr(50), 22879 - 22871), ehT0Px3KOsy9('\x30' + chr(4828 - 4717) + chr(50) + chr(53) + chr(1618 - 1570), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(1340 - 1291) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + '\060' + chr(49), 25657 - 25649), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + chr(134 - 85) + '\x37' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(1260 - 1205), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1969 - 1858) + chr(0b100010 + 0o20) + chr(0b110101) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b111 + 0o53) + chr(0b11001 + 0o31) + chr(1855 - 1801), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110111) + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(0b110011) + chr(48) + chr(1523 - 1475), 26707 - 26699), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(49) + chr(2576 - 2525), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(936 - 825) + chr(49) + chr(2696 - 2641) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(895 - 847) + chr(0b110010 + 0o75) + '\062' + chr(0b110100) + chr(0b111 + 0o54), 27194 - 27186), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(1312 - 1260) + '\063', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(53) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(100) + '\x65' + chr(2642 - 2543) + chr(0b1101111) + chr(0b1111 + 0o125) + chr(0b1100101))('\x75' + chr(116) + '\x66' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def o3g82qjbKnlP(EjgP3Uo4AYh3):
if c2A0yzQpDQB3(xafqLlk3kkUe(EjgP3Uo4AYh3, xafqLlk3kkUe(SXOLrMavuUCe(b'b"\xe9\xfe\xac\x95|N\xd8\x91\xaeA'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1001011 + 0o31) + '\145')(chr(117) + chr(0b1110100) + chr(7993 - 7891) + '\055' + '\070'))):
return xafqLlk3kkUe(EjgP3Uo4AYh3, xafqLlk3kkUe(SXOLrMavuUCe(b'b"\xe9\xfe\xac\x95|N\xd8\x91\xaeA'), chr(0b1100100 + 0o0) + chr(0b1100001 + 0o4) + chr(0b101 + 0o136) + '\157' + chr(0b11111 + 0o105) + '\x65')(chr(0b1101110 + 0o7) + chr(0b1110100) + chr(0b1100001 + 0o5) + '\x2d' + '\070'))
elif c2A0yzQpDQB3(xafqLlk3kkUe(EjgP3Uo4AYh3, xafqLlk3kkUe(SXOLrMavuUCe(b'f\x02\xe1\xa6\xa3\xac`\x0c\x98\xac\x97R'), chr(0b1100 + 0o130) + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100011 + 0o1) + '\145')('\x75' + chr(0b1110100) + chr(0b101110 + 0o70) + chr(2019 - 1974) + chr(2802 - 2746)))):
return xafqLlk3kkUe(EjgP3Uo4AYh3, xafqLlk3kkUe(SXOLrMavuUCe(b'f\x02\xe1\xa6\xa3\xac`\x0c\x98\xac\x97R'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + chr(5401 - 5299) + chr(45) + '\x38'))
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\\+\xfe\xf2\x8e\xb4h\x1e\xdb\x93\x99_#\x95B\x8a\xda\x9fF'), chr(0b1100100) + chr(2147 - 2046) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1001001 + 0o34))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + '\x38'))
|
apache/incubator-mxnet
|
tools/caffe_converter/caffe_parser.py
|
read_caffemodel
|
def read_caffemodel(prototxt_fname, caffemodel_fname):
"""Return a caffe_pb2.NetParameter object that defined in a binary
caffemodel file
"""
if use_caffe:
caffe.set_mode_cpu()
net = caffe.Net(prototxt_fname, caffemodel_fname, caffe.TEST)
layer_names = net._layer_names
layers = net.layers
return (layers, layer_names)
else:
proto = caffe_pb2.NetParameter()
with open(caffemodel_fname, 'rb') as f:
proto.ParseFromString(f.read())
return (get_layers(proto), None)
|
python
|
def read_caffemodel(prototxt_fname, caffemodel_fname):
"""Return a caffe_pb2.NetParameter object that defined in a binary
caffemodel file
"""
if use_caffe:
caffe.set_mode_cpu()
net = caffe.Net(prototxt_fname, caffemodel_fname, caffe.TEST)
layer_names = net._layer_names
layers = net.layers
return (layers, layer_names)
else:
proto = caffe_pb2.NetParameter()
with open(caffemodel_fname, 'rb') as f:
proto.ParseFromString(f.read())
return (get_layers(proto), None)
|
[
"def",
"read_caffemodel",
"(",
"prototxt_fname",
",",
"caffemodel_fname",
")",
":",
"if",
"use_caffe",
":",
"caffe",
".",
"set_mode_cpu",
"(",
")",
"net",
"=",
"caffe",
".",
"Net",
"(",
"prototxt_fname",
",",
"caffemodel_fname",
",",
"caffe",
".",
"TEST",
")",
"layer_names",
"=",
"net",
".",
"_layer_names",
"layers",
"=",
"net",
".",
"layers",
"return",
"(",
"layers",
",",
"layer_names",
")",
"else",
":",
"proto",
"=",
"caffe_pb2",
".",
"NetParameter",
"(",
")",
"with",
"open",
"(",
"caffemodel_fname",
",",
"'rb'",
")",
"as",
"f",
":",
"proto",
".",
"ParseFromString",
"(",
"f",
".",
"read",
"(",
")",
")",
"return",
"(",
"get_layers",
"(",
"proto",
")",
",",
"None",
")"
] |
Return a caffe_pb2.NetParameter object that defined in a binary
caffemodel file
|
[
"Return",
"a",
"caffe_pb2",
".",
"NetParameter",
"object",
"that",
"defined",
"in",
"a",
"binary",
"caffemodel",
"file"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/tools/caffe_converter/caffe_parser.py#L52-L66
|
train
|
Return a caffe_pb2. NetParameter object that defined in a binary caffemodel file
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2H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,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(5167 - 5056) + chr(0b100 + 0o56) + chr(0b10101 + 0o35) + chr(1664 - 1612), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10001 + 0o44) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(0b0 + 0o63) + '\063' + chr(0b101 + 0o61), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1862 - 1813) + '\064' + chr(0b10110 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + '\064' + chr(0b10011 + 0o35), 0o10), ehT0Px3KOsy9(chr(111 - 63) + chr(111) + '\x31' + chr(2244 - 2195) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111010 + 0o65) + chr(1853 - 1804) + chr(0b11010 + 0o31) + chr(0b100 + 0o55), 9318 - 9310), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(52) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(48) + chr(2364 - 2309), 932 - 924), ehT0Px3KOsy9(chr(1223 - 1175) + chr(111) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(2343 - 2294) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\063' + chr(0b0 + 0o66), 7428 - 7420), ehT0Px3KOsy9(chr(656 - 608) + chr(0b1101111) + '\x32' + '\x36' + chr(0b110000), 55429 - 55421), ehT0Px3KOsy9('\060' + chr(7822 - 7711) + chr(0b110100) + '\060', 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(0b110011) + '\x37' + chr(427 - 372), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110011) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b1010011 + 0o34) + chr(0b110001) + chr(1298 - 1243) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1 + 0o61) + '\x36' + chr(0b110000 + 0o7), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101010 + 0o10) + chr(1675 - 1626) + chr(0b11101 + 0o25), 0o10), ehT0Px3KOsy9(chr(870 - 822) + '\157' + chr(0b110011) + '\063' + chr(2400 - 2349), 32164 - 32156), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(2652 - 2600) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(11560 - 11449) + chr(0b110001) + chr(1038 - 984) + chr(595 - 540), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b10010 + 0o135) + chr(1650 - 1597) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10148 - 10037) + chr(0b110010) + '\064' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101101 + 0o6) + chr(53) + chr(0b10011 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(1317 - 1269) + chr(0b1001110 + 0o41) + chr(967 - 918) + chr(0b10101 + 0o41), 7549 - 7541), ehT0Px3KOsy9(chr(0b110000) + chr(3275 - 3164) + '\062' + chr(539 - 486) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x32' + chr(956 - 903), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + chr(0b1110 + 0o44) + chr(0b110110) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b11100 + 0o27) + chr(2269 - 2217), 2484 - 2476), ehT0Px3KOsy9(chr(0b110000) + chr(4700 - 4589) + chr(49) + '\066', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101101 + 0o4) + chr(0b100100 + 0o15) + chr(0b110101 + 0o2), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\x32' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(3632 - 3521) + chr(51) + chr(439 - 390) + chr(0b110011), 18847 - 18839), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\063' + chr(0b110010) + chr(1484 - 1435), ord("\x08")), ehT0Px3KOsy9(chr(929 - 881) + chr(11963 - 11852) + chr(2430 - 2379) + chr(51) + chr(1370 - 1320), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b110010) + chr(388 - 340) + chr(0b1010 + 0o50), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(2159 - 2104) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11011 + 0o124) + chr(164 - 112) + chr(49), 22355 - 22347)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\065' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xba'), chr(0b1100100) + chr(0b100101 + 0o100) + '\143' + chr(0b11111 + 0o120) + chr(4776 - 4676) + '\x65')(chr(0b1001000 + 0o55) + chr(10224 - 10108) + chr(102) + chr(45) + chr(0b10 + 0o66)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def tuBMKn9mtSvY(K7CT4b1_DoTc, rjjGB7Ve9o7H):
if ioH_pHoOwsph:
xafqLlk3kkUe(zxY_Snv8Hi5Q, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7M\xaa;M =\x06\xd8b\xba\xeb'), chr(6773 - 6673) + chr(0b1100101) + chr(0b1100011) + chr(8183 - 8072) + chr(0b1100000 + 0o4) + '\145')(chr(0b1110101) + chr(116) + '\146' + '\x2d' + chr(0b11001 + 0o37)))()
DyzboKL9cczb = zxY_Snv8Hi5Q.Net(K7CT4b1_DoTc, rjjGB7Ve9o7H, zxY_Snv8Hi5Q.TEST)
cer2l_8reHfd = DyzboKL9cczb._layer_names
sGi5Aql23May = DyzboKL9cczb.sGi5Aql23May
return (sGi5Aql23May, cer2l_8reHfd)
else:
EjgP3Uo4AYh3 = mZRfXumBxS_C.NetParameter()
with _fwkIVCGgtAN(rjjGB7Ve9o7H, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6J'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(2171 - 2060) + chr(0b1100001 + 0o3) + chr(1692 - 1591))('\x75' + '\x74' + chr(0b1001111 + 0o27) + chr(45) + chr(56))) as EGyt1xfPT1P6:
xafqLlk3kkUe(EjgP3Uo4AYh3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc4I\xac\x17E\t+\x0c\xeaR\xbe\xec\xd9N\x98'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\145')('\x75' + '\x74' + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x1e\x93\rw=1\x16\xc4h\xf8\xc7'), chr(1492 - 1392) + chr(101) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(7535 - 7418) + chr(7246 - 7130) + '\x66' + chr(45) + '\x38'))())
return (o3g82qjbKnlP(EjgP3Uo4AYh3), None)
|
apache/incubator-mxnet
|
tools/caffe_converter/caffe_parser.py
|
layer_iter
|
def layer_iter(layers, layer_names):
"""Iterate over all layers"""
if use_caffe:
for layer_idx, layer in enumerate(layers):
layer_name = re.sub('[-/]', '_', layer_names[layer_idx])
layer_type = layer.type
layer_blobs = layer.blobs
yield (layer_name, layer_type, layer_blobs)
else:
for layer in layers:
layer_name = re.sub('[-/]', '_', layer.name)
layer_type = layer.type
layer_blobs = layer.blobs
yield (layer_name, layer_type, layer_blobs)
|
python
|
def layer_iter(layers, layer_names):
"""Iterate over all layers"""
if use_caffe:
for layer_idx, layer in enumerate(layers):
layer_name = re.sub('[-/]', '_', layer_names[layer_idx])
layer_type = layer.type
layer_blobs = layer.blobs
yield (layer_name, layer_type, layer_blobs)
else:
for layer in layers:
layer_name = re.sub('[-/]', '_', layer.name)
layer_type = layer.type
layer_blobs = layer.blobs
yield (layer_name, layer_type, layer_blobs)
|
[
"def",
"layer_iter",
"(",
"layers",
",",
"layer_names",
")",
":",
"if",
"use_caffe",
":",
"for",
"layer_idx",
",",
"layer",
"in",
"enumerate",
"(",
"layers",
")",
":",
"layer_name",
"=",
"re",
".",
"sub",
"(",
"'[-/]'",
",",
"'_'",
",",
"layer_names",
"[",
"layer_idx",
"]",
")",
"layer_type",
"=",
"layer",
".",
"type",
"layer_blobs",
"=",
"layer",
".",
"blobs",
"yield",
"(",
"layer_name",
",",
"layer_type",
",",
"layer_blobs",
")",
"else",
":",
"for",
"layer",
"in",
"layers",
":",
"layer_name",
"=",
"re",
".",
"sub",
"(",
"'[-/]'",
",",
"'_'",
",",
"layer",
".",
"name",
")",
"layer_type",
"=",
"layer",
".",
"type",
"layer_blobs",
"=",
"layer",
".",
"blobs",
"yield",
"(",
"layer_name",
",",
"layer_type",
",",
"layer_blobs",
")"
] |
Iterate over all layers
|
[
"Iterate",
"over",
"all",
"layers"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/tools/caffe_converter/caffe_parser.py#L68-L81
|
train
|
Iterate over all layers in a list.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl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ertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(182 - 134) + chr(0b1101111) + '\061' + '\064' + chr(0b100 + 0o57), 12137 - 12129), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b100 + 0o153) + chr(0b10010 + 0o43) + chr(0b1 + 0o62), 0b1000), ehT0Px3KOsy9('\060' + chr(1768 - 1657) + '\062' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + chr(1829 - 1774) + chr(2168 - 2114), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110111) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1301 - 1251) + chr(55) + chr(626 - 571), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\x31' + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\064' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1767 - 1719) + chr(0b1101111) + chr(54) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + '\067' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(1206 - 1158) + '\157' + chr(0b110010) + chr(0b110110) + chr(0b101110 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2458 - 2347) + chr(49) + chr(0b11101 + 0o27) + chr(53), 35661 - 35653), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110111) + chr(881 - 829), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1011 + 0o47) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\x35' + '\067', 8), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + '\061' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1998 - 1950) + chr(0b1011100 + 0o23) + chr(1321 - 1270) + chr(1214 - 1163) + '\x36', 58561 - 58553), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b10101 + 0o132) + chr(0b110001) + '\x31' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110001) + chr(0b110110 + 0o0), 0b1000), ehT0Px3KOsy9(chr(1825 - 1777) + '\157' + chr(0b100 + 0o56) + chr(0b101111 + 0o1) + '\x33', 61453 - 61445), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(344 - 293) + chr(0b100 + 0o57) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(54) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110011) + chr(54), 8), ehT0Px3KOsy9('\060' + chr(256 - 145) + '\061' + chr(1298 - 1245) + chr(49), 19515 - 19507), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x33' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(0b110010) + chr(1073 - 1020), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(0b110010) + '\x34' + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + '\062' + chr(1115 - 1060) + chr(0b1100 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(1336 - 1288) + '\x33', 0o10), ehT0Px3KOsy9(chr(1906 - 1858) + chr(0b1000111 + 0o50) + chr(51) + chr(53) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(1445 - 1391) + '\x34', 49415 - 49407), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(2111 - 2057) + chr(522 - 469), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11110 + 0o26) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x32' + chr(0b110101) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(761 - 711) + chr(0b110110) + chr(51), 8), ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + chr(227 - 176) + chr(1452 - 1402) + chr(699 - 648), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(49) + chr(1375 - 1320) + chr(0b100011 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(108 - 60) + '\157' + chr(572 - 522) + chr(0b11011 + 0o25) + chr(52), 40057 - 40049), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\x32' + '\x35' + '\063', 8), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + chr(424 - 375) + '\062', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(0b11001 + 0o34) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'M'), '\144' + '\x65' + chr(99) + chr(111) + '\144' + chr(0b110100 + 0o61))(chr(117) + '\164' + '\146' + chr(0b101101) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def EIH2EnC5HcgW(sGi5Aql23May, cer2l_8reHfd):
if ioH_pHoOwsph:
for (a0IPW77YxjK_, wgamNHppspXj) in YlkZvXL8qwsX(sGi5Aql23May):
YzJBPucQyDh2 = _7u55U49WwX2.sub(xafqLlk3kkUe(SXOLrMavuUCe(b'8\x06;c'), '\x64' + '\145' + chr(0b10010 + 0o121) + '\x6f' + chr(0b1000 + 0o134) + chr(0b1100101))('\x75' + '\164' + chr(102) + '\055' + chr(1809 - 1753)), xafqLlk3kkUe(SXOLrMavuUCe(b'<'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + '\145')('\165' + '\164' + '\146' + chr(45) + '\070'), cer2l_8reHfd[a0IPW77YxjK_])
nF24o7I0_Wgs = wgamNHppspXj.wmQmyeWBmUpv
GefaWGLgIZIr = wgamNHppspXj.LItHjOK5hqim
yield (YzJBPucQyDh2, nF24o7I0_Wgs, GefaWGLgIZIr)
else:
for wgamNHppspXj in sGi5Aql23May:
YzJBPucQyDh2 = _7u55U49WwX2.sub(xafqLlk3kkUe(SXOLrMavuUCe(b'8\x06;c'), chr(0b1011011 + 0o11) + chr(3941 - 3840) + chr(0b1100011) + '\157' + '\144' + chr(5429 - 5328))('\x75' + chr(10317 - 10201) + chr(0b1000000 + 0o46) + chr(821 - 776) + chr(0b101011 + 0o15)), xafqLlk3kkUe(SXOLrMavuUCe(b'<'), chr(8092 - 7992) + chr(0b10100 + 0o121) + '\x63' + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\164' + '\x66' + '\x2d' + '\x38'), wgamNHppspXj.AIvJRzLdDfgF)
nF24o7I0_Wgs = wgamNHppspXj.wmQmyeWBmUpv
GefaWGLgIZIr = wgamNHppspXj.LItHjOK5hqim
yield (YzJBPucQyDh2, nF24o7I0_Wgs, GefaWGLgIZIr)
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
set_config
|
def set_config(**kwargs):
"""Set up the configure of profiler (only accepts keyword arguments).
Parameters
----------
filename : string,
output file for profile data
profile_all : boolean,
all profile types enabled
profile_symbolic : boolean,
whether to profile symbolic operators
profile_imperative : boolean,
whether to profile imperative operators
profile_memory : boolean,
whether to profile memory usage
profile_api : boolean,
whether to profile the C API
contiguous_dump : boolean,
whether to periodically dump profiling data to file
dump_period : float,
seconds between profile data dumps
aggregate_stats : boolean,
whether to maintain aggregate stats in memory for console
dump. Has some negative performance impact.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
kk = kwargs.keys()
vv = kwargs.values()
check_call(_LIB.MXSetProcessProfilerConfig(len(kwargs),
c_str_array([key for key in kk]),
c_str_array([str(val) for val in vv]),
profiler_kvstore_handle))
|
python
|
def set_config(**kwargs):
"""Set up the configure of profiler (only accepts keyword arguments).
Parameters
----------
filename : string,
output file for profile data
profile_all : boolean,
all profile types enabled
profile_symbolic : boolean,
whether to profile symbolic operators
profile_imperative : boolean,
whether to profile imperative operators
profile_memory : boolean,
whether to profile memory usage
profile_api : boolean,
whether to profile the C API
contiguous_dump : boolean,
whether to periodically dump profiling data to file
dump_period : float,
seconds between profile data dumps
aggregate_stats : boolean,
whether to maintain aggregate stats in memory for console
dump. Has some negative performance impact.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
kk = kwargs.keys()
vv = kwargs.values()
check_call(_LIB.MXSetProcessProfilerConfig(len(kwargs),
c_str_array([key for key in kk]),
c_str_array([str(val) for val in vv]),
profiler_kvstore_handle))
|
[
"def",
"set_config",
"(",
"*",
"*",
"kwargs",
")",
":",
"kk",
"=",
"kwargs",
".",
"keys",
"(",
")",
"vv",
"=",
"kwargs",
".",
"values",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXSetProcessProfilerConfig",
"(",
"len",
"(",
"kwargs",
")",
",",
"c_str_array",
"(",
"[",
"key",
"for",
"key",
"in",
"kk",
"]",
")",
",",
"c_str_array",
"(",
"[",
"str",
"(",
"val",
")",
"for",
"val",
"in",
"vv",
"]",
")",
",",
"profiler_kvstore_handle",
")",
")"
] |
Set up the configure of profiler (only accepts keyword arguments).
Parameters
----------
filename : string,
output file for profile data
profile_all : boolean,
all profile types enabled
profile_symbolic : boolean,
whether to profile symbolic operators
profile_imperative : boolean,
whether to profile imperative operators
profile_memory : boolean,
whether to profile memory usage
profile_api : boolean,
whether to profile the C API
contiguous_dump : boolean,
whether to periodically dump profiling data to file
dump_period : float,
seconds between profile data dumps
aggregate_stats : boolean,
whether to maintain aggregate stats in memory for console
dump. Has some negative performance impact.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
|
[
"Set",
"up",
"the",
"configure",
"of",
"profiler",
"(",
"only",
"accepts",
"keyword",
"arguments",
")",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/bl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0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b11000 + 0o34) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(53) + chr(1979 - 1926), 0o10), ehT0Px3KOsy9(chr(1442 - 1394) + chr(5143 - 5032) + chr(0b110010) + chr(0b110100) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(673 - 625) + chr(111) + chr(51) + chr(0b11110 + 0o23) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(8606 - 8495) + '\x34' + chr(764 - 711), 9959 - 9951), ehT0Px3KOsy9(chr(0b110000) + chr(1028 - 917) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + '\062' + chr(0b110010) + '\063', 2520 - 2512), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b10111 + 0o130) + '\x34' + chr(0b100110 + 0o12), 28241 - 28233), ehT0Px3KOsy9(chr(48) + chr(11538 - 11427) + chr(645 - 595) + chr(0b110001) + chr(0b110010 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\064', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001 + 0o2) + '\061' + chr(1139 - 1084), 8), ehT0Px3KOsy9(chr(48) + chr(7194 - 7083) + chr(50) + chr(0b110110 + 0o1) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(54) + chr(165 - 110), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10000 + 0o47) + chr(0b100101 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(528 - 480) + '\157' + chr(49) + chr(2258 - 2210), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + '\x37' + chr(0b110011), 8), ehT0Px3KOsy9(chr(316 - 268) + chr(111) + chr(51) + chr(0b110111) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110001) + chr(0b11010 + 0o33), 18239 - 18231), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\063' + '\063' + '\x36', 0b1000), ehT0Px3KOsy9(chr(1279 - 1231) + chr(0b1101111) + chr(0b100100 + 0o16) + chr(1476 - 1425), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101100 + 0o103) + chr(0b110011) + chr(1635 - 1587) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(700 - 652) + chr(5716 - 5605) + chr(0b100 + 0o57) + '\x36' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(1509 - 1398) + chr(1341 - 1290) + '\x30', 54911 - 54903), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\x35' + chr(0b10 + 0o63), 30048 - 30040), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\x32' + chr(0b110011), 21705 - 21697), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + chr(0b110111) + chr(0b110110), 63354 - 63346), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(484 - 435), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\x36' + chr(1250 - 1199), ord("\x08")), ehT0Px3KOsy9(chr(1625 - 1577) + chr(0b100100 + 0o113) + '\x32' + chr(52) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\x32' + chr(2273 - 2222), ord("\x08")), ehT0Px3KOsy9(chr(1088 - 1040) + '\157' + '\062' + chr(55) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1111 + 0o44) + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\x31' + '\x32', 4371 - 4363), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + '\062' + chr(0b110111) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2190 - 2140) + chr(2612 - 2558) + chr(0b11000 + 0o34), 8250 - 8242), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\062' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1885 - 1837) + '\157' + chr(0b110001) + '\061' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(823 - 775) + chr(0b1101111) + chr(0b110010) + chr(1782 - 1731) + chr(0b10101 + 0o41), 23278 - 23270)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35' + chr(243 - 195), 31260 - 31252)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), chr(100) + '\145' + chr(0b1101 + 0o126) + chr(0b1101111) + chr(0b1010001 + 0o23) + chr(0b10000 + 0o125))(chr(0b1110101) + chr(116) + chr(102) + chr(0b10100 + 0o31) + chr(0b111000 + 0o0)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _eH3_inGryvD(**M8EIoTs2GJXE):
QKyp0Jlczj2b = M8EIoTs2GJXE.keys()
LQfxcNNsq7bH = M8EIoTs2GJXE.SPnCNu54H1db()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xad5\xf5\xaaQV\xe1O\xe9a\xbc\xc9\xa7ItnR\x96u?\x9d|\xac\x94q\x8a'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(5337 - 5237) + '\x65')(chr(117) + chr(3070 - 2954) + chr(0b1010000 + 0o26) + chr(0b1011 + 0o42) + chr(0b101100 + 0o14)))(c2A0yzQpDQB3(M8EIoTs2GJXE), Ukszo3_Jz5eC([K3J4ZwSlE0sT for K3J4ZwSlE0sT in QKyp0Jlczj2b]), Ukszo3_Jz5eC([M8_cKLkHVB2V(pQxH2D_k9sXQ) for pQxH2D_k9sXQ in LQfxcNNsq7bH]), W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
profiler_set_config
|
def profiler_set_config(mode='symbolic', filename='profile.json'):
"""Set up the configure of profiler (Deprecated).
Parameters
----------
mode : string, optional
Indicates whether to enable the profiler, can
be 'symbolic', or 'all'. Defaults to `symbolic`.
filename : string, optional
The name of output trace file. Defaults to 'profile.json'.
"""
warnings.warn('profiler.profiler_set_config() is deprecated. '
'Please use profiler.set_config() instead')
keys = c_str_array([key for key in ["profile_" + mode, "filename"]])
values = c_str_array([str(val) for val in [True, filename]])
assert len(keys) == len(values)
check_call(_LIB.MXSetProcessProfilerConfig(len(keys), keys, values, profiler_kvstore_handle))
|
python
|
def profiler_set_config(mode='symbolic', filename='profile.json'):
"""Set up the configure of profiler (Deprecated).
Parameters
----------
mode : string, optional
Indicates whether to enable the profiler, can
be 'symbolic', or 'all'. Defaults to `symbolic`.
filename : string, optional
The name of output trace file. Defaults to 'profile.json'.
"""
warnings.warn('profiler.profiler_set_config() is deprecated. '
'Please use profiler.set_config() instead')
keys = c_str_array([key for key in ["profile_" + mode, "filename"]])
values = c_str_array([str(val) for val in [True, filename]])
assert len(keys) == len(values)
check_call(_LIB.MXSetProcessProfilerConfig(len(keys), keys, values, profiler_kvstore_handle))
|
[
"def",
"profiler_set_config",
"(",
"mode",
"=",
"'symbolic'",
",",
"filename",
"=",
"'profile.json'",
")",
":",
"warnings",
".",
"warn",
"(",
"'profiler.profiler_set_config() is deprecated. '",
"'Please use profiler.set_config() instead'",
")",
"keys",
"=",
"c_str_array",
"(",
"[",
"key",
"for",
"key",
"in",
"[",
"\"profile_\"",
"+",
"mode",
",",
"\"filename\"",
"]",
"]",
")",
"values",
"=",
"c_str_array",
"(",
"[",
"str",
"(",
"val",
")",
"for",
"val",
"in",
"[",
"True",
",",
"filename",
"]",
"]",
")",
"assert",
"len",
"(",
"keys",
")",
"==",
"len",
"(",
"values",
")",
"check_call",
"(",
"_LIB",
".",
"MXSetProcessProfilerConfig",
"(",
"len",
"(",
"keys",
")",
",",
"keys",
",",
"values",
",",
"profiler_kvstore_handle",
")",
")"
] |
Set up the configure of profiler (Deprecated).
Parameters
----------
mode : string, optional
Indicates whether to enable the profiler, can
be 'symbolic', or 'all'. Defaults to `symbolic`.
filename : string, optional
The name of output trace file. Defaults to 'profile.json'.
|
[
"Set",
"up",
"the",
"configure",
"of",
"profiler",
"(",
"Deprecated",
")",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L70-L86
|
train
|
Configure profiler.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5V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YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110100) + chr(48), 0o10), ehT0Px3KOsy9(chr(1514 - 1466) + chr(111) + chr(1059 - 1007) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001010 + 0o45) + '\x33' + chr(53) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b11110 + 0o23) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(563 - 515) + '\x6f' + chr(49) + chr(0b110000 + 0o4) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b101101 + 0o102) + '\x31' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + '\x34' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b110011) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(409 - 361) + chr(111) + chr(2580 - 2525) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(0b110001) + chr(54) + '\062', 5057 - 5049), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110110) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(49) + chr(50) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\064' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001100 + 0o43) + chr(0b1101 + 0o46) + chr(53) + chr(52), 8793 - 8785), ehT0Px3KOsy9('\060' + chr(9713 - 9602) + chr(0b11010 + 0o34) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x34' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11111 + 0o23) + '\x36' + chr(1199 - 1150), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11438 - 11327) + chr(0b110101) + '\x35', 58012 - 58004), ehT0Px3KOsy9(chr(1170 - 1122) + chr(0b1101111) + chr(0b110001) + chr(1707 - 1659) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\066', 24406 - 24398), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(5763 - 5652) + chr(0b100011 + 0o17) + '\x36' + chr(2723 - 2668), 0o10), ehT0Px3KOsy9(chr(1223 - 1175) + chr(0b1101111) + chr(0b110001) + '\063' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(55 - 7) + chr(0b1101111) + chr(0b1001 + 0o50) + chr(55) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(708 - 658) + chr(649 - 600) + chr(2255 - 2206), 8), ehT0Px3KOsy9('\060' + chr(7513 - 7402) + chr(0b10110 + 0o33) + chr(495 - 440) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + '\060' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1671 - 1622) + '\066' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(0b110001 + 0o2) + chr(1977 - 1925) + chr(0b110111), 13472 - 13464), ehT0Px3KOsy9(chr(1037 - 989) + '\x6f' + chr(0b100000 + 0o21) + chr(55) + '\062', 0o10), ehT0Px3KOsy9(chr(170 - 122) + chr(0b1101111) + chr(52) + chr(1210 - 1156), 10068 - 10060), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(54) + chr(50), 12262 - 12254), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(98 - 48) + chr(52) + chr(1888 - 1840), 8), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(0b1100 + 0o47) + chr(235 - 183) + chr(0b1111 + 0o50), 8), ehT0Px3KOsy9(chr(1966 - 1918) + chr(0b1101111) + '\062' + chr(1121 - 1073), 0o10), ehT0Px3KOsy9(chr(1536 - 1488) + chr(5469 - 5358) + chr(0b11010 + 0o31) + chr(48) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11010 + 0o31) + chr(0b101111 + 0o1), 0o10), ehT0Px3KOsy9('\060' + chr(0b1011000 + 0o27) + chr(149 - 98) + chr(1946 - 1894) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b101111 + 0o1) + chr(0b110001), 19859 - 19851), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b11110 + 0o25), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1 + 0o64) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e'), '\x64' + '\x65' + chr(0b1100011) + chr(9843 - 9732) + chr(0b1100100) + chr(0b110001 + 0o64))(chr(117) + chr(3086 - 2970) + chr(6461 - 6359) + chr(800 - 755) + chr(0b11000 + 0o40)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def tYORQ_OXdEdB(holLFgwB7vsP=xafqLlk3kkUe(SXOLrMavuUCe(b'S\\\x84\xeb\x0faH\xb9'), '\x64' + '\x65' + chr(0b1001110 + 0o25) + chr(8595 - 8484) + chr(100) + chr(0b1010011 + 0o22))(chr(571 - 454) + chr(0b111101 + 0o67) + chr(0b1100110) + '\x2d' + chr(2016 - 1960)), xw4DsBfIJ22E=xafqLlk3kkUe(SXOLrMavuUCe(b'PW\x86\xef\taD\xf4lM\x1d\x9b'), chr(100) + chr(5973 - 5872) + chr(0b111110 + 0o45) + chr(111) + chr(0b1100100) + chr(1261 - 1160))(chr(0b1110101) + chr(8028 - 7912) + '\x66' + '\055' + chr(0b111000))):
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'Na\xac\xe7.O@\xb8@p9\x98'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(117) + '\164' + chr(735 - 633) + chr(0b101101) + chr(658 - 602)))(xafqLlk3kkUe(SXOLrMavuUCe(b'PW\x86\xef\taD\xa8(N\x00\x9a5\xc9\x80T\x16\xee^$j\xe8=\x10\xe7\x1e\xe9\x10\xcfS\x06\xdb\xd3\xc7t\xa6h\x95\xe4hAQ\x8c\xedN-q\xb6c_\x01\x90s\xd5\x9fTD\xc1_.x\xde2\x1a\xfbV\xf3\x12\x93%E\xdd\xce\x81y\xa40\xce\xa1bNV\x9d\xec\x01i'), '\x64' + chr(0b101100 + 0o71) + chr(0b1100011) + chr(111) + '\x64' + '\145')('\165' + chr(116) + chr(5704 - 5602) + chr(1608 - 1563) + chr(56)))
w8H8C9ec5BO1 = Ukszo3_Jz5eC([K3J4ZwSlE0sT for K3J4ZwSlE0sT in [xafqLlk3kkUe(SXOLrMavuUCe(b'PW\x86\xef\taD\x85'), chr(100) + chr(101) + '\143' + chr(0b1101111) + chr(1248 - 1148) + '\x65')(chr(0b1110101) + '\164' + chr(102) + '\x2d' + '\x38') + holLFgwB7vsP, xafqLlk3kkUe(SXOLrMavuUCe(b'FL\x85\xec\x0elL\xbf'), chr(100) + chr(5521 - 5420) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(6228 - 6112) + chr(0b101000 + 0o76) + chr(0b101101) + '\x38')]])
SPnCNu54H1db = Ukszo3_Jz5eC([M8_cKLkHVB2V(pQxH2D_k9sXQ) for pQxH2D_k9sXQ in [ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(3636 - 3525) + chr(0b110001), 0o10), xw4DsBfIJ22E]])
assert c2A0yzQpDQB3(w8H8C9ec5BO1) == c2A0yzQpDQB3(SPnCNu54H1db)
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'm}\xba\xec\x14]S\xb5e[\x01\x86\x03\xd2\x83W\r\xddH3]\xd80\x19\xe0\x1f'), chr(0b1000101 + 0o37) + '\x65' + '\x63' + chr(0b1101111) + chr(9049 - 8949) + '\145')(chr(0b101100 + 0o111) + chr(3853 - 3737) + chr(0b1100110) + chr(1253 - 1208) + chr(1722 - 1666)))(c2A0yzQpDQB3(w8H8C9ec5BO1), w8H8C9ec5BO1, SPnCNu54H1db, W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
set_state
|
def set_state(state='stop', profile_process='worker'):
"""Set up the profiler state to 'run' or 'stop'.
Parameters
----------
state : string, optional
Indicates whether to run the profiler, can
be 'stop' or 'run'. Default is `stop`.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
state2int = {'stop': 0, 'run': 1}
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXSetProcessProfilerState(ctypes.c_int(state2int[state]),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
python
|
def set_state(state='stop', profile_process='worker'):
"""Set up the profiler state to 'run' or 'stop'.
Parameters
----------
state : string, optional
Indicates whether to run the profiler, can
be 'stop' or 'run'. Default is `stop`.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
state2int = {'stop': 0, 'run': 1}
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXSetProcessProfilerState(ctypes.c_int(state2int[state]),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
[
"def",
"set_state",
"(",
"state",
"=",
"'stop'",
",",
"profile_process",
"=",
"'worker'",
")",
":",
"state2int",
"=",
"{",
"'stop'",
":",
"0",
",",
"'run'",
":",
"1",
"}",
"profile_process2int",
"=",
"{",
"'worker'",
":",
"0",
",",
"'server'",
":",
"1",
"}",
"check_call",
"(",
"_LIB",
".",
"MXSetProcessProfilerState",
"(",
"ctypes",
".",
"c_int",
"(",
"state2int",
"[",
"state",
"]",
")",
",",
"profile_process2int",
"[",
"profile_process",
"]",
",",
"profiler_kvstore_handle",
")",
")"
] |
Set up the profiler state to 'run' or 'stop'.
Parameters
----------
state : string, optional
Indicates whether to run the profiler, can
be 'stop' or 'run'. Default is `stop`.
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
|
[
"Set",
"up",
"the",
"profiler",
"state",
"to",
"run",
"or",
"stop",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L89-L106
|
train
|
Sets the profiler state to run or stop.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ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iMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(708 - 660) + '\x6f' + chr(0b110011) + '\x34' + '\x30', 0b1000), ehT0Px3KOsy9(chr(147 - 99) + chr(11790 - 11679) + chr(52) + chr(2515 - 2463), 28790 - 28782), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(510 - 459) + chr(0b110111), 39929 - 39921), ehT0Px3KOsy9(chr(1000 - 952) + chr(0b111100 + 0o63) + chr(0b100011 + 0o16) + chr(0b1101 + 0o50) + chr(0b110101), 43964 - 43956), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + '\x31' + chr(1400 - 1346) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1111 + 0o44) + chr(0b110001) + chr(0b10 + 0o57), 39629 - 39621), ehT0Px3KOsy9('\060' + chr(0b110001 + 0o76) + chr(0b110010) + chr(52) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\065' + chr(0b101011 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6387 - 6276) + '\x31' + chr(1577 - 1527) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\x33' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(1490 - 1442) + chr(3996 - 3885) + chr(0b101001 + 0o10) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\062' + chr(0b1110 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + '\062' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1000001 + 0o56) + '\063' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(1337 - 1288) + chr(1229 - 1176) + chr(51), 49369 - 49361), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\x32' + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2074 - 2024) + chr(0b110101) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100 + 0o61) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3892 - 3781) + chr(51) + chr(52) + chr(1359 - 1308), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + '\063' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1495 - 1446) + chr(55) + chr(0b1010 + 0o51), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(1507 - 1458) + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110011) + '\x32', 31166 - 31158), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110111) + chr(48), 0b1000), ehT0Px3KOsy9(chr(705 - 657) + chr(0b1101111) + chr(0b110010) + '\067' + chr(0b110011), 26798 - 26790), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b110000) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1380 - 1332) + chr(0b1100111 + 0o10) + '\063' + chr(700 - 645) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100111 + 0o14) + chr(0b110001 + 0o0) + chr(0b100 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110110) + chr(0b1101 + 0o51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(49) + '\x34', 9011 - 9003), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\x33' + chr(0b110111) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(267 - 156) + chr(0b1111 + 0o44) + '\067' + chr(48), 8), ehT0Px3KOsy9(chr(1654 - 1606) + '\157' + chr(1347 - 1297) + '\x35' + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b100111 + 0o15) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(53) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2177 - 2066) + '\063' + chr(0b110010) + chr(0b11101 + 0o30), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\x34' + chr(52), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(850 - 797) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), chr(100) + chr(0b1100000 + 0o5) + chr(99) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(0b100100 + 0o120) + chr(102) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def SiByHftK6uAj(KKFQISrGeiAm=xafqLlk3kkUe(SXOLrMavuUCe(b'\x93Po\xaf'), chr(0b1100100) + chr(0b1100101) + chr(4593 - 4494) + chr(0b1000 + 0o147) + '\x64' + chr(10046 - 9945))(chr(10919 - 10802) + chr(4549 - 4433) + chr(102) + chr(0b101101) + chr(63 - 7)), SRkNRja1IAbs=xafqLlk3kkUe(SXOLrMavuUCe(b'\x97Kr\xb4\x08\x00'), '\144' + chr(6320 - 6219) + chr(0b11001 + 0o112) + chr(0b1101111) + '\x64' + chr(10110 - 10009))('\x75' + chr(0b10101 + 0o137) + '\x66' + '\055' + '\070')):
IwAE3CzL6UyZ = {xafqLlk3kkUe(SXOLrMavuUCe(b'\x93Po\xaf'), chr(100) + chr(0b1011011 + 0o12) + chr(0b1100011) + '\157' + chr(100) + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'): ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + '\x30', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\x92Qn'), chr(0b1100001 + 0o3) + chr(101) + chr(1161 - 1062) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + '\x74' + chr(9652 - 9550) + chr(923 - 878) + '\070'): ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061', 0b1000)}
PtsRTqE4omJL = {xafqLlk3kkUe(SXOLrMavuUCe(b'\x97Kr\xb4\x08\x00'), '\x64' + chr(0b1001110 + 0o27) + chr(99) + chr(2103 - 1992) + '\x64' + '\145')(chr(2233 - 2116) + chr(116) + chr(0b1100110) + chr(45) + '\070'): ehT0Px3KOsy9(chr(0b110000) + chr(9512 - 9401) + chr(0b1101 + 0o43), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\x93Ar\xa9\x08\x00'), chr(1845 - 1745) + '\145' + chr(3514 - 3415) + chr(111) + '\144' + chr(0b100110 + 0o77))('\165' + chr(116) + chr(10110 - 10008) + chr(1962 - 1917) + '\x38'): ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b10110 + 0o131) + '\x31', 8)}
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xad|S\xba\x19"\xbb\xc9\x0c6\xef}\x00at\r\xbf\xc3O\x91\x0c\x0f\xeb\xee]'), '\x64' + chr(138 - 37) + chr(99) + '\x6f' + chr(0b1011100 + 0o10) + chr(4166 - 4065))('\165' + chr(1599 - 1483) + '\146' + chr(1430 - 1385) + chr(622 - 566)))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x83{i\xb1\x19'), chr(0b100011 + 0o101) + chr(0b1100010 + 0o3) + chr(6528 - 6429) + '\157' + chr(100) + chr(0b101001 + 0o74))(chr(117) + '\x74' + chr(102) + chr(0b101101) + '\x38'))(IwAE3CzL6UyZ[KKFQISrGeiAm]), PtsRTqE4omJL[SRkNRja1IAbs], W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
dump
|
def dump(finished=True, profile_process='worker'):
"""Dump profile and stop profiler. Use this to save profile
in advance in case your program cannot exit normally.
Parameters
----------
finished : boolean
Indicates whether to stop statistic output (dumping) after this dump.
Default is True
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
fin = 1 if finished is True else 0
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXDumpProcessProfile(fin,
profile_process2int[profile_process],
profiler_kvstore_handle))
|
python
|
def dump(finished=True, profile_process='worker'):
"""Dump profile and stop profiler. Use this to save profile
in advance in case your program cannot exit normally.
Parameters
----------
finished : boolean
Indicates whether to stop statistic output (dumping) after this dump.
Default is True
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
fin = 1 if finished is True else 0
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXDumpProcessProfile(fin,
profile_process2int[profile_process],
profiler_kvstore_handle))
|
[
"def",
"dump",
"(",
"finished",
"=",
"True",
",",
"profile_process",
"=",
"'worker'",
")",
":",
"fin",
"=",
"1",
"if",
"finished",
"is",
"True",
"else",
"0",
"profile_process2int",
"=",
"{",
"'worker'",
":",
"0",
",",
"'server'",
":",
"1",
"}",
"check_call",
"(",
"_LIB",
".",
"MXDumpProcessProfile",
"(",
"fin",
",",
"profile_process2int",
"[",
"profile_process",
"]",
",",
"profiler_kvstore_handle",
")",
")"
] |
Dump profile and stop profiler. Use this to save profile
in advance in case your program cannot exit normally.
Parameters
----------
finished : boolean
Indicates whether to stop statistic output (dumping) after this dump.
Default is True
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
|
[
"Dump",
"profile",
"and",
"stop",
"profiler",
".",
"Use",
"this",
"to",
"save",
"profile",
"in",
"advance",
"in",
"case",
"your",
"program",
"cannot",
"exit",
"normally",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L122-L140
|
train
|
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0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(326 - 215) + chr(1147 - 1093), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(0b101010 + 0o15) + '\x35', 0o10), ehT0Px3KOsy9(chr(1179 - 1131) + chr(6678 - 6567) + '\063' + '\x34' + '\067', 52736 - 52728), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + '\062' + chr(274 - 220) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11000 + 0o31) + chr(1083 - 1030) + chr(50), 40170 - 40162), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + chr(487 - 436) + chr(0b10001 + 0o42) + chr(0b1011 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3740 - 3629) + chr(0b110010) + chr(1751 - 1702) + chr(0b100 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(1813 - 1765) + chr(10376 - 10265) + chr(49) + '\061' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100110 + 0o111) + '\064' + chr(2288 - 2236), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110111) + chr(996 - 942), 0b1000), ehT0Px3KOsy9('\x30' + chr(3126 - 3015) + chr(341 - 291) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(500 - 449) + chr(0b110110) + chr(0b110110), 34381 - 34373), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(1816 - 1761) + '\x30', 25009 - 25001), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110110) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8413 - 8302) + '\x33' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(852 - 799), ord("\x08")), ehT0Px3KOsy9(chr(1403 - 1355) + chr(9750 - 9639) + '\063' + chr(760 - 707) + chr(1871 - 1820), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(49) + '\067', 1756 - 1748), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101011 + 0o7) + chr(0b101000 + 0o11) + '\064', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x35' + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b110000) + chr(1213 - 1159), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + '\061' + chr(0b100001 + 0o22) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(291 - 240) + chr(823 - 771), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\060' + '\066', 8), ehT0Px3KOsy9(chr(2230 - 2182) + '\x6f' + chr(0b110010) + chr(0b11011 + 0o25), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\065', 4484 - 4476), ehT0Px3KOsy9('\060' + '\157' + chr(1425 - 1375) + chr(1703 - 1653) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(321 - 273) + '\157' + '\063' + chr(52) + '\x34', 49094 - 49086), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110010) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(5526 - 5415) + '\062' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x30' + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\x30' + chr(50), 6331 - 6323), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x37' + chr(0b110011), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(55) + chr(1711 - 1656), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2765 - 2654) + chr(0b110011) + '\x33' + chr(1033 - 981), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(1140 - 1089) + chr(2784 - 2730) + '\x37', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110111) + chr(0b10011 + 0o35), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(49) + '\x33' + '\x32', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1717 - 1669) + '\157' + chr(0b10010 + 0o43) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'('), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(0b1000111 + 0o56) + chr(116) + chr(102) + chr(0b10000 + 0o35) + chr(0b100001 + 0o27)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def XsRuywm9RqIP(NTRJeiwBLUyk=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2139 - 2090), 5495 - 5487), SRkNRja1IAbs=xafqLlk3kkUe(SXOLrMavuUCe(b'qR\x95\xd9\x0f\xa9'), chr(0b1001100 + 0o30) + chr(5981 - 5880) + chr(3522 - 3423) + chr(0b101101 + 0o102) + '\x64' + chr(101))(chr(10324 - 10207) + chr(1547 - 1431) + '\146' + chr(0b100111 + 0o6) + chr(0b10010 + 0o46))):
m1t8Ca5e_XLV = ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + '\061', 8) if NTRJeiwBLUyk is ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1989 - 1940), 8) else ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(1607 - 1559), 8)
PtsRTqE4omJL = {xafqLlk3kkUe(SXOLrMavuUCe(b'qR\x95\xd9\x0f\xa9'), chr(100) + chr(101) + chr(0b11110 + 0o105) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + '\070'): ehT0Px3KOsy9(chr(48) + chr(9636 - 9525) + '\060', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'uX\x95\xc4\x0f\xa9'), '\144' + chr(101) + chr(99) + chr(0b1001000 + 0o47) + '\x64' + '\x65')('\x75' + '\164' + '\146' + chr(45) + chr(56)): ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001), 8)}
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'Ke\xa3\xc7\x07\xab\xd89K_[f\x85(\x02tc\x82\xe3\xe9'), '\144' + chr(101) + chr(0b111110 + 0o45) + chr(0b1101111) + chr(0b1011010 + 0o12) + chr(0b1011101 + 0o10))(chr(2728 - 2611) + '\x74' + chr(102) + '\055' + chr(0b111000)))(m1t8Ca5e_XLV, PtsRTqE4omJL[SRkNRja1IAbs], W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
dumps
|
def dumps(reset=False):
"""Return a printable string of aggregate profile stats.
Parameters
----------
reset: boolean
Indicates whether to clean aggeregate statistical data collected up to this point
"""
debug_str = ctypes.c_char_p()
do_reset = 1 if reset is True else 0
check_call(_LIB.MXAggregateProfileStatsPrint(ctypes.byref(debug_str), int(do_reset)))
return py_str(debug_str.value)
|
python
|
def dumps(reset=False):
"""Return a printable string of aggregate profile stats.
Parameters
----------
reset: boolean
Indicates whether to clean aggeregate statistical data collected up to this point
"""
debug_str = ctypes.c_char_p()
do_reset = 1 if reset is True else 0
check_call(_LIB.MXAggregateProfileStatsPrint(ctypes.byref(debug_str), int(do_reset)))
return py_str(debug_str.value)
|
[
"def",
"dumps",
"(",
"reset",
"=",
"False",
")",
":",
"debug_str",
"=",
"ctypes",
".",
"c_char_p",
"(",
")",
"do_reset",
"=",
"1",
"if",
"reset",
"is",
"True",
"else",
"0",
"check_call",
"(",
"_LIB",
".",
"MXAggregateProfileStatsPrint",
"(",
"ctypes",
".",
"byref",
"(",
"debug_str",
")",
",",
"int",
"(",
"do_reset",
")",
")",
")",
"return",
"py_str",
"(",
"debug_str",
".",
"value",
")"
] |
Return a printable string of aggregate profile stats.
Parameters
----------
reset: boolean
Indicates whether to clean aggeregate statistical data collected up to this point
|
[
"Return",
"a",
"printable",
"string",
"of",
"aggregate",
"profile",
"stats",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L151-L162
|
train
|
Return a printable string of aggregate profile stats.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ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_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(52) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(289 - 241) + chr(3364 - 3253) + '\062' + chr(0b101101 + 0o11) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1325 - 1274) + '\x33' + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1111 + 0o43) + chr(0b110001) + chr(0b110 + 0o56), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(1364 - 1314) + chr(55), 20310 - 20302), ehT0Px3KOsy9(chr(2042 - 1994) + chr(111) + '\062' + chr(0b110000) + chr(2721 - 2668), 20697 - 20689), ehT0Px3KOsy9(chr(1047 - 999) + chr(6061 - 5950) + chr(49) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110001) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(0b10000 + 0o40) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2905 - 2794) + chr(1884 - 1833) + chr(0b101010 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b11011 + 0o33) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(296 - 245) + '\x31' + '\066', 8), ehT0Px3KOsy9('\x30' + chr(3889 - 3778) + '\x34' + chr(0b100000 + 0o24), 3418 - 3410), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110011) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b110011 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + chr(361 - 250) + chr(0b110011) + chr(49) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x32', 8), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + '\061' + '\064' + chr(1884 - 1833), ord("\x08")), ehT0Px3KOsy9(chr(138 - 90) + chr(0b1101111) + '\062' + chr(0b110010) + '\x34', 35235 - 35227), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101011 + 0o13) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(742 - 693) + chr(1238 - 1183) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(2054 - 2006) + chr(111) + '\061' + chr(0b100110 + 0o17) + chr(529 - 476), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001010 + 0o45) + chr(53) + chr(48), 0b1000), ehT0Px3KOsy9(chr(75 - 27) + chr(111) + '\061' + chr(1930 - 1882) + '\063', 53695 - 53687), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111) + chr(50), 26063 - 26055), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(1851 - 1801) + chr(1021 - 972), 0o10), ehT0Px3KOsy9(chr(2251 - 2203) + chr(0b1101111) + chr(0b101100 + 0o7) + chr(0b10001 + 0o46) + chr(2377 - 2322), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\061' + chr(416 - 368), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(49) + chr(2249 - 2200), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110110) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(2020 - 1972) + chr(11844 - 11733) + '\062' + chr(53) + '\x32', 41940 - 41932), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110011) + '\065', 39936 - 39928), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1570 - 1520) + chr(0b110000) + chr(724 - 670), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + chr(0b110010) + chr(2178 - 2129), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(849 - 800) + '\061' + '\x35', 64794 - 64786), ehT0Px3KOsy9(chr(1209 - 1161) + chr(3176 - 3065) + chr(0b110011) + '\061' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(300 - 252) + chr(0b1011011 + 0o24) + chr(233 - 178) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8400 - 8289) + chr(1174 - 1124) + '\062' + chr(2304 - 2250), 0b1000), ehT0Px3KOsy9('\x30' + chr(8073 - 7962) + chr(49) + '\x33' + chr(1577 - 1524), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x08'), chr(6646 - 6546) + chr(0b1000011 + 0o42) + chr(0b1100011) + '\x6f' + chr(530 - 430) + chr(0b1000000 + 0o45))(chr(4593 - 4476) + '\x74' + chr(0b1100110) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def xAMNxXacWsXH(G0V856pwkJmZ=ehT0Px3KOsy9('\060' + chr(0b10110 + 0o131) + chr(0b110000), 0b1000)):
QP_anTSfARw7 = RyQ4N1viUrfz.c_char_p()
rZBas6iwNATE = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001), 0b1000) if G0V856pwkJmZ is ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(8190 - 8079) + '\x31', 8) else ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10000 + 0o40), 8)
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xee\x9d\xeb0\xf7o\xa9\xa0n\x97\x9eVu8|\xa1o0\xe0W\x0f\x1ex1S?\x8b'), chr(3818 - 3718) + chr(0b1100101) + chr(0b1100011) + chr(0b101011 + 0o104) + chr(6356 - 6256) + chr(9556 - 9455))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + '\x38'))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'D\xcf\xae\xe91'), '\144' + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(1735 - 1634))('\165' + chr(0b1001001 + 0o53) + '\x66' + '\x2d' + chr(0b111000)))(QP_anTSfARw7), ehT0Px3KOsy9(rZBas6iwNATE)))
return CaGHn5i0wDWS(xafqLlk3kkUe(QP_anTSfARw7, xafqLlk3kkUe(SXOLrMavuUCe(b'w\xdb\xb1\xeb\x00\xd0H\xff\xf2L\xb1\x84'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(1332 - 1230) + chr(45) + chr(56))))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
pause
|
def pause(profile_process='worker'):
"""Pause profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXProcessProfilePause(int(1),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
python
|
def pause(profile_process='worker'):
"""Pause profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXProcessProfilePause(int(1),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
[
"def",
"pause",
"(",
"profile_process",
"=",
"'worker'",
")",
":",
"profile_process2int",
"=",
"{",
"'worker'",
":",
"0",
",",
"'server'",
":",
"1",
"}",
"check_call",
"(",
"_LIB",
".",
"MXProcessProfilePause",
"(",
"int",
"(",
"1",
")",
",",
"profile_process2int",
"[",
"profile_process",
"]",
",",
"profiler_kvstore_handle",
")",
")"
] |
Pause profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
|
[
"Pause",
"profiling",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L165-L178
|
train
|
Pause profiling.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy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DPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + '\x31' + chr(0b110011) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b110110) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(3371 - 3260) + chr(1606 - 1557), 0o10), ehT0Px3KOsy9(chr(195 - 147) + chr(0b1101111) + chr(0b101011 + 0o6) + '\066' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(53) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\x35' + chr(0b110100), 23663 - 23655), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(545 - 434) + chr(0b110001) + chr(0b101111 + 0o3) + chr(0b110001), 22862 - 22854), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + '\x31' + chr(0b110000) + chr(52), 55075 - 55067), ehT0Px3KOsy9(chr(48) + chr(4510 - 4399) + chr(51) + chr(52) + chr(2009 - 1958), 0o10), ehT0Px3KOsy9(chr(1432 - 1384) + chr(0b1100100 + 0o13) + chr(1859 - 1809) + chr(2353 - 2303) + '\066', 35688 - 35680), ehT0Px3KOsy9('\x30' + chr(111) + chr(2198 - 2148) + '\065' + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b0 + 0o61) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(8506 - 8395) + chr(50) + '\x34' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5106 - 4995) + chr(0b10100 + 0o41) + '\x35', 0b1000), ehT0Px3KOsy9(chr(219 - 171) + chr(0b1100011 + 0o14) + chr(1780 - 1730) + chr(52) + chr(946 - 894), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(361 - 312) + '\063' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(673 - 622) + chr(694 - 641) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b101000 + 0o12) + chr(0b1001 + 0o51), 61078 - 61070), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2396 - 2346) + chr(0b110001) + chr(0b11001 + 0o30), 52083 - 52075), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b110001 + 0o1) + chr(0b110111) + '\x37', 0o10), ehT0Px3KOsy9(chr(1766 - 1718) + chr(0b1101111) + '\061' + chr(0b110110) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + chr(0b10100 + 0o36) + chr(1242 - 1191) + chr(0b101011 + 0o14), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\064' + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\065' + chr(1479 - 1427), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(159 - 108), 0b1000), ehT0Px3KOsy9(chr(663 - 615) + chr(0b1101111) + chr(51) + '\x37' + chr(770 - 717), 0o10), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + chr(51) + '\x36' + chr(0b10100 + 0o34), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3327 - 3216) + '\x34' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + chr(153 - 101) + '\065', 0b1000), ehT0Px3KOsy9(chr(2221 - 2173) + '\157' + '\061' + chr(49) + '\066', 0b1000), ehT0Px3KOsy9(chr(361 - 313) + chr(11985 - 11874) + chr(0b101001 + 0o13) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(0b110011) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(0b10110 + 0o37) + chr(50), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110 + 0o61) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100110 + 0o15) + chr(447 - 396) + '\066', 36377 - 36369), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + '\x36' + chr(1723 - 1673), 29706 - 29698), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(55) + chr(1736 - 1681), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\x37', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2075 - 2027) + chr(7725 - 7614) + chr(2718 - 2665) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b't'), chr(0b1011111 + 0o5) + chr(9070 - 8969) + chr(0b1010 + 0o131) + chr(0b1010100 + 0o33) + chr(6913 - 6813) + chr(0b1100101))(chr(0b1000 + 0o155) + chr(0b111000 + 0o74) + '\146' + chr(0b1 + 0o54) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def VWVKSklMO9y2(SRkNRja1IAbs=xafqLlk3kkUe(SXOLrMavuUCe(b'-\x98s\x19\x08^'), chr(0b1111 + 0o125) + chr(6296 - 6195) + chr(4309 - 4210) + chr(0b110111 + 0o70) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(4056 - 3954) + chr(0b101000 + 0o5) + chr(0b111000))):
PtsRTqE4omJL = {xafqLlk3kkUe(SXOLrMavuUCe(b'-\x98s\x19\x08^'), '\x64' + chr(101) + '\x63' + chr(111) + chr(0b1100100 + 0o0) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(2384 - 2282) + '\x2d' + '\x38'): ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(544 - 496), 0b1000), xafqLlk3kkUe(SXOLrMavuUCe(b')\x92s\x04\x08^'), '\144' + chr(101) + chr(0b1100011) + chr(0b110000 + 0o77) + chr(100) + '\145')(chr(117) + chr(0b11011 + 0o131) + '\146' + chr(1013 - 968) + chr(56)): ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1365 - 1316), 8)}
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xafQ\x00\x02O47\x90\xc6\xdd\xe7\xc0D\xc8<\xbf\xb3\xfc\xcc\x12'), chr(0b1100100) + chr(0b1100101) + chr(292 - 193) + chr(0b111001 + 0o66) + '\x64' + chr(0b1011001 + 0o14))(chr(117) + '\164' + '\x66' + chr(0b101001 + 0o4) + chr(0b111000)))(ehT0Px3KOsy9(ehT0Px3KOsy9('\060' + '\157' + chr(0b100 + 0o55), 8)), PtsRTqE4omJL[SRkNRja1IAbs], W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
resume
|
def resume(profile_process='worker'):
"""
Resume paused profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXProcessProfilePause(int(0),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
python
|
def resume(profile_process='worker'):
"""
Resume paused profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
"""
profile_process2int = {'worker': 0, 'server': 1}
check_call(_LIB.MXProcessProfilePause(int(0),
profile_process2int[profile_process],
profiler_kvstore_handle))
|
[
"def",
"resume",
"(",
"profile_process",
"=",
"'worker'",
")",
":",
"profile_process2int",
"=",
"{",
"'worker'",
":",
"0",
",",
"'server'",
":",
"1",
"}",
"check_call",
"(",
"_LIB",
".",
"MXProcessProfilePause",
"(",
"int",
"(",
"0",
")",
",",
"profile_process2int",
"[",
"profile_process",
"]",
",",
"profiler_kvstore_handle",
")",
")"
] |
Resume paused profiling.
Parameters
----------
profile_process : string
whether to profile kvstore `server` or `worker`.
server can only be profiled when kvstore is of type dist.
if this is not passed, defaults to `worker`
|
[
"Resume",
"paused",
"profiling",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L181-L195
|
train
|
Resume paused profiling.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN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JQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(50) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x33' + '\064', 0o10), ehT0Px3KOsy9(chr(387 - 339) + chr(0b1101111) + chr(1028 - 979) + chr(673 - 621) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b11100 + 0o123) + '\x33' + chr(380 - 329) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b11111 + 0o27) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2096 - 2047) + '\x35' + '\062', 61344 - 61336), ehT0Px3KOsy9(chr(115 - 67) + chr(6274 - 6163) + chr(0b11110 + 0o23) + chr(54) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(136 - 81) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b101 + 0o61) + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(575 - 524) + chr(0b110101) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(916 - 868) + '\157' + '\063' + chr(0b100100 + 0o23) + chr(221 - 169), ord("\x08")), ehT0Px3KOsy9(chr(458 - 410) + chr(0b1101111) + chr(0b110111) + chr(0b110101), 35433 - 35425), ehT0Px3KOsy9('\060' + '\157' + chr(0b110000 + 0o1) + chr(0b110110) + chr(1619 - 1570), 8), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + '\x33' + chr(0b101000 + 0o15) + chr(1325 - 1276), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + chr(0b11001 + 0o32) + chr(916 - 866) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2096 - 2047) + '\x33' + chr(402 - 348), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b10111 + 0o33) + chr(1034 - 985), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b11110 + 0o22) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(54) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(1169 - 1058) + chr(51) + '\066' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o57) + chr(1734 - 1686) + chr(0b100100 + 0o17), 8715 - 8707), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b101001 + 0o106) + '\061' + '\063' + chr(0b10111 + 0o35), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(52) + chr(0b101110 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110110) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7209 - 7098) + chr(992 - 941) + chr(54) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x36' + '\x33', 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\061' + chr(2239 - 2187) + '\x36', 8), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + chr(0b110011) + chr(0b110011) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(956 - 906) + chr(1778 - 1724) + chr(2260 - 2207), ord("\x08")), ehT0Px3KOsy9(chr(1169 - 1121) + chr(9095 - 8984) + chr(50) + chr(49) + '\061', 11431 - 11423), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(258 - 208) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2666 - 2555) + chr(1869 - 1818) + chr(0b110111) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2098 - 2047) + chr(0b1001 + 0o52) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1861 - 1810) + chr(0b101010 + 0o6) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b110010 + 0o0), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1479 - 1430) + '\060' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(2946 - 2835) + chr(51) + chr(2263 - 2208) + chr(2403 - 2352), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(2898 - 2843) + chr(0b101110 + 0o10), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(53) + '\060', 51450 - 51442)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc'), chr(0b1100100) + chr(0b1100011 + 0o2) + '\143' + chr(111) + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b100010 + 0o13) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nZ_kXXKO_LOJ(SRkNRja1IAbs=xafqLlk3kkUe(SXOLrMavuUCe(b'\xe53\x14\xb6\x14\x18'), chr(100) + '\145' + '\x63' + '\157' + chr(100) + chr(101))(chr(0b1001111 + 0o46) + '\164' + '\x66' + chr(0b1010 + 0o43) + chr(56))):
PtsRTqE4omJL = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xe53\x14\xb6\x14\x18'), chr(0b111111 + 0o45) + chr(0b1100101) + chr(3301 - 3202) + chr(0b1101111) + chr(6479 - 6379) + chr(0b101111 + 0o66))(chr(0b110 + 0o157) + chr(116) + chr(302 - 200) + '\x2d' + chr(0b100100 + 0o24)): ehT0Px3KOsy9('\x30' + '\157' + chr(870 - 822), ord("\x08")), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe19\x14\xab\x14\x18'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b111110 + 0o46) + chr(9770 - 9669))(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + chr(56)): ehT0Px3KOsy9(chr(2180 - 2132) + chr(0b1101110 + 0o1) + '\061', 0b1000)}
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf\x046\xaf\x1e\t\x10\x8a\x02S\x9a\x93[\x18\x85\xb0\x0e\xf03A\x93'), '\x64' + '\145' + '\143' + '\157' + chr(100) + chr(0b100001 + 0o104))(chr(9323 - 9206) + '\x74' + '\146' + '\055' + '\x38'))(ehT0Px3KOsy9(ehT0Px3KOsy9('\060' + '\x6f' + chr(2027 - 1979), 8)), PtsRTqE4omJL[SRkNRja1IAbs], W9lZIs8c8meD))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
Counter.set_value
|
def set_value(self, value):
"""Set counter value.
Parameters
----------
value : int
Value for the counter
"""
check_call(_LIB.MXProfileSetCounter(self.handle, int(value)))
|
python
|
def set_value(self, value):
"""Set counter value.
Parameters
----------
value : int
Value for the counter
"""
check_call(_LIB.MXProfileSetCounter(self.handle, int(value)))
|
[
"def",
"set_value",
"(",
"self",
",",
"value",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXProfileSetCounter",
"(",
"self",
".",
"handle",
",",
"int",
"(",
"value",
")",
")",
")"
] |
Set counter value.
Parameters
----------
value : int
Value for the counter
|
[
"Set",
"counter",
"value",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L405-L413
|
train
|
Set the value of the counter.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HP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3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(1560 - 1449) + chr(2175 - 2125) + chr(0b110001) + chr(0b11111 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b1111 + 0o50) + '\067', 0b1000), ehT0Px3KOsy9(chr(369 - 321) + chr(4209 - 4098) + chr(0b110010) + '\x32' + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(848 - 797), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(12008 - 11897) + chr(52) + chr(2248 - 2197), ord("\x08")), ehT0Px3KOsy9(chr(2205 - 2157) + chr(1941 - 1830) + chr(50) + chr(55) + chr(0b100111 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(1831 - 1720) + chr(0b10 + 0o61) + chr(0b110100) + chr(515 - 461), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\x35' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(1409 - 1360) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(377 - 329) + '\157' + '\x32' + chr(0b101100 + 0o4) + chr(0b11001 + 0o27), 38888 - 38880), ehT0Px3KOsy9(chr(702 - 654) + chr(0b1101111) + chr(1375 - 1326) + chr(0b110101) + chr(0b110011 + 0o2), 33156 - 33148), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(1161 - 1050) + chr(616 - 566) + chr(0b11001 + 0o33), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + chr(0b110000 + 0o3), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + chr(49) + '\067' + chr(671 - 622), 300 - 292), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b110001 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + '\x33' + '\060' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(400 - 350) + '\065', 7178 - 7170), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + chr(0b110010) + chr(0b110010) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\062' + '\067', 0b1000), ehT0Px3KOsy9(chr(1569 - 1521) + chr(0b1101111) + chr(0b11001 + 0o30) + chr(2160 - 2112) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110 + 0o61) + chr(52), 0o10), ehT0Px3KOsy9(chr(1869 - 1821) + '\x6f' + '\061' + '\062' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(767 - 719) + chr(0b101010 + 0o105) + chr(0b1 + 0o64) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1025 - 977) + '\157' + chr(51) + chr(1450 - 1402) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1110 + 0o43) + '\x31' + chr(0b110001), 7800 - 7792), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(0b100001 + 0o24) + chr(0b110 + 0o53), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110110) + chr(48), 11026 - 11018), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(2465 - 2411) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1983 - 1935) + '\x6f' + chr(746 - 696) + '\x33' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010100 + 0o33) + chr(912 - 863) + chr(0b110000) + chr(51), 57353 - 57345), ehT0Px3KOsy9(chr(48) + chr(2938 - 2827) + chr(0b110001) + chr(1000 - 948) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(825 - 772) + chr(0b100001 + 0o20), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\067' + chr(52), 0o10), ehT0Px3KOsy9(chr(1562 - 1514) + '\157' + chr(0b110010) + chr(906 - 856) + '\061', 26452 - 26444), ehT0Px3KOsy9('\x30' + chr(5031 - 4920) + chr(0b10111 + 0o33) + chr(49) + chr(0b11111 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + '\063' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\061' + chr(0b10 + 0o60), 39178 - 39170), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(8648 - 8537) + '\x32' + chr(0b110101) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(3277 - 3166) + chr(0b110011) + chr(0b101100 + 0o5) + chr(1138 - 1083), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1524 - 1473) + chr(48), 59442 - 59434)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(174 - 126) + '\x6f' + chr(0b110001 + 0o4) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0'), chr(100) + chr(779 - 678) + '\x63' + chr(10480 - 10369) + '\x64' + '\145')('\165' + chr(0b1110100) + chr(2034 - 1932) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def pBCaqMXWc3h8(oVre8I6UXc3b, QmmgWUB13VCJ):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b"\xc3'\xc6iL\xd9\x8f\x07+\xd3\x08`x\x16y\xa8!\xf1e"), '\x64' + '\145' + chr(5257 - 5158) + '\x6f' + chr(5959 - 5859) + chr(0b1100101))(chr(0b1000111 + 0o56) + '\164' + chr(0b1100101 + 0o1) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x07\xc2nn\xce\xa01*\xfa7l'), chr(0b1100100) + chr(0b101010 + 0o73) + chr(8197 - 8098) + '\157' + chr(0b1100100) + '\145')(chr(0b111101 + 0o70) + '\x74' + '\146' + '\055' + chr(56))), ehT0Px3KOsy9(QmmgWUB13VCJ)))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
Counter.increment
|
def increment(self, delta=1):
"""Increment counter value.
Parameters
----------
value_change : int
Amount by which to add to the counter
"""
check_call(_LIB.MXProfileAdjustCounter(self.handle, int(delta)))
|
python
|
def increment(self, delta=1):
"""Increment counter value.
Parameters
----------
value_change : int
Amount by which to add to the counter
"""
check_call(_LIB.MXProfileAdjustCounter(self.handle, int(delta)))
|
[
"def",
"increment",
"(",
"self",
",",
"delta",
"=",
"1",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXProfileAdjustCounter",
"(",
"self",
".",
"handle",
",",
"int",
"(",
"delta",
")",
")",
")"
] |
Increment counter value.
Parameters
----------
value_change : int
Amount by which to add to the counter
|
[
"Increment",
"counter",
"value",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L415-L423
|
train
|
Increment the value of the internal counter by delta.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4x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6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\x30' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(10868 - 10757) + chr(0b1001 + 0o54) + chr(51), 0o10), ehT0Px3KOsy9(chr(292 - 244) + '\157' + '\062' + '\x34' + chr(0b1110 + 0o47), 46183 - 46175), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + chr(0b1000 + 0o57), 35793 - 35785), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101 + 0o55) + '\061' + chr(2399 - 2350), 0b1000), ehT0Px3KOsy9(chr(1487 - 1439) + chr(1190 - 1079) + chr(49) + chr(1352 - 1300) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(69 - 21) + chr(0b1101111) + '\x32' + chr(1589 - 1535) + chr(48), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11011 + 0o26) + '\x35' + chr(1276 - 1228), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(513 - 464) + chr(1339 - 1290) + chr(0b110 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(51) + chr(0b110001) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010001 + 0o36) + chr(0b11011 + 0o26) + '\x32' + chr(64 - 16), 43461 - 43453), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + chr(1951 - 1903), 41329 - 41321), ehT0Px3KOsy9(chr(486 - 438) + chr(0b1101111) + chr(0b111 + 0o54) + chr(0b110111) + chr(0b1111 + 0o42), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + '\x35' + chr(54), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(48), 0o10), ehT0Px3KOsy9(chr(863 - 815) + chr(0b100011 + 0o114) + chr(0b110010) + chr(0b110011 + 0o0) + chr(2131 - 2079), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(1475 - 1422) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + '\x31' + '\061' + chr(0b110100), 12225 - 12217), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\065' + chr(48), 54805 - 54797), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\x32' + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(9015 - 8904) + '\x35' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(50) + chr(0b110011) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7423 - 7312) + chr(0b110011) + chr(0b110000) + chr(0b110011), 54608 - 54600), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101011 + 0o4) + chr(50) + chr(0b1001 + 0o53) + chr(269 - 217), 8), ehT0Px3KOsy9(chr(1073 - 1025) + chr(4445 - 4334) + '\x35' + chr(0b101010 + 0o12), 18007 - 17999), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(8815 - 8704) + '\061' + chr(0b110110) + chr(0b10111 + 0o33), 16704 - 16696), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(774 - 721) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(54) + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(52) + '\x35', 14798 - 14790), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(0b110 + 0o53) + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9(chr(1375 - 1327) + chr(0b1101111) + '\x31' + '\x34', 0o10), ehT0Px3KOsy9(chr(1626 - 1578) + chr(0b110011 + 0o74) + '\x31' + chr(0b110011) + chr(1804 - 1749), 23080 - 23072), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + '\061' + chr(0b101101 + 0o3) + chr(1810 - 1760), 48673 - 48665), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(493 - 438) + chr(1906 - 1851), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b110010) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000 + 0o147) + '\x35' + '\065', 43968 - 43960), ehT0Px3KOsy9('\060' + chr(2232 - 2121) + chr(0b100101 + 0o20) + '\061', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(52) + chr(0b110010), 45615 - 45607)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\065' + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8'), chr(100) + '\145' + chr(0b10101 + 0o116) + chr(0b1101111) + '\144' + chr(0b1011111 + 0o6))(chr(117) + chr(7756 - 7640) + chr(135 - 33) + chr(0b101101) + chr(2586 - 2530)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def vGYFMKlhPcqx(oVre8I6UXc3b, cWaXceDbkqGZ=ehT0Px3KOsy9('\x30' + chr(111) + '\x31', ord("\x08"))):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8bs\xf5E\xe6\x01\xd9\x04,\x8e42\x8c[Z[\xf3\xd8"\xdc\xc1['), chr(100) + chr(0b1010100 + 0o21) + '\x63' + chr(2636 - 2525) + '\x64' + chr(101))(chr(0b1110101) + '\164' + '\146' + '\055' + chr(0b111000)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95S\xf1B\xc4\x16\xf62-\xb5\n '), '\x64' + chr(0b101110 + 0o67) + '\143' + chr(0b1001 + 0o146) + '\x64' + chr(101))(chr(4605 - 4488) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b111000))), ehT0Px3KOsy9(cWaXceDbkqGZ)))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
Counter.decrement
|
def decrement(self, delta=1):
"""Decrement counter value.
Parameters
----------
value_change : int
Amount by which to subtract from the counter
"""
check_call(_LIB.MXProfileAdjustCounter(self.handle, -int(delta)))
|
python
|
def decrement(self, delta=1):
"""Decrement counter value.
Parameters
----------
value_change : int
Amount by which to subtract from the counter
"""
check_call(_LIB.MXProfileAdjustCounter(self.handle, -int(delta)))
|
[
"def",
"decrement",
"(",
"self",
",",
"delta",
"=",
"1",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXProfileAdjustCounter",
"(",
"self",
".",
"handle",
",",
"-",
"int",
"(",
"delta",
")",
")",
")"
] |
Decrement counter value.
Parameters
----------
value_change : int
Amount by which to subtract from the counter
|
[
"Decrement",
"counter",
"value",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L425-L433
|
train
|
Decrement the value of the internal counter by delta.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVM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qGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(778 - 727) + chr(0b110001) + chr(1921 - 1871), 64385 - 64377), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(54) + chr(1993 - 1940), 0b1000), ehT0Px3KOsy9('\x30' + chr(7059 - 6948) + chr(51) + chr(0b110011) + chr(1047 - 997), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + chr(51) + '\067' + '\x32', 0b1000), ehT0Px3KOsy9(chr(1827 - 1779) + chr(0b1101111) + chr(0b110010) + chr(346 - 297) + chr(1055 - 1001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11100 + 0o123) + '\x32' + chr(0b110001) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\064' + chr(0b110111), 19871 - 19863), ehT0Px3KOsy9('\x30' + chr(12228 - 12117) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7412 - 7301) + chr(0b11111 + 0o22) + '\x34' + chr(0b110110 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b100011 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + '\063' + chr(0b11000 + 0o37) + chr(1937 - 1884), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110001) + chr(1231 - 1182), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100001 + 0o116) + '\x32' + chr(55) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11660 - 11549) + chr(0b10000 + 0o44) + chr(0b110110), 34517 - 34509), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100 + 0o62) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9421 - 9310) + chr(1999 - 1949) + '\061' + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x37' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b110100 + 0o1) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(514 - 466) + chr(111) + chr(51) + chr(618 - 564) + chr(0b110001 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(935 - 886) + '\x35' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(347 - 296) + chr(0b110111) + '\x32', 8), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(10576 - 10465) + '\x32' + chr(547 - 492) + chr(1018 - 968), 0b1000), ehT0Px3KOsy9(chr(150 - 102) + '\x6f' + '\062' + chr(53) + chr(0b110001 + 0o5), 4140 - 4132), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(548 - 494) + '\062', 39927 - 39919), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\065' + chr(755 - 703), 3430 - 3422), ehT0Px3KOsy9('\x30' + '\157' + chr(2446 - 2395) + '\x32' + chr(1848 - 1799), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(49) + '\067', 54552 - 54544), ehT0Px3KOsy9('\060' + chr(11776 - 11665) + chr(55 - 5) + chr(0b110111) + chr(0b10101 + 0o40), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + chr(49) + chr(54) + '\061', 22139 - 22131), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + chr(0b10000 + 0o47) + chr(2472 - 2421), 40409 - 40401), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011 + 0o0) + chr(2196 - 2145) + chr(0b110101), 5618 - 5610), ehT0Px3KOsy9(chr(1547 - 1499) + chr(2939 - 2828) + chr(53) + chr(0b10100 + 0o37), 0o10), ehT0Px3KOsy9(chr(1588 - 1540) + chr(7552 - 7441) + chr(0b11100 + 0o27) + '\066' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(50) + '\065' + chr(50), 50250 - 50242), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(0b100111 + 0o12) + chr(0b110110) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(3520 - 3409) + chr(1783 - 1733) + chr(552 - 502) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(1957 - 1846) + chr(51) + chr(0b110010), 24666 - 24658), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b110 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1705 - 1654) + chr(0b110001) + chr(50), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100101 + 0o20) + chr(0b110000), 21125 - 21117)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + chr(100) + '\x65')(chr(117) + '\164' + '\x66' + chr(1113 - 1068) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def hnfrK4Q4JD88(oVre8I6UXc3b, cWaXceDbkqGZ=ehT0Px3KOsy9('\x30' + '\157' + '\x31', 8)):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x87-\x8a\x88\xe1\xee\x8em\x03l}\x97<\xcaRp\xe0\xc8\xc3\x83\x0b\x88'), chr(100) + chr(0b1100101) + '\143' + chr(0b1110 + 0o141) + '\x64' + chr(0b1100101))(chr(0b1010000 + 0o45) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b110001 + 0o7)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\r\x8e\x8f\xc3\xf9\xa1[\x02WC\x85'), chr(100) + chr(0b110111 + 0o56) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + '\x38')), -ehT0Px3KOsy9(cWaXceDbkqGZ)))
|
apache/incubator-mxnet
|
python/mxnet/profiler.py
|
Marker.mark
|
def mark(self, scope='process'):
"""Set up the profiler state to record operator.
Parameters
----------
scope : string, optional
Indicates what scope the marker should refer to.
Can be 'global', 'process', thread', task', and 'marker'
Default is `process`.
"""
check_call(_LIB.MXProfileSetMarker(self.domain.handle, c_str(self.name), c_str(scope)))
|
python
|
def mark(self, scope='process'):
"""Set up the profiler state to record operator.
Parameters
----------
scope : string, optional
Indicates what scope the marker should refer to.
Can be 'global', 'process', thread', task', and 'marker'
Default is `process`.
"""
check_call(_LIB.MXProfileSetMarker(self.domain.handle, c_str(self.name), c_str(scope)))
|
[
"def",
"mark",
"(",
"self",
",",
"scope",
"=",
"'process'",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXProfileSetMarker",
"(",
"self",
".",
"domain",
".",
"handle",
",",
"c_str",
"(",
"self",
".",
"name",
")",
",",
"c_str",
"(",
"scope",
")",
")",
")"
] |
Set up the profiler state to record operator.
Parameters
----------
scope : string, optional
Indicates what scope the marker should refer to.
Can be 'global', 'process', thread', task', and 'marker'
Default is `process`.
|
[
"Set",
"up",
"the",
"profiler",
"state",
"to",
"record",
"operator",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/profiler.py#L463-L473
|
train
|
Set up the profiler state to record operator.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk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o4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\065', 59234 - 59226), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110011) + chr(0b11011 + 0o26) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + '\x36' + chr(0b11010 + 0o30), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(2627 - 2516) + chr(315 - 266) + chr(54) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + chr(1207 - 1157) + chr(0b101000 + 0o16) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11 + 0o60) + '\x30' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + chr(0b110010) + chr(584 - 532) + chr(0b11111 + 0o21), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(51) + chr(0b11011 + 0o30) + chr(2360 - 2311), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1000001 + 0o56) + chr(49) + chr(0b110111) + chr(48), 42491 - 42483), ehT0Px3KOsy9('\x30' + chr(8840 - 8729) + '\x31' + chr(944 - 896) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100110 + 0o111) + '\x31' + chr(52) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2248 - 2199) + chr(2406 - 2353) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(2778 - 2667) + chr(51) + chr(231 - 180) + chr(0b110010), 28216 - 28208), ehT0Px3KOsy9(chr(1249 - 1201) + chr(0b1101111) + chr(255 - 202), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(0b110011) + chr(55) + chr(52), 9755 - 9747), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(438 - 389) + chr(51) + '\x30', 0o10), ehT0Px3KOsy9(chr(442 - 394) + chr(9992 - 9881) + '\x33' + chr(0b110101) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(6616 - 6505) + chr(0b11111 + 0o23) + chr(0b11010 + 0o34) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\062' + chr(1267 - 1213), 3573 - 3565), ehT0Px3KOsy9('\x30' + chr(2255 - 2144) + chr(0b110001) + chr(50) + chr(0b1110 + 0o42), 0o10), ehT0Px3KOsy9(chr(890 - 842) + chr(111) + chr(49) + chr(1129 - 1079) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b101011 + 0o6) + chr(0b11110 + 0o27) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(978 - 929) + chr(1080 - 1025) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(12086 - 11975) + '\x33' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(54) + '\x35', 0o10), ehT0Px3KOsy9(chr(1700 - 1652) + '\157' + chr(1597 - 1548) + chr(1910 - 1858) + chr(0b110 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(0b110001 + 0o0) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101110 + 0o1) + chr(0b1100 + 0o51) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\062' + chr(2586 - 2534), 0b1000), ehT0Px3KOsy9(chr(640 - 592) + chr(0b1001001 + 0o46) + '\x33' + '\061' + chr(1028 - 977), 0o10), ehT0Px3KOsy9(chr(1500 - 1452) + chr(1955 - 1844) + '\061' + chr(49) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(50) + chr(0b10101 + 0o33), 8), ehT0Px3KOsy9(chr(2135 - 2087) + chr(0b1111 + 0o140) + chr(0b110011) + chr(1934 - 1884), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8997 - 8886) + chr(49) + chr(2362 - 2308) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(1170 - 1122) + chr(0b1101111) + '\061' + '\061' + chr(0b1 + 0o57), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(2653 - 2601) + chr(51), 778 - 770), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110011) + chr(0b10000 + 0o45), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b110100) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(981 - 932) + '\x37' + chr(0b110000), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(738 - 690) + chr(111) + '\x35' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(0b1001100 + 0o30) + '\145' + chr(0b1100011) + chr(3650 - 3539) + chr(4201 - 4101) + chr(0b1100101))('\165' + chr(116) + '\146' + chr(0b101 + 0o50) + chr(62 - 6)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def M4hjJuuC8Wtm(oVre8I6UXc3b, CJBHNoj4zKoT=xafqLlk3kkUe(SXOLrMavuUCe(b'e\xb8]\x10\xd5\xb2\xd3'), chr(6577 - 6477) + chr(101) + chr(0b110000 + 0o63) + chr(111) + '\144' + chr(816 - 715))('\165' + chr(116) + '\x66' + chr(1192 - 1147) + '\x38')):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'X\x92b\x01\xdf\xa7\xc9\xb5e+%\x11!\xbbw\x97=\x9e'), chr(9573 - 9473) + '\x65' + '\x63' + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(8721 - 8605) + '\146' + '\x2d' + chr(2489 - 2433)))(xafqLlk3kkUe(oVre8I6UXc3b.domain, xafqLlk3kkUe(SXOLrMavuUCe(b'F\xb2f\x06\xfd\xb0\xe6\x83d\x02\x1a\x1d'), '\144' + '\x65' + '\x63' + '\157' + '\x64' + chr(9033 - 8932))(chr(12130 - 12013) + chr(9855 - 9739) + chr(102) + chr(0b101101) + '\070')), ZYHUZuTony_e(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b"T\x83D9\xe2\xbb\xec\xbdD\x1e'#"), chr(4724 - 4624) + chr(0b101010 + 0o73) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(0b1110000 + 0o5) + '\x74' + chr(0b101011 + 0o73) + '\055' + chr(0b111000)))), ZYHUZuTony_e(CJBHNoj4zKoT)))
|
apache/incubator-mxnet
|
python/mxnet/rtc.py
|
CudaModule.get_kernel
|
def get_kernel(self, name, signature):
r"""Get CUDA kernel from compiled module.
Parameters
----------
name : str
String name of the kernel.
signature : str
Function signature for the kernel. For example, if a kernel is
declared as::
extern "C" __global__ void axpy(const float *x, double *y, int alpha)
Then its signature should be::
const float *x, double *y, int alpha
or::
const float *, double *, int
Note that `*` in signature marks an argument as array and
`const` marks an argument as constant (input) array.
Returns
-------
CudaKernel
CUDA kernels that can be launched on GPUs.
"""
hdl = CudaKernelHandle()
is_ndarray = []
is_const = []
dtypes = []
pattern = re.compile(r"""^\s*(const)?\s*([\w_]+)\s*(\*)?\s*([\w_]+)?\s*$""")
args = re.sub(r"\s+", " ", signature).split(",")
for arg in args:
match = pattern.match(arg)
if not match or match.groups()[1] == 'const':
raise ValueError(
'Invalid function prototype "%s". Must be in the '
'form of "(const) type (*) (name)"'%arg)
is_const.append(bool(match.groups()[0]))
dtype = match.groups()[1]
is_ndarray.append(bool(match.groups()[2]))
if dtype not in _DTYPE_CPP_TO_NP:
raise TypeError(
"Unsupported kernel argument type %s. Supported types are: %s."%(
arg, ','.join(_DTYPE_CPP_TO_NP.keys())))
dtypes.append(_DTYPE_NP_TO_MX[_DTYPE_CPP_TO_NP[dtype]])
check_call(_LIB.MXRtcCudaKernelCreate(
self.handle,
c_str(name),
len(dtypes),
c_array_buf(ctypes.c_int, array('i', is_ndarray)),
c_array_buf(ctypes.c_int, array('i', is_const)),
c_array_buf(ctypes.c_int, array('i', dtypes)),
ctypes.byref(hdl)))
return CudaKernel(hdl, name, is_ndarray, dtypes)
|
python
|
def get_kernel(self, name, signature):
r"""Get CUDA kernel from compiled module.
Parameters
----------
name : str
String name of the kernel.
signature : str
Function signature for the kernel. For example, if a kernel is
declared as::
extern "C" __global__ void axpy(const float *x, double *y, int alpha)
Then its signature should be::
const float *x, double *y, int alpha
or::
const float *, double *, int
Note that `*` in signature marks an argument as array and
`const` marks an argument as constant (input) array.
Returns
-------
CudaKernel
CUDA kernels that can be launched on GPUs.
"""
hdl = CudaKernelHandle()
is_ndarray = []
is_const = []
dtypes = []
pattern = re.compile(r"""^\s*(const)?\s*([\w_]+)\s*(\*)?\s*([\w_]+)?\s*$""")
args = re.sub(r"\s+", " ", signature).split(",")
for arg in args:
match = pattern.match(arg)
if not match or match.groups()[1] == 'const':
raise ValueError(
'Invalid function prototype "%s". Must be in the '
'form of "(const) type (*) (name)"'%arg)
is_const.append(bool(match.groups()[0]))
dtype = match.groups()[1]
is_ndarray.append(bool(match.groups()[2]))
if dtype not in _DTYPE_CPP_TO_NP:
raise TypeError(
"Unsupported kernel argument type %s. Supported types are: %s."%(
arg, ','.join(_DTYPE_CPP_TO_NP.keys())))
dtypes.append(_DTYPE_NP_TO_MX[_DTYPE_CPP_TO_NP[dtype]])
check_call(_LIB.MXRtcCudaKernelCreate(
self.handle,
c_str(name),
len(dtypes),
c_array_buf(ctypes.c_int, array('i', is_ndarray)),
c_array_buf(ctypes.c_int, array('i', is_const)),
c_array_buf(ctypes.c_int, array('i', dtypes)),
ctypes.byref(hdl)))
return CudaKernel(hdl, name, is_ndarray, dtypes)
|
[
"def",
"get_kernel",
"(",
"self",
",",
"name",
",",
"signature",
")",
":",
"hdl",
"=",
"CudaKernelHandle",
"(",
")",
"is_ndarray",
"=",
"[",
"]",
"is_const",
"=",
"[",
"]",
"dtypes",
"=",
"[",
"]",
"pattern",
"=",
"re",
".",
"compile",
"(",
"r\"\"\"^\\s*(const)?\\s*([\\w_]+)\\s*(\\*)?\\s*([\\w_]+)?\\s*$\"\"\"",
")",
"args",
"=",
"re",
".",
"sub",
"(",
"r\"\\s+\"",
",",
"\" \"",
",",
"signature",
")",
".",
"split",
"(",
"\",\"",
")",
"for",
"arg",
"in",
"args",
":",
"match",
"=",
"pattern",
".",
"match",
"(",
"arg",
")",
"if",
"not",
"match",
"or",
"match",
".",
"groups",
"(",
")",
"[",
"1",
"]",
"==",
"'const'",
":",
"raise",
"ValueError",
"(",
"'Invalid function prototype \"%s\". Must be in the '",
"'form of \"(const) type (*) (name)\"'",
"%",
"arg",
")",
"is_const",
".",
"append",
"(",
"bool",
"(",
"match",
".",
"groups",
"(",
")",
"[",
"0",
"]",
")",
")",
"dtype",
"=",
"match",
".",
"groups",
"(",
")",
"[",
"1",
"]",
"is_ndarray",
".",
"append",
"(",
"bool",
"(",
"match",
".",
"groups",
"(",
")",
"[",
"2",
"]",
")",
")",
"if",
"dtype",
"not",
"in",
"_DTYPE_CPP_TO_NP",
":",
"raise",
"TypeError",
"(",
"\"Unsupported kernel argument type %s. Supported types are: %s.\"",
"%",
"(",
"arg",
",",
"','",
".",
"join",
"(",
"_DTYPE_CPP_TO_NP",
".",
"keys",
"(",
")",
")",
")",
")",
"dtypes",
".",
"append",
"(",
"_DTYPE_NP_TO_MX",
"[",
"_DTYPE_CPP_TO_NP",
"[",
"dtype",
"]",
"]",
")",
"check_call",
"(",
"_LIB",
".",
"MXRtcCudaKernelCreate",
"(",
"self",
".",
"handle",
",",
"c_str",
"(",
"name",
")",
",",
"len",
"(",
"dtypes",
")",
",",
"c_array_buf",
"(",
"ctypes",
".",
"c_int",
",",
"array",
"(",
"'i'",
",",
"is_ndarray",
")",
")",
",",
"c_array_buf",
"(",
"ctypes",
".",
"c_int",
",",
"array",
"(",
"'i'",
",",
"is_const",
")",
")",
",",
"c_array_buf",
"(",
"ctypes",
".",
"c_int",
",",
"array",
"(",
"'i'",
",",
"dtypes",
")",
")",
",",
"ctypes",
".",
"byref",
"(",
"hdl",
")",
")",
")",
"return",
"CudaKernel",
"(",
"hdl",
",",
"name",
",",
"is_ndarray",
",",
"dtypes",
")"
] |
r"""Get CUDA kernel from compiled module.
Parameters
----------
name : str
String name of the kernel.
signature : str
Function signature for the kernel. For example, if a kernel is
declared as::
extern "C" __global__ void axpy(const float *x, double *y, int alpha)
Then its signature should be::
const float *x, double *y, int alpha
or::
const float *, double *, int
Note that `*` in signature marks an argument as array and
`const` marks an argument as constant (input) array.
Returns
-------
CudaKernel
CUDA kernels that can be launched on GPUs.
|
[
"r",
"Get",
"CUDA",
"kernel",
"from",
"compiled",
"module",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/rtc.py#L112-L171
|
train
|
Get CUDA kernel from compiled module.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtW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pH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(2430 - 2380) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b110100) + '\067', 24326 - 24318), ehT0Px3KOsy9(chr(630 - 582) + chr(554 - 443) + '\x34' + chr(0b10001 + 0o46), 51893 - 51885), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2090 - 2041) + chr(55) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9280 - 9169) + '\x33' + '\062' + '\061', 5674 - 5666), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100110 + 0o14) + chr(0b110000) + chr(0b100101 + 0o16), 38253 - 38245), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\065' + chr(0b11111 + 0o30), 0o10), ehT0Px3KOsy9(chr(48) + chr(8363 - 8252) + '\061' + chr(0b10000 + 0o41) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(49) + '\x37' + chr(0b100110 + 0o13), 22522 - 22514), ehT0Px3KOsy9('\x30' + '\157' + chr(1280 - 1231) + '\063' + chr(0b1010 + 0o46), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111100 + 0o63) + chr(777 - 726) + '\x30' + chr(0b10000 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(53) + chr(54), 28447 - 28439), ehT0Px3KOsy9(chr(833 - 785) + chr(111) + '\x31' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(1729 - 1679) + chr(0b100011 + 0o17), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\066' + '\063', 14538 - 14530), ehT0Px3KOsy9(chr(1099 - 1051) + chr(7119 - 7008) + chr(52) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\062' + '\064', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + '\064', 26155 - 26147), ehT0Px3KOsy9(chr(48) + chr(0b11110 + 0o121) + chr(51) + chr(0b110001), 54714 - 54706), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100100 + 0o17) + chr(0b110100) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + '\067' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b110100) + chr(1573 - 1524), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(223 - 172) + chr(0b110011) + chr(0b110101), 18653 - 18645), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100001 + 0o21) + '\x30' + '\x31', 63286 - 63278), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(220 - 167) + chr(0b110010), 18570 - 18562), ehT0Px3KOsy9(chr(48) + chr(10959 - 10848) + chr(0b101111 + 0o3) + chr(0b110000 + 0o7) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9322 - 9211) + chr(633 - 580) + '\x36', 8), ehT0Px3KOsy9(chr(128 - 80) + chr(0b1101011 + 0o4) + chr(1915 - 1866) + '\064' + chr(0b100101 + 0o13), 1998 - 1990), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b10 + 0o56) + '\x36', 0o10), ehT0Px3KOsy9(chr(227 - 179) + chr(0b1101111) + '\x32' + '\x35' + chr(207 - 157), 0o10), ehT0Px3KOsy9(chr(48) + chr(5075 - 4964) + chr(0b110011) + chr(0b110100) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(362 - 311) + '\x33' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + '\067' + '\066', 0b1000), ehT0Px3KOsy9(chr(700 - 652) + chr(8766 - 8655) + '\x33' + chr(50), 19699 - 19691), ehT0Px3KOsy9(chr(159 - 111) + chr(111) + '\063' + '\063' + chr(53), 8), ehT0Px3KOsy9(chr(1229 - 1181) + chr(0b1101111) + '\x31' + chr(671 - 618) + chr(2034 - 1986), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(839 - 785) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + '\063' + chr(0b1100 + 0o52) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(798 - 750) + chr(4262 - 4151) + chr(0b110011) + chr(1283 - 1235) + chr(53), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + chr(0b10001 + 0o44) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + chr(0b100110 + 0o76) + chr(101))(chr(1695 - 1578) + '\164' + chr(102) + '\x2d' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def i0zXQTab8SFX(oVre8I6UXc3b, AIvJRzLdDfgF, W65V97aJT0Tb):
WYHuLDJkKIZM = mWziDiMBt0lZ()
RDfrULpLHcPj = []
EWsiIikOHRid = []
povqwBfbr44M = []
D7PcF8SpuWmc = _7u55U49WwX2.compile(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\xfbTR<\xb2\xec\x81:\rq\xfdr{\xf8\x1by\xc8KF\xbc\x16\xc8\x81\xf2@\x93rJo\x95\xb9\xa9T2\x864\x85\xa9\x98\xfb\x8e\x18$g\xfb\xa7'), chr(0b101001 + 0o73) + chr(101) + chr(99) + chr(0b1101111) + chr(100) + chr(101))('\x75' + chr(116) + chr(0b1100110) + '\055' + chr(0b110111 + 0o1)))
kJDRfRhcZHjS = _7u55U49WwX2.sub(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c\xd4\x0c'), chr(0b10010 + 0o122) + '\x65' + '\143' + chr(0b10100 + 0o133) + chr(8625 - 8525) + chr(101))(chr(1504 - 1387) + chr(0b1000111 + 0o55) + chr(102) + chr(1931 - 1886) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0'), '\x64' + chr(101) + '\143' + chr(0b1101111) + '\144' + '\145')(chr(117) + '\164' + chr(0b1011011 + 0o13) + chr(45) + chr(0b111000)), W65V97aJT0Tb).split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), '\x64' + '\145' + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b10011 + 0o142) + chr(116) + chr(0b1001100 + 0o32) + chr(45) + chr(0b11100 + 0o34)))
for LTE9MPUbqSos in kJDRfRhcZHjS:
AZi1vqvu7T1_ = D7PcF8SpuWmc.match(LTE9MPUbqSos)
if not AZi1vqvu7T1_ or xafqLlk3kkUe(AZi1vqvu7T1_, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xd5H\rd\xa2'), '\x64' + chr(6888 - 6787) + '\x63' + chr(0b1001000 + 0o47) + chr(100) + '\x65')('\x75' + chr(2652 - 2536) + chr(0b1100110) + '\055' + chr(0b111000)))()[ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b10110 + 0o33), 0o10)] == xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xc8I\x0b`'), '\x64' + '\x65' + '\143' + '\157' + chr(0b1100100) + '\x65')(chr(0b1001001 + 0o54) + '\x74' + '\146' + chr(45) + chr(56)):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\xc9Q\x19x\xb8\xe7\xcf/\x0c6\xa1Za\xbd]\x02\xe4Nv\x95R\x95\xa4\xf1\x0f\x9b\x0cE5\x88\xcb\xfa3o\xae\x1c\xd2\x94\xa0\xf0\xceIX`\xb9\xe6\xcf/\x16*\xaf\x0eg\xb4\x13\x00\xbc_v\x8fN\x95\xf4\xa1\x1e\xc2^\x05f\x82\xcf\xf3^2\xb3\t\x9f\x93\xec\xf2'), '\x64' + '\145' + chr(0b111100 + 0o47) + '\x6f' + chr(2822 - 2722) + chr(101))(chr(0b1110101) + '\164' + chr(7599 - 7497) + '\055' + chr(56)) % LTE9MPUbqSos)
xafqLlk3kkUe(EWsiIikOHRid, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xd7W\x1dz\xb5'), chr(100) + '\x65' + chr(99) + '\157' + chr(3949 - 3849) + '\x65')(chr(5251 - 5134) + '\164' + chr(0b1100011 + 0o3) + '\x2d' + chr(2607 - 2551)))(WbBjf8Y7v9VN(xafqLlk3kkUe(AZi1vqvu7T1_, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xd5H\rd\xa2'), chr(8731 - 8631) + chr(1064 - 963) + chr(99) + '\x6f' + '\144' + chr(2692 - 2591))(chr(9150 - 9033) + chr(0b1001011 + 0o51) + '\x66' + chr(0b100 + 0o51) + chr(56)))()[ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\x30', ord("\x08"))]))
jSV9IKnemH7K = AZi1vqvu7T1_.groups()[ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001), 8)]
xafqLlk3kkUe(RDfrULpLHcPj, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xd7W\x1dz\xb5'), '\x64' + chr(0b11010 + 0o113) + chr(0b100100 + 0o77) + chr(0b1101111) + chr(0b101100 + 0o70) + chr(7300 - 7199))(chr(0b1110101) + '\164' + chr(102) + chr(45) + '\x38'))(WbBjf8Y7v9VN(xafqLlk3kkUe(AZi1vqvu7T1_, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xd5H\rd\xa2'), '\144' + chr(1103 - 1002) + chr(99) + chr(111) + chr(100) + chr(101))(chr(0b110010 + 0o103) + chr(0b1110100) + chr(0b1100110) + chr(0b1011 + 0o42) + chr(1687 - 1631)))()[ehT0Px3KOsy9(chr(1128 - 1080) + chr(0b111000 + 0o67) + '\062', 0b1000)]))
if jSV9IKnemH7K not in p05lQOqPkUtC:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xc9T\rd\xa1\xec\x9d=\x1c<\xe2Em\xa0]G\xf8\x1cx\x93Z\x94\xb0\xe4\x04\xcf\x0e\x14?\xda\x80\xfa[i\xf3H\xa1\x83\xb5\xa0\xc8U\x0cq\xb5\xa3\x9b0\t=\xb1\x0ei\xa0V\x18\xb4\x19j\xcf'), chr(816 - 716) + '\145' + chr(0b1101 + 0o126) + chr(111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b101100 + 0o110) + '\x66' + chr(1369 - 1324) + chr(0b11000 + 0o40)) % (LTE9MPUbqSos, xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), chr(287 - 187) + '\x65' + chr(0b1010000 + 0o23) + '\157' + chr(0b100010 + 0o102) + chr(0b111010 + 0o53))(chr(117) + chr(5385 - 5269) + chr(0b1100000 + 0o6) + chr(1669 - 1624) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b"\x8f\xc8p n\xa5\xd5\xa1'\x08\x10\x84"), chr(100) + chr(0b110 + 0o137) + chr(0b1100011) + chr(7387 - 7276) + chr(0b1010010 + 0o22) + chr(0b1100101 + 0o0))(chr(3374 - 3257) + chr(4061 - 3945) + '\x66' + '\055' + chr(0b111000)))(xafqLlk3kkUe(p05lQOqPkUtC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\xc2^\x0b'), chr(100) + chr(101) + chr(99) + '\x6f' + '\144' + chr(0b1100101))('\x75' + '\164' + '\146' + '\x2d' + chr(0b10100 + 0o44)))())))
xafqLlk3kkUe(povqwBfbr44M, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xd7W\x1dz\xb5'), '\x64' + chr(3404 - 3303) + chr(9001 - 8902) + chr(0b101100 + 0o103) + chr(0b1001 + 0o133) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(2791 - 2735)))(DX1GNb5Mermf[p05lQOqPkUtC[jSV9IKnemH7K]])
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d\xffu\x0cw\x92\xf6\x8b(2=\xb0@m\xbepP\xf1]m\x84'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1001010 + 0o33))(chr(0b1110101) + chr(116) + chr(5639 - 5537) + '\x2d' + chr(3100 - 3044)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x83\xdfs\rY\xa0\xc5\xb5-\x03\x02\xba'), chr(6538 - 6438) + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(8067 - 7966))(chr(4283 - 4166) + chr(116) + chr(0b10000 + 0o126) + chr(1939 - 1894) + chr(56))), ZYHUZuTony_e(AIvJRzLdDfgF), c2A0yzQpDQB3(povqwBfbr44M), IWgIBOZX5BKJ(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xf8N\x16`'), chr(5233 - 5133) + chr(3555 - 3454) + chr(0b1100011) + chr(0b10001 + 0o136) + chr(0b1100001 + 0o3) + '\145')(chr(12013 - 11896) + chr(0b1110100) + chr(0b100000 + 0o106) + '\055' + chr(1728 - 1672))), B0ePDhpqxN5n(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9'), '\x64' + chr(101) + '\x63' + '\x6f' + '\144' + chr(0b101111 + 0o66))('\165' + '\164' + chr(0b1100110) + '\x2d' + '\070'), RDfrULpLHcPj)), IWgIBOZX5BKJ(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xf8N\x16`'), chr(0b1100100) + chr(0b1100101) + chr(0b110001 + 0o62) + chr(2207 - 2096) + chr(0b101001 + 0o73) + '\145')(chr(117) + '\164' + chr(102) + chr(45) + '\x38')), B0ePDhpqxN5n(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(0b111101 + 0o47) + chr(0b110001 + 0o64))('\x75' + chr(0b1110100) + chr(102) + chr(1591 - 1546) + '\070'), EWsiIikOHRid)), IWgIBOZX5BKJ(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\xf8N\x16`'), '\144' + '\145' + chr(0b1010000 + 0o23) + chr(0b1101 + 0o142) + chr(0b1100100) + '\145')(chr(0b1110100 + 0o1) + '\x74' + chr(7696 - 7594) + '\055' + chr(56))), B0ePDhpqxN5n(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9'), chr(0b1100100) + chr(0b1101 + 0o130) + '\143' + chr(111) + chr(100) + chr(0b0 + 0o145))('\x75' + chr(116) + '\x66' + chr(621 - 576) + '\x38'), povqwBfbr44M)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xdeU\x1dr'), chr(0b1100100) + chr(101) + chr(5381 - 5282) + '\x6f' + chr(0b1000111 + 0o35) + '\145')('\x75' + chr(0b1110100) + chr(102) + '\x2d' + chr(2381 - 2325)))(WYHuLDJkKIZM)))
return LOVEXfTBX0aD(WYHuLDJkKIZM, AIvJRzLdDfgF, RDfrULpLHcPj, povqwBfbr44M)
|
apache/incubator-mxnet
|
python/mxnet/rtc.py
|
CudaKernel.launch
|
def launch(self, args, ctx, grid_dims, block_dims, shared_mem=0):
"""Launch cuda kernel.
Parameters
----------
args : tuple of NDArray or numbers
List of arguments for kernel. NDArrays are expected for pointer
types (e.g. `float*`, `double*`) while numbers are expected for
non-pointer types (e.g. `int`, `float`).
ctx : Context
The context to launch kernel on. Must be GPU context.
grid_dims : tuple of 3 integers
Grid dimensions for CUDA kernel.
block_dims : tuple of 3 integers
Block dimensions for CUDA kernel.
shared_mem : integer, optional
Size of dynamically allocated shared memory. Defaults to 0.
"""
assert ctx.device_type == 'gpu', "Cuda kernel can only be launched on GPU"
assert len(grid_dims) == 3, "grid_dims must be a tuple of 3 integers"
assert len(block_dims) == 3, "grid_dims must be a tuple of 3 integers"
assert len(args) == len(self._dtypes), \
"CudaKernel(%s) expects %d arguments but got %d"%(
self._name, len(self._dtypes), len(args))
void_args = []
ref_holder = []
for i, (arg, is_nd, dtype) in enumerate(zip(args, self._is_ndarray, self._dtypes)):
if is_nd:
assert isinstance(arg, NDArray), \
"The %d-th argument is expected to be a NDArray but got %s"%(
i, type(arg))
void_args.append(arg.handle)
else:
assert isinstance(arg, numeric_types), \
"The %d-th argument is expected to be a number, but got %s"%(
i, type(arg))
ref_holder.append(np.array(arg, dtype=dtype))
void_args.append(ref_holder[-1].ctypes.data_as(ctypes.c_void_p))
check_call(_LIB.MXRtcCudaKernelCall(
self.handle,
ctx.device_id,
c_array(ctypes.c_void_p, void_args),
mx_uint(grid_dims[0]), mx_uint(grid_dims[1]), mx_uint(grid_dims[2]),
mx_uint(block_dims[0]), mx_uint(block_dims[1]), mx_uint(block_dims[2]),
mx_uint(shared_mem)))
|
python
|
def launch(self, args, ctx, grid_dims, block_dims, shared_mem=0):
"""Launch cuda kernel.
Parameters
----------
args : tuple of NDArray or numbers
List of arguments for kernel. NDArrays are expected for pointer
types (e.g. `float*`, `double*`) while numbers are expected for
non-pointer types (e.g. `int`, `float`).
ctx : Context
The context to launch kernel on. Must be GPU context.
grid_dims : tuple of 3 integers
Grid dimensions for CUDA kernel.
block_dims : tuple of 3 integers
Block dimensions for CUDA kernel.
shared_mem : integer, optional
Size of dynamically allocated shared memory. Defaults to 0.
"""
assert ctx.device_type == 'gpu', "Cuda kernel can only be launched on GPU"
assert len(grid_dims) == 3, "grid_dims must be a tuple of 3 integers"
assert len(block_dims) == 3, "grid_dims must be a tuple of 3 integers"
assert len(args) == len(self._dtypes), \
"CudaKernel(%s) expects %d arguments but got %d"%(
self._name, len(self._dtypes), len(args))
void_args = []
ref_holder = []
for i, (arg, is_nd, dtype) in enumerate(zip(args, self._is_ndarray, self._dtypes)):
if is_nd:
assert isinstance(arg, NDArray), \
"The %d-th argument is expected to be a NDArray but got %s"%(
i, type(arg))
void_args.append(arg.handle)
else:
assert isinstance(arg, numeric_types), \
"The %d-th argument is expected to be a number, but got %s"%(
i, type(arg))
ref_holder.append(np.array(arg, dtype=dtype))
void_args.append(ref_holder[-1].ctypes.data_as(ctypes.c_void_p))
check_call(_LIB.MXRtcCudaKernelCall(
self.handle,
ctx.device_id,
c_array(ctypes.c_void_p, void_args),
mx_uint(grid_dims[0]), mx_uint(grid_dims[1]), mx_uint(grid_dims[2]),
mx_uint(block_dims[0]), mx_uint(block_dims[1]), mx_uint(block_dims[2]),
mx_uint(shared_mem)))
|
[
"def",
"launch",
"(",
"self",
",",
"args",
",",
"ctx",
",",
"grid_dims",
",",
"block_dims",
",",
"shared_mem",
"=",
"0",
")",
":",
"assert",
"ctx",
".",
"device_type",
"==",
"'gpu'",
",",
"\"Cuda kernel can only be launched on GPU\"",
"assert",
"len",
"(",
"grid_dims",
")",
"==",
"3",
",",
"\"grid_dims must be a tuple of 3 integers\"",
"assert",
"len",
"(",
"block_dims",
")",
"==",
"3",
",",
"\"grid_dims must be a tuple of 3 integers\"",
"assert",
"len",
"(",
"args",
")",
"==",
"len",
"(",
"self",
".",
"_dtypes",
")",
",",
"\"CudaKernel(%s) expects %d arguments but got %d\"",
"%",
"(",
"self",
".",
"_name",
",",
"len",
"(",
"self",
".",
"_dtypes",
")",
",",
"len",
"(",
"args",
")",
")",
"void_args",
"=",
"[",
"]",
"ref_holder",
"=",
"[",
"]",
"for",
"i",
",",
"(",
"arg",
",",
"is_nd",
",",
"dtype",
")",
"in",
"enumerate",
"(",
"zip",
"(",
"args",
",",
"self",
".",
"_is_ndarray",
",",
"self",
".",
"_dtypes",
")",
")",
":",
"if",
"is_nd",
":",
"assert",
"isinstance",
"(",
"arg",
",",
"NDArray",
")",
",",
"\"The %d-th argument is expected to be a NDArray but got %s\"",
"%",
"(",
"i",
",",
"type",
"(",
"arg",
")",
")",
"void_args",
".",
"append",
"(",
"arg",
".",
"handle",
")",
"else",
":",
"assert",
"isinstance",
"(",
"arg",
",",
"numeric_types",
")",
",",
"\"The %d-th argument is expected to be a number, but got %s\"",
"%",
"(",
"i",
",",
"type",
"(",
"arg",
")",
")",
"ref_holder",
".",
"append",
"(",
"np",
".",
"array",
"(",
"arg",
",",
"dtype",
"=",
"dtype",
")",
")",
"void_args",
".",
"append",
"(",
"ref_holder",
"[",
"-",
"1",
"]",
".",
"ctypes",
".",
"data_as",
"(",
"ctypes",
".",
"c_void_p",
")",
")",
"check_call",
"(",
"_LIB",
".",
"MXRtcCudaKernelCall",
"(",
"self",
".",
"handle",
",",
"ctx",
".",
"device_id",
",",
"c_array",
"(",
"ctypes",
".",
"c_void_p",
",",
"void_args",
")",
",",
"mx_uint",
"(",
"grid_dims",
"[",
"0",
"]",
")",
",",
"mx_uint",
"(",
"grid_dims",
"[",
"1",
"]",
")",
",",
"mx_uint",
"(",
"grid_dims",
"[",
"2",
"]",
")",
",",
"mx_uint",
"(",
"block_dims",
"[",
"0",
"]",
")",
",",
"mx_uint",
"(",
"block_dims",
"[",
"1",
"]",
")",
",",
"mx_uint",
"(",
"block_dims",
"[",
"2",
"]",
")",
",",
"mx_uint",
"(",
"shared_mem",
")",
")",
")"
] |
Launch cuda kernel.
Parameters
----------
args : tuple of NDArray or numbers
List of arguments for kernel. NDArrays are expected for pointer
types (e.g. `float*`, `double*`) while numbers are expected for
non-pointer types (e.g. `int`, `float`).
ctx : Context
The context to launch kernel on. Must be GPU context.
grid_dims : tuple of 3 integers
Grid dimensions for CUDA kernel.
block_dims : tuple of 3 integers
Block dimensions for CUDA kernel.
shared_mem : integer, optional
Size of dynamically allocated shared memory. Defaults to 0.
|
[
"Launch",
"cuda",
"kernel",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/rtc.py#L185-L230
|
train
|
Launch cuda kernel.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwD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oxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100000 + 0o21) + '\x35' + chr(50), 27117 - 27109), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(49) + chr(1949 - 1894), 1469 - 1461), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(2176 - 2065) + chr(0b110010) + chr(0b110000) + chr(0b100 + 0o62), 28673 - 28665), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\x31' + chr(0b1000 + 0o56) + chr(49), 54872 - 54864), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(53) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(0b101010 + 0o15), 18830 - 18822), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x36' + '\062', 29068 - 29060), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\x37' + chr(857 - 802), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + '\x31' + chr(0b110000) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(0b100000 + 0o23) + chr(49) + chr(54), 35090 - 35082), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110000 + 0o7) + chr(0b110011 + 0o4), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1734 - 1682) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(7985 - 7874) + '\062' + chr(0b110101) + chr(0b100111 + 0o11), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(420 - 369) + chr(50) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101000 + 0o13) + chr(0b110011 + 0o3) + '\065', 17437 - 17429), ehT0Px3KOsy9('\x30' + chr(111) + chr(693 - 643) + '\x35' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x35' + chr(1689 - 1639), ord("\x08")), ehT0Px3KOsy9(chr(2120 - 2072) + chr(0b100100 + 0o113) + '\x32' + chr(48) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(542 - 492) + chr(0b110011) + chr(0b101100 + 0o10), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1052 - 941) + '\x31' + chr(55) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\x34' + chr(0b10 + 0o65), 0b1000), ehT0Px3KOsy9('\060' + chr(1732 - 1621) + chr(0b100110 + 0o15) + chr(804 - 751) + chr(49), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o14) + chr(141 - 86) + chr(153 - 104), 3448 - 3440), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(659 - 605), 53712 - 53704), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(1158 - 1107) + chr(2160 - 2105) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\x34' + chr(1152 - 1099), 7063 - 7055), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1288 - 1239) + chr(51) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b110011) + chr(553 - 505) + chr(1705 - 1657), 14717 - 14709), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b111 + 0o52) + chr(505 - 457) + '\061', 8), ehT0Px3KOsy9('\060' + chr(0b110010 + 0o75) + chr(1103 - 1054) + chr(0b110010) + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1265 - 1214) + chr(48) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2106 - 2056) + chr(0b11110 + 0o25) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(570 - 520) + chr(0b110110) + '\x33', 47054 - 47046), ehT0Px3KOsy9('\060' + chr(0b111 + 0o150) + chr(49) + '\062' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + '\x34' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9041 - 8930) + chr(200 - 151) + '\061' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x30' + chr(2808 - 2753), 8), ehT0Px3KOsy9(chr(1799 - 1751) + chr(0b1101111) + chr(0b110011) + chr(980 - 927) + chr(0b110 + 0o56), 64722 - 64714)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + chr(2148 - 2095) + chr(0b10101 + 0o33), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'D'), chr(0b1100100) + chr(101) + '\143' + chr(5901 - 5790) + '\x64' + chr(101))('\x75' + '\164' + chr(1358 - 1256) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def uVT0Y5BZyRiG(oVre8I6UXc3b, kJDRfRhcZHjS, oM3jLo753XfX, toRm_3Sz33Ja, dm_mR_vnHBPK, ArPDY0w0krFP=ehT0Px3KOsy9(chr(765 - 717) + chr(0b110111 + 0o70) + '\x30', 0b1000)):
assert xafqLlk3kkUe(oM3jLo753XfX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xea\xf0\x18\x8aB\xad\x8b8\xbe\x9a'), '\144' + '\145' + chr(0b1100 + 0o127) + '\157' + '\x64' + chr(5221 - 5120))(chr(0b1110101) + chr(116) + chr(0b110 + 0o140) + '\x2d' + chr(0b1001 + 0o57))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xff\xf3'), chr(0b1100100) + chr(0b1001101 + 0o30) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(4112 - 4011))(chr(3857 - 3740) + chr(3898 - 3782) + chr(0b1001111 + 0o27) + chr(0b10000 + 0o35) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b')\xfa\xe2\x10\xc9L\x97\x8d/\xab\x93\x02\xcb\xb5\x9b\x89\x85\xe9\xf0\x00G\x8bO\x14\x95o\x8dK8\xa8$5\xe6\xf0\xddpc\x1d\xd2'), '\144' + chr(1227 - 1126) + '\x63' + '\x6f' + chr(0b110 + 0o136) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(0b1000 + 0o45) + chr(0b111000))
assert c2A0yzQpDQB3(toRm_3Sz33Ja) == ehT0Px3KOsy9(chr(1118 - 1070) + chr(111) + chr(0b100100 + 0o17), ord("\x08")), xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xfd\xef\x15\xb6C\x9b\x922\xee\x92W\xdb\xa0\xd5\xcb\x8f\xa7\xfdY\x13\x9cZX\x9c.\x97C{\xf3a8\xa8\xeb\xd67A?\xf4'), '\x64' + chr(101) + '\143' + chr(3088 - 2977) + '\144' + chr(7855 - 7754))(chr(10262 - 10145) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(1373 - 1317))
assert c2A0yzQpDQB3(dm_mR_vnHBPK) == ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\063', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xfd\xef\x15\xb6C\x9b\x922\xee\x92W\xdb\xa0\xd5\xcb\x8f\xa7\xfdY\x13\x9cZX\x9c.\x97C{\xf3a8\xa8\xeb\xd67A?\xf4'), chr(3621 - 3521) + '\x65' + chr(5193 - 5094) + '\157' + chr(100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38')
assert c2A0yzQpDQB3(kJDRfRhcZHjS) == c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xeb\xf2\x08\x99B\x81'), chr(6098 - 5998) + chr(9980 - 9879) + chr(0b1100011) + chr(5053 - 4942) + chr(245 - 145) + '\x65')(chr(0b1011110 + 0o27) + chr(0b111001 + 0o73) + '\x66' + chr(2013 - 1968) + '\x38'))), xafqLlk3kkUe(SXOLrMavuUCe(b')\xfa\xe2\x10\xa2B\x80\x91$\xa2\xd7\x07\xdb\xfd\xd5\xcc\x92\xf7\xf9\x1a\x13\x9a\n\x11\x9d.\x99W<\xb5,4\xa8\xeb\xc0pF8\xf3\xcc\r\xe0\xf2Q\xccC'), '\x64' + '\x65' + '\x63' + '\x6f' + '\x64' + chr(6171 - 6070))(chr(1876 - 1759) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38') % (xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xe1\xe7\x1c\x8c'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(0b110 + 0o47) + chr(56))), c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xeb\xf2\x08\x99B\x81'), '\x64' + '\x65' + '\143' + '\157' + chr(6755 - 6655) + '\x65')(chr(9611 - 9494) + '\x74' + '\x66' + chr(1692 - 1647) + chr(56)))), c2A0yzQpDQB3(kJDRfRhcZHjS))
M7uTbt_OHazm = []
IYkir_lK0PqZ = []
for (WVxHKyX45z_L, (LTE9MPUbqSos, lOtEX3gC8AGs, jSV9IKnemH7K)) in YlkZvXL8qwsX(pZ0NK2y6HRbn(kJDRfRhcZHjS, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xe6\xf5.\x87C\x93\x8d3\xaf\x86'), '\x64' + chr(0b100 + 0o141) + chr(0b1100011) + '\x6f' + chr(0b1001000 + 0o34) + chr(0b11110 + 0o107))(chr(11865 - 11748) + '\164' + chr(0b1001011 + 0o33) + chr(45) + chr(0b111000))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xeb\xf2\x08\x99B\x81'), chr(0b1100100) + chr(10105 - 10004) + chr(5637 - 5538) + '\157' + '\x64' + chr(0b101101 + 0o70))(chr(117) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38')))):
if lOtEX3gC8AGs:
assert PlSM16l2KDPD(LTE9MPUbqSos, GdqFjMbtKL7s), xafqLlk3kkUe(SXOLrMavuUCe(b'>\xe7\xe3Q\xccC\xdf\x8b)\xee\x9eP\xcf\xa1\x98\xcc\x84\xf3\xbc\x10\x14\xc9OL\x89k\x9bQ>\xa4a%\xa9\xbf\xd15\x04,\xa7\xa2.\xce\xf4\x03\x88^\xd2\x9d4\xba\xdfE\xc7\xa0\xd5\x8c\x99'), '\x64' + chr(0b1100101) + chr(0b100011 + 0o100) + chr(0b1100011 + 0o14) + chr(1498 - 1398) + '\145')(chr(0b1011101 + 0o30) + chr(0b1100010 + 0o22) + chr(501 - 399) + chr(206 - 161) + chr(0b111000)) % (WVxHKyX45z_L, wmQmyeWBmUpv(LTE9MPUbqSos))
xafqLlk3kkUe(M7uTbt_OHazm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xff\xf6\x14\x87C'), chr(0b1100100) + chr(101) + chr(219 - 120) + '\157' + chr(100) + chr(101))('\165' + chr(0b10100 + 0o140) + chr(102) + chr(0b1001 + 0o44) + chr(2713 - 2657)))(xafqLlk3kkUe(LTE9MPUbqSos, xafqLlk3kkUe(SXOLrMavuUCe(b'9\xf7\xd2\x04\xa4V\xb4\xa5%\xb4\xa5Z'), chr(0b1100100) + chr(3947 - 3846) + chr(4700 - 4601) + '\x6f' + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + '\070')))
else:
assert PlSM16l2KDPD(LTE9MPUbqSos, _oZ7ToMS5xAg), xafqLlk3kkUe(SXOLrMavuUCe(b'>\xe7\xe3Q\xccC\xdf\x8b)\xee\x9eP\xcf\xa1\x98\xcc\x84\xf3\xbc\x10\x14\xc9OL\x89k\x9bQ>\xa4a%\xa9\xbf\xd15\x04,\xa7\x82\x1f\xe2\xe4\x14\x9b\x0b\xd2\x9d4\xba\xdfE\xc7\xa0\xd5\x8c\x99'), '\144' + chr(0b1100101) + chr(99) + chr(0b100001 + 0o116) + chr(0b11 + 0o141) + chr(101))('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(56)) % (WVxHKyX45z_L, wmQmyeWBmUpv(LTE9MPUbqSos))
xafqLlk3kkUe(IYkir_lK0PqZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xff\xf6\x14\x87C'), chr(8643 - 8543) + chr(1871 - 1770) + '\x63' + chr(111) + chr(0b1010100 + 0o20) + '\145')(chr(0b10010 + 0o143) + chr(0b1110100) + chr(0b1000011 + 0o43) + chr(0b101011 + 0o2) + '\070'))(xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'(\xbf\xe3!\xadO\x82\x8e9\x80\xcaL'), chr(0b1100100) + '\x65' + chr(7261 - 7162) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(56)))(LTE9MPUbqSos, dtype=jSV9IKnemH7K))
xafqLlk3kkUe(M7uTbt_OHazm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xff\xf6\x14\x87C'), '\x64' + '\x65' + chr(0b1011000 + 0o13) + '\157' + '\x64' + chr(1649 - 1548))(chr(0b1110101) + chr(116) + '\x66' + chr(674 - 629) + chr(0b100101 + 0o23)))(xafqLlk3kkUe(IYkir_lK0PqZ[-ehT0Px3KOsy9('\060' + '\157' + chr(744 - 695), 27916 - 27908)].ctypes, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xee\xf2\x10\xb6F\x81'), chr(0b101101 + 0o67) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1010011 + 0o21) + '\145')('\x75' + chr(0b1101010 + 0o12) + '\x66' + '\x2d' + chr(56)))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xd0\xf0\x1e\x80C\xad\x8f'), '\144' + chr(0b110111 + 0o56) + chr(5617 - 5518) + chr(0b1010001 + 0o36) + '\144' + chr(101))('\165' + chr(116) + '\146' + chr(45) + chr(56)))))
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b"'\xd7\xd4\x05\x8ad\x87\x9b \x85\x9aP\xc6\xb1\x99\xea\x8b\xeb\xf0"), chr(9289 - 9189) + chr(0b1100101) + '\143' + chr(0b1101111 + 0o0) + chr(100) + '\145')(chr(0b1000111 + 0o56) + chr(0b1110100 + 0o0) + chr(0b1100110) + chr(0b100101 + 0o10) + chr(0b111000)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'9\xf7\xd2\x04\xa4V\xb4\xa5%\xb4\xa5Z'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(297 - 186) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(0b111010 + 0o54) + '\055' + '\x38')), xafqLlk3kkUe(oM3jLo753XfX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xea\xf0\x18\x8aB\xad\x96%'), chr(6723 - 6623) + chr(0b100111 + 0o76) + '\143' + chr(0b1101111) + chr(0b1011101 + 0o7) + chr(0b1100101))('\165' + chr(0b100110 + 0o116) + '\146' + '\055' + chr(550 - 494))), eGLcYYYr5Dni(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xd0\xf0\x1e\x80C\xad\x8f'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(3844 - 3743))(chr(0b101001 + 0o114) + chr(2388 - 2272) + chr(0b1 + 0o145) + '\055' + chr(0b110011 + 0o5))), M7uTbt_OHazm), RSEUJ_H3k51M(toRm_3Sz33Ja[ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(0b110000), 8)]), RSEUJ_H3k51M(toRm_3Sz33Ja[ehT0Px3KOsy9(chr(135 - 87) + chr(0b1000000 + 0o57) + chr(0b110001), 8)]), RSEUJ_H3k51M(toRm_3Sz33Ja[ehT0Px3KOsy9('\060' + '\x6f' + chr(50), 0b1000)]), RSEUJ_H3k51M(dm_mR_vnHBPK[ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x30', 8)]), RSEUJ_H3k51M(dm_mR_vnHBPK[ehT0Px3KOsy9('\060' + chr(9564 - 9453) + chr(49), 8)]), RSEUJ_H3k51M(dm_mR_vnHBPK[ehT0Px3KOsy9(chr(48) + '\157' + chr(1584 - 1534), 8)]), RSEUJ_H3k51M(ArPDY0w0krFP)))
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric.reset
|
def reset(self):
"""Clear the internal statistics to initial state."""
if getattr(self, 'num', None) is None:
self.num_inst = 0
self.sum_metric = 0.0
else:
self.num_inst = [0] * self.num
self.sum_metric = [0.0] * self.num
self.records = dict()
self.counts = dict()
|
python
|
def reset(self):
"""Clear the internal statistics to initial state."""
if getattr(self, 'num', None) is None:
self.num_inst = 0
self.sum_metric = 0.0
else:
self.num_inst = [0] * self.num
self.sum_metric = [0.0] * self.num
self.records = dict()
self.counts = dict()
|
[
"def",
"reset",
"(",
"self",
")",
":",
"if",
"getattr",
"(",
"self",
",",
"'num'",
",",
"None",
")",
"is",
"None",
":",
"self",
".",
"num_inst",
"=",
"0",
"self",
".",
"sum_metric",
"=",
"0.0",
"else",
":",
"self",
".",
"num_inst",
"=",
"[",
"0",
"]",
"*",
"self",
".",
"num",
"self",
".",
"sum_metric",
"=",
"[",
"0.0",
"]",
"*",
"self",
".",
"num",
"self",
".",
"records",
"=",
"dict",
"(",
")",
"self",
".",
"counts",
"=",
"dict",
"(",
")"
] |
Clear the internal statistics to initial state.
|
[
"Clear",
"the",
"internal",
"statistics",
"to",
"initial",
"state",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L53-L62
|
train
|
Clear the internal statistics to initial state.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJ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u4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(0b110000 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(0b101001 + 0o14) + chr(1929 - 1879), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\060' + chr(823 - 772), 37934 - 37926), ehT0Px3KOsy9('\060' + chr(6697 - 6586) + chr(50) + chr(49) + chr(0b110011), 42509 - 42501), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101110 + 0o5) + chr(53) + chr(0b101001 + 0o10), 0o10), ehT0Px3KOsy9('\060' + chr(3417 - 3306) + chr(54) + '\x30', 11923 - 11915), ehT0Px3KOsy9(chr(1348 - 1300) + chr(0b1101111) + '\063' + chr(0b110011) + chr(2587 - 2536), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x32' + chr(167 - 112), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(2482 - 2431) + chr(0b101 + 0o54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x36', 0b1000), ehT0Px3KOsy9(chr(2103 - 2055) + '\157' + chr(0b11011 + 0o26) + '\062' + '\x30', 5131 - 5123), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + '\062' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(9294 - 9183) + chr(49) + chr(0b11110 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(1781 - 1733) + chr(0b1101111) + chr(0b110110), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(399 - 346), 0b1000), ehT0Px3KOsy9(chr(1187 - 1139) + chr(0b1011001 + 0o26) + '\x36' + chr(0b1111 + 0o44), 62374 - 62366), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110010) + '\062' + '\060', 58437 - 58429), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(1489 - 1437) + '\x36', 51372 - 51364), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o42) + chr(0b110000), 6956 - 6948), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110001) + '\066' + chr(1302 - 1249), 0o10), ehT0Px3KOsy9(chr(944 - 896) + '\x6f' + chr(51) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(0b110001) + chr(55) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100001 + 0o116) + chr(2360 - 2311) + chr(0b1000 + 0o53) + chr(1570 - 1522), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110000) + chr(0b100011 + 0o20), 8), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + chr(55) + '\060', 8), ehT0Px3KOsy9('\060' + chr(0b100000 + 0o117) + chr(51) + chr(0b110110) + chr(923 - 872), 0b1000), ehT0Px3KOsy9(chr(1163 - 1115) + chr(5349 - 5238) + chr(0b111 + 0o54) + chr(0b110001), 51898 - 51890), ehT0Px3KOsy9(chr(1906 - 1858) + '\157' + chr(986 - 935) + '\x33' + chr(0b110000), 18985 - 18977), ehT0Px3KOsy9(chr(1116 - 1068) + chr(0b1010111 + 0o30) + '\x37' + chr(0b101101 + 0o5), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110011) + chr(50) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(491 - 443) + '\157' + chr(52) + chr(838 - 789), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(49) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5944 - 5833) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(2279 - 2231) + '\x6f' + chr(2084 - 2034) + chr(53) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101001 + 0o12) + '\x31' + '\063', 0b1000), ehT0Px3KOsy9(chr(578 - 530) + chr(0b1101111) + chr(703 - 652) + chr(369 - 315), 64452 - 64444), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(4506 - 4395) + chr(0b110001) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(49) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + '\x31' + chr(50) + '\066', 14139 - 14131), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(0b11001 + 0o31) + chr(0b10010 + 0o42) + chr(0b110110), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1319 - 1266) + '\x30', 52720 - 52712)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x96'), chr(0b110011 + 0o61) + '\145' + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + '\146' + '\055' + chr(2545 - 2489)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def G0V856pwkJmZ(oVre8I6UXc3b):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6\xdf.'), '\x64' + '\145' + chr(2246 - 2147) + '\x6f' + chr(0b1000010 + 0o42) + chr(101))('\165' + chr(0b101100 + 0o110) + '\x66' + chr(45) + chr(56)), None) is None:
oVre8I6UXc3b._cdA_ca5MiLS = ehT0Px3KOsy9('\060' + '\157' + chr(176 - 128), 52406 - 52398)
oVre8I6UXc3b.jGUwTiF22LVj = 0.0
else:
oVre8I6UXc3b._cdA_ca5MiLS = [ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110000), 8)] * oVre8I6UXc3b.num
oVre8I6UXc3b.jGUwTiF22LVj = [0.0] * oVre8I6UXc3b.num
oVre8I6UXc3b.mov_6OW2Bcur = wLqBDw8l0eIm()
oVre8I6UXc3b.qaIx4JIwHiwL = wLqBDw8l0eIm()
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric.update
|
def update(self, labels, preds):
"""
Update internal records. This function now only update internal buffer,
sum_metric and num_inst are updated in _update() function instead when
get() is called to return results.
Params:
----------
labels: mx.nd.array (n * 6) or (n * 5), difficult column is optional
2-d array of ground-truths, n objects(id-xmin-ymin-xmax-ymax-[difficult])
preds: mx.nd.array (m * 6)
2-d array of detections, m objects(id-score-xmin-ymin-xmax-ymax)
"""
def iou(x, ys):
"""
Calculate intersection-over-union overlap
Params:
----------
x : numpy.array
single box [xmin, ymin ,xmax, ymax]
ys : numpy.array
multiple box [[xmin, ymin, xmax, ymax], [...], ]
Returns:
-----------
numpy.array
[iou1, iou2, ...], size == ys.shape[0]
"""
ixmin = np.maximum(ys[:, 0], x[0])
iymin = np.maximum(ys[:, 1], x[1])
ixmax = np.minimum(ys[:, 2], x[2])
iymax = np.minimum(ys[:, 3], x[3])
iw = np.maximum(ixmax - ixmin, 0.)
ih = np.maximum(iymax - iymin, 0.)
inters = iw * ih
uni = (x[2] - x[0]) * (x[3] - x[1]) + (ys[:, 2] - ys[:, 0]) * \
(ys[:, 3] - ys[:, 1]) - inters
ious = inters / uni
ious[uni < 1e-12] = 0 # in case bad boxes
return ious
# independant execution for each image
for i in range(labels[0].shape[0]):
# get as numpy arrays
label = labels[0][i].asnumpy()
if np.sum(label[:, 0] >= 0) < 1:
continue
pred = preds[self.pred_idx][i].asnumpy()
# calculate for each class
while (pred.shape[0] > 0):
cid = int(pred[0, 0])
indices = np.where(pred[:, 0].astype(int) == cid)[0]
if cid < 0:
pred = np.delete(pred, indices, axis=0)
continue
dets = pred[indices]
pred = np.delete(pred, indices, axis=0)
# sort by score, desceding
dets = dets[dets[:,1].argsort()[::-1]]
records = np.hstack((dets[:, 1][:, np.newaxis], np.zeros((dets.shape[0], 1))))
# ground-truths
label_indices = np.where(label[:, 0].astype(int) == cid)[0]
gts = label[label_indices, :]
label = np.delete(label, label_indices, axis=0)
if gts.size > 0:
found = [False] * gts.shape[0]
for j in range(dets.shape[0]):
# compute overlaps
ious = iou(dets[j, 2:], gts[:, 1:5])
ovargmax = np.argmax(ious)
ovmax = ious[ovargmax]
if ovmax > self.ovp_thresh:
if (not self.use_difficult and
gts.shape[1] >= 6 and
gts[ovargmax, 5] > 0):
pass
else:
if not found[ovargmax]:
records[j, -1] = 1 # tp
found[ovargmax] = True
else:
# duplicate
records[j, -1] = 2 # fp
else:
records[j, -1] = 2 # fp
else:
# no gt, mark all fp
records[:, -1] = 2
# ground truth count
if (not self.use_difficult and gts.shape[1] >= 6):
gt_count = np.sum(gts[:, 5] < 1)
else:
gt_count = gts.shape[0]
# now we push records to buffer
# first column: score, second column: tp/fp
# 0: not set(matched to difficult or something), 1: tp, 2: fp
records = records[np.where(records[:, -1] > 0)[0], :]
if records.size > 0:
self._insert(cid, records, gt_count)
# add missing class if not present in prediction
while (label.shape[0] > 0):
cid = int(label[0, 0])
label_indices = np.where(label[:, 0].astype(int) == cid)[0]
label = np.delete(label, label_indices, axis=0)
if cid < 0:
continue
gt_count = label_indices.size
self._insert(cid, np.array([[0, 0]]), gt_count)
|
python
|
def update(self, labels, preds):
"""
Update internal records. This function now only update internal buffer,
sum_metric and num_inst are updated in _update() function instead when
get() is called to return results.
Params:
----------
labels: mx.nd.array (n * 6) or (n * 5), difficult column is optional
2-d array of ground-truths, n objects(id-xmin-ymin-xmax-ymax-[difficult])
preds: mx.nd.array (m * 6)
2-d array of detections, m objects(id-score-xmin-ymin-xmax-ymax)
"""
def iou(x, ys):
"""
Calculate intersection-over-union overlap
Params:
----------
x : numpy.array
single box [xmin, ymin ,xmax, ymax]
ys : numpy.array
multiple box [[xmin, ymin, xmax, ymax], [...], ]
Returns:
-----------
numpy.array
[iou1, iou2, ...], size == ys.shape[0]
"""
ixmin = np.maximum(ys[:, 0], x[0])
iymin = np.maximum(ys[:, 1], x[1])
ixmax = np.minimum(ys[:, 2], x[2])
iymax = np.minimum(ys[:, 3], x[3])
iw = np.maximum(ixmax - ixmin, 0.)
ih = np.maximum(iymax - iymin, 0.)
inters = iw * ih
uni = (x[2] - x[0]) * (x[3] - x[1]) + (ys[:, 2] - ys[:, 0]) * \
(ys[:, 3] - ys[:, 1]) - inters
ious = inters / uni
ious[uni < 1e-12] = 0 # in case bad boxes
return ious
# independant execution for each image
for i in range(labels[0].shape[0]):
# get as numpy arrays
label = labels[0][i].asnumpy()
if np.sum(label[:, 0] >= 0) < 1:
continue
pred = preds[self.pred_idx][i].asnumpy()
# calculate for each class
while (pred.shape[0] > 0):
cid = int(pred[0, 0])
indices = np.where(pred[:, 0].astype(int) == cid)[0]
if cid < 0:
pred = np.delete(pred, indices, axis=0)
continue
dets = pred[indices]
pred = np.delete(pred, indices, axis=0)
# sort by score, desceding
dets = dets[dets[:,1].argsort()[::-1]]
records = np.hstack((dets[:, 1][:, np.newaxis], np.zeros((dets.shape[0], 1))))
# ground-truths
label_indices = np.where(label[:, 0].astype(int) == cid)[0]
gts = label[label_indices, :]
label = np.delete(label, label_indices, axis=0)
if gts.size > 0:
found = [False] * gts.shape[0]
for j in range(dets.shape[0]):
# compute overlaps
ious = iou(dets[j, 2:], gts[:, 1:5])
ovargmax = np.argmax(ious)
ovmax = ious[ovargmax]
if ovmax > self.ovp_thresh:
if (not self.use_difficult and
gts.shape[1] >= 6 and
gts[ovargmax, 5] > 0):
pass
else:
if not found[ovargmax]:
records[j, -1] = 1 # tp
found[ovargmax] = True
else:
# duplicate
records[j, -1] = 2 # fp
else:
records[j, -1] = 2 # fp
else:
# no gt, mark all fp
records[:, -1] = 2
# ground truth count
if (not self.use_difficult and gts.shape[1] >= 6):
gt_count = np.sum(gts[:, 5] < 1)
else:
gt_count = gts.shape[0]
# now we push records to buffer
# first column: score, second column: tp/fp
# 0: not set(matched to difficult or something), 1: tp, 2: fp
records = records[np.where(records[:, -1] > 0)[0], :]
if records.size > 0:
self._insert(cid, records, gt_count)
# add missing class if not present in prediction
while (label.shape[0] > 0):
cid = int(label[0, 0])
label_indices = np.where(label[:, 0].astype(int) == cid)[0]
label = np.delete(label, label_indices, axis=0)
if cid < 0:
continue
gt_count = label_indices.size
self._insert(cid, np.array([[0, 0]]), gt_count)
|
[
"def",
"update",
"(",
"self",
",",
"labels",
",",
"preds",
")",
":",
"def",
"iou",
"(",
"x",
",",
"ys",
")",
":",
"\"\"\"\n Calculate intersection-over-union overlap\n Params:\n ----------\n x : numpy.array\n single box [xmin, ymin ,xmax, ymax]\n ys : numpy.array\n multiple box [[xmin, ymin, xmax, ymax], [...], ]\n Returns:\n -----------\n numpy.array\n [iou1, iou2, ...], size == ys.shape[0]\n \"\"\"",
"ixmin",
"=",
"np",
".",
"maximum",
"(",
"ys",
"[",
":",
",",
"0",
"]",
",",
"x",
"[",
"0",
"]",
")",
"iymin",
"=",
"np",
".",
"maximum",
"(",
"ys",
"[",
":",
",",
"1",
"]",
",",
"x",
"[",
"1",
"]",
")",
"ixmax",
"=",
"np",
".",
"minimum",
"(",
"ys",
"[",
":",
",",
"2",
"]",
",",
"x",
"[",
"2",
"]",
")",
"iymax",
"=",
"np",
".",
"minimum",
"(",
"ys",
"[",
":",
",",
"3",
"]",
",",
"x",
"[",
"3",
"]",
")",
"iw",
"=",
"np",
".",
"maximum",
"(",
"ixmax",
"-",
"ixmin",
",",
"0.",
")",
"ih",
"=",
"np",
".",
"maximum",
"(",
"iymax",
"-",
"iymin",
",",
"0.",
")",
"inters",
"=",
"iw",
"*",
"ih",
"uni",
"=",
"(",
"x",
"[",
"2",
"]",
"-",
"x",
"[",
"0",
"]",
")",
"*",
"(",
"x",
"[",
"3",
"]",
"-",
"x",
"[",
"1",
"]",
")",
"+",
"(",
"ys",
"[",
":",
",",
"2",
"]",
"-",
"ys",
"[",
":",
",",
"0",
"]",
")",
"*",
"(",
"ys",
"[",
":",
",",
"3",
"]",
"-",
"ys",
"[",
":",
",",
"1",
"]",
")",
"-",
"inters",
"ious",
"=",
"inters",
"/",
"uni",
"ious",
"[",
"uni",
"<",
"1e-12",
"]",
"=",
"0",
"# in case bad boxes",
"return",
"ious",
"# independant execution for each image",
"for",
"i",
"in",
"range",
"(",
"labels",
"[",
"0",
"]",
".",
"shape",
"[",
"0",
"]",
")",
":",
"# get as numpy arrays",
"label",
"=",
"labels",
"[",
"0",
"]",
"[",
"i",
"]",
".",
"asnumpy",
"(",
")",
"if",
"np",
".",
"sum",
"(",
"label",
"[",
":",
",",
"0",
"]",
">=",
"0",
")",
"<",
"1",
":",
"continue",
"pred",
"=",
"preds",
"[",
"self",
".",
"pred_idx",
"]",
"[",
"i",
"]",
".",
"asnumpy",
"(",
")",
"# calculate for each class",
"while",
"(",
"pred",
".",
"shape",
"[",
"0",
"]",
">",
"0",
")",
":",
"cid",
"=",
"int",
"(",
"pred",
"[",
"0",
",",
"0",
"]",
")",
"indices",
"=",
"np",
".",
"where",
"(",
"pred",
"[",
":",
",",
"0",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"cid",
")",
"[",
"0",
"]",
"if",
"cid",
"<",
"0",
":",
"pred",
"=",
"np",
".",
"delete",
"(",
"pred",
",",
"indices",
",",
"axis",
"=",
"0",
")",
"continue",
"dets",
"=",
"pred",
"[",
"indices",
"]",
"pred",
"=",
"np",
".",
"delete",
"(",
"pred",
",",
"indices",
",",
"axis",
"=",
"0",
")",
"# sort by score, desceding",
"dets",
"=",
"dets",
"[",
"dets",
"[",
":",
",",
"1",
"]",
".",
"argsort",
"(",
")",
"[",
":",
":",
"-",
"1",
"]",
"]",
"records",
"=",
"np",
".",
"hstack",
"(",
"(",
"dets",
"[",
":",
",",
"1",
"]",
"[",
":",
",",
"np",
".",
"newaxis",
"]",
",",
"np",
".",
"zeros",
"(",
"(",
"dets",
".",
"shape",
"[",
"0",
"]",
",",
"1",
")",
")",
")",
")",
"# ground-truths",
"label_indices",
"=",
"np",
".",
"where",
"(",
"label",
"[",
":",
",",
"0",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"cid",
")",
"[",
"0",
"]",
"gts",
"=",
"label",
"[",
"label_indices",
",",
":",
"]",
"label",
"=",
"np",
".",
"delete",
"(",
"label",
",",
"label_indices",
",",
"axis",
"=",
"0",
")",
"if",
"gts",
".",
"size",
">",
"0",
":",
"found",
"=",
"[",
"False",
"]",
"*",
"gts",
".",
"shape",
"[",
"0",
"]",
"for",
"j",
"in",
"range",
"(",
"dets",
".",
"shape",
"[",
"0",
"]",
")",
":",
"# compute overlaps",
"ious",
"=",
"iou",
"(",
"dets",
"[",
"j",
",",
"2",
":",
"]",
",",
"gts",
"[",
":",
",",
"1",
":",
"5",
"]",
")",
"ovargmax",
"=",
"np",
".",
"argmax",
"(",
"ious",
")",
"ovmax",
"=",
"ious",
"[",
"ovargmax",
"]",
"if",
"ovmax",
">",
"self",
".",
"ovp_thresh",
":",
"if",
"(",
"not",
"self",
".",
"use_difficult",
"and",
"gts",
".",
"shape",
"[",
"1",
"]",
">=",
"6",
"and",
"gts",
"[",
"ovargmax",
",",
"5",
"]",
">",
"0",
")",
":",
"pass",
"else",
":",
"if",
"not",
"found",
"[",
"ovargmax",
"]",
":",
"records",
"[",
"j",
",",
"-",
"1",
"]",
"=",
"1",
"# tp",
"found",
"[",
"ovargmax",
"]",
"=",
"True",
"else",
":",
"# duplicate",
"records",
"[",
"j",
",",
"-",
"1",
"]",
"=",
"2",
"# fp",
"else",
":",
"records",
"[",
"j",
",",
"-",
"1",
"]",
"=",
"2",
"# fp",
"else",
":",
"# no gt, mark all fp",
"records",
"[",
":",
",",
"-",
"1",
"]",
"=",
"2",
"# ground truth count",
"if",
"(",
"not",
"self",
".",
"use_difficult",
"and",
"gts",
".",
"shape",
"[",
"1",
"]",
">=",
"6",
")",
":",
"gt_count",
"=",
"np",
".",
"sum",
"(",
"gts",
"[",
":",
",",
"5",
"]",
"<",
"1",
")",
"else",
":",
"gt_count",
"=",
"gts",
".",
"shape",
"[",
"0",
"]",
"# now we push records to buffer",
"# first column: score, second column: tp/fp",
"# 0: not set(matched to difficult or something), 1: tp, 2: fp",
"records",
"=",
"records",
"[",
"np",
".",
"where",
"(",
"records",
"[",
":",
",",
"-",
"1",
"]",
">",
"0",
")",
"[",
"0",
"]",
",",
":",
"]",
"if",
"records",
".",
"size",
">",
"0",
":",
"self",
".",
"_insert",
"(",
"cid",
",",
"records",
",",
"gt_count",
")",
"# add missing class if not present in prediction",
"while",
"(",
"label",
".",
"shape",
"[",
"0",
"]",
">",
"0",
")",
":",
"cid",
"=",
"int",
"(",
"label",
"[",
"0",
",",
"0",
"]",
")",
"label_indices",
"=",
"np",
".",
"where",
"(",
"label",
"[",
":",
",",
"0",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"cid",
")",
"[",
"0",
"]",
"label",
"=",
"np",
".",
"delete",
"(",
"label",
",",
"label_indices",
",",
"axis",
"=",
"0",
")",
"if",
"cid",
"<",
"0",
":",
"continue",
"gt_count",
"=",
"label_indices",
".",
"size",
"self",
".",
"_insert",
"(",
"cid",
",",
"np",
".",
"array",
"(",
"[",
"[",
"0",
",",
"0",
"]",
"]",
")",
",",
"gt_count",
")"
] |
Update internal records. This function now only update internal buffer,
sum_metric and num_inst are updated in _update() function instead when
get() is called to return results.
Params:
----------
labels: mx.nd.array (n * 6) or (n * 5), difficult column is optional
2-d array of ground-truths, n objects(id-xmin-ymin-xmax-ymax-[difficult])
preds: mx.nd.array (m * 6)
2-d array of detections, m objects(id-score-xmin-ymin-xmax-ymax)
|
[
"Update",
"internal",
"records",
".",
"This",
"function",
"now",
"only",
"update",
"internal",
"buffer",
"sum_metric",
"and",
"num_inst",
"are",
"updated",
"in",
"_update",
"()",
"function",
"instead",
"when",
"get",
"()",
"is",
"called",
"to",
"return",
"results",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L86-L195
|
train
|
Update internal buffer with new information.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDR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Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\x32' + '\x35' + chr(2443 - 2388), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(49) + chr(0b10101 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(2246 - 2198) + chr(111) + chr(50) + '\067' + chr(2625 - 2571), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1589 - 1478) + chr(1533 - 1484) + '\061' + chr(0b1011 + 0o45), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\061' + '\067', 22566 - 22558), ehT0Px3KOsy9('\x30' + chr(1368 - 1257) + chr(2473 - 2423) + '\x36' + '\066', 47013 - 47005), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(0b110111), 12737 - 12729), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b10110 + 0o40) + chr(1760 - 1709), 0b1000), ehT0Px3KOsy9(chr(169 - 121) + '\157' + chr(52) + '\x34', 23009 - 23001), ehT0Px3KOsy9(chr(2230 - 2182) + '\157' + '\063' + chr(599 - 551) + '\061', 64246 - 64238), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + chr(0b110001) + chr(48) + chr(930 - 882), 0b1000), ehT0Px3KOsy9(chr(1037 - 989) + chr(0b1101111) + chr(0b101001 + 0o11) + chr(2541 - 2489) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1319 - 1270) + chr(0b100010 + 0o21), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11101 + 0o26) + chr(613 - 563) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100010 + 0o17) + '\x34' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(1124 - 1074) + chr(0b101111 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b100111 + 0o17) + chr(0b101010 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + chr(9565 - 9454) + chr(503 - 453) + '\x36' + chr(0b110101), 43052 - 43044), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b110111) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\x32' + '\x30' + chr(0b110010 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(2197 - 2142) + chr(1563 - 1515), 0b1000), ehT0Px3KOsy9(chr(335 - 287) + chr(2868 - 2757) + '\x32' + chr(48) + chr(0b110110 + 0o1), 0o10), ehT0Px3KOsy9(chr(261 - 213) + chr(0b1101111) + '\x32' + chr(53) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2174 - 2063) + '\066', 33719 - 33711), ehT0Px3KOsy9('\060' + chr(3425 - 3314) + '\062' + '\x31' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(351 - 303) + chr(0b11011 + 0o124) + chr(50) + chr(0b110000 + 0o6), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(11197 - 11086) + chr(55) + chr(0b1101 + 0o52), 58454 - 58446), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + chr(0b10 + 0o57) + chr(0b11110 + 0o23) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(10962 - 10851) + chr(188 - 137) + '\x31' + '\067', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b11010 + 0o31) + chr(50) + chr(0b100100 + 0o16), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110001 + 0o76) + '\x33' + chr(0b110100) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1839 - 1788) + chr(55), 0o10), ehT0Px3KOsy9(chr(1089 - 1041) + chr(0b1101111) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1374 - 1263) + chr(0b10 + 0o57) + chr(0b110101) + chr(0b101100 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\x31' + chr(0b11110 + 0o22), 8), ehT0Px3KOsy9('\060' + chr(0b110000 + 0o77) + chr(0b110011) + '\060' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1418 - 1370) + chr(3198 - 3087) + chr(2227 - 2176) + '\x32' + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x37' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(265 - 215) + chr(0b110100) + chr(0b11011 + 0o33), 6082 - 6074)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(749 - 701) + '\x6f' + chr(130 - 77) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x81'), chr(100) + '\145' + chr(4025 - 3926) + chr(0b101100 + 0o103) + chr(0b1010110 + 0o16) + '\145')(chr(0b1010110 + 0o37) + chr(0b1011111 + 0o25) + chr(0b1100110) + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ZtAEiNJny4e0(oVre8I6UXc3b, uXMK81tmdpTM, rFir39ju85_Z):
def QuP9qp_8KcAp(OeWW0F1dBPRQ, oCqQNfCOTQKb):
vJ4x1Ww5i92J = WqUC3KWvYVup.maximum(oCqQNfCOTQKb[:, ehT0Px3KOsy9(chr(48) + chr(0b1101101 + 0o2) + '\x30', 0o10)], OeWW0F1dBPRQ[ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000), 8)])
Fff4ZuM805KA = WqUC3KWvYVup.maximum(oCqQNfCOTQKb[:, ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001), 8)], OeWW0F1dBPRQ[ehT0Px3KOsy9('\060' + '\x6f' + chr(1669 - 1620), 8)])
HQiLfEKA8PlN = WqUC3KWvYVup.minimum(oCqQNfCOTQKb[:, ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + '\x32', 0b1000)], OeWW0F1dBPRQ[ehT0Px3KOsy9(chr(139 - 91) + chr(0b1101111) + chr(1296 - 1246), 8)])
rTbun8JVixwF = WqUC3KWvYVup.minimum(oCqQNfCOTQKb[:, ehT0Px3KOsy9(chr(80 - 32) + '\157' + chr(0b110011), 61029 - 61021)], OeWW0F1dBPRQ[ehT0Px3KOsy9(chr(1775 - 1727) + chr(0b1101111) + chr(0b110011), 8)])
K3FreLTIzd3i = WqUC3KWvYVup.maximum(HQiLfEKA8PlN - vJ4x1Ww5i92J, 0.0)
azVlGopTQdfj = WqUC3KWvYVup.maximum(rTbun8JVixwF - Fff4ZuM805KA, 0.0)
GZrwZKCGDRhV = K3FreLTIzd3i * azVlGopTQdfj
Ft_W8SK5CLwi = (OeWW0F1dBPRQ[ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32', 8)] - OeWW0F1dBPRQ[ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + '\x30', 8)]) * (OeWW0F1dBPRQ[ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + chr(2154 - 2103), 8)] - OeWW0F1dBPRQ[ehT0Px3KOsy9('\x30' + chr(0b1000111 + 0o50) + chr(0b10111 + 0o32), 8)]) + (oCqQNfCOTQKb[:, ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010), 8)] - oCqQNfCOTQKb[:, ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + chr(897 - 849), 8)]) * (oCqQNfCOTQKb[:, ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\063', 8)] - oCqQNfCOTQKb[:, ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100000 + 0o21), 8)]) - GZrwZKCGDRhV
U5fZ0EjIiA0a = GZrwZKCGDRhV / Ft_W8SK5CLwi
U5fZ0EjIiA0a[Ft_W8SK5CLwi < 1e-12] = ehT0Px3KOsy9(chr(442 - 394) + chr(0b110111 + 0o70) + chr(417 - 369), 8)
return U5fZ0EjIiA0a
for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(uXMK81tmdpTM[ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x30', 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), chr(100) + chr(3696 - 3595) + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(0b110 + 0o157) + chr(0b1101 + 0o147) + '\x66' + chr(1177 - 1132) + chr(844 - 788)))[ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b110000 + 0o0), 8)]):
TRUOLFLuD08x = uXMK81tmdpTM[ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10111 + 0o31), 8)][WVxHKyX45z_L].asnumpy()
if xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xa5\xc6\n"\xd9\x13J\\\xf3\x01\xcf'), chr(0b1000 + 0o134) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(102) + '\x2d' + '\x38'))(TRUOLFLuD08x[:, ehT0Px3KOsy9(chr(48) + chr(9384 - 9273) + chr(0b110000), 8)] >= ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8)) < ehT0Px3KOsy9(chr(48) + chr(0b10001 + 0o136) + chr(1432 - 1383), 8):
continue
eyamnrN0elUS = rFir39ju85_Z[oVre8I6UXc3b.pred_idx][WVxHKyX45z_L].asnumpy()
while xafqLlk3kkUe(eyamnrN0elUS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), '\x64' + '\145' + chr(0b11111 + 0o104) + chr(1301 - 1190) + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + '\070'))[ehT0Px3KOsy9(chr(1008 - 960) + '\157' + chr(48), 8)] > ehT0Px3KOsy9(chr(48) + '\157' + '\x30', 8):
KuJEPW92hwQ3 = ehT0Px3KOsy9(eyamnrN0elUS[ehT0Px3KOsy9(chr(525 - 477) + '\x6f' + chr(48), 8), ehT0Px3KOsy9('\060' + chr(0b1001001 + 0o46) + chr(0b11010 + 0o26), 8)])
pIcoaXENl5Pw = WqUC3KWvYVup.dRFAC59yQBm_(eyamnrN0elUS[:, ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000), 8)].astype(ehT0Px3KOsy9) == KuJEPW92hwQ3)[ehT0Px3KOsy9('\x30' + chr(9691 - 9580) + chr(1531 - 1483), 8)]
if KuJEPW92hwQ3 < ehT0Px3KOsy9('\060' + chr(4588 - 4477) + '\x30', 8):
eyamnrN0elUS = WqUC3KWvYVup.delete(eyamnrN0elUS, pIcoaXENl5Pw, axis=ehT0Px3KOsy9('\060' + chr(4122 - 4011) + chr(48), 8))
continue
E5zNArgQovxX = eyamnrN0elUS[pIcoaXENl5Pw]
eyamnrN0elUS = WqUC3KWvYVup.delete(eyamnrN0elUS, pIcoaXENl5Pw, axis=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1312 - 1264), 8))
E5zNArgQovxX = E5zNArgQovxX[E5zNArgQovxX[:, ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49), 8)].argsort()[::-ehT0Px3KOsy9(chr(0b110000) + chr(0b1010111 + 0o30) + chr(0b1101 + 0o44), 8)]]
mov_6OW2Bcur = WqUC3KWvYVup.hstack((E5zNArgQovxX[:, ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31', 8)][:, WqUC3KWvYVup.newaxis], WqUC3KWvYVup.zeros((E5zNArgQovxX.nauYfLglTpcb[ehT0Px3KOsy9(chr(947 - 899) + chr(0b1101111) + chr(0b110000), 8)], ehT0Px3KOsy9('\060' + '\157' + '\061', 8)))))
KcIYUhnydBnE = WqUC3KWvYVup.dRFAC59yQBm_(TRUOLFLuD08x[:, ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(48), 8)].astype(ehT0Px3KOsy9) == KuJEPW92hwQ3)[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(368 - 320), 8)]
n_bFdULQBfdM = TRUOLFLuD08x[KcIYUhnydBnE, :]
TRUOLFLuD08x = WqUC3KWvYVup.delete(TRUOLFLuD08x, KcIYUhnydBnE, axis=ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x30', 8))
if xafqLlk3kkUe(n_bFdULQBfdM, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\x82\xdd+|\xf4d9J\x90+\xc0'), '\x64' + chr(101) + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(0b101011 + 0o112) + chr(0b1000111 + 0o55) + '\x66' + chr(0b101101) + '\x38')) > ehT0Px3KOsy9('\060' + chr(2913 - 2802) + chr(48), 8):
PCyJ03LCCQIZ = [ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(427 - 379), 8)] * n_bFdULQBfdM.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + '\x6f' + '\060', 8)]
for tlORBuYsiw3X in vQr8gNKaIaWE(xafqLlk3kkUe(E5zNArgQovxX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), chr(100) + chr(0b10000 + 0o125) + '\143' + chr(11551 - 11440) + chr(0b1001101 + 0o27) + chr(0b100011 + 0o102))(chr(117) + chr(0b1110100) + '\146' + chr(0b1 + 0o54) + '\x38'))[ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1179 - 1131), 8)]):
U5fZ0EjIiA0a = QuP9qp_8KcAp(E5zNArgQovxX[tlORBuYsiw3X, ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100011 + 0o17), 8):], n_bFdULQBfdM[:, ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001), 8):ehT0Px3KOsy9('\060' + '\157' + chr(53), 16060 - 16052)])
s7kTMC_qkv5G = WqUC3KWvYVup.argmax(U5fZ0EjIiA0a)
fEJydcdLEiwu = U5fZ0EjIiA0a[s7kTMC_qkv5G]
if fEJydcdLEiwu > xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xb8\xce\x17;\xdeU\x16W\xa9'), chr(100) + '\145' + '\143' + chr(111) + chr(100) + chr(468 - 367))(chr(0b1100001 + 0o24) + chr(1914 - 1798) + chr(9264 - 9162) + chr(45) + '\070')):
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xda\xbd\xdb\x17+\xdfA\x15M\xa25\xcd\x7f'), chr(100) + chr(101) + chr(0b11101 + 0o106) + '\x6f' + '\x64' + chr(101))(chr(117) + '\x74' + '\146' + chr(45) + chr(56))) and xafqLlk3kkUe(n_bFdULQBfdM, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), '\144' + chr(0b1100101) + '\143' + chr(11827 - 11716) + chr(0b10100 + 0o120) + '\145')(chr(0b111110 + 0o67) + chr(4572 - 4456) + '\146' + '\x2d' + '\x38'))[ehT0Px3KOsy9('\060' + '\x6f' + chr(1515 - 1466), 8)] >= ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110110), 8) and (n_bFdULQBfdM[s7kTMC_qkv5G, ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + '\065', 8)] > ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 8)):
pass
elif not PCyJ03LCCQIZ[s7kTMC_qkv5G]:
mov_6OW2Bcur[tlORBuYsiw3X, -ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001), 8)] = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101011 + 0o6), 8)
PCyJ03LCCQIZ[s7kTMC_qkv5G] = ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + '\x31', 8)
else:
mov_6OW2Bcur[tlORBuYsiw3X, -ehT0Px3KOsy9(chr(48) + chr(111) + '\x31', 8)] = ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11100 + 0o26), 8)
else:
mov_6OW2Bcur[tlORBuYsiw3X, -ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(0b110001), 8)] = ehT0Px3KOsy9(chr(48) + chr(3128 - 3017) + chr(1357 - 1307), 8)
else:
mov_6OW2Bcur[:, -ehT0Px3KOsy9(chr(0b110000) + chr(6368 - 6257) + chr(49), 8)] = ehT0Px3KOsy9('\x30' + chr(10881 - 10770) + chr(1019 - 969), 8)
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xda\xbd\xdb\x17+\xdfA\x15M\xa25\xcd\x7f'), '\x64' + chr(1329 - 1228) + chr(0b11011 + 0o110) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(0b1110100) + chr(0b1 + 0o145) + '\055' + chr(0b1100 + 0o54))) and xafqLlk3kkUe(n_bFdULQBfdM, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), chr(0b1100100) + chr(9852 - 9751) + chr(0b1010 + 0o131) + chr(0b1100000 + 0o17) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + chr(7587 - 7485) + '\x2d' + chr(56)))[ehT0Px3KOsy9(chr(48) + chr(9392 - 9281) + chr(49), 8)] >= ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(54), 8):
AyX8vJJhUogz = WqUC3KWvYVup.xkxBmo49x2An(n_bFdULQBfdM[:, ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065', 8)] < ehT0Px3KOsy9('\x30' + '\x6f' + '\x31', 8))
else:
AyX8vJJhUogz = n_bFdULQBfdM.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + '\x6f' + chr(48), 8)]
mov_6OW2Bcur = mov_6OW2Bcur[WqUC3KWvYVup.dRFAC59yQBm_(mov_6OW2Bcur[:, -ehT0Px3KOsy9('\060' + chr(10869 - 10758) + chr(0b110001), 8)] > ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100011 + 0o15), 8))[ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), 8)], :]
if xafqLlk3kkUe(mov_6OW2Bcur, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\x82\xdd+|\xf4d9J\x90+\xc0'), chr(0b1100100) + chr(9234 - 9133) + '\x63' + '\157' + '\x64' + chr(0b1011001 + 0o14))('\165' + chr(0b1110100) + chr(102) + '\055' + chr(0b10101 + 0o43))) > ehT0Px3KOsy9(chr(352 - 304) + chr(111) + chr(0b110000), 8):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xa7\xd0;*\xc4S'), '\144' + '\145' + '\143' + chr(4921 - 4810) + '\x64' + chr(101))(chr(0b1110101) + '\164' + '\x66' + chr(1953 - 1908) + chr(56)))(KuJEPW92hwQ3, mov_6OW2Bcur, AyX8vJJhUogz)
while xafqLlk3kkUe(TRUOLFLuD08x, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xaf\xcb\x11)\xfa@\x1fp\xb1#\xc3'), '\x64' + chr(0b100011 + 0o102) + chr(99) + '\157' + chr(0b1100100) + chr(0b0 + 0o145))(chr(0b1110101) + chr(5703 - 5587) + chr(7934 - 7832) + chr(0b101101) + chr(511 - 455)))[ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + chr(422 - 374), 8)] > ehT0Px3KOsy9('\x30' + '\157' + chr(0b100000 + 0o20), 8):
KuJEPW92hwQ3 = ehT0Px3KOsy9(TRUOLFLuD08x[ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(2075 - 1964) + chr(0b100100 + 0o14), 8), ehT0Px3KOsy9('\060' + '\157' + chr(48), 8)])
KcIYUhnydBnE = WqUC3KWvYVup.dRFAC59yQBm_(TRUOLFLuD08x[:, ehT0Px3KOsy9(chr(1882 - 1834) + '\x6f' + chr(0b110000), 8)].astype(ehT0Px3KOsy9) == KuJEPW92hwQ3)[ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + chr(0b10101 + 0o33), 8)]
TRUOLFLuD08x = WqUC3KWvYVup.delete(TRUOLFLuD08x, KcIYUhnydBnE, axis=ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10 + 0o56), 8))
if KuJEPW92hwQ3 < ehT0Px3KOsy9(chr(1593 - 1545) + chr(7894 - 7783) + chr(48), 8):
continue
AyX8vJJhUogz = KcIYUhnydBnE.NLcc3BCJnQka
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xa7\xd0;*\xc4S'), '\144' + chr(0b1100101) + chr(6896 - 6797) + '\157' + chr(0b1011111 + 0o5) + chr(0b10 + 0o143))('\x75' + chr(0b1110001 + 0o3) + chr(0b1001111 + 0o27) + '\055' + chr(1959 - 1903)))(KuJEPW92hwQ3, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\xfe\xdb\x18\x0b\xdeW\x02\\\x8fu\xcf'), chr(100) + '\x65' + '\x63' + '\157' + chr(1110 - 1010) + chr(9351 - 9250))(chr(117) + chr(0b1110100) + chr(361 - 259) + chr(45) + '\070'))([[ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1001010 + 0o45) + chr(0b110000), 8), ehT0Px3KOsy9(chr(179 - 131) + chr(2209 - 2098) + '\x30', 8)]]), AyX8vJJhUogz)
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric._update
|
def _update(self):
""" update num_inst and sum_metric """
aps = []
for k, v in self.records.items():
recall, prec = self._recall_prec(v, self.counts[k])
ap = self._average_precision(recall, prec)
aps.append(ap)
if self.num is not None and k < (self.num - 1):
self.sum_metric[k] = ap
self.num_inst[k] = 1
if self.num is None:
self.num_inst = 1
self.sum_metric = np.mean(aps)
else:
self.num_inst[-1] = 1
self.sum_metric[-1] = np.mean(aps)
|
python
|
def _update(self):
""" update num_inst and sum_metric """
aps = []
for k, v in self.records.items():
recall, prec = self._recall_prec(v, self.counts[k])
ap = self._average_precision(recall, prec)
aps.append(ap)
if self.num is not None and k < (self.num - 1):
self.sum_metric[k] = ap
self.num_inst[k] = 1
if self.num is None:
self.num_inst = 1
self.sum_metric = np.mean(aps)
else:
self.num_inst[-1] = 1
self.sum_metric[-1] = np.mean(aps)
|
[
"def",
"_update",
"(",
"self",
")",
":",
"aps",
"=",
"[",
"]",
"for",
"k",
",",
"v",
"in",
"self",
".",
"records",
".",
"items",
"(",
")",
":",
"recall",
",",
"prec",
"=",
"self",
".",
"_recall_prec",
"(",
"v",
",",
"self",
".",
"counts",
"[",
"k",
"]",
")",
"ap",
"=",
"self",
".",
"_average_precision",
"(",
"recall",
",",
"prec",
")",
"aps",
".",
"append",
"(",
"ap",
")",
"if",
"self",
".",
"num",
"is",
"not",
"None",
"and",
"k",
"<",
"(",
"self",
".",
"num",
"-",
"1",
")",
":",
"self",
".",
"sum_metric",
"[",
"k",
"]",
"=",
"ap",
"self",
".",
"num_inst",
"[",
"k",
"]",
"=",
"1",
"if",
"self",
".",
"num",
"is",
"None",
":",
"self",
".",
"num_inst",
"=",
"1",
"self",
".",
"sum_metric",
"=",
"np",
".",
"mean",
"(",
"aps",
")",
"else",
":",
"self",
".",
"num_inst",
"[",
"-",
"1",
"]",
"=",
"1",
"self",
".",
"sum_metric",
"[",
"-",
"1",
"]",
"=",
"np",
".",
"mean",
"(",
"aps",
")"
] |
update num_inst and sum_metric
|
[
"update",
"num_inst",
"and",
"sum_metric"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L197-L212
|
train
|
update num_inst and sum_metric
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,Kl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ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(12017 - 11906) + '\062' + chr(0b110111) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1439 - 1391) + chr(0b101110 + 0o101) + chr(2579 - 2528) + '\x33' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(0b10111 + 0o33), 0b1000), ehT0Px3KOsy9(chr(2278 - 2230) + chr(0b0 + 0o157) + '\061' + chr(2311 - 2257) + chr(0b11101 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(1913 - 1865) + chr(6635 - 6524) + chr(55) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b101100 + 0o13), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1390 - 1340) + chr(54) + chr(0b11110 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b100 + 0o56) + chr(0b10100 + 0o36) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110011 + 0o3) + chr(360 - 311), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1293 - 1244) + chr(53) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6615 - 6504) + '\x32' + chr(50) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b110101 + 0o72) + '\x35' + '\065', 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(0b100111 + 0o16) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x35', 0b1000), ehT0Px3KOsy9(chr(2121 - 2073) + chr(0b1011110 + 0o21) + '\062' + chr(0b110101 + 0o1) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9983 - 9872) + chr(973 - 924) + chr(0b100111 + 0o16) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\061' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x30' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(51) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10111 + 0o33) + chr(1661 - 1607) + chr(2034 - 1984), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110011) + chr(0b1101 + 0o51) + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(49) + chr(0b101110 + 0o3), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b11010 + 0o31) + chr(0b100001 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(1867 - 1818) + chr(0b11000 + 0o37) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(9161 - 9050) + chr(0b1011 + 0o47) + '\x33' + chr(775 - 727), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(1066 - 1011) + chr(0b110100), 59910 - 59902), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b110010) + chr(1337 - 1283), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\066' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b10010 + 0o36) + chr(50), 10733 - 10725), ehT0Px3KOsy9(chr(748 - 700) + '\157' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(597 - 546) + '\060' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x37' + chr(918 - 867), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(53) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(0b110001) + '\x34' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b110010) + chr(0b11100 + 0o32) + '\x34', 7637 - 7629), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1711 - 1661) + '\067' + chr(0b100 + 0o63), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(1830 - 1779) + '\x35' + chr(48), 1486 - 1478), ehT0Px3KOsy9('\x30' + chr(0b1010011 + 0o34) + '\x32' + chr(54) + '\064', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10110 + 0o34) + '\x36' + chr(0b101111 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(1591 - 1543) + chr(0b1101111) + '\066' + chr(0b110101), 57895 - 57887)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x95'), chr(0b1100100) + chr(101) + chr(6613 - 6514) + chr(0b111110 + 0o61) + '\144' + chr(0b101000 + 0o75))(chr(117) + chr(116) + '\146' + '\x2d' + chr(1565 - 1509)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def kM5_qHaMRp5M(oVre8I6UXc3b):
KW1QuHyhThR1 = []
for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(oVre8I6UXc3b.records, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xa7t\x12pE\x84\xdd\xdd;\xda\x14'), chr(8718 - 8618) + '\x65' + chr(99) + chr(111) + '\144' + '\145')('\165' + chr(0b1100101 + 0o17) + '\x66' + '\x2d' + '\070'))():
(mmdmvtGtAwiM, ANktCRdddHV_) = oVre8I6UXc3b._recall_prec(cMbll0QYhULo, oVre8I6UXc3b.qaIx4JIwHiwL[OolUPRJhRaJd])
n2zqRR6sJTnh = oVre8I6UXc3b._average_precision(mmdmvtGtAwiM, ANktCRdddHV_)
xafqLlk3kkUe(KW1QuHyhThR1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xda\xadr\x12W{'), '\144' + chr(0b1100101) + chr(0b111100 + 0o47) + chr(8307 - 8196) + chr(7328 - 7228) + chr(9843 - 9742))(chr(12276 - 12159) + chr(2725 - 2609) + '\146' + chr(285 - 240) + chr(597 - 541)))(n2zqRR6sJTnh)
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\xa8o'), chr(0b110000 + 0o64) + chr(101) + '\x63' + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(116) + chr(0b111001 + 0o55) + chr(0b101101) + chr(56))) is not None and OolUPRJhRaJd < xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\xa8o'), chr(166 - 66) + chr(4489 - 4388) + chr(99) + chr(0b110110 + 0o71) + '\144' + chr(0b1100101))(chr(0b10000 + 0o145) + chr(3216 - 3100) + '\146' + chr(0b101101) + chr(0b111000))) - ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1001011 + 0o44) + chr(49), ord("\x08")):
oVre8I6UXc3b.jGUwTiF22LVj[OolUPRJhRaJd] = n2zqRR6sJTnh
oVre8I6UXc3b._cdA_ca5MiLS[OolUPRJhRaJd] = ehT0Px3KOsy9('\060' + chr(4259 - 4148) + chr(0b110001), 8)
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\xa8o'), chr(100) + '\145' + '\143' + chr(9962 - 9851) + chr(100) + chr(0b1010001 + 0o24))(chr(2674 - 2557) + '\x74' + '\146' + chr(0b101101) + chr(0b100000 + 0o30))) is None:
oVre8I6UXc3b._cdA_ca5MiLS = ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1937 - 1888), 8)
oVre8I6UXc3b.jGUwTiF22LVj = WqUC3KWvYVup.aJhItC_Vawlw(KW1QuHyhThR1)
else:
oVre8I6UXc3b._cdA_ca5MiLS[-ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(2804 - 2693) + chr(0b11001 + 0o30), 8)] = ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\x31', 8)
oVre8I6UXc3b.jGUwTiF22LVj[-ehT0Px3KOsy9(chr(1519 - 1471) + chr(111) + '\061', 8)] = WqUC3KWvYVup.aJhItC_Vawlw(KW1QuHyhThR1)
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric._recall_prec
|
def _recall_prec(self, record, count):
""" get recall and precision from internal records """
record = np.delete(record, np.where(record[:, 1].astype(int) == 0)[0], axis=0)
sorted_records = record[record[:,0].argsort()[::-1]]
tp = np.cumsum(sorted_records[:, 1].astype(int) == 1)
fp = np.cumsum(sorted_records[:, 1].astype(int) == 2)
if count <= 0:
recall = tp * 0.0
else:
recall = tp / float(count)
prec = tp.astype(float) / (tp + fp)
return recall, prec
|
python
|
def _recall_prec(self, record, count):
""" get recall and precision from internal records """
record = np.delete(record, np.where(record[:, 1].astype(int) == 0)[0], axis=0)
sorted_records = record[record[:,0].argsort()[::-1]]
tp = np.cumsum(sorted_records[:, 1].astype(int) == 1)
fp = np.cumsum(sorted_records[:, 1].astype(int) == 2)
if count <= 0:
recall = tp * 0.0
else:
recall = tp / float(count)
prec = tp.astype(float) / (tp + fp)
return recall, prec
|
[
"def",
"_recall_prec",
"(",
"self",
",",
"record",
",",
"count",
")",
":",
"record",
"=",
"np",
".",
"delete",
"(",
"record",
",",
"np",
".",
"where",
"(",
"record",
"[",
":",
",",
"1",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"0",
")",
"[",
"0",
"]",
",",
"axis",
"=",
"0",
")",
"sorted_records",
"=",
"record",
"[",
"record",
"[",
":",
",",
"0",
"]",
".",
"argsort",
"(",
")",
"[",
":",
":",
"-",
"1",
"]",
"]",
"tp",
"=",
"np",
".",
"cumsum",
"(",
"sorted_records",
"[",
":",
",",
"1",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"1",
")",
"fp",
"=",
"np",
".",
"cumsum",
"(",
"sorted_records",
"[",
":",
",",
"1",
"]",
".",
"astype",
"(",
"int",
")",
"==",
"2",
")",
"if",
"count",
"<=",
"0",
":",
"recall",
"=",
"tp",
"*",
"0.0",
"else",
":",
"recall",
"=",
"tp",
"/",
"float",
"(",
"count",
")",
"prec",
"=",
"tp",
".",
"astype",
"(",
"float",
")",
"/",
"(",
"tp",
"+",
"fp",
")",
"return",
"recall",
",",
"prec"
] |
get recall and precision from internal records
|
[
"get",
"recall",
"and",
"precision",
"from",
"internal",
"records"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L214-L225
|
train
|
get recall and precision from internal records
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6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ectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + '\x36' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(463 - 352) + chr(50) + chr(54) + chr(0b110111), 58265 - 58257), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(2253 - 2203) + chr(0b101111 + 0o4), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2395 - 2346) + chr(0b10010 + 0o45) + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101 + 0o61) + '\061', 27842 - 27834), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(1223 - 1173) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110001) + chr(0b0 + 0o63), 0o10), ehT0Px3KOsy9('\x30' + chr(5323 - 5212) + chr(0b100110 + 0o13) + chr(0b10111 + 0o33) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1688 - 1638) + chr(1751 - 1703) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(49) + chr(0b100101 + 0o21) + '\063', 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111 + 0o0) + chr(0b110011) + chr(0b10 + 0o60), 26639 - 26631), ehT0Px3KOsy9(chr(387 - 339) + '\157' + chr(50) + chr(0b100001 + 0o23) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\062' + '\x31', 0o10), ehT0Px3KOsy9(chr(1441 - 1393) + chr(0b11010 + 0o125) + chr(51) + chr(50) + chr(1923 - 1874), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(2526 - 2474) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b101 + 0o56) + '\060' + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1010 + 0o47) + chr(0b110001) + chr(0b1101 + 0o50), 33385 - 33377), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\063' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(968 - 918) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(2196 - 2148) + chr(6114 - 6003) + chr(0b110 + 0o54) + '\066' + '\x30', 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b100011 + 0o23) + '\065', 1586 - 1578), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101000 + 0o12) + '\x36', 38830 - 38822), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b11111 + 0o23) + chr(0b111 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\x36' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b110111) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(54) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(4377 - 4266) + chr(0b110011) + '\065' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(7272 - 7161) + '\067' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10010 + 0o37) + chr(52) + chr(1646 - 1593), 0b1000), ehT0Px3KOsy9(chr(1157 - 1109) + chr(0b1000110 + 0o51) + chr(435 - 384) + '\067' + chr(2763 - 2710), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(52) + chr(0b1011 + 0o52), 8), ehT0Px3KOsy9(chr(1037 - 989) + '\157' + chr(1423 - 1374) + chr(951 - 897) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(368 - 320) + chr(0b1101111) + chr(49) + '\x35' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(8098 - 7987) + '\062' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7329 - 7218) + chr(0b1101 + 0o44) + chr(0b11110 + 0o24) + chr(2064 - 2015), 8), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b11011 + 0o27) + '\061', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(0b110011) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + chr(0b100010 + 0o115) + '\062' + chr(836 - 786) + chr(0b100110 + 0o17), 6909 - 6901)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(404 - 356) + '\x6f' + chr(53) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e'), '\144' + chr(0b1010011 + 0o22) + '\143' + chr(111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nJxzxa2vPuHW(oVre8I6UXc3b, SIWbn6wzltxD, ualWdDeXJEGO):
SIWbn6wzltxD = WqUC3KWvYVup.delete(SIWbn6wzltxD, WqUC3KWvYVup.dRFAC59yQBm_(SIWbn6wzltxD[:, ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', 0o10)].astype(ehT0Px3KOsy9) == ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1011001 + 0o26) + '\060', 47553 - 47545))[ehT0Px3KOsy9('\x30' + chr(9434 - 9323) + '\060', 8)], axis=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 8))
k9kHY16fU2D9 = SIWbn6wzltxD[SIWbn6wzltxD[:, ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b10111 + 0o31), 8)].argsort()[::-ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(1452 - 1403), 8)]]
H4gv2k7w5Qi_ = WqUC3KWvYVup.i0lzZW3r00ue(k9kHY16fU2D9[:, ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49), 8)].astype(ehT0Px3KOsy9) == ehT0Px3KOsy9(chr(2165 - 2117) + chr(0b1101111) + chr(49), 8))
ey_P6rjw_s2D = WqUC3KWvYVup.i0lzZW3r00ue(k9kHY16fU2D9[:, ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b10011 + 0o36), 8)].astype(ehT0Px3KOsy9) == ehT0Px3KOsy9('\x30' + '\x6f' + '\062', 0b1000))
if ualWdDeXJEGO <= ehT0Px3KOsy9(chr(507 - 459) + chr(0b100010 + 0o115) + chr(0b100010 + 0o16), 8):
mmdmvtGtAwiM = H4gv2k7w5Qi_ * 0.0
else:
mmdmvtGtAwiM = H4gv2k7w5Qi_ / kkSX4ccExqw4(ualWdDeXJEGO)
ANktCRdddHV_ = H4gv2k7w5Qi_.astype(kkSX4ccExqw4) / (H4gv2k7w5Qi_ + ey_P6rjw_s2D)
return (mmdmvtGtAwiM, ANktCRdddHV_)
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric._average_precision
|
def _average_precision(self, rec, prec):
"""
calculate average precision
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
"""
# append sentinel values at both ends
mrec = np.concatenate(([0.], rec, [1.]))
mpre = np.concatenate(([0.], prec, [0.]))
# compute precision integration ladder
for i in range(mpre.size - 1, 0, -1):
mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])
# look for recall value changes
i = np.where(mrec[1:] != mrec[:-1])[0]
# sum (\delta recall) * prec
ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
return ap
|
python
|
def _average_precision(self, rec, prec):
"""
calculate average precision
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
"""
# append sentinel values at both ends
mrec = np.concatenate(([0.], rec, [1.]))
mpre = np.concatenate(([0.], prec, [0.]))
# compute precision integration ladder
for i in range(mpre.size - 1, 0, -1):
mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i])
# look for recall value changes
i = np.where(mrec[1:] != mrec[:-1])[0]
# sum (\delta recall) * prec
ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1])
return ap
|
[
"def",
"_average_precision",
"(",
"self",
",",
"rec",
",",
"prec",
")",
":",
"# append sentinel values at both ends",
"mrec",
"=",
"np",
".",
"concatenate",
"(",
"(",
"[",
"0.",
"]",
",",
"rec",
",",
"[",
"1.",
"]",
")",
")",
"mpre",
"=",
"np",
".",
"concatenate",
"(",
"(",
"[",
"0.",
"]",
",",
"prec",
",",
"[",
"0.",
"]",
")",
")",
"# compute precision integration ladder",
"for",
"i",
"in",
"range",
"(",
"mpre",
".",
"size",
"-",
"1",
",",
"0",
",",
"-",
"1",
")",
":",
"mpre",
"[",
"i",
"-",
"1",
"]",
"=",
"np",
".",
"maximum",
"(",
"mpre",
"[",
"i",
"-",
"1",
"]",
",",
"mpre",
"[",
"i",
"]",
")",
"# look for recall value changes",
"i",
"=",
"np",
".",
"where",
"(",
"mrec",
"[",
"1",
":",
"]",
"!=",
"mrec",
"[",
":",
"-",
"1",
"]",
")",
"[",
"0",
"]",
"# sum (\\delta recall) * prec",
"ap",
"=",
"np",
".",
"sum",
"(",
"(",
"mrec",
"[",
"i",
"+",
"1",
"]",
"-",
"mrec",
"[",
"i",
"]",
")",
"*",
"mpre",
"[",
"i",
"+",
"1",
"]",
")",
"return",
"ap"
] |
calculate average precision
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
|
[
"calculate",
"average",
"precision"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L227-L254
|
train
|
Calculates the average precision of a set of recall values and returns the average precision integration of the set of recall values.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMy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IOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1100011 + 0o14) + chr(720 - 671) + chr(0b110001) + '\067', 0o10), ehT0Px3KOsy9(chr(470 - 422) + chr(111) + chr(0b110001) + chr(579 - 524) + chr(0b101001 + 0o12), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110110) + chr(0b10 + 0o63), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110110) + chr(76 - 26), 8404 - 8396), ehT0Px3KOsy9(chr(48) + chr(8108 - 7997) + '\062' + '\x37' + chr(539 - 489), 43677 - 43669), ehT0Px3KOsy9(chr(1566 - 1518) + '\157' + '\061' + '\064' + '\x30', 40601 - 40593), ehT0Px3KOsy9(chr(1966 - 1918) + chr(0b1101111) + '\061' + chr(540 - 490) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(179 - 125) + chr(1865 - 1811), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + '\x31' + '\062' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(51) + '\x37' + chr(1690 - 1640), 54390 - 54382), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101100 + 0o5) + chr(1285 - 1235) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + '\x32' + chr(0b101111 + 0o1), 5925 - 5917), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\063', 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(1578 - 1527) + chr(0b110100) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110100) + chr(0b110000 + 0o2), 11695 - 11687), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110001) + chr(1679 - 1627), ord("\x08")), ehT0Px3KOsy9(chr(1402 - 1354) + '\157' + chr(53) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8578 - 8467) + '\062' + '\060' + '\x30', 64049 - 64041), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\062' + chr(0b110110) + chr(0b101001 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\063' + '\067' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(7710 - 7599) + chr(1511 - 1461) + '\067' + chr(891 - 837), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10000 + 0o41) + chr(0b110100) + chr(49), 0b1000), ehT0Px3KOsy9(chr(2284 - 2236) + '\157' + '\x32' + '\061' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b1011 + 0o52) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(10262 - 10151) + chr(900 - 851) + chr(0b110000) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1915 - 1867) + chr(8720 - 8609) + chr(2187 - 2138) + chr(0b110011) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(51) + '\x36' + chr(493 - 439), 0o10), ehT0Px3KOsy9('\x30' + chr(11178 - 11067) + '\062' + chr(0b11110 + 0o24) + '\063', 0b1000), ehT0Px3KOsy9(chr(248 - 200) + chr(0b1101000 + 0o7) + '\063' + '\063' + chr(0b1110 + 0o45), 52607 - 52599), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(1142 - 1091) + chr(0b110111), 50754 - 50746), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\067' + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\x37' + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(5832 - 5721) + chr(51) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(3891 - 3780) + chr(0b110001) + chr(0b10111 + 0o40) + chr(49), 8), ehT0Px3KOsy9('\060' + chr(801 - 690) + chr(55) + chr(0b10111 + 0o31), 0o10), ehT0Px3KOsy9(chr(2056 - 2008) + chr(0b1101111) + '\061' + '\x37' + chr(2823 - 2769), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101001 + 0o10) + '\x31' + chr(0b101110 + 0o3), 29070 - 29062), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\060' + chr(0b1111 + 0o41), 8), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(50) + chr(0b101000 + 0o12) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1500 - 1452) + chr(0b1101111) + '\062' + chr(848 - 795), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(4474 - 4363) + '\065' + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'a'), chr(100) + chr(0b1000000 + 0o45) + chr(0b1000010 + 0o41) + '\157' + chr(100) + chr(0b1001100 + 0o31))(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def sZJhQq7EEHhV(oVre8I6UXc3b, MnMCYVsiR1pJ, ANktCRdddHV_):
JNPumP3D5YwE = WqUC3KWvYVup.concatenate(([0.0], MnMCYVsiR1pJ, [1.0]))
xS3BS7wnXhwF = WqUC3KWvYVup.concatenate(([0.0], ANktCRdddHV_, [0.0]))
for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(xS3BS7wnXhwF, xafqLlk3kkUe(SXOLrMavuUCe(b'\x017\x16\x91\x89"\x12|:\xab9\xb1'), chr(0b1100100) + chr(0b1100101) + chr(0b110101 + 0o56) + '\x6f' + chr(9283 - 9183) + chr(101))('\x75' + chr(0b1110100) + chr(0b1010011 + 0o23) + chr(825 - 780) + '\x38')) - ehT0Px3KOsy9(chr(572 - 524) + chr(3728 - 3617) + chr(49), 32568 - 32560), ehT0Px3KOsy9(chr(370 - 322) + '\x6f' + chr(0b100 + 0o54), 0b1000), -ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001), 8)):
xS3BS7wnXhwF[WVxHKyX45z_L - ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b101001 + 0o10), 8)] = WqUC3KWvYVup.maximum(xS3BS7wnXhwF[WVxHKyX45z_L - ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + '\x31', 8)], xS3BS7wnXhwF[WVxHKyX45z_L])
WVxHKyX45z_L = WqUC3KWvYVup.dRFAC59yQBm_(JNPumP3D5YwE[ehT0Px3KOsy9('\060' + chr(111) + chr(508 - 459), 8):] != JNPumP3D5YwE[:-ehT0Px3KOsy9(chr(0b110000) + chr(11862 - 11751) + chr(0b110001), 8)])[ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11011 + 0o25), 8)]
n2zqRR6sJTnh = WqUC3KWvYVup.xkxBmo49x2An((JNPumP3D5YwE[WVxHKyX45z_L + ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49), 8)] - JNPumP3D5YwE[WVxHKyX45z_L]) * xS3BS7wnXhwF[WVxHKyX45z_L + ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1110 + 0o43), 8)])
return n2zqRR6sJTnh
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
MApMetric._insert
|
def _insert(self, key, records, count):
""" Insert records according to key """
if key not in self.records:
assert key not in self.counts
self.records[key] = records
self.counts[key] = count
else:
self.records[key] = np.vstack((self.records[key], records))
assert key in self.counts
self.counts[key] += count
|
python
|
def _insert(self, key, records, count):
""" Insert records according to key """
if key not in self.records:
assert key not in self.counts
self.records[key] = records
self.counts[key] = count
else:
self.records[key] = np.vstack((self.records[key], records))
assert key in self.counts
self.counts[key] += count
|
[
"def",
"_insert",
"(",
"self",
",",
"key",
",",
"records",
",",
"count",
")",
":",
"if",
"key",
"not",
"in",
"self",
".",
"records",
":",
"assert",
"key",
"not",
"in",
"self",
".",
"counts",
"self",
".",
"records",
"[",
"key",
"]",
"=",
"records",
"self",
".",
"counts",
"[",
"key",
"]",
"=",
"count",
"else",
":",
"self",
".",
"records",
"[",
"key",
"]",
"=",
"np",
".",
"vstack",
"(",
"(",
"self",
".",
"records",
"[",
"key",
"]",
",",
"records",
")",
")",
"assert",
"key",
"in",
"self",
".",
"counts",
"self",
".",
"counts",
"[",
"key",
"]",
"+=",
"count"
] |
Insert records according to key
|
[
"Insert",
"records",
"according",
"to",
"key"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L256-L265
|
train
|
Insert records according to key
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0Zk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Pdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1101001 + 0o6) + chr(0b10001 + 0o41) + chr(0b110000 + 0o5) + chr(534 - 483), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + '\x34' + '\x35', 0b1000), ehT0Px3KOsy9(chr(979 - 931) + '\x6f' + '\062' + chr(55) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6744 - 6633) + chr(0b110011) + chr(54) + chr(2352 - 2302), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101000 + 0o7) + chr(0b10001 + 0o41) + '\x34' + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1071 - 1016) + chr(134 - 85), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110001) + '\062', 28237 - 28229), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11110 + 0o30) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10653 - 10542) + chr(50) + chr(0b100101 + 0o13) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x36' + chr(0b11 + 0o64), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2600 - 2489) + chr(0b110011) + '\x34' + chr(50), 3958 - 3950), ehT0Px3KOsy9(chr(495 - 447) + chr(0b10101 + 0o132) + chr(0b110001) + '\060' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + '\062' + chr(0b11001 + 0o31) + chr(0b110000), 43853 - 43845), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b100101 + 0o15) + '\063' + chr(1540 - 1488), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110001) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x30', 38321 - 38313), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(0b1 + 0o66), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(3163 - 3052) + '\x35' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(356 - 307) + chr(0b11001 + 0o34) + '\x37', 10680 - 10672), ehT0Px3KOsy9(chr(1409 - 1361) + chr(0b1101111 + 0o0) + chr(0b110010) + '\063' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(1511 - 1458) + '\061', 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(4718 - 4607) + chr(51) + '\063' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x33' + chr(399 - 349), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(975 - 927) + chr(8730 - 8619) + chr(0b110010) + chr(0b1010 + 0o46), 2972 - 2964), ehT0Px3KOsy9(chr(797 - 749) + '\157' + chr(50) + '\x30', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(4731 - 4620) + chr(1241 - 1190) + '\064' + chr(2540 - 2489), 4982 - 4974), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100001 + 0o20) + chr(2026 - 1978), 0b1000), ehT0Px3KOsy9(chr(1028 - 980) + chr(0b1101111) + chr(0b110010) + '\062' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + '\061' + '\x30' + '\061', 64550 - 64542), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(51) + chr(0b11101 + 0o30) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1393 - 1340), 0b1000), ehT0Px3KOsy9(chr(1138 - 1090) + '\157' + chr(0b110011) + chr(0b111 + 0o54), 0o10), ehT0Px3KOsy9(chr(499 - 451) + chr(111) + '\062' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110111) + '\066', 0b1000), ehT0Px3KOsy9(chr(441 - 393) + chr(0b1101111) + chr(0b110010) + chr(0b110010) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(50) + '\061', 34906 - 34898), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b10000 + 0o137) + chr(0b1110 + 0o50) + chr(0b110101), 63635 - 63627)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(564 - 511) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x85'), chr(0b1100100) + chr(0b10010 + 0o123) + chr(4607 - 4508) + '\157' + chr(0b1100100) + chr(0b1000 + 0o135))(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def w8qjF7xXNAvg(oVre8I6UXc3b, K3J4ZwSlE0sT, mov_6OW2Bcur, ualWdDeXJEGO):
if K3J4ZwSlE0sT not in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6J\xc8\xad\x95v]\x06\xc6T\x971'), chr(0b1100100) + chr(101) + '\143' + chr(0b1101001 + 0o6) + '\144' + chr(0b1100101))('\x75' + chr(0b1010001 + 0o43) + '\146' + chr(45) + '\x38')):
assert K3J4ZwSlE0sT not in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaD\xf7\x8a\x97sCC\xcc^\x95\x0f'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1001011 + 0o44) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110001 + 0o3) + '\146' + chr(0b111 + 0o46) + '\x38'))
oVre8I6UXc3b.mov_6OW2Bcur[K3J4ZwSlE0sT] = mov_6OW2Bcur
oVre8I6UXc3b.qaIx4JIwHiwL[K3J4ZwSlE0sT] = ualWdDeXJEGO
else:
oVre8I6UXc3b.mov_6OW2Bcur[K3J4ZwSlE0sT] = WqUC3KWvYVup.vstack((oVre8I6UXc3b.mov_6OW2Bcur[K3J4ZwSlE0sT], mov_6OW2Bcur))
assert K3J4ZwSlE0sT in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaD\xf7\x8a\x97sCC\xcc^\x95\x0f'), '\144' + chr(6240 - 6139) + chr(99) + chr(11920 - 11809) + chr(5618 - 5518) + '\x65')(chr(0b1100100 + 0o21) + chr(116) + '\146' + chr(0b1 + 0o54) + '\070'))
oVre8I6UXc3b.qaIx4JIwHiwL[K3J4ZwSlE0sT] += ualWdDeXJEGO
|
apache/incubator-mxnet
|
example/ssd/evaluate/eval_metric.py
|
VOC07MApMetric._average_precision
|
def _average_precision(self, rec, prec):
"""
calculate average precision, override the default one,
special 11-point metric
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
"""
ap = 0.
for t in np.arange(0., 1.1, 0.1):
if np.sum(rec >= t) == 0:
p = 0
else:
p = np.max(prec[rec >= t])
ap += p / 11.
return ap
|
python
|
def _average_precision(self, rec, prec):
"""
calculate average precision, override the default one,
special 11-point metric
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
"""
ap = 0.
for t in np.arange(0., 1.1, 0.1):
if np.sum(rec >= t) == 0:
p = 0
else:
p = np.max(prec[rec >= t])
ap += p / 11.
return ap
|
[
"def",
"_average_precision",
"(",
"self",
",",
"rec",
",",
"prec",
")",
":",
"ap",
"=",
"0.",
"for",
"t",
"in",
"np",
".",
"arange",
"(",
"0.",
",",
"1.1",
",",
"0.1",
")",
":",
"if",
"np",
".",
"sum",
"(",
"rec",
">=",
"t",
")",
"==",
"0",
":",
"p",
"=",
"0",
"else",
":",
"p",
"=",
"np",
".",
"max",
"(",
"prec",
"[",
"rec",
">=",
"t",
"]",
")",
"ap",
"+=",
"p",
"/",
"11.",
"return",
"ap"
] |
calculate average precision, override the default one,
special 11-point metric
Params:
----------
rec : numpy.array
cumulated recall
prec : numpy.array
cumulated precision
Returns:
----------
ap as float
|
[
"calculate",
"average",
"precision",
"override",
"the",
"default",
"one",
"special",
"11",
"-",
"point",
"metric"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/evaluate/eval_metric.py#L273-L295
|
train
|
Calculates the average precision of the cumulated recall and precision.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GM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Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(12313 - 12202) + '\x31' + chr(607 - 557) + '\061', 0b1000), ehT0Px3KOsy9(chr(2076 - 2028) + chr(11918 - 11807) + '\x33' + '\067' + '\x35', 0b1000), ehT0Px3KOsy9(chr(1407 - 1359) + chr(0b1100011 + 0o14) + chr(0b110010) + chr(0b100010 + 0o17) + chr(0b10110 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + '\062' + '\065' + chr(0b10010 + 0o45), 0b1000), ehT0Px3KOsy9(chr(976 - 928) + chr(3431 - 3320) + '\x33' + chr(0b11010 + 0o34) + chr(2710 - 2657), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(1515 - 1463), ord("\x08")), ehT0Px3KOsy9(chr(2032 - 1984) + '\157' + chr(50) + '\x32' + chr(0b101100 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1100 + 0o143) + '\061' + chr(50) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\064' + chr(703 - 650), 0b1000), ehT0Px3KOsy9('\060' + chr(9985 - 9874) + chr(49) + chr(2095 - 2047) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1001 + 0o50) + chr(51) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(501 - 451) + '\x34' + '\061', 0b1000), ehT0Px3KOsy9(chr(642 - 594) + '\157' + '\x33' + chr(465 - 415) + chr(52), 18000 - 17992), ehT0Px3KOsy9(chr(48) + chr(2184 - 2073) + chr(49) + chr(329 - 276) + chr(1405 - 1351), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\063' + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\064' + chr(0b1 + 0o60), 0o10), ehT0Px3KOsy9(chr(1708 - 1660) + '\x6f' + '\063' + chr(116 - 62) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(51) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11001 + 0o31) + chr(0b110011) + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(0b100100 + 0o113) + chr(0b100111 + 0o14) + '\064' + chr(1247 - 1195), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(357 - 302) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + '\066' + '\065', 0b1000), ehT0Px3KOsy9(chr(897 - 849) + chr(0b1101111) + '\063' + chr(54) + chr(0b11010 + 0o34), 23699 - 23691), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\064' + '\061', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065' + chr(984 - 931), 50961 - 50953), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(1586 - 1475) + chr(55) + '\062', 30367 - 30359), ehT0Px3KOsy9('\060' + '\157' + chr(554 - 501) + chr(0b11110 + 0o27), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(389 - 337) + '\x36', 12487 - 12479), ehT0Px3KOsy9(chr(48) + chr(0b0 + 0o157) + chr(0b110011) + '\062' + '\064', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b101101 + 0o6) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1125 - 1074) + '\x32' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(2148 - 2097) + chr(974 - 922), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\x32' + chr(0b110011) + '\x32', 43066 - 43058), ehT0Px3KOsy9(chr(2124 - 2076) + '\x6f' + chr(0b100011 + 0o22) + chr(2022 - 1970), 24131 - 24123), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101110 + 0o5) + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1 + 0o62) + chr(101 - 52) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\066' + '\061', 53691 - 53683), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b10110 + 0o131) + chr(51) + '\x34' + chr(0b110111), 50640 - 50632), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(7830 - 7719) + chr(50) + '\067' + chr(2737 - 2684), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\061' + chr(0b100011 + 0o17), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f'), chr(0b110010 + 0o62) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b10011 + 0o121) + '\x65')('\165' + chr(129 - 13) + chr(102) + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def sZJhQq7EEHhV(oVre8I6UXc3b, MnMCYVsiR1pJ, ANktCRdddHV_):
n2zqRR6sJTnh = 0.0
for YeT3l7JgTbWR in xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'0\x8f\xea\xc1\x92y'), chr(0b1011011 + 0o11) + chr(101) + '\x63' + chr(0b110011 + 0o74) + chr(0b1000101 + 0o37) + '\145')(chr(0b11010 + 0o133) + '\164' + chr(0b1000111 + 0o37) + '\x2d' + chr(0b111000)))(0.0, 1.1, 0.1):
if xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b')\x96\xf3\xed\x98s\xa2m\x1dw\x1f\xcf'), chr(0b11111 + 0o105) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1001011 + 0o32))('\165' + '\x74' + '\146' + '\x2d' + '\x38'))(MnMCYVsiR1pJ >= YeT3l7JgTbWR) == ehT0Px3KOsy9('\060' + chr(7022 - 6911) + chr(1833 - 1785), ord("\x08")):
UyakMW2IMFEj = ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(0b110000), 8)
else:
UyakMW2IMFEj = WqUC3KWvYVup.tsdjvlgh9gDP(ANktCRdddHV_[MnMCYVsiR1pJ >= YeT3l7JgTbWR])
n2zqRR6sJTnh += UyakMW2IMFEj / 11.0
return n2zqRR6sJTnh
|
apache/incubator-mxnet
|
example/image-classification/fine-tune.py
|
get_fine_tune_model
|
def get_fine_tune_model(symbol, arg_params, num_classes, layer_name, dtype='float32'):
"""
symbol: the pre-trained network symbol
arg_params: the argument parameters of the pre-trained model
num_classes: the number of classes for the fine-tune datasets
layer_name: the layer name before the last fully-connected layer
"""
all_layers = symbol.get_internals()
net = all_layers[layer_name+'_output']
net = mx.symbol.FullyConnected(data=net, num_hidden=num_classes, name='fc')
if dtype == 'float16':
net = mx.sym.Cast(data=net, dtype=np.float32)
net = mx.symbol.SoftmaxOutput(data=net, name='softmax')
new_args = dict({k:arg_params[k] for k in arg_params if 'fc' not in k})
return (net, new_args)
|
python
|
def get_fine_tune_model(symbol, arg_params, num_classes, layer_name, dtype='float32'):
"""
symbol: the pre-trained network symbol
arg_params: the argument parameters of the pre-trained model
num_classes: the number of classes for the fine-tune datasets
layer_name: the layer name before the last fully-connected layer
"""
all_layers = symbol.get_internals()
net = all_layers[layer_name+'_output']
net = mx.symbol.FullyConnected(data=net, num_hidden=num_classes, name='fc')
if dtype == 'float16':
net = mx.sym.Cast(data=net, dtype=np.float32)
net = mx.symbol.SoftmaxOutput(data=net, name='softmax')
new_args = dict({k:arg_params[k] for k in arg_params if 'fc' not in k})
return (net, new_args)
|
[
"def",
"get_fine_tune_model",
"(",
"symbol",
",",
"arg_params",
",",
"num_classes",
",",
"layer_name",
",",
"dtype",
"=",
"'float32'",
")",
":",
"all_layers",
"=",
"symbol",
".",
"get_internals",
"(",
")",
"net",
"=",
"all_layers",
"[",
"layer_name",
"+",
"'_output'",
"]",
"net",
"=",
"mx",
".",
"symbol",
".",
"FullyConnected",
"(",
"data",
"=",
"net",
",",
"num_hidden",
"=",
"num_classes",
",",
"name",
"=",
"'fc'",
")",
"if",
"dtype",
"==",
"'float16'",
":",
"net",
"=",
"mx",
".",
"sym",
".",
"Cast",
"(",
"data",
"=",
"net",
",",
"dtype",
"=",
"np",
".",
"float32",
")",
"net",
"=",
"mx",
".",
"symbol",
".",
"SoftmaxOutput",
"(",
"data",
"=",
"net",
",",
"name",
"=",
"'softmax'",
")",
"new_args",
"=",
"dict",
"(",
"{",
"k",
":",
"arg_params",
"[",
"k",
"]",
"for",
"k",
"in",
"arg_params",
"if",
"'fc'",
"not",
"in",
"k",
"}",
")",
"return",
"(",
"net",
",",
"new_args",
")"
] |
symbol: the pre-trained network symbol
arg_params: the argument parameters of the pre-trained model
num_classes: the number of classes for the fine-tune datasets
layer_name: the layer name before the last fully-connected layer
|
[
"symbol",
":",
"the",
"pre",
"-",
"trained",
"network",
"symbol",
"arg_params",
":",
"the",
"argument",
"parameters",
"of",
"the",
"pre",
"-",
"trained",
"model",
"num_classes",
":",
"the",
"number",
"of",
"classes",
"for",
"the",
"fine",
"-",
"tune",
"datasets",
"layer_name",
":",
"the",
"layer",
"name",
"before",
"the",
"last",
"fully",
"-",
"connected",
"layer"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/image-classification/fine-tune.py#L28-L42
|
train
|
Returns the model for the fine - tuning dataset.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HP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3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(5480 - 5369) + '\x31' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + chr(0b110001) + chr(0b1010 + 0o54) + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001111 + 0o40) + '\066', 52596 - 52588), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(50), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101001 + 0o12) + '\x34' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(522 - 473) + chr(1109 - 1058) + chr(0b1011 + 0o45), 35584 - 35576), ehT0Px3KOsy9('\x30' + chr(7062 - 6951) + chr(1449 - 1398) + chr(0b11010 + 0o30) + chr(1397 - 1343), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + '\x31' + chr(1798 - 1743) + '\x31', 60497 - 60489), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(49) + chr(0b110010) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101001 + 0o10) + chr(0b100111 + 0o17) + chr(1330 - 1281), 0b1000), ehT0Px3KOsy9(chr(999 - 951) + chr(1708 - 1597) + '\061' + '\065' + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101100 + 0o6) + chr(0b100100 + 0o16) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(6026 - 5915) + chr(0b1110 + 0o47) + chr(1226 - 1171), 0o10), ehT0Px3KOsy9(chr(1810 - 1762) + chr(0b1101111) + chr(0b110011) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101011 + 0o4) + '\063' + chr(0b100000 + 0o27) + chr(0b110001 + 0o2), 56316 - 56308), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b110000) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + '\x31' + '\062' + chr(564 - 516), 30577 - 30569), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + '\063' + chr(0b101011 + 0o6) + chr(177 - 124), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2612 - 2559) + chr(53), 2024 - 2016), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(971 - 923) + '\157' + chr(765 - 716) + chr(1341 - 1286), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x36' + chr(0b100000 + 0o20), 0b1000), ehT0Px3KOsy9(chr(856 - 808) + chr(0b1101111) + chr(0b110110) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(6302 - 6191) + chr(2296 - 2246) + '\x34' + chr(55), 11854 - 11846), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b110010) + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(1076 - 1027) + '\x36' + chr(0b10110 + 0o37), 8), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + chr(49) + chr(0b1000 + 0o51) + chr(50), 12802 - 12794), ehT0Px3KOsy9('\060' + chr(9642 - 9531) + '\x31' + '\060' + chr(0b110111), 17000 - 16992), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x37' + chr(0b110010), 3339 - 3331), ehT0Px3KOsy9(chr(1305 - 1257) + chr(111) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101011 + 0o6) + '\x36' + '\x32', 0o10), ehT0Px3KOsy9(chr(72 - 24) + chr(11162 - 11051) + chr(1844 - 1795) + chr(52) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(11879 - 11768) + chr(0b110101), 31128 - 31120), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(0b110001 + 0o2) + '\x34' + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + '\x31' + chr(1888 - 1837) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010 + 0o4), 8), ehT0Px3KOsy9(chr(285 - 237) + chr(0b1101010 + 0o5) + '\x33' + '\060' + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(1572 - 1524) + '\064', 10725 - 10717), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1100000 + 0o17) + chr(0b110011) + '\x32' + chr(0b110011), 35014 - 35006)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b111 + 0o150) + chr(1267 - 1214) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'!'), '\144' + chr(3025 - 2924) + '\143' + chr(0b1100100 + 0o13) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1011111 + 0o25) + chr(5696 - 5594) + chr(0b100101 + 0o10) + chr(0b110000 + 0o10)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CIdTd5RPmZ5z(Usr5ykvL2UZF, GroVdzCONmWS, i6loyAgxUM2t, YzJBPucQyDh2, jSV9IKnemH7K=xafqLlk3kkUe(SXOLrMavuUCe(b'iv\x1agn\xd3j'), chr(0b101100 + 0o70) + chr(101) + chr(0b1000010 + 0o41) + chr(0b1100 + 0o143) + chr(6991 - 6891) + chr(5831 - 5730))('\165' + chr(0b10010 + 0o142) + '\146' + chr(45) + chr(56))):
SzAgihaYt2o7 = Usr5ykvL2UZF.get_internals()
DyzboKL9cczb = SzAgihaYt2o7[YzJBPucQyDh2 + xafqLlk3kkUe(SXOLrMavuUCe(b'Pu\x00rj\x95,'), chr(0b101101 + 0o67) + '\x65' + chr(5842 - 5743) + '\157' + chr(0b1100100) + chr(0b111 + 0o136))(chr(117) + chr(0b1110100) + chr(0b10100 + 0o122) + chr(45) + chr(56))]
DyzboKL9cczb = CIVheOt0RKQX.symbol.FullyConnected(data=DyzboKL9cczb, num_hidden=i6loyAgxUM2t, name=xafqLlk3kkUe(SXOLrMavuUCe(b'iy'), chr(0b1000101 + 0o37) + chr(101) + '\143' + chr(6797 - 6686) + chr(7318 - 7218) + chr(101))('\x75' + chr(0b10100 + 0o140) + '\x66' + chr(45) + chr(898 - 842)))
if jSV9IKnemH7K == xafqLlk3kkUe(SXOLrMavuUCe(b'iv\x1agn\xd1n'), chr(100) + chr(0b1011111 + 0o6) + chr(673 - 574) + chr(111) + '\144' + chr(926 - 825))('\165' + chr(0b1110100) + '\x66' + chr(544 - 499) + chr(56)):
DyzboKL9cczb = CIVheOt0RKQX.sym.Cast(data=DyzboKL9cczb, dtype=WqUC3KWvYVup.float32)
DyzboKL9cczb = CIVheOt0RKQX.symbol.SoftmaxOutput(data=DyzboKL9cczb, name=xafqLlk3kkUe(SXOLrMavuUCe(b'|u\x13rw\x81 '), '\x64' + '\145' + chr(0b1100011) + chr(0b1000 + 0o147) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(99 - 54) + chr(56)))
DlmoypQS8ajP = wLqBDw8l0eIm({OolUPRJhRaJd: GroVdzCONmWS[OolUPRJhRaJd] for OolUPRJhRaJd in GroVdzCONmWS if xafqLlk3kkUe(SXOLrMavuUCe(b'iy'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1011000 + 0o27) + '\144' + chr(0b11110 + 0o107))(chr(0b1110101) + chr(0b1110100) + chr(4820 - 4718) + '\x2d' + chr(0b10111 + 0o41)) not in OolUPRJhRaJd})
return (DyzboKL9cczb, DlmoypQS8ajP)
|
apache/incubator-mxnet
|
example/gluon/lipnet/data_loader.py
|
LipsDataset._list_images
|
def _list_images(self, root):
"""
Description : generate list for lip images
"""
self.labels = []
self.items = []
valid_unseen_sub_idx = [1, 2, 20, 22]
skip_sub_idx = [21]
if self._mode == 'train':
sub_idx = ['s' + str(i) for i in range(1, 35) \
if i not in valid_unseen_sub_idx + skip_sub_idx]
elif self._mode == 'valid':
sub_idx = ['s' + str(i) for i in valid_unseen_sub_idx]
folder_path = []
for i in sub_idx:
folder_path.extend(glob.glob(os.path.join(root, i, "*")))
for folder in folder_path:
filename = glob.glob(os.path.join(folder, "*"))
if len(filename) != self._seq_len:
continue
filename.sort()
label = os.path.split(folder)[-1]
self.items.append((filename, label))
|
python
|
def _list_images(self, root):
"""
Description : generate list for lip images
"""
self.labels = []
self.items = []
valid_unseen_sub_idx = [1, 2, 20, 22]
skip_sub_idx = [21]
if self._mode == 'train':
sub_idx = ['s' + str(i) for i in range(1, 35) \
if i not in valid_unseen_sub_idx + skip_sub_idx]
elif self._mode == 'valid':
sub_idx = ['s' + str(i) for i in valid_unseen_sub_idx]
folder_path = []
for i in sub_idx:
folder_path.extend(glob.glob(os.path.join(root, i, "*")))
for folder in folder_path:
filename = glob.glob(os.path.join(folder, "*"))
if len(filename) != self._seq_len:
continue
filename.sort()
label = os.path.split(folder)[-1]
self.items.append((filename, label))
|
[
"def",
"_list_images",
"(",
"self",
",",
"root",
")",
":",
"self",
".",
"labels",
"=",
"[",
"]",
"self",
".",
"items",
"=",
"[",
"]",
"valid_unseen_sub_idx",
"=",
"[",
"1",
",",
"2",
",",
"20",
",",
"22",
"]",
"skip_sub_idx",
"=",
"[",
"21",
"]",
"if",
"self",
".",
"_mode",
"==",
"'train'",
":",
"sub_idx",
"=",
"[",
"'s'",
"+",
"str",
"(",
"i",
")",
"for",
"i",
"in",
"range",
"(",
"1",
",",
"35",
")",
"if",
"i",
"not",
"in",
"valid_unseen_sub_idx",
"+",
"skip_sub_idx",
"]",
"elif",
"self",
".",
"_mode",
"==",
"'valid'",
":",
"sub_idx",
"=",
"[",
"'s'",
"+",
"str",
"(",
"i",
")",
"for",
"i",
"in",
"valid_unseen_sub_idx",
"]",
"folder_path",
"=",
"[",
"]",
"for",
"i",
"in",
"sub_idx",
":",
"folder_path",
".",
"extend",
"(",
"glob",
".",
"glob",
"(",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"i",
",",
"\"*\"",
")",
")",
")",
"for",
"folder",
"in",
"folder_path",
":",
"filename",
"=",
"glob",
".",
"glob",
"(",
"os",
".",
"path",
".",
"join",
"(",
"folder",
",",
"\"*\"",
")",
")",
"if",
"len",
"(",
"filename",
")",
"!=",
"self",
".",
"_seq_len",
":",
"continue",
"filename",
".",
"sort",
"(",
")",
"label",
"=",
"os",
".",
"path",
".",
"split",
"(",
"folder",
")",
"[",
"-",
"1",
"]",
"self",
".",
"items",
".",
"append",
"(",
"(",
"filename",
",",
"label",
")",
")"
] |
Description : generate list for lip images
|
[
"Description",
":",
"generate",
"list",
"for",
"lip",
"images"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/data_loader.py#L45-L71
|
train
|
Generate list of images for lip images
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk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Bmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(416 - 368) + chr(0b1101111) + chr(50) + chr(0b110101) + chr(123 - 69), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(55) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100101 + 0o16) + chr(0b110001) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b10000 + 0o46), 24001 - 23993), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x37' + chr(0b101001 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b11000 + 0o127) + chr(0b100111 + 0o14), 56467 - 56459), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\062' + chr(0b110000) + chr(54), 60817 - 60809), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(72 - 21) + '\x31' + chr(1439 - 1388), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(48) + '\062', 9277 - 9269), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(0b11010 + 0o35) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(538 - 490) + chr(111) + chr(0b110010) + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110011) + chr(0b10100 + 0o42) + chr(0b1010 + 0o50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x35' + chr(0b11110 + 0o23), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(377 - 266) + chr(1040 - 991) + chr(142 - 87) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110111) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2239 - 2188) + chr(49) + chr(0b101011 + 0o10), 8), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + '\061' + chr(1890 - 1839), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100011 + 0o20) + chr(668 - 613) + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(10746 - 10635) + chr(0b110001) + chr(1380 - 1329) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10111 + 0o33) + chr(0b110110) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(0b110011) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b11011 + 0o31) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11110 + 0o23) + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(319 - 208) + '\061' + chr(2011 - 1963) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(941 - 886) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + '\x31' + '\064' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2280 - 2232) + chr(674 - 563) + chr(1000 - 951) + chr(49) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(130 - 80) + chr(502 - 454) + chr(0b101110 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b100010 + 0o21), 8), ehT0Px3KOsy9('\060' + chr(11983 - 11872) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10000 + 0o42) + chr(1662 - 1613) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\065' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(1997 - 1946) + '\062', 63279 - 63271), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + '\063' + '\x30' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000 + 0o147) + chr(1727 - 1678) + '\065' + chr(0b110000), 38527 - 38519), ehT0Px3KOsy9(chr(673 - 625) + chr(10036 - 9925) + chr(0b110001) + chr(50) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(6085 - 5974) + '\x35' + chr(0b10001 + 0o41), 0o10), ehT0Px3KOsy9(chr(2055 - 2007) + chr(111) + '\x31' + chr(52) + chr(0b10 + 0o63), 19901 - 19893), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + chr(241 - 186), ord("\x08")), ehT0Px3KOsy9(chr(666 - 618) + chr(0b1010010 + 0o35) + chr(0b110011) + chr(1543 - 1488) + chr(0b110011 + 0o3), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + chr(0b1101 + 0o50) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x80'), chr(0b1100100) + chr(9988 - 9887) + '\x63' + chr(0b1101111) + chr(0b1011110 + 0o6) + chr(0b1110 + 0o127))('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b1001 + 0o57)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def tsEBgTiVQW2B(oVre8I6UXc3b, FiL2Xt3u2AMN):
oVre8I6UXc3b.uXMK81tmdpTM = []
oVre8I6UXc3b.NzveIZ3IlSH9 = []
GKwIu7cBMi_I = [ehT0Px3KOsy9('\060' + chr(5708 - 5597) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(0b101010 + 0o10), 8), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(425 - 375) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(465 - 415) + '\066', 1132 - 1124)]
YtLRH5AgvTp8 = [ehT0Px3KOsy9(chr(841 - 793) + '\157' + '\062' + '\x35', 25276 - 25268)]
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfaK\xbdYrM\xde\x9f\xb0\xf6\xc2\x98'), chr(2184 - 2084) + '\x65' + '\143' + chr(2035 - 1924) + '\x64' + chr(9603 - 9502))(chr(0b10011 + 0o142) + '\x74' + chr(0b1100110) + chr(0b11001 + 0o24) + chr(0b10011 + 0o45))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaL\xaawU'), chr(0b1110 + 0o126) + chr(7952 - 7851) + '\143' + chr(111) + chr(100) + '\x65')(chr(11740 - 11623) + chr(116) + chr(102) + '\055' + chr(56)):
u6QMQWWlGVLi = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd'), chr(6214 - 6114) + '\x65' + chr(99) + chr(0b10110 + 0o131) + chr(4836 - 4736) + chr(101))(chr(0b1110101) + chr(11156 - 11040) + '\146' + chr(0b10011 + 0o32) + chr(0b111000)) + M8_cKLkHVB2V(WVxHKyX45z_L) for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101010 + 0o7), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\064' + '\063', ord("\x08"))) if WVxHKyX45z_L not in GKwIu7cBMi_I + YtLRH5AgvTp8]
elif xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfaK\xbdYrM\xde\x9f\xb0\xf6\xc2\x98'), chr(0b1100100) + chr(101) + chr(8086 - 7987) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(0b1011 + 0o133) + chr(0b11111 + 0o16) + chr(0b111000))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8_\xa7w_'), chr(4609 - 4509) + chr(0b10 + 0o143) + chr(0b1100000 + 0o3) + chr(0b1101111) + chr(0b1100100) + chr(1700 - 1599))(chr(13511 - 13394) + '\164' + '\x66' + chr(0b100010 + 0o13) + chr(0b111000)):
u6QMQWWlGVLi = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd'), chr(0b1100100) + '\x65' + '\143' + chr(0b1010111 + 0o30) + '\x64' + '\x65')('\x75' + chr(0b1000001 + 0o63) + chr(102) + chr(1444 - 1399) + chr(0b111000)) + M8_cKLkHVB2V(WVxHKyX45z_L) for WVxHKyX45z_L in GKwIu7cBMi_I]
WENnbPKvoHO9 = []
for WVxHKyX45z_L in u6QMQWWlGVLi:
xafqLlk3kkUe(WENnbPKvoHO9, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcbF\xbf{Ug'), chr(397 - 297) + chr(101) + chr(0b10010 + 0o121) + chr(0b110001 + 0o76) + chr(0b1100100) + chr(525 - 424))('\x75' + chr(0b111001 + 0o73) + chr(269 - 167) + chr(0b110 + 0o47) + chr(1947 - 1891)))(xafqLlk3kkUe(jt2o3b6QEdP_, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9R\xa4|'), chr(6187 - 6087) + chr(0b10101 + 0o120) + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(11556 - 11439) + chr(7761 - 7645) + chr(0b110000 + 0o66) + chr(0b101101) + '\070'))(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1Q\x9cFAw\xd0\x85\xac\xce\xe3\xb4'), chr(100) + chr(0b1100101) + chr(9441 - 9342) + chr(0b1101111) + chr(0b111011 + 0o51) + '\145')('\x75' + chr(6581 - 6465) + '\146' + '\x2d' + chr(56)))(FiL2Xt3u2AMN, WVxHKyX45z_L, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), chr(100) + chr(0b11101 + 0o110) + chr(0b1100011) + chr(111) + chr(100) + chr(0b100111 + 0o76))(chr(9738 - 9621) + chr(0b1110100) + chr(102) + chr(1354 - 1309) + chr(0b111000)))))
for CVmiUiclDQ_k in WENnbPKvoHO9:
xw4DsBfIJ22E = jt2o3b6QEdP_.glob(oqhJDdMJfuwx.path._oWXztVNnqHF(CVmiUiclDQ_k, xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), chr(0b1100100) + chr(0b1100101) + chr(6445 - 6346) + '\x6f' + chr(100) + chr(0b1100101))(chr(9447 - 9330) + chr(0b1001011 + 0o51) + '\x66' + chr(45) + '\x38')))
if c2A0yzQpDQB3(xw4DsBfIJ22E) != xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1M\xaeodo\xe3\xa5'), '\x64' + chr(0b1100101) + chr(0b1000 + 0o133) + chr(111) + '\x64' + '\x65')(chr(0b101101 + 0o110) + '\x74' + chr(102) + '\055' + chr(355 - 299))):
continue
xafqLlk3kkUe(xw4DsBfIJ22E, xafqLlk3kkUe(SXOLrMavuUCe(b'\xddQ\xb9j'), chr(3359 - 3259) + chr(101) + chr(8943 - 8844) + '\x6f' + chr(0b1001 + 0o133) + '\145')(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)))()
TRUOLFLuD08x = oqhJDdMJfuwx.path.split(CVmiUiclDQ_k)[-ehT0Px3KOsy9(chr(171 - 123) + chr(111) + '\x31', 8)]
xafqLlk3kkUe(oVre8I6UXc3b.items, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcfN\xbb{Ug'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(6526 - 6426) + chr(2940 - 2839))(chr(7153 - 7036) + '\x74' + chr(0b11000 + 0o116) + chr(1730 - 1685) + chr(0b111000)))((xw4DsBfIJ22E, TRUOLFLuD08x))
|
apache/incubator-mxnet
|
example/gluon/lipnet/data_loader.py
|
LipsDataset.align_generation
|
def align_generation(self, file_nm, padding=75):
"""
Description : Align to lip position
"""
align = Align(self._align_root + '/' + file_nm + '.align')
return nd.array(align.sentence(padding))
|
python
|
def align_generation(self, file_nm, padding=75):
"""
Description : Align to lip position
"""
align = Align(self._align_root + '/' + file_nm + '.align')
return nd.array(align.sentence(padding))
|
[
"def",
"align_generation",
"(",
"self",
",",
"file_nm",
",",
"padding",
"=",
"75",
")",
":",
"align",
"=",
"Align",
"(",
"self",
".",
"_align_root",
"+",
"'/'",
"+",
"file_nm",
"+",
"'.align'",
")",
"return",
"nd",
".",
"array",
"(",
"align",
".",
"sentence",
"(",
"padding",
")",
")"
] |
Description : Align to lip position
|
[
"Description",
":",
"Align",
"to",
"lip",
"position"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/data_loader.py#L73-L78
|
train
|
Description : Align to lip position
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ix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D68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(49) + chr(50), 53999 - 53991), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(512 - 463) + chr(1631 - 1577), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100101 + 0o14) + chr(52) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1401 - 1353) + '\x6f' + chr(0b110011) + chr(0b110000 + 0o1) + chr(2222 - 2173), 33083 - 33075), ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + chr(0b110111) + chr(0b100010 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(0b110011) + chr(0b110110) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1000 - 949) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1452 - 1398) + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(2671 - 2560) + chr(0b101111 + 0o2) + chr(0b110101) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(6127 - 6016) + chr(50) + chr(52) + chr(0b110101), 38785 - 38777), ehT0Px3KOsy9(chr(48) + chr(8542 - 8431) + chr(0b110010) + '\x35' + '\x30', 26062 - 26054), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + '\062' + chr(0b11010 + 0o34) + chr(0b1001 + 0o53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\065' + '\063', 31163 - 31155), ehT0Px3KOsy9(chr(48) + '\157' + chr(623 - 574) + '\067' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + '\x32' + chr(48) + chr(1887 - 1833), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(1234 - 1185) + '\063' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(931 - 879) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000001 + 0o56) + chr(0b110110) + chr(2037 - 1989), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(0b11 + 0o62), 38653 - 38645), ehT0Px3KOsy9('\x30' + chr(2032 - 1921) + '\061' + chr(0b0 + 0o62) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10010 + 0o41) + '\x31' + chr(49), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b110110) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(52), 0o10), ehT0Px3KOsy9(chr(1994 - 1946) + '\157' + chr(1691 - 1639), 3707 - 3699), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110001) + chr(0b10111 + 0o33), 8), ehT0Px3KOsy9('\060' + chr(0b11011 + 0o124) + chr(2082 - 2032) + chr(157 - 108) + chr(51), 30522 - 30514), ehT0Px3KOsy9(chr(672 - 624) + '\x6f' + chr(0b1000 + 0o51) + '\066' + chr(0b110110), 35259 - 35251), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1659 - 1607) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11100 + 0o26) + chr(0b11 + 0o61) + '\x36', 17117 - 17109), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(352 - 298), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010010 + 0o35) + chr(53) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(428 - 377) + chr(55) + chr(55), 0b1000), ehT0Px3KOsy9(chr(1283 - 1235) + '\157' + chr(0b110011) + '\x37' + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(138 - 27) + chr(0b11110 + 0o25) + chr(0b101000 + 0o14) + chr(2679 - 2626), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(0b1100 + 0o46) + '\x34' + chr(2919 - 2864), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(2102 - 2051) + chr(0b110111) + '\063', 0b1000), ehT0Px3KOsy9(chr(949 - 901) + '\x6f' + chr(370 - 316) + chr(2085 - 2035), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(1523 - 1475), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4'), '\144' + chr(101) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(1582 - 1480) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def oiVpXCbpwlUa(oVre8I6UXc3b, sYpPsse9tIa2, TFLseEYASEKG=ehT0Px3KOsy9('\x30' + chr(111) + chr(419 - 370) + chr(0b100100 + 0o15) + chr(51), 0b1000)):
MamwrHbsTf0Z = GDSRke8e7aw5(oVre8I6UXc3b._align_root + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5'), '\x64' + chr(0b1010010 + 0o23) + chr(826 - 727) + chr(5930 - 5819) + chr(100) + '\145')('\x75' + chr(0b110100 + 0o100) + chr(10162 - 10060) + '\x2d' + chr(2147 - 2091)) + sYpPsse9tIa2 + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4/\x0b\xa0gW'), chr(100) + chr(0b1100101) + chr(5560 - 5461) + '\157' + chr(0b10101 + 0o117) + chr(0b100101 + 0o100))(chr(0b1110101) + chr(0b1110100) + chr(0b111 + 0o137) + chr(0b10100 + 0o31) + '\x38'))
return xafqLlk3kkUe(Vy_CFRcuYrTj, xafqLlk3kkUe(SXOLrMavuUCe(b"\x88~\x02\x99DQ\x83kJ'2\xcb"), '\x64' + chr(0b10111 + 0o116) + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b101001 + 0o114) + chr(5944 - 5828) + '\x66' + chr(45) + '\x38'))(xafqLlk3kkUe(MamwrHbsTf0Z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9+\t\xbdeW\x90\x7f'), '\144' + chr(0b1100101) + '\x63' + chr(0b1000101 + 0o52) + '\x64' + '\x65')(chr(0b1101000 + 0o15) + chr(1673 - 1557) + chr(0b110011 + 0o63) + chr(45) + chr(1733 - 1677)))(TFLseEYASEKG))
|
apache/incubator-mxnet
|
python/mxnet/initializer.py
|
Initializer.set_verbosity
|
def set_verbosity(self, verbose=False, print_func=None):
"""Switch on/off verbose mode
Parameters
----------
verbose : bool
switch on/off verbose mode
print_func : function
A function that computes statistics of initialized arrays.
Takes an `NDArray` and returns an `str`. Defaults to mean
absolute value str((abs(x)/size(x)).asscalar()).
"""
self._verbose = verbose
if print_func is None:
def asum_stat(x):
"""returns |x|/size(x), async execution."""
return str((ndarray.norm(x)/sqrt(x.size)).asscalar())
print_func = asum_stat
self._print_func = print_func
return self
|
python
|
def set_verbosity(self, verbose=False, print_func=None):
"""Switch on/off verbose mode
Parameters
----------
verbose : bool
switch on/off verbose mode
print_func : function
A function that computes statistics of initialized arrays.
Takes an `NDArray` and returns an `str`. Defaults to mean
absolute value str((abs(x)/size(x)).asscalar()).
"""
self._verbose = verbose
if print_func is None:
def asum_stat(x):
"""returns |x|/size(x), async execution."""
return str((ndarray.norm(x)/sqrt(x.size)).asscalar())
print_func = asum_stat
self._print_func = print_func
return self
|
[
"def",
"set_verbosity",
"(",
"self",
",",
"verbose",
"=",
"False",
",",
"print_func",
"=",
"None",
")",
":",
"self",
".",
"_verbose",
"=",
"verbose",
"if",
"print_func",
"is",
"None",
":",
"def",
"asum_stat",
"(",
"x",
")",
":",
"\"\"\"returns |x|/size(x), async execution.\"\"\"",
"return",
"str",
"(",
"(",
"ndarray",
".",
"norm",
"(",
"x",
")",
"/",
"sqrt",
"(",
"x",
".",
"size",
")",
")",
".",
"asscalar",
"(",
")",
")",
"print_func",
"=",
"asum_stat",
"self",
".",
"_print_func",
"=",
"print_func",
"return",
"self"
] |
Switch on/off verbose mode
Parameters
----------
verbose : bool
switch on/off verbose mode
print_func : function
A function that computes statistics of initialized arrays.
Takes an `NDArray` and returns an `str`. Defaults to mean
absolute value str((abs(x)/size(x)).asscalar()).
|
[
"Switch",
"on",
"/",
"off",
"verbose",
"mode"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/initializer.py#L61-L80
|
train
|
Switch on or off verbose mode.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5Fy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tyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b110001 + 0o76) + chr(0b101110 + 0o3) + chr(0b110010) + chr(1208 - 1160), 56347 - 56339), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(1989 - 1940) + '\x37' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2089 - 2040) + chr(0b1 + 0o57) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + '\062' + chr(0b1000 + 0o56) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110001) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(55) + chr(0b1 + 0o66), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\x31' + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011111 + 0o20) + '\x32' + '\063' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\065' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(1908 - 1854) + '\x30', 0b1000), ehT0Px3KOsy9(chr(246 - 198) + '\157' + chr(0b110011) + '\060' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\065' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(160 - 106) + '\x30', 43065 - 43057), ehT0Px3KOsy9(chr(1776 - 1728) + chr(0b1101111) + chr(1464 - 1413) + chr(1522 - 1474) + chr(0b100 + 0o61), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(8707 - 8596) + chr(0b110011) + chr(0b101010 + 0o14) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\066' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(384 - 335) + '\x37' + chr(0b101 + 0o62), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(51) + '\063' + chr(52), 0b1000), ehT0Px3KOsy9(chr(696 - 648) + '\x6f' + chr(385 - 335) + chr(53) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11010 + 0o30) + chr(89 - 41) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(53) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3307 - 3196) + '\063' + chr(0b10111 + 0o34) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3089 - 2978) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(2995 - 2884) + chr(49) + chr(0b110010) + chr(0b1010 + 0o50), 5056 - 5048), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b110011) + chr(171 - 121) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(1266 - 1212) + chr(53), 42578 - 42570), ehT0Px3KOsy9('\060' + chr(6145 - 6034) + chr(0b110001) + chr(1677 - 1623), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1000101 + 0o52) + chr(52) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(458 - 406) + '\x31', 0o10), ehT0Px3KOsy9(chr(1418 - 1370) + chr(0b11100 + 0o123) + chr(0b110011) + chr(1170 - 1120) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x30' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(1380 - 1332) + chr(0b1101111) + chr(1505 - 1455) + chr(1144 - 1095) + chr(656 - 602), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110 + 0o53) + chr(1197 - 1142) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(49) + chr(0b111 + 0o52) + '\062', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b1111 + 0o43) + chr(0b101101 + 0o4), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(53) + chr(1973 - 1924), 8), ehT0Px3KOsy9('\x30' + chr(10050 - 9939) + chr(699 - 649) + chr(2364 - 2310) + '\x33', 16885 - 16877), ehT0Px3KOsy9('\x30' + chr(5296 - 5185) + chr(51) + chr(0b110010) + chr(0b1000 + 0o55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1111 + 0o46) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'~'), chr(6956 - 6856) + '\145' + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(0b10 + 0o162) + chr(0b1001111 + 0o27) + chr(0b101101) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def di0bBxNA5Ink(oVre8I6UXc3b, j5jgrsOGZdZ4=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10001 + 0o37), 0o10), XbgkZwjDsZBH=None):
oVre8I6UXc3b.llJ4hEafDMAo = j5jgrsOGZdZ4
if XbgkZwjDsZBH is None:
def LnUDO1hcwSwA(OeWW0F1dBPRQ):
return M8_cKLkHVB2V(xafqLlk3kkUe(VtU1DncglWAm.norm(OeWW0F1dBPRQ) / K3BO8RrL877k(OeWW0F1dBPRQ.size), xafqLlk3kkUe(SXOLrMavuUCe(b'1\x0f1\xd5m"^\xfa'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b110110 + 0o56) + chr(5226 - 5125))(chr(117) + chr(808 - 692) + chr(0b1100110) + '\055' + '\x38'))())
XbgkZwjDsZBH = LnUDO1hcwSwA
oVre8I6UXc3b.IcbCOZVKwXuS = XbgkZwjDsZBH
return oVre8I6UXc3b
|
apache/incubator-mxnet
|
python/mxnet/initializer.py
|
Initializer._verbose_print
|
def _verbose_print(self, desc, init, arr):
"""Internal verbose print function
Parameters
----------
desc : InitDesc or str
name of the array
init : str
initializer pattern
arr : NDArray
initialized array
"""
if self._verbose and self._print_func:
logging.info('Initialized %s as %s: %s', desc, init, self._print_func(arr))
|
python
|
def _verbose_print(self, desc, init, arr):
"""Internal verbose print function
Parameters
----------
desc : InitDesc or str
name of the array
init : str
initializer pattern
arr : NDArray
initialized array
"""
if self._verbose and self._print_func:
logging.info('Initialized %s as %s: %s', desc, init, self._print_func(arr))
|
[
"def",
"_verbose_print",
"(",
"self",
",",
"desc",
",",
"init",
",",
"arr",
")",
":",
"if",
"self",
".",
"_verbose",
"and",
"self",
".",
"_print_func",
":",
"logging",
".",
"info",
"(",
"'Initialized %s as %s: %s'",
",",
"desc",
",",
"init",
",",
"self",
".",
"_print_func",
"(",
"arr",
")",
")"
] |
Internal verbose print function
Parameters
----------
desc : InitDesc or str
name of the array
init : str
initializer pattern
arr : NDArray
initialized array
|
[
"Internal",
"verbose",
"print",
"function"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/initializer.py#L82-L95
|
train
|
Internal verbose print function.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV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YI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(12032 - 11921) + chr(0b10101 + 0o35) + '\x32' + '\x34', 45285 - 45277), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b101110 + 0o3) + chr(0b111 + 0o54) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b110011 + 0o1) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b11011 + 0o27) + chr(0b1101 + 0o44), 0b1000), ehT0Px3KOsy9(chr(213 - 165) + chr(111) + chr(0b10101 + 0o36) + '\067' + chr(0b110010), 33115 - 33107), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b101 + 0o54) + chr(0b110010 + 0o5), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\065' + '\065', 62892 - 62884), ehT0Px3KOsy9('\060' + chr(0b1111 + 0o140) + chr(916 - 863) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11620 - 11509) + chr(49) + chr(2330 - 2280) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + chr(0b110101) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1921 - 1873) + chr(0b1101111) + chr(352 - 299) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1555 - 1505) + chr(1425 - 1377) + chr(0b100101 + 0o22), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b110001) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(576 - 528) + '\157' + chr(51) + chr(0b101010 + 0o15) + chr(2086 - 2032), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5987 - 5876) + chr(0b11010 + 0o33) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1100 + 0o143) + chr(2433 - 2383) + chr(0b110011) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(1764 - 1716) + '\157' + '\067' + chr(1854 - 1805), 35976 - 35968), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\x33' + chr(0b11100 + 0o24), 50808 - 50800), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b101 + 0o61), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110100) + chr(0b110000 + 0o4), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(11676 - 11565) + chr(49) + chr(52) + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b0 + 0o63) + chr(50) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(54) + '\061', 21853 - 21845), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o42), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x30' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\060' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + chr(319 - 270) + chr(50) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3546 - 3435) + '\x33' + chr(793 - 742) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + '\066' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5348 - 5237) + chr(969 - 919) + '\x34' + chr(0b11111 + 0o21), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(610 - 562), 37811 - 37803), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101011 + 0o4) + chr(2335 - 2286) + '\060' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b10001 + 0o42) + '\x32' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(53) + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + '\x33' + chr(0b1100 + 0o53) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + '\063' + chr(1445 - 1397), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(82 - 33) + chr(1159 - 1105), 0b1000), ehT0Px3KOsy9(chr(587 - 539) + chr(111) + chr(1360 - 1310) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(1310 - 1256) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(0b11000 + 0o34) + chr(683 - 630), 61894 - 61886)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(0b100001 + 0o17), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xba'), '\x64' + chr(0b1100101) + chr(5910 - 5811) + chr(0b1101111) + chr(100) + chr(9356 - 9255))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def v_SXSZ3XNaRv(oVre8I6UXc3b, XQWhGt09O88Z, A5GIpkDsgP4U, ZxkNvNvuRNy5):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf81,\xe5\x92J\x8cN\x13gm\xe8'), '\144' + chr(0b11000 + 0o115) + chr(4518 - 4419) + '\157' + chr(2451 - 2351) + '\145')(chr(4241 - 4124) + '\x74' + chr(102) + chr(1103 - 1058) + '\x38')) and xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd>\x04\x92\xb5U\xbbc rY\xd4'), chr(4419 - 4319) + chr(0b1100101) + chr(6890 - 6791) + chr(0b1011111 + 0o20) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + '\146' + chr(0b100101 + 0o10) + chr(56))):
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7j.\xa9\x8fl\x8a\x1f=Fv\xec'), chr(100) + '\x65' + '\x63' + '\157' + chr(0b10000 + 0o124) + chr(0b1100101))('\x75' + chr(4572 - 4456) + chr(0b1000110 + 0o40) + chr(1861 - 1816) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd3\x0f\xa5\x93n\x81A-OH\xa7\xea\x8d\x0f\xfdJ\xf83W\\\xf4Tr'), chr(0b1100100) + '\x65' + chr(99) + chr(0b110010 + 0o75) + chr(0b1001101 + 0o27) + chr(4301 - 4200))(chr(6531 - 6414) + chr(0b1110100) + chr(7037 - 6935) + chr(45) + chr(0b111000)), XQWhGt09O88Z, A5GIpkDsgP4U, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd>\x04\x92\xb5U\xbbc rY\xd4'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(7178 - 7077))(chr(0b1110101) + chr(4212 - 4096) + chr(0b1 + 0o145) + chr(1010 - 965) + chr(56)))(ZxkNvNvuRNy5))
|
apache/incubator-mxnet
|
python/mxnet/initializer.py
|
Initializer._legacy_init
|
def _legacy_init(self, name, arr):
"""Legacy initialization method.
Parameters
----------
name : str
Name of corresponding NDArray.
arr : NDArray
NDArray to be initialized.
"""
warnings.warn(
"\033[91mCalling initializer with init(str, NDArray) has been deprecated." \
"please use init(mx.init.InitDesc(...), NDArray) instead.\033[0m",
DeprecationWarning, stacklevel=3)
if not isinstance(name, string_types):
raise TypeError('name must be string')
if not isinstance(arr, NDArray):
raise TypeError('arr must be NDArray')
if name.startswith('upsampling'):
self._init_bilinear(name, arr)
elif name.startswith('stn_loc') and name.endswith('weight'):
self._init_zero(name, arr)
elif name.startswith('stn_loc') and name.endswith('bias'):
self._init_loc_bias(name, arr)
elif name.endswith('bias'):
self._init_bias(name, arr)
elif name.endswith('gamma'):
self._init_gamma(name, arr)
elif name.endswith('beta'):
self._init_beta(name, arr)
elif name.endswith('weight'):
self._init_weight(name, arr)
elif name.endswith("moving_mean"):
self._init_zero(name, arr)
elif name.endswith("moving_var"):
self._init_one(name, arr)
elif name.endswith("moving_inv_var"):
self._init_zero(name, arr)
elif name.endswith("moving_avg"):
self._init_zero(name, arr)
elif name.endswith('min'):
self._init_zero(name, arr)
elif name.endswith('max'):
self._init_one(name, arr)
else:
self._init_default(name, arr)
|
python
|
def _legacy_init(self, name, arr):
"""Legacy initialization method.
Parameters
----------
name : str
Name of corresponding NDArray.
arr : NDArray
NDArray to be initialized.
"""
warnings.warn(
"\033[91mCalling initializer with init(str, NDArray) has been deprecated." \
"please use init(mx.init.InitDesc(...), NDArray) instead.\033[0m",
DeprecationWarning, stacklevel=3)
if not isinstance(name, string_types):
raise TypeError('name must be string')
if not isinstance(arr, NDArray):
raise TypeError('arr must be NDArray')
if name.startswith('upsampling'):
self._init_bilinear(name, arr)
elif name.startswith('stn_loc') and name.endswith('weight'):
self._init_zero(name, arr)
elif name.startswith('stn_loc') and name.endswith('bias'):
self._init_loc_bias(name, arr)
elif name.endswith('bias'):
self._init_bias(name, arr)
elif name.endswith('gamma'):
self._init_gamma(name, arr)
elif name.endswith('beta'):
self._init_beta(name, arr)
elif name.endswith('weight'):
self._init_weight(name, arr)
elif name.endswith("moving_mean"):
self._init_zero(name, arr)
elif name.endswith("moving_var"):
self._init_one(name, arr)
elif name.endswith("moving_inv_var"):
self._init_zero(name, arr)
elif name.endswith("moving_avg"):
self._init_zero(name, arr)
elif name.endswith('min'):
self._init_zero(name, arr)
elif name.endswith('max'):
self._init_one(name, arr)
else:
self._init_default(name, arr)
|
[
"def",
"_legacy_init",
"(",
"self",
",",
"name",
",",
"arr",
")",
":",
"warnings",
".",
"warn",
"(",
"\"\\033[91mCalling initializer with init(str, NDArray) has been deprecated.\"",
"\"please use init(mx.init.InitDesc(...), NDArray) instead.\\033[0m\"",
",",
"DeprecationWarning",
",",
"stacklevel",
"=",
"3",
")",
"if",
"not",
"isinstance",
"(",
"name",
",",
"string_types",
")",
":",
"raise",
"TypeError",
"(",
"'name must be string'",
")",
"if",
"not",
"isinstance",
"(",
"arr",
",",
"NDArray",
")",
":",
"raise",
"TypeError",
"(",
"'arr must be NDArray'",
")",
"if",
"name",
".",
"startswith",
"(",
"'upsampling'",
")",
":",
"self",
".",
"_init_bilinear",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"startswith",
"(",
"'stn_loc'",
")",
"and",
"name",
".",
"endswith",
"(",
"'weight'",
")",
":",
"self",
".",
"_init_zero",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"startswith",
"(",
"'stn_loc'",
")",
"and",
"name",
".",
"endswith",
"(",
"'bias'",
")",
":",
"self",
".",
"_init_loc_bias",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'bias'",
")",
":",
"self",
".",
"_init_bias",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'gamma'",
")",
":",
"self",
".",
"_init_gamma",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'beta'",
")",
":",
"self",
".",
"_init_beta",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'weight'",
")",
":",
"self",
".",
"_init_weight",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"\"moving_mean\"",
")",
":",
"self",
".",
"_init_zero",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"\"moving_var\"",
")",
":",
"self",
".",
"_init_one",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"\"moving_inv_var\"",
")",
":",
"self",
".",
"_init_zero",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"\"moving_avg\"",
")",
":",
"self",
".",
"_init_zero",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'min'",
")",
":",
"self",
".",
"_init_zero",
"(",
"name",
",",
"arr",
")",
"elif",
"name",
".",
"endswith",
"(",
"'max'",
")",
":",
"self",
".",
"_init_one",
"(",
"name",
",",
"arr",
")",
"else",
":",
"self",
".",
"_init_default",
"(",
"name",
",",
"arr",
")"
] |
Legacy initialization method.
Parameters
----------
name : str
Name of corresponding NDArray.
arr : NDArray
NDArray to be initialized.
|
[
"Legacy",
"initialization",
"method",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/initializer.py#L171-L217
|
train
|
Legacy initialization method.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,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okenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(7219 - 7108) + chr(0b110010) + '\064' + chr(0b110111), 28316 - 28308), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(50) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(1428 - 1375) + chr(0b10000 + 0o45), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x36' + '\066', 0b1000), ehT0Px3KOsy9(chr(119 - 71) + chr(111) + chr(49) + '\x33' + chr(0b10010 + 0o43), 0o10), ehT0Px3KOsy9(chr(48) + chr(10826 - 10715) + chr(534 - 482) + chr(955 - 903), 0o10), ehT0Px3KOsy9(chr(1343 - 1295) + chr(0b1101111) + chr(0b110011) + chr(426 - 374) + '\064', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(2604 - 2549) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1674 - 1563) + chr(0b110001) + chr(0b11110 + 0o30) + chr(0b10100 + 0o35), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9151 - 9040) + chr(0b110010) + chr(0b110111) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(7846 - 7735) + '\x32' + chr(0b110110) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100001 + 0o116) + chr(0b110001) + '\067' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110111 + 0o70) + chr(49) + '\063' + chr(51), 0b1000), ehT0Px3KOsy9(chr(1898 - 1850) + chr(111) + chr(0b110000 + 0o3) + chr(53) + chr(339 - 285), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x36' + '\066', 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b101010 + 0o10) + chr(0b110010) + chr(1606 - 1552), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10110 + 0o131) + chr(0b110001) + chr(49) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(1396 - 1346) + chr(0b11 + 0o62), 30399 - 30391), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1180 - 1131) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\061' + '\061', 8), ehT0Px3KOsy9(chr(2136 - 2088) + chr(5859 - 5748) + chr(0b100010 + 0o21) + '\x34', 51058 - 51050), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x31' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110110) + chr(48), 0b1000), ehT0Px3KOsy9(chr(524 - 476) + '\x6f' + chr(1501 - 1450) + '\x34' + chr(0b110000), 7247 - 7239), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(2341 - 2287) + chr(0b11000 + 0o33), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b101100 + 0o5) + '\062', 36257 - 36249), ehT0Px3KOsy9(chr(48) + chr(12251 - 12140) + chr(49) + chr(0b110111) + chr(1827 - 1772), 8), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\064' + '\x37', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x30' + chr(0b110101), 17205 - 17197), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + '\x37' + chr(0b0 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2295 - 2245) + '\x33' + chr(894 - 844), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + '\066', 8847 - 8839), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(1824 - 1774) + chr(0b10 + 0o64), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x34' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(3383 - 3272) + '\x31' + chr(405 - 355) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(2065 - 2017) + '\x6f' + '\x33' + '\x37' + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\060' + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101110 + 0o4) + chr(0b110011) + chr(55), 0o10), ehT0Px3KOsy9(chr(794 - 746) + '\157' + chr(0b10110 + 0o33) + chr(0b110101), 57029 - 57021)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(9307 - 9196) + chr(2808 - 2755) + chr(180 - 132), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), chr(0b1100100) + chr(0b110001 + 0o64) + chr(0b1100011) + '\157' + chr(8477 - 8377) + '\x65')(chr(117) + '\164' + chr(1938 - 1836) + chr(457 - 412) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def YsarkVBN9nql(oVre8I6UXc3b, AIvJRzLdDfgF, ZxkNvNvuRNy5):
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9S\xe8X\x13f\x85\x987\xf3\xfc\x12'), chr(9196 - 9096) + chr(0b1010 + 0o133) + chr(0b101010 + 0o71) + '\x6f' + '\x64' + chr(101))('\165' + chr(5755 - 5639) + chr(6878 - 6776) + chr(1632 - 1587) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xbcL\x94\x070g\x85\x96\x1d\xd4\xd9\x18{\x87X\xff=\xbck%u\xf6\x15\x92S=\x16\xd3\xad\x19\xf3@\x7f\x97}\x88\xf7O\xb3-\xe9S\xecD/E\x9d\xd3Q\xd5\xd6\x0c{\x8cS\xf3'\xf5n,l\xfe\x15\x83\x12>\x1a\xc3\xebI\xf6Kw\x900\xdb\xf6N\xfa-\xcey\xc4BuI\x9c\xd4\x18\xd3\xde\x0bu\xa7X\xff=\x91o:\x7f\xa4^\xce]cS\x87\x8b}\xdb\\d\x82,\xd2\xa3T\xf1~\xd3r\xccRs?\xbf\xca\x1c"), chr(100) + chr(4002 - 3901) + chr(2227 - 2128) + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(1813 - 1711) + chr(0b101101) + chr(0b111000)), ker4pIJmdvxf, stacklevel=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011), 0o10))
if not PlSM16l2KDPD(AIvJRzLdDfgF, sInLJQno9SRQ):
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9v\xc0S}I\x91\x89\x05\x9d\xd5\x1a{\x9dB\xe4 \xbbm'), chr(7480 - 7380) + chr(2684 - 2583) + chr(0b10101 + 0o116) + chr(0b11001 + 0o126) + chr(0b100001 + 0o103) + chr(101))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(252 - 196)))
if not PlSM16l2KDPD(ZxkNvNvuRNy5, GdqFjMbtKL7s):
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6e\xdf\x160Q\x97\x8eQ\xdf\xd2_\x15\xaaw\xe4;\xb4s'), '\144' + chr(101) + chr(6560 - 6461) + chr(0b1101111) + chr(0b100001 + 0o103) + chr(0b100011 + 0o102))('\165' + chr(0b1110100) + chr(102) + chr(45) + chr(56)))
if xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4c\xccD)W\x93\x93\x05\xd5'), '\x64' + '\x65' + '\x63' + chr(1566 - 1455) + chr(4452 - 4352) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(0b1100 + 0o41) + chr(0b10001 + 0o47)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2g\xdeW0T\x88\x93\x1f\xda'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(0b1110000 + 0o4) + chr(4773 - 4671) + chr(0b111 + 0o46) + chr(56))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x86\x93\x1d\xd4\xd9\x1a:\x9c'), '\144' + '\x65' + chr(0b1100011) + chr(0b1111 + 0o140) + chr(9479 - 9379) + chr(6741 - 6640))('\x75' + chr(0b1110100) + chr(3474 - 3372) + chr(0b101101) + chr(0b101 + 0o63)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4c\xccD)W\x93\x93\x05\xd5'), chr(6079 - 5979) + '\145' + chr(0b100010 + 0o101) + chr(0b1100001 + 0o16) + chr(100) + chr(0b1100101))('\165' + chr(116) + '\x66' + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4c\xc3i1K\x87'), '\144' + chr(0b110000 + 0o65) + chr(0b1100011) + chr(0b1101111) + chr(0b1000000 + 0o44) + chr(4576 - 4475))(chr(117) + chr(0b1110100) + '\x66' + chr(1977 - 1932) + chr(56))) and xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(100) + chr(0b1100101) + chr(5788 - 5689) + chr(7343 - 7232) + '\144' + chr(101))('\165' + chr(0b10100 + 0o140) + '\146' + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0r\xc4Q5P'), chr(0b1100100) + chr(0b1100101) + chr(0b1000011 + 0o40) + '\157' + chr(1315 - 1215) + chr(0b101000 + 0o75))(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + chr(2575 - 2519))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x9e\x9f\x03\xd2'), chr(100) + chr(2341 - 2240) + '\x63' + chr(0b1011010 + 0o25) + chr(0b1100100) + chr(1403 - 1302))(chr(0b10100 + 0o141) + chr(116) + chr(6944 - 6842) + chr(45) + '\070'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4c\xccD)W\x93\x93\x05\xd5'), '\144' + '\x65' + chr(0b1000001 + 0o42) + '\157' + chr(0b1010 + 0o132) + chr(0b1100101))(chr(117) + chr(0b1101001 + 0o13) + '\x66' + chr(45) + chr(1955 - 1899)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4c\xc3i1K\x87'), chr(0b1010001 + 0o23) + chr(0b1000100 + 0o41) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\165' + chr(0b1100011 + 0o21) + chr(102) + chr(45) + chr(0b111000))) and xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(100) + '\145' + chr(99) + chr(0b111110 + 0o61) + '\x64' + '\145')(chr(117) + '\x74' + chr(7510 - 7408) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5~\xccE'), chr(0b1100100) + chr(101) + '\143' + chr(0b1010101 + 0o32) + '\144' + chr(0b1100101))(chr(0b1101010 + 0o13) + chr(9999 - 9883) + '\146' + chr(45) + '\x38')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x88\x95\x12\xe2\xd5\x16:\x9d'), '\144' + '\145' + '\143' + chr(0b10110 + 0o131) + chr(0b110111 + 0o55) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(0b100101 + 0o10) + '\x38'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(0b111111 + 0o45) + chr(4602 - 4501) + chr(0b1100011) + chr(7756 - 7645) + chr(100) + '\x65')(chr(0b1000111 + 0o56) + '\164' + '\x66' + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5~\xccE'), chr(100) + chr(8027 - 7926) + chr(0b1100011) + chr(0b1010111 + 0o30) + '\144' + chr(0b100010 + 0o103))(chr(8576 - 8459) + chr(0b1110100) + chr(0b1001 + 0o135) + chr(759 - 714) + '\070')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x86\x93\x10\xce'), '\x64' + chr(0b1011001 + 0o14) + '\143' + '\x6f' + chr(100) + chr(4942 - 4841))(chr(117) + chr(0b1110100) + '\146' + chr(45) + '\070'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(100) + chr(0b111100 + 0o51) + chr(0b101100 + 0o67) + chr(111) + chr(7179 - 7079) + chr(5453 - 5352))('\165' + chr(3697 - 3581) + chr(9656 - 9554) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0v\xc0[<'), chr(0b1100001 + 0o3) + '\x65' + chr(0b10 + 0o141) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b100001 + 0o124) + chr(931 - 815) + '\x66' + chr(0b101101) + chr(56))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x83\x9b\x1c\xd0\xd6'), chr(0b1100100) + chr(0b11100 + 0o111) + chr(9124 - 9025) + chr(0b101000 + 0o107) + '\144' + chr(0b1100101))(chr(13089 - 12972) + chr(116) + '\146' + chr(0b101101) + chr(0b111000)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), '\x64' + chr(0b10000 + 0o125) + chr(5946 - 5847) + chr(111) + '\x64' + chr(101))(chr(0b100101 + 0o120) + chr(0b10011 + 0o141) + chr(0b1100110) + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5r\xd9W'), chr(3899 - 3799) + chr(0b11010 + 0o113) + '\x63' + chr(0b10101 + 0o132) + chr(0b1100100) + chr(0b110000 + 0o65))('\165' + chr(0b1010110 + 0o36) + chr(0b1100110) + '\055' + '\x38')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x86\x9f\x05\xdc'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(2725 - 2614) + chr(0b101100 + 0o70) + chr(6550 - 6449))(chr(0b11001 + 0o134) + '\164' + chr(102) + chr(0b101101) + chr(1881 - 1825)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), '\x64' + chr(0b1100101) + '\x63' + '\157' + chr(100) + chr(0b1100100 + 0o1))(chr(117) + '\x74' + '\x66' + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0r\xc4Q5P'), chr(0b1001100 + 0o30) + chr(4762 - 4661) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b101010 + 0o112) + chr(0b1100110) + chr(575 - 530) + chr(1153 - 1097))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x93\x9f\x18\xda\xdf\x0b'), chr(6617 - 6517) + chr(101) + chr(0b10001 + 0o122) + chr(0b1101111) + chr(0b10 + 0o142) + '\145')('\x75' + chr(3509 - 3393) + chr(0b1100110) + chr(0b101101) + chr(2189 - 2133)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), '\144' + chr(0b1100010 + 0o3) + chr(6916 - 6817) + chr(111) + chr(0b1100100) + chr(0b110001 + 0o64))('\x75' + '\164' + chr(0b1001101 + 0o31) + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcax\xdb_3C\xbb\x97\x14\xdc\xd9'), '\x64' + '\145' + chr(4431 - 4332) + '\157' + '\x64' + '\x65')(chr(0b10101 + 0o140) + chr(12337 - 12221) + chr(0b1010 + 0o134) + '\055' + chr(0b11101 + 0o33))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x9e\x9f\x03\xd2'), chr(100) + chr(1449 - 1348) + chr(0b1100011) + chr(111) + '\144' + chr(0b1101 + 0o130))('\165' + '\164' + chr(3349 - 3247) + chr(0b11001 + 0o24) + chr(56)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(0b11010 + 0o112) + chr(289 - 188) + '\x63' + chr(111) + chr(0b1100100) + chr(8961 - 8860))('\x75' + chr(0b1011011 + 0o31) + chr(6645 - 6543) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcax\xdb_3C\xbb\x8c\x10\xcf'), '\144' + chr(0b1100101) + chr(7106 - 7007) + '\x6f' + chr(0b111110 + 0o46) + chr(0b101101 + 0o70))('\x75' + '\x74' + '\146' + chr(45) + '\x38')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x8b\x94\x14'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100010 + 0o2) + chr(101))(chr(0b1110101) + chr(8123 - 8007) + '\146' + '\x2d' + '\070'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(100) + chr(0b1000111 + 0o36) + chr(99) + chr(111) + chr(0b1100100) + chr(9861 - 9760))('\x75' + chr(0b1 + 0o163) + '\146' + '\055' + chr(1757 - 1701)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcax\xdb_3C\xbb\x93\x1f\xcb\xe8\t:\x9c'), '\144' + '\x65' + '\x63' + chr(0b101110 + 0o101) + chr(650 - 550) + chr(7901 - 7800))(chr(10152 - 10035) + chr(7293 - 7177) + chr(0b101100 + 0o72) + chr(0b100111 + 0o6) + '\x38')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x9e\x9f\x03\xd2'), chr(100) + chr(0b1100101) + chr(3985 - 3886) + chr(10908 - 10797) + '\x64' + chr(101))(chr(7298 - 7181) + chr(116) + chr(102) + chr(45) + chr(56)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), '\x64' + chr(0b101011 + 0o72) + chr(99) + chr(111) + chr(0b1110 + 0o126) + chr(0b11111 + 0o106))(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcax\xdb_3C\xbb\x9b\x07\xda'), chr(3622 - 3522) + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(0b110111 + 0o75) + '\146' + chr(45) + chr(0b10111 + 0o41))):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x9e\x9f\x03\xd2'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b101011 + 0o71) + '\x65')(chr(117) + chr(0b1110100) + chr(102) + '\055' + '\070'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(0b1100100) + chr(8206 - 8105) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1100000 + 0o5))(chr(117) + chr(4543 - 4427) + chr(473 - 371) + '\x2d' + chr(265 - 209)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xca~\xc3'), chr(100) + chr(0b1100101) + '\x63' + chr(111) + chr(100) + chr(8085 - 7984))('\x75' + chr(116) + '\x66' + chr(0b101 + 0o50) + '\070')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x9e\x9f\x03\xd2'), chr(0b1110 + 0o126) + chr(0b110110 + 0o57) + chr(99) + chr(111) + chr(6335 - 6235) + chr(0b1100101))('\x75' + chr(116) + chr(7597 - 7495) + '\x2d' + '\x38'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
elif xafqLlk3kkUe(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2y\xc9E*M\x90\x92'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(3265 - 3165) + '\x65')(chr(0b1110101) + chr(10282 - 10166) + chr(0b100010 + 0o104) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcav\xd5'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + '\x64' + '\x65')('\165' + '\x74' + chr(102) + chr(0b101101) + '\070')):
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x8b\x94\x14'), '\144' + chr(0b111011 + 0o52) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(9333 - 9216) + chr(0b1001101 + 0o47) + chr(4599 - 4497) + '\055' + '\x38'))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
else:
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8~\xc3_){\x80\x9f\x17\xdc\xc2\x13/'), chr(0b11000 + 0o114) + chr(0b110000 + 0o65) + chr(99) + chr(111) + '\x64' + chr(0b1000100 + 0o41))('\x75' + '\164' + '\146' + '\x2d' + chr(365 - 309)))(AIvJRzLdDfgF, ZxkNvNvuRNy5)
|
apache/incubator-mxnet
|
example/ssd/dataset/imdb.py
|
Imdb.save_imglist
|
def save_imglist(self, fname=None, root=None, shuffle=False):
"""
save imglist to disk
Parameters:
----------
fname : str
saved filename
"""
def progress_bar(count, total, suffix=''):
import sys
bar_len = 24
filled_len = int(round(bar_len * count / float(total)))
percents = round(100.0 * count / float(total), 1)
bar = '=' * filled_len + '-' * (bar_len - filled_len)
sys.stdout.write('[%s] %s%s ...%s\r' % (bar, percents, '%', suffix))
sys.stdout.flush()
str_list = []
for index in range(self.num_images):
progress_bar(index, self.num_images)
label = self.label_from_index(index)
if label.size < 1:
continue
path = self.image_path_from_index(index)
if root:
path = osp.relpath(path, root)
str_list.append('\t'.join([str(index), str(2), str(label.shape[1])] \
+ ["{0:.4f}".format(x) for x in label.ravel()] + [path,]) + '\n')
if str_list:
if shuffle:
import random
random.shuffle(str_list)
if not fname:
fname = self.name + '.lst'
with open(fname, 'w') as f:
for line in str_list:
f.write(line)
else:
raise RuntimeError("No image in imdb")
|
python
|
def save_imglist(self, fname=None, root=None, shuffle=False):
"""
save imglist to disk
Parameters:
----------
fname : str
saved filename
"""
def progress_bar(count, total, suffix=''):
import sys
bar_len = 24
filled_len = int(round(bar_len * count / float(total)))
percents = round(100.0 * count / float(total), 1)
bar = '=' * filled_len + '-' * (bar_len - filled_len)
sys.stdout.write('[%s] %s%s ...%s\r' % (bar, percents, '%', suffix))
sys.stdout.flush()
str_list = []
for index in range(self.num_images):
progress_bar(index, self.num_images)
label = self.label_from_index(index)
if label.size < 1:
continue
path = self.image_path_from_index(index)
if root:
path = osp.relpath(path, root)
str_list.append('\t'.join([str(index), str(2), str(label.shape[1])] \
+ ["{0:.4f}".format(x) for x in label.ravel()] + [path,]) + '\n')
if str_list:
if shuffle:
import random
random.shuffle(str_list)
if not fname:
fname = self.name + '.lst'
with open(fname, 'w') as f:
for line in str_list:
f.write(line)
else:
raise RuntimeError("No image in imdb")
|
[
"def",
"save_imglist",
"(",
"self",
",",
"fname",
"=",
"None",
",",
"root",
"=",
"None",
",",
"shuffle",
"=",
"False",
")",
":",
"def",
"progress_bar",
"(",
"count",
",",
"total",
",",
"suffix",
"=",
"''",
")",
":",
"import",
"sys",
"bar_len",
"=",
"24",
"filled_len",
"=",
"int",
"(",
"round",
"(",
"bar_len",
"*",
"count",
"/",
"float",
"(",
"total",
")",
")",
")",
"percents",
"=",
"round",
"(",
"100.0",
"*",
"count",
"/",
"float",
"(",
"total",
")",
",",
"1",
")",
"bar",
"=",
"'='",
"*",
"filled_len",
"+",
"'-'",
"*",
"(",
"bar_len",
"-",
"filled_len",
")",
"sys",
".",
"stdout",
".",
"write",
"(",
"'[%s] %s%s ...%s\\r'",
"%",
"(",
"bar",
",",
"percents",
",",
"'%'",
",",
"suffix",
")",
")",
"sys",
".",
"stdout",
".",
"flush",
"(",
")",
"str_list",
"=",
"[",
"]",
"for",
"index",
"in",
"range",
"(",
"self",
".",
"num_images",
")",
":",
"progress_bar",
"(",
"index",
",",
"self",
".",
"num_images",
")",
"label",
"=",
"self",
".",
"label_from_index",
"(",
"index",
")",
"if",
"label",
".",
"size",
"<",
"1",
":",
"continue",
"path",
"=",
"self",
".",
"image_path_from_index",
"(",
"index",
")",
"if",
"root",
":",
"path",
"=",
"osp",
".",
"relpath",
"(",
"path",
",",
"root",
")",
"str_list",
".",
"append",
"(",
"'\\t'",
".",
"join",
"(",
"[",
"str",
"(",
"index",
")",
",",
"str",
"(",
"2",
")",
",",
"str",
"(",
"label",
".",
"shape",
"[",
"1",
"]",
")",
"]",
"+",
"[",
"\"{0:.4f}\"",
".",
"format",
"(",
"x",
")",
"for",
"x",
"in",
"label",
".",
"ravel",
"(",
")",
"]",
"+",
"[",
"path",
",",
"]",
")",
"+",
"'\\n'",
")",
"if",
"str_list",
":",
"if",
"shuffle",
":",
"import",
"random",
"random",
".",
"shuffle",
"(",
"str_list",
")",
"if",
"not",
"fname",
":",
"fname",
"=",
"self",
".",
"name",
"+",
"'.lst'",
"with",
"open",
"(",
"fname",
",",
"'w'",
")",
"as",
"f",
":",
"for",
"line",
"in",
"str_list",
":",
"f",
".",
"write",
"(",
"line",
")",
"else",
":",
"raise",
"RuntimeError",
"(",
"\"No image in imdb\"",
")"
] |
save imglist to disk
Parameters:
----------
fname : str
saved filename
|
[
"save",
"imglist",
"to",
"disk"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/dataset/imdb.py#L70-L110
|
train
|
save imglist to disk
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_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tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b111110 + 0o61) + '\x33' + chr(2828 - 2773) + chr(0b100110 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010 + 0o1) + '\064' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\063' + chr(54) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(2186 - 2136) + chr(0b101110 + 0o3) + chr(0b10010 + 0o45), 41612 - 41604), ehT0Px3KOsy9(chr(0b110000) + chr(8512 - 8401) + chr(0b11100 + 0o27) + chr(52) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b101111 + 0o3) + chr(0b10101 + 0o42) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10101 + 0o35) + '\x30' + chr(0b11000 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(10206 - 10095) + chr(0b110010) + chr(0b11110 + 0o27), 0o10), ehT0Px3KOsy9(chr(1766 - 1718) + chr(111) + chr(0b110011) + chr(0b110001) + '\061', 0b1000), ehT0Px3KOsy9(chr(2050 - 2002) + chr(0b1101111) + '\063' + chr(1852 - 1797) + chr(0b110000), 50696 - 50688), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\x37' + chr(1728 - 1678), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(52) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(1936 - 1884), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(0b100100 + 0o16) + '\061' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1000100 + 0o53) + chr(0b1 + 0o60) + '\x35' + chr(0b10101 + 0o34), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + '\x32' + chr(0b11010 + 0o34) + chr(2357 - 2308), 47472 - 47464), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x37', 0b1000), ehT0Px3KOsy9(chr(104 - 56) + chr(1053 - 942) + chr(0b1111 + 0o47) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x36' + '\x31', 0o10), ehT0Px3KOsy9(chr(621 - 573) + '\x6f' + chr(50) + '\062' + chr(2482 - 2429), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001 + 0o1) + chr(996 - 948) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(2377 - 2323), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100001 + 0o21) + '\061' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(50) + chr(0b110100) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100101 + 0o16) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100010 + 0o16) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(5972 - 5861) + '\062' + chr(0b11100 + 0o33) + '\061', 6818 - 6810), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b1110 + 0o47) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + '\x34' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(169 - 114) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b101010 + 0o10) + chr(1663 - 1611), 8089 - 8081), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + chr(0b110010) + chr(0b110101) + chr(52), 18039 - 18031), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b110111 + 0o0), 61310 - 61302), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x34' + chr(0b100010 + 0o25), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4997 - 4886) + chr(51) + chr(1491 - 1442) + chr(0b101100 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(510 - 459) + chr(50) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(254 - 203) + '\x35' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\x31' + chr(54) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(1338 - 1284), 23095 - 23087)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(0b110101) + chr(1893 - 1845), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4'), chr(100) + '\x65' + '\x63' + chr(11717 - 11606) + chr(394 - 294) + chr(0b1100101))(chr(0b1101100 + 0o11) + '\164' + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def PTKSm_65DrKm(oVre8I6UXc3b, t3WbF0Ae42Pu=None, FiL2Xt3u2AMN=None, iVWwODfFXHPF=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 21550 - 21542)):
def e_JlnroeHtLh(ualWdDeXJEGO, K6dkrI1oAm5b, YhhkyMvxPIjH=xafqLlk3kkUe(SXOLrMavuUCe(b''), '\x64' + '\x65' + chr(4190 - 4091) + '\x6f' + chr(100) + chr(6881 - 6780))(chr(0b10 + 0o163) + chr(0b1000000 + 0o64) + '\146' + chr(0b101101) + chr(2230 - 2174))):
(a2SYDDomXDZ2,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\x89\x98\x85'), '\x64' + chr(101) + chr(0b100 + 0o137) + '\157' + chr(0b111110 + 0o46) + chr(9976 - 9875))(chr(1985 - 1868) + '\164' + '\x66' + '\x2d' + chr(0b101001 + 0o17))),)
Gk0KRDeWxO3V = ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(1204 - 1156), 16621 - 16613)
tUmUnls0u8me = ehT0Px3KOsy9(jB_HdqgHmVpI(Gk0KRDeWxO3V * ualWdDeXJEGO / kkSX4ccExqw4(K6dkrI1oAm5b)))
T17GtNsOW6N3 = jB_HdqgHmVpI(100.0 * ualWdDeXJEGO / kkSX4ccExqw4(K6dkrI1oAm5b), ehT0Px3KOsy9(chr(1687 - 1639) + '\157' + '\061', 732 - 724))
PaA969Wc_xg_ = xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7'), chr(0b1100100) + '\x65' + chr(2013 - 1914) + '\157' + chr(100) + '\145')(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(0b111000)) * tUmUnls0u8me + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7'), '\x64' + chr(0b100 + 0o141) + chr(99) + '\157' + chr(100) + '\145')('\x75' + '\164' + chr(0b101011 + 0o73) + chr(45) + '\070') * (Gk0KRDeWxO3V - tUmUnls0u8me)
xafqLlk3kkUe(a2SYDDomXDZ2.stdout, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\x93\x9f\xfb\x87'), chr(100) + chr(1176 - 1075) + chr(3046 - 2947) + chr(11713 - 11602) + chr(100) + chr(3960 - 3859))('\165' + chr(0b1010100 + 0o40) + chr(0b111110 + 0o50) + chr(0b1111 + 0o36) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\xc4\x85\xd2\xc2\x99\xf50\xba\xd8\xd4N2\xad\x1a\xbc'), '\144' + chr(101) + chr(99) + chr(0b1000000 + 0o57) + chr(4699 - 4599) + '\x65')(chr(117) + chr(4389 - 4273) + chr(1571 - 1469) + chr(0b101101) + '\x38') % (PaA969Wc_xg_, T17GtNsOW6N3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf'), chr(0b1010101 + 0o17) + chr(0b1110 + 0o127) + '\143' + chr(4353 - 4242) + chr(100) + '\145')('\x75' + chr(5893 - 5777) + chr(1766 - 1664) + chr(45) + chr(56)), YhhkyMvxPIjH))
xafqLlk3kkUe(a2SYDDomXDZ2.stdout, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\x8d\x83\xfc\x8a'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(2101 - 2001) + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + chr(0b100 + 0o64)))()
Sgh1XajR50te = []
for XdowRbJKZWL9 in vQr8gNKaIaWE(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\x94\x9b\xd0\x8b\xd1\xe7r\xac\x8b'), chr(100) + '\x65' + '\x63' + chr(111) + chr(100) + '\x65')(chr(1196 - 1079) + chr(116) + chr(102) + chr(1856 - 1811) + '\x38'))):
e_JlnroeHtLh(XdowRbJKZWL9, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\x94\x9b\xd0\x8b\xd1\xe7r\xac\x8b'), '\144' + chr(0b1100101) + '\143' + chr(11626 - 11515) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + '\055' + '\x38')))
TRUOLFLuD08x = oVre8I6UXc3b.label_from_index(XdowRbJKZWL9)
if xafqLlk3kkUe(TRUOLFLuD08x, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4\xad\x95\xec\xd1\xfe\xc5_\xa7\xa9\x91\x01'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(9568 - 9468) + chr(0b110100 + 0o61))(chr(8467 - 8350) + '\164' + '\146' + chr(0b11101 + 0o20) + '\x38')) < ehT0Px3KOsy9('\060' + chr(2407 - 2296) + chr(0b110001), 8):
continue
EaCjyhZptSer = oVre8I6UXc3b.image_path_from_index(XdowRbJKZWL9)
if FiL2Xt3u2AMN:
EaCjyhZptSer = kZQLyf6U9n_3.relpath(EaCjyhZptSer, FiL2Xt3u2AMN)
xafqLlk3kkUe(Sgh1XajR50te, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b\x91\x86\xea\x8c\xd8'), '\144' + chr(6879 - 6778) + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(117) + chr(10771 - 10655) + chr(0b1100110) + '\x2d' + '\x38'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3'), chr(0b0 + 0o144) + chr(101) + '\x63' + chr(6761 - 6650) + chr(0b1100100) + chr(7745 - 7644))(chr(0b1000011 + 0o62) + '\164' + '\x66' + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\x8e\xa1\xd7\x98\xc8\xd0[\xa7\x89\xb2&'), chr(0b11 + 0o141) + '\x65' + chr(99) + '\157' + chr(5679 - 5579) + chr(101))(chr(0b1110101) + chr(8622 - 8506) + chr(0b1100110) + '\x2d' + chr(0b100010 + 0o26)))([M8_cKLkHVB2V(XdowRbJKZWL9), M8_cKLkHVB2V(ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010), 27953 - 27945)), M8_cKLkHVB2V(xafqLlk3kkUe(TRUOLFLuD08x, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\x80\x83\xd6\x84\xf0\xe1y\x9d\x88\x99\x02'), chr(0b1000110 + 0o36) + chr(0b1100101) + chr(0b1011110 + 0o5) + chr(111) + chr(4144 - 4044) + chr(101))(chr(8169 - 8052) + chr(1414 - 1298) + '\146' + chr(1060 - 1015) + chr(0b100100 + 0o24)))[ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1 + 0o60), 8)])] + [xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\x81\xd1\xcc\xa1\xd6\xda\xfb'), '\x64' + chr(3573 - 3472) + chr(0b1 + 0o142) + chr(111) + chr(0b1100000 + 0o4) + chr(0b1 + 0o144))(chr(0b11100 + 0o131) + chr(9234 - 9118) + chr(0b1100110) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xd5\x84\xe0\xaa\xdd\xd5&\x99\x88\x9f\n'), '\144' + chr(6038 - 5937) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(7973 - 7872))('\x75' + '\x74' + '\x66' + chr(0b101101) + '\070'))(OeWW0F1dBPRQ) for OeWW0F1dBPRQ in xafqLlk3kkUe(TRUOLFLuD08x, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\x9b\xc5\xe0\xb5\xd2\xb1R\x84\xbe\x9b.'), '\144' + chr(2820 - 2719) + '\143' + chr(111) + '\144' + chr(0b101011 + 0o72))(chr(0b110001 + 0o104) + chr(116) + chr(1834 - 1732) + '\x2d' + chr(365 - 309)))()] + [EaCjyhZptSer]) + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0'), '\144' + chr(0b1100101) + '\143' + chr(2013 - 1902) + chr(470 - 370) + '\x65')(chr(1494 - 1377) + '\164' + chr(0b10000 + 0o126) + chr(45) + chr(0b111000)))
if Sgh1XajR50te:
if iVWwODfFXHPF:
(drxw09AdRdci,) = (jFWsnpHpAUWz(xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\x80\x98\xeb\x8d\xd1'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\144' + '\145')('\x75' + chr(6739 - 6623) + chr(0b1100110) + chr(0b101101) + '\070')),)
xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'\x89\x89\x83\xe9\x84\xd0\xe3'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1010100 + 0o21))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1418 - 1373) + '\070'))(Sgh1XajR50te)
if not t3WbF0Ae42Pu:
t3WbF0Ae42Pu = oVre8I6UXc3b.AIvJRzLdDfgF + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\x8d\x85\xfb'), chr(0b1100010 + 0o2) + chr(0b1100100 + 0o1) + '\143' + '\157' + chr(7883 - 7783) + chr(0b1000011 + 0o42))(chr(0b1010001 + 0o44) + chr(0b1110100) + chr(0b1000110 + 0o40) + chr(0b111 + 0o46) + '\070')
with _fwkIVCGgtAN(t3WbF0Ae42Pu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d'), '\144' + '\145' + '\x63' + chr(7964 - 7853) + chr(0b111100 + 0o50) + chr(0b1100101))('\165' + '\x74' + '\146' + '\055' + '\x38')) as EGyt1xfPT1P6:
for LycYkDpyelF6 in Sgh1XajR50te:
xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\x93\x9f\xfb\x87'), chr(0b1010001 + 0o23) + chr(101) + chr(6023 - 5924) + '\157' + chr(0b1000001 + 0o43) + '\145')(chr(117) + '\x74' + '\146' + chr(0b1001 + 0o44) + chr(0b1000 + 0o60)))(LycYkDpyelF6)
else:
raise n0ZkatoveZpF(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4\x8e\xd6\xe6\x8f\xdd\xe1p\xe9\x91\x94@u\xe5\r\xd3'), chr(100) + '\x65' + chr(0b1 + 0o142) + chr(0b1101111) + chr(0b101001 + 0o73) + '\145')(chr(0b1101000 + 0o15) + '\164' + chr(0b11001 + 0o115) + chr(45) + chr(117 - 61)))
|
apache/incubator-mxnet
|
example/ssd/dataset/imdb.py
|
Imdb._load_class_names
|
def _load_class_names(self, filename, dirname):
"""
load class names from text file
Parameters:
----------
filename: str
file stores class names
dirname: str
file directory
"""
full_path = osp.join(dirname, filename)
classes = []
with open(full_path, 'r') as f:
classes = [l.strip() for l in f.readlines()]
return classes
|
python
|
def _load_class_names(self, filename, dirname):
"""
load class names from text file
Parameters:
----------
filename: str
file stores class names
dirname: str
file directory
"""
full_path = osp.join(dirname, filename)
classes = []
with open(full_path, 'r') as f:
classes = [l.strip() for l in f.readlines()]
return classes
|
[
"def",
"_load_class_names",
"(",
"self",
",",
"filename",
",",
"dirname",
")",
":",
"full_path",
"=",
"osp",
".",
"join",
"(",
"dirname",
",",
"filename",
")",
"classes",
"=",
"[",
"]",
"with",
"open",
"(",
"full_path",
",",
"'r'",
")",
"as",
"f",
":",
"classes",
"=",
"[",
"l",
".",
"strip",
"(",
")",
"for",
"l",
"in",
"f",
".",
"readlines",
"(",
")",
"]",
"return",
"classes"
] |
load class names from text file
Parameters:
----------
filename: str
file stores class names
dirname: str
file directory
|
[
"load",
"class",
"names",
"from",
"text",
"file"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/dataset/imdb.py#L112-L127
|
train
|
Loads class names from text file.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr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bortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(290 - 240) + chr(0b110111) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(661 - 613) + '\157' + chr(50) + '\x35' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(0b110011) + '\066' + chr(215 - 165), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + '\065' + chr(0b110010), 61567 - 61559), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(1691 - 1641) + chr(0b111 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(956 - 908) + chr(0b1000001 + 0o56) + chr(0b110010 + 0o5) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\064' + '\x30', 35900 - 35892), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(2883 - 2829) + '\x30', 65327 - 65319), ehT0Px3KOsy9(chr(48) + chr(0b1100011 + 0o14) + chr(0b100010 + 0o17) + chr(0b10100 + 0o43) + chr(479 - 431), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101 + 0o56) + chr(0b11011 + 0o26) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x35' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(665 - 615) + chr(957 - 907) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + '\x31' + chr(54) + chr(2334 - 2285), 57777 - 57769), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101011 + 0o6) + '\x33' + chr(0b11010 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\062' + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(803 - 754) + chr(0b100001 + 0o26) + chr(663 - 612), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101 + 0o56) + '\x37' + chr(0b110011 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100011 + 0o16) + chr(2196 - 2142), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4544 - 4433) + chr(1860 - 1810) + '\065' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\064' + chr(987 - 932), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(0b110011) + chr(53) + chr(2340 - 2290), 34302 - 34294), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b10101 + 0o36) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(53) + chr(0b1100 + 0o46), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x35' + chr(1784 - 1736), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b110101) + chr(1797 - 1747), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3230 - 3119) + chr(53) + '\x35', 0o10), ehT0Px3KOsy9(chr(1343 - 1295) + chr(111) + '\061' + chr(1338 - 1288) + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + chr(50) + chr(1923 - 1870) + chr(0b10 + 0o62), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(49) + chr(0b110000) + '\064', 9521 - 9513), ehT0Px3KOsy9('\060' + chr(8861 - 8750) + chr(0b100101 + 0o20) + chr(0b10011 + 0o43), 29080 - 29072), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(2290 - 2241) + '\060' + chr(53), 0b1000), ehT0Px3KOsy9(chr(475 - 427) + chr(0b1101111) + chr(55) + chr(0b11 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(1375 - 1327) + chr(0b1011111 + 0o20) + chr(50) + chr(1157 - 1109) + '\x37', 0o10), ehT0Px3KOsy9(chr(2141 - 2093) + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\060' + '\061', 37978 - 37970), ehT0Px3KOsy9('\060' + chr(7415 - 7304) + chr(0b110001) + chr(0b110011 + 0o1) + '\x35', 39080 - 39072), ehT0Px3KOsy9(chr(323 - 275) + chr(0b101100 + 0o103) + chr(764 - 713) + chr(277 - 226) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + '\063' + chr(50) + chr(0b100101 + 0o22), 7647 - 7639)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b111 + 0o56) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x91'), chr(8960 - 8860) + '\145' + chr(0b1100011) + chr(111) + chr(0b110101 + 0o57) + chr(101))('\x75' + chr(116) + chr(1511 - 1409) + '\x2d' + chr(344 - 288)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ySKianK7m2z5(oVre8I6UXc3b, xw4DsBfIJ22E, xT0fStj2MyFU):
rI6LPzVe_y18 = kZQLyf6U9n_3._oWXztVNnqHF(xT0fStj2MyFU, xw4DsBfIJ22E)
anO3bg2_hMSE = []
with _fwkIVCGgtAN(rI6LPzVe_y18, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd'), chr(6680 - 6580) + chr(0b1100101) + chr(0b110010 + 0o61) + '\157' + chr(594 - 494) + chr(0b1010000 + 0o25))('\165' + chr(116) + '\146' + chr(45) + '\x38')) as EGyt1xfPT1P6:
anO3bg2_hMSE = [aLoH_Mt0dzwO.strip() for aLoH_Mt0dzwO in EGyt1xfPT1P6.readlines()]
return anO3bg2_hMSE
|
apache/incubator-mxnet
|
example/image-classification/train_mnist.py
|
read_data
|
def read_data(label, image):
"""
download and read data into numpy
"""
base_url = 'http://yann.lecun.com/exdb/mnist/'
with gzip.open(download_file(base_url+label, os.path.join('data',label))) as flbl:
magic, num = struct.unpack(">II", flbl.read(8))
label = np.fromstring(flbl.read(), dtype=np.int8)
with gzip.open(download_file(base_url+image, os.path.join('data',image)), 'rb') as fimg:
magic, num, rows, cols = struct.unpack(">IIII", fimg.read(16))
image = np.fromstring(fimg.read(), dtype=np.uint8).reshape(len(label), rows, cols)
return (label, image)
|
python
|
def read_data(label, image):
"""
download and read data into numpy
"""
base_url = 'http://yann.lecun.com/exdb/mnist/'
with gzip.open(download_file(base_url+label, os.path.join('data',label))) as flbl:
magic, num = struct.unpack(">II", flbl.read(8))
label = np.fromstring(flbl.read(), dtype=np.int8)
with gzip.open(download_file(base_url+image, os.path.join('data',image)), 'rb') as fimg:
magic, num, rows, cols = struct.unpack(">IIII", fimg.read(16))
image = np.fromstring(fimg.read(), dtype=np.uint8).reshape(len(label), rows, cols)
return (label, image)
|
[
"def",
"read_data",
"(",
"label",
",",
"image",
")",
":",
"base_url",
"=",
"'http://yann.lecun.com/exdb/mnist/'",
"with",
"gzip",
".",
"open",
"(",
"download_file",
"(",
"base_url",
"+",
"label",
",",
"os",
".",
"path",
".",
"join",
"(",
"'data'",
",",
"label",
")",
")",
")",
"as",
"flbl",
":",
"magic",
",",
"num",
"=",
"struct",
".",
"unpack",
"(",
"\">II\"",
",",
"flbl",
".",
"read",
"(",
"8",
")",
")",
"label",
"=",
"np",
".",
"fromstring",
"(",
"flbl",
".",
"read",
"(",
")",
",",
"dtype",
"=",
"np",
".",
"int8",
")",
"with",
"gzip",
".",
"open",
"(",
"download_file",
"(",
"base_url",
"+",
"image",
",",
"os",
".",
"path",
".",
"join",
"(",
"'data'",
",",
"image",
")",
")",
",",
"'rb'",
")",
"as",
"fimg",
":",
"magic",
",",
"num",
",",
"rows",
",",
"cols",
"=",
"struct",
".",
"unpack",
"(",
"\">IIII\"",
",",
"fimg",
".",
"read",
"(",
"16",
")",
")",
"image",
"=",
"np",
".",
"fromstring",
"(",
"fimg",
".",
"read",
"(",
")",
",",
"dtype",
"=",
"np",
".",
"uint8",
")",
".",
"reshape",
"(",
"len",
"(",
"label",
")",
",",
"rows",
",",
"cols",
")",
"return",
"(",
"label",
",",
"image",
")"
] |
download and read data into numpy
|
[
"download",
"and",
"read",
"data",
"into",
"numpy"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/image-classification/train_mnist.py#L31-L42
|
train
|
download and read data into numpy
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,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gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + chr(0b11110 + 0o23) + chr(48) + chr(0b110011), 30178 - 30170), ehT0Px3KOsy9(chr(1461 - 1413) + chr(111) + chr(0b111 + 0o52) + chr(0b110 + 0o53) + chr(0b100001 + 0o26), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110100) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1510 - 1460) + chr(0b110010) + chr(0b110100), 29901 - 29893), ehT0Px3KOsy9(chr(1940 - 1892) + chr(111) + chr(0b110001 + 0o6) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(4148 - 4037) + chr(1966 - 1917) + chr(0b11010 + 0o27) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + '\x35' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(330 - 281) + '\x32' + chr(0b110011), 49648 - 49640), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + chr(0b100111 + 0o16) + chr(1282 - 1229), 25451 - 25443), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + '\x31' + chr(48) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101100 + 0o6) + chr(0b110001) + chr(0b100011 + 0o20), 50090 - 50082), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(0b10101 + 0o40) + chr(0b101010 + 0o6), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\060' + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(838 - 789) + chr(0b10100 + 0o35) + chr(1518 - 1464), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x30' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + '\x33' + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b0 + 0o157) + chr(49) + chr(768 - 715) + chr(54), 288 - 280), ehT0Px3KOsy9('\060' + chr(0b1001 + 0o146) + chr(0b1100 + 0o47) + chr(496 - 442), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b10011 + 0o41) + '\062', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(686 - 635) + chr(0b101111 + 0o1) + chr(438 - 387), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(50) + chr(0b101001 + 0o7) + chr(2800 - 2747), ord("\x08")), ehT0Px3KOsy9(chr(567 - 519) + chr(0b1101111) + chr(230 - 179) + '\x34', 58145 - 58137), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\x32' + chr(2431 - 2378) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + '\x31' + chr(1783 - 1735), 0b1000), ehT0Px3KOsy9(chr(1944 - 1896) + chr(0b1000111 + 0o50) + chr(850 - 801) + chr(1694 - 1640) + chr(0b110110), 15276 - 15268), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1100100 + 0o13) + chr(51) + chr(0b110010) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b10010 + 0o37) + '\061', 13066 - 13058), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + '\x31' + '\063' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9054 - 8943) + '\x33' + chr(0b11100 + 0o33) + chr(52), 28456 - 28448), ehT0Px3KOsy9(chr(986 - 938) + chr(111) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10897 - 10786) + chr(0b11 + 0o64) + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9(chr(421 - 373) + chr(2251 - 2140) + chr(49) + chr(1300 - 1247) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\x36' + chr(1187 - 1136), 45931 - 45923), ehT0Px3KOsy9('\x30' + chr(1398 - 1287) + chr(0b110110) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b10100 + 0o43) + chr(793 - 743), 61412 - 61404), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b110101 + 0o2) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\060' + '\064', 50709 - 50701), ehT0Px3KOsy9('\x30' + chr(111) + chr(1086 - 1036) + chr(0b110001) + '\063', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + '\x35' + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'm'), chr(0b110111 + 0o55) + '\x65' + '\143' + chr(111) + chr(0b1100100) + '\x65')('\x75' + '\x74' + chr(0b101101 + 0o71) + chr(0b10010 + 0o33) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def VIO891y3B3FW(TRUOLFLuD08x, IdmAHWfCqrnp):
RRtObAo6EjTi = xafqLlk3kkUe(SXOLrMavuUCe(b"+;\x97\xe4\x01b\x07*L/g\xa5\xc4'-\xf5\x86+\rq\x0f\xec\xe0d\xccjY\xb8\xa73\x8fv\x15"), chr(0b1100100) + chr(0b1011111 + 0o6) + chr(0b11101 + 0o106) + chr(0b11100 + 0o123) + chr(0b1100100) + chr(8570 - 8469))(chr(0b1110101) + chr(0b110101 + 0o77) + chr(6164 - 6062) + '\055' + chr(56))
with xafqLlk3kkUe(Sl9BQg7umixy, xafqLlk3kkUe(SXOLrMavuUCe(b',?\x86\xfa'), chr(8810 - 8710) + chr(101) + chr(8661 - 8562) + chr(11243 - 11132) + chr(0b1001110 + 0o26) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(1821 - 1776) + chr(0b1110 + 0o52)))(kacAZuJlkC3G(RRtObAo6EjTi + TRUOLFLuD08x, xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c \xb4\xccA9~\x1dC0A\xcd'), '\144' + chr(7370 - 7269) + chr(99) + '\157' + chr(0b1000001 + 0o43) + '\145')(chr(3941 - 3824) + '\164' + chr(102) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b"'.\x97\xf5"), chr(0b1001100 + 0o30) + chr(0b101110 + 0o67) + '\x63' + chr(0b1101111) + chr(4114 - 4014) + '\x65')('\x75' + chr(0b1110100) + chr(2696 - 2594) + '\x2d' + '\x38'), TRUOLFLuD08x))) as mssQ2aYV9XUt:
(kl8GYIpmK_fa, jFuGPhnxN9fq) = NBzIH1FKot5b.unpack(xafqLlk3kkUe(SXOLrMavuUCe(b'}\x06\xaa'), chr(0b101100 + 0o70) + '\x65' + chr(2548 - 2449) + chr(0b100110 + 0o111) + '\x64' + chr(0b1100101))('\165' + '\164' + chr(102) + chr(0b101101) + chr(2206 - 2150)), mssQ2aYV9XUt.U6MiWrhuCi2Y(ehT0Px3KOsy9(chr(678 - 630) + '\157' + '\x31' + '\x30', 8)))
TRUOLFLuD08x = WqUC3KWvYVup.fromstring(mssQ2aYV9XUt.U6MiWrhuCi2Y(), dtype=WqUC3KWvYVup.int8)
with xafqLlk3kkUe(Sl9BQg7umixy, xafqLlk3kkUe(SXOLrMavuUCe(b',?\x86\xfa'), chr(3701 - 3601) + '\x65' + '\143' + chr(111) + '\144' + '\145')(chr(0b1110101) + '\164' + chr(0b11111 + 0o107) + chr(1945 - 1900) + chr(0b110010 + 0o6)))(kacAZuJlkC3G(RRtObAo6EjTi + IdmAHWfCqrnp, xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c \xb4\xccA9~\x1dC0A\xcd'), chr(0b1100100) + chr(0b1011100 + 0o11) + '\143' + chr(0b100110 + 0o111) + chr(0b1100100) + chr(0b1011101 + 0o10))(chr(0b11110 + 0o127) + chr(0b1110100) + chr(0b1100000 + 0o6) + chr(0b101101) + chr(0b11111 + 0o31)))(xafqLlk3kkUe(SXOLrMavuUCe(b"'.\x97\xf5"), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1 + 0o164) + '\164' + '\146' + chr(45) + chr(0b11011 + 0o35)), IdmAHWfCqrnp)), xafqLlk3kkUe(SXOLrMavuUCe(b'1-'), chr(0b1100100) + chr(0b10001 + 0o124) + chr(0b1000011 + 0o40) + chr(8883 - 8772) + chr(4434 - 4334) + '\145')(chr(0b11100 + 0o131) + chr(0b1110100) + '\146' + '\x2d' + chr(1742 - 1686))) as Mtl7PSyhqIfZ:
(kl8GYIpmK_fa, jFuGPhnxN9fq, rAoIgjmAxUis, AIgvIWQd9onz) = NBzIH1FKot5b.unpack(xafqLlk3kkUe(SXOLrMavuUCe(b'}\x06\xaa\xddr'), '\x64' + chr(0b1100101) + '\143' + chr(0b10000 + 0o137) + chr(2630 - 2530) + chr(6666 - 6565))('\x75' + '\164' + chr(323 - 221) + chr(236 - 191) + '\x38'), Mtl7PSyhqIfZ.U6MiWrhuCi2Y(ehT0Px3KOsy9('\x30' + chr(9516 - 9405) + '\x32' + '\060', 0o10)))
IdmAHWfCqrnp = WqUC3KWvYVup.fromstring(Mtl7PSyhqIfZ.read(), dtype=WqUC3KWvYVup.uint8).reshape(c2A0yzQpDQB3(TRUOLFLuD08x), rAoIgjmAxUis, AIgvIWQd9onz)
return (TRUOLFLuD08x, IdmAHWfCqrnp)
|
apache/incubator-mxnet
|
example/image-classification/train_mnist.py
|
get_mnist_iter
|
def get_mnist_iter(args, kv):
"""
create data iterator with NDArrayIter
"""
(train_lbl, train_img) = read_data(
'train-labels-idx1-ubyte.gz', 'train-images-idx3-ubyte.gz')
(val_lbl, val_img) = read_data(
't10k-labels-idx1-ubyte.gz', 't10k-images-idx3-ubyte.gz')
train = mx.io.NDArrayIter(
to4d(train_img), train_lbl, args.batch_size, shuffle=True)
val = mx.io.NDArrayIter(
to4d(val_img), val_lbl, args.batch_size)
return (train, val)
|
python
|
def get_mnist_iter(args, kv):
"""
create data iterator with NDArrayIter
"""
(train_lbl, train_img) = read_data(
'train-labels-idx1-ubyte.gz', 'train-images-idx3-ubyte.gz')
(val_lbl, val_img) = read_data(
't10k-labels-idx1-ubyte.gz', 't10k-images-idx3-ubyte.gz')
train = mx.io.NDArrayIter(
to4d(train_img), train_lbl, args.batch_size, shuffle=True)
val = mx.io.NDArrayIter(
to4d(val_img), val_lbl, args.batch_size)
return (train, val)
|
[
"def",
"get_mnist_iter",
"(",
"args",
",",
"kv",
")",
":",
"(",
"train_lbl",
",",
"train_img",
")",
"=",
"read_data",
"(",
"'train-labels-idx1-ubyte.gz'",
",",
"'train-images-idx3-ubyte.gz'",
")",
"(",
"val_lbl",
",",
"val_img",
")",
"=",
"read_data",
"(",
"'t10k-labels-idx1-ubyte.gz'",
",",
"'t10k-images-idx3-ubyte.gz'",
")",
"train",
"=",
"mx",
".",
"io",
".",
"NDArrayIter",
"(",
"to4d",
"(",
"train_img",
")",
",",
"train_lbl",
",",
"args",
".",
"batch_size",
",",
"shuffle",
"=",
"True",
")",
"val",
"=",
"mx",
".",
"io",
".",
"NDArrayIter",
"(",
"to4d",
"(",
"val_img",
")",
",",
"val_lbl",
",",
"args",
".",
"batch_size",
")",
"return",
"(",
"train",
",",
"val",
")"
] |
create data iterator with NDArrayIter
|
[
"create",
"data",
"iterator",
"with",
"NDArrayIter"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/image-classification/train_mnist.py#L51-L63
|
train
|
create data iterator with NDArrayIter
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuR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E,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(0b1010101 + 0o32) + '\x32' + chr(51) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(2030 - 1980) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(2046 - 1997) + chr(1717 - 1666), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o35) + chr(1960 - 1907) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(565 - 517) + chr(0b1101111 + 0o0) + chr(0b100001 + 0o26) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\060' + chr(69 - 16), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + '\x31' + chr(0b101 + 0o61) + chr(0b100001 + 0o17), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(222 - 170) + chr(2301 - 2251), ord("\x08")), ehT0Px3KOsy9(chr(876 - 828) + '\157' + chr(49) + '\x31', 39764 - 39756), ehT0Px3KOsy9(chr(1292 - 1244) + chr(0b0 + 0o157) + chr(49) + chr(1290 - 1242) + '\060', 0o10), ehT0Px3KOsy9(chr(2274 - 2226) + chr(8504 - 8393) + '\063' + chr(0b110001) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(0b110010 + 0o1) + chr(901 - 850) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(1633 - 1584) + '\065' + chr(54), 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b10 + 0o57) + chr(1650 - 1601) + chr(2306 - 2256), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\061' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(50) + '\061' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(7431 - 7320) + chr(51) + chr(0b110001) + chr(52), 14800 - 14792), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(901 - 852) + chr(1084 - 1031) + chr(2071 - 2017), 8), ehT0Px3KOsy9('\060' + chr(8193 - 8082) + chr(50) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(8366 - 8255) + '\x33' + chr(1332 - 1278) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(0b110010 + 0o3) + chr(0b101100 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(0b10 + 0o62) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(917 - 869) + chr(0b100111 + 0o110) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(474 - 426) + '\157' + chr(272 - 222) + '\065' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(0b110011) + '\x36' + '\065', 0b1000), ehT0Px3KOsy9(chr(1188 - 1140) + chr(111) + chr(51) + '\x30' + chr(1886 - 1838), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + chr(0b100101 + 0o15) + '\062' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6309 - 6198) + chr(0b110001 + 0o0) + chr(0b110000) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(375 - 326) + chr(0b110111) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2309 - 2255) + chr(553 - 498), 0o10), ehT0Px3KOsy9(chr(211 - 163) + chr(0b11000 + 0o127) + '\063' + '\066' + chr(53), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\060' + chr(0b101000 + 0o13), 33992 - 33984), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b101110 + 0o4) + '\064', 8), ehT0Px3KOsy9('\060' + chr(234 - 123) + chr(1347 - 1296) + chr(0b10111 + 0o35) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110 + 0o55) + '\060' + chr(346 - 298), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(218 - 168), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101000 + 0o7) + chr(261 - 212) + '\x36' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + chr(0b110010) + '\x35' + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101010 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + '\x37' + '\064', 57982 - 57974)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(6780 - 6669) + '\x35' + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0'), '\x64' + chr(0b10110 + 0o117) + chr(99) + chr(0b100011 + 0o114) + '\144' + chr(4847 - 4746))('\165' + chr(116) + chr(0b1010100 + 0o22) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def URbYdvk8XSKe(kJDRfRhcZHjS, oG9AO0uxBJ0V):
(lSXgSO6cL6tI, L_b7hIGN7PYH) = VIO891y3B3FW(xafqLlk3kkUe(SXOLrMavuUCe(b'\xeaa\xea\x07W\xa8\x1c\x83k%\xa2\xaaC#)\xf5\xfdCa\x91RT`\x80\x92\xba'), chr(8737 - 8637) + '\145' + chr(0b111 + 0o134) + chr(111) + chr(0b1100100) + chr(1004 - 903))(chr(8730 - 8613) + chr(116) + '\x66' + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b"\xeaa\xea\x07W\xa8\x19\x8fh'\xab\xaaC#)\xf5\xffCa\x91RT`\x80\x92\xba"), chr(4362 - 4262) + '\145' + '\143' + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\164' + '\146' + '\x2d' + chr(0b111000)))
(iqR2th6xY_Mw, JSLkIQBVhzUg) = VIO891y3B3FW(xafqLlk3kkUe(SXOLrMavuUCe(b'\xea"\xbb\x05\x14\xe9\x11\x80l,\xbd\xf4\x07.5\xbc\xe1\x1bv\x8a_E+\xc9\x8f'), '\x64' + chr(0b1010000 + 0o25) + chr(2795 - 2696) + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(116) + chr(0b100001 + 0o105) + chr(0b101101) + chr(0b100010 + 0o26)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xea"\xbb\x05\x14\xec\x1d\x83n%\xbd\xf4\x07.5\xbe\xe1\x1bv\x8a_E+\xc9\x8f'), chr(8050 - 7950) + chr(9830 - 9729) + chr(99) + chr(0b1001010 + 0o45) + '\144' + '\145')(chr(0b1110101) + '\164' + chr(102) + chr(0b100 + 0o51) + chr(1802 - 1746)))
e80gRioCjdat = CIVheOt0RKQX.io.NDArrayIter(X9i8jNqI5GC9(L_b7hIGN7PYH), lSXgSO6cL6tI, kJDRfRhcZHjS.ix9dZyeAmUxY, shuffle=ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + '\061', 0o10))
pQxH2D_k9sXQ = CIVheOt0RKQX.io.NDArrayIter(X9i8jNqI5GC9(JSLkIQBVhzUg), iqR2th6xY_Mw, kJDRfRhcZHjS.ix9dZyeAmUxY)
return (e80gRioCjdat, pQxH2D_k9sXQ)
|
apache/incubator-mxnet
|
example/fcn-xs/image_segmentaion.py
|
make_file_extension_assertion
|
def make_file_extension_assertion(extension):
"""Function factory for file extension argparse assertion
Args:
extension (string): the file extension to assert
Returns:
string: the supplied extension, if assertion is successful.
"""
def file_extension_assertion(file_path):
base, ext = os.path.splitext(file_path)
if ext.lower() != extension:
raise argparse.ArgumentTypeError('File must have ' + extension + ' extension')
return file_path
return file_extension_assertion
|
python
|
def make_file_extension_assertion(extension):
"""Function factory for file extension argparse assertion
Args:
extension (string): the file extension to assert
Returns:
string: the supplied extension, if assertion is successful.
"""
def file_extension_assertion(file_path):
base, ext = os.path.splitext(file_path)
if ext.lower() != extension:
raise argparse.ArgumentTypeError('File must have ' + extension + ' extension')
return file_path
return file_extension_assertion
|
[
"def",
"make_file_extension_assertion",
"(",
"extension",
")",
":",
"def",
"file_extension_assertion",
"(",
"file_path",
")",
":",
"base",
",",
"ext",
"=",
"os",
".",
"path",
".",
"splitext",
"(",
"file_path",
")",
"if",
"ext",
".",
"lower",
"(",
")",
"!=",
"extension",
":",
"raise",
"argparse",
".",
"ArgumentTypeError",
"(",
"'File must have '",
"+",
"extension",
"+",
"' extension'",
")",
"return",
"file_path",
"return",
"file_extension_assertion"
] |
Function factory for file extension argparse assertion
Args:
extension (string): the file extension to assert
Returns:
string: the supplied extension, if assertion is successful.
|
[
"Function",
"factory",
"for",
"file",
"extension",
"argparse",
"assertion",
"Args",
":",
"extension",
"(",
"string",
")",
":",
"the",
"file",
"extension",
"to",
"assert"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/fcn-xs/image_segmentaion.py#L31-L45
|
train
|
Function factory for file extension argparse assertion
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiS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pInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(1506 - 1456) + chr(0b101101 + 0o3) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\063' + '\x35', 0o10), ehT0Px3KOsy9(chr(1794 - 1746) + '\157' + '\x31' + '\x34' + chr(1542 - 1489), 39598 - 39590), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(412 - 362) + '\060', 47377 - 47369), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(50) + chr(55), 0o10), ehT0Px3KOsy9(chr(1584 - 1536) + chr(111) + chr(0b110010) + chr(467 - 415) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + chr(0b110011) + '\x30' + chr(0b110001), 46911 - 46903), ehT0Px3KOsy9('\060' + chr(3144 - 3033) + chr(2409 - 2357) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\065' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(0b100100 + 0o16) + chr(0b110101) + '\060', 42480 - 42472), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + '\062' + chr(1949 - 1899) + chr(176 - 122), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b110111) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010010 + 0o35) + '\x33' + chr(0b100010 + 0o24) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b10101 + 0o35) + '\061' + chr(0b0 + 0o61), 2321 - 2313), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + chr(872 - 820) + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(7401 - 7290) + '\x32' + chr(50) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o20) + chr(2552 - 2501) + chr(2165 - 2117), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100110 + 0o13) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100 + 0o63) + chr(0b110110), 42804 - 42796), ehT0Px3KOsy9(chr(0b110000) + chr(12222 - 12111) + '\x31' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\062' + chr(189 - 135), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(52) + chr(0b110111), 41449 - 41441), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(330 - 280) + chr(0b100010 + 0o17) + '\061', 8), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + '\067' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(49) + '\x36', 0b1000), ehT0Px3KOsy9(chr(1999 - 1951) + chr(0b100101 + 0o112) + '\061' + chr(531 - 479) + chr(0b10011 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(0b110010) + chr(0b100100 + 0o15) + '\065', 43146 - 43138), ehT0Px3KOsy9(chr(48) + chr(0b10001 + 0o136) + '\063' + chr(2562 - 2511) + chr(0b1111 + 0o50), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(52) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(978 - 867) + chr(1121 - 1072) + chr(53) + '\x37', 42634 - 42626), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2103 - 2054) + '\x35' + chr(2256 - 2205), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1111 + 0o50) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110000 + 0o2) + chr(0b110101) + '\x30', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x35' + chr(2423 - 2372), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b11000 + 0o32) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\x33' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b101 + 0o57) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1375 - 1264) + chr(855 - 807), 10109 - 10101), ehT0Px3KOsy9('\060' + '\157' + chr(2387 - 2337) + '\x37' + '\x36', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1110 + 0o141) + chr(0b101010 + 0o13) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9'), '\x64' + '\x65' + chr(8811 - 8712) + '\x6f' + chr(100) + chr(3369 - 3268))(chr(7912 - 7795) + chr(0b1110100) + chr(0b10101 + 0o121) + chr(899 - 854) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def M8H1CndY1HrO(bJEQ7witqKOi):
def vtFSTv5LuGMn(Ti9e_bxaCVyu):
(XLXqkmM_0GVx, gC4CNOEOq9Vm) = oqhJDdMJfuwx.path.splitext(Ti9e_bxaCVyu)
if xafqLlk3kkUe(gC4CNOEOq9Vm, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xf2\x12u\xa5'), chr(9101 - 9001) + chr(0b1100101) + chr(99) + chr(6771 - 6660) + '\x64' + chr(8751 - 8650))('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000)))() != bJEQ7witqKOi:
raise xafqLlk3kkUe(J3PV4AmS6TTH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\xef\x02e\xba\xc7\xafVz\xd1\xe6Z\xb1\xfbP\xfe*'), chr(9020 - 8920) + chr(0b101001 + 0o74) + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(13194 - 13078) + chr(0b1100010 + 0o4) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xf4\tu\xf7\xcf\xb4QZ\x88\xfe^\x82\xec\x02'), chr(0b1100011 + 0o1) + '\145' + chr(99) + '\x6f' + chr(100) + chr(0b101000 + 0o75))('\x75' + '\164' + chr(0b110 + 0o140) + chr(45) + chr(2423 - 2367)) + bJEQ7witqKOi + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xf8\x1dd\xb2\xcc\xb2KA\xc6'), '\x64' + chr(2903 - 2802) + chr(9158 - 9059) + chr(0b1000011 + 0o54) + '\144' + chr(0b101111 + 0o66))(chr(0b1011001 + 0o34) + chr(116) + '\146' + '\x2d' + '\070'))
return Ti9e_bxaCVyu
return vtFSTv5LuGMn
|
apache/incubator-mxnet
|
example/fcn-xs/image_segmentaion.py
|
get_palette
|
def get_palette(num_colors=256):
"""generates the colormap for visualizing the segmentation mask
Args:
num_colors (int): the number of colors to generate in the output palette
Returns:
string: the supplied extension, if assertion is successful.
"""
pallete = [0]*(num_colors*3)
for j in range(0, num_colors):
lab = j
pallete[j*3+0] = 0
pallete[j*3+1] = 0
pallete[j*3+2] = 0
i = 0
while (lab > 0):
pallete[j*3+0] |= (((lab >> 0) & 1) << (7-i))
pallete[j*3+1] |= (((lab >> 1) & 1) << (7-i))
pallete[j*3+2] |= (((lab >> 2) & 1) << (7-i))
i = i + 1
lab >>= 3
return pallete
|
python
|
def get_palette(num_colors=256):
"""generates the colormap for visualizing the segmentation mask
Args:
num_colors (int): the number of colors to generate in the output palette
Returns:
string: the supplied extension, if assertion is successful.
"""
pallete = [0]*(num_colors*3)
for j in range(0, num_colors):
lab = j
pallete[j*3+0] = 0
pallete[j*3+1] = 0
pallete[j*3+2] = 0
i = 0
while (lab > 0):
pallete[j*3+0] |= (((lab >> 0) & 1) << (7-i))
pallete[j*3+1] |= (((lab >> 1) & 1) << (7-i))
pallete[j*3+2] |= (((lab >> 2) & 1) << (7-i))
i = i + 1
lab >>= 3
return pallete
|
[
"def",
"get_palette",
"(",
"num_colors",
"=",
"256",
")",
":",
"pallete",
"=",
"[",
"0",
"]",
"*",
"(",
"num_colors",
"*",
"3",
")",
"for",
"j",
"in",
"range",
"(",
"0",
",",
"num_colors",
")",
":",
"lab",
"=",
"j",
"pallete",
"[",
"j",
"*",
"3",
"+",
"0",
"]",
"=",
"0",
"pallete",
"[",
"j",
"*",
"3",
"+",
"1",
"]",
"=",
"0",
"pallete",
"[",
"j",
"*",
"3",
"+",
"2",
"]",
"=",
"0",
"i",
"=",
"0",
"while",
"(",
"lab",
">",
"0",
")",
":",
"pallete",
"[",
"j",
"*",
"3",
"+",
"0",
"]",
"|=",
"(",
"(",
"(",
"lab",
">>",
"0",
")",
"&",
"1",
")",
"<<",
"(",
"7",
"-",
"i",
")",
")",
"pallete",
"[",
"j",
"*",
"3",
"+",
"1",
"]",
"|=",
"(",
"(",
"(",
"lab",
">>",
"1",
")",
"&",
"1",
")",
"<<",
"(",
"7",
"-",
"i",
")",
")",
"pallete",
"[",
"j",
"*",
"3",
"+",
"2",
"]",
"|=",
"(",
"(",
"(",
"lab",
">>",
"2",
")",
"&",
"1",
")",
"<<",
"(",
"7",
"-",
"i",
")",
")",
"i",
"=",
"i",
"+",
"1",
"lab",
">>=",
"3",
"return",
"pallete"
] |
generates the colormap for visualizing the segmentation mask
Args:
num_colors (int): the number of colors to generate in the output palette
Returns:
string: the supplied extension, if assertion is successful.
|
[
"generates",
"the",
"colormap",
"for",
"visualizing",
"the",
"segmentation",
"mask",
"Args",
":",
"num_colors",
"(",
"int",
")",
":",
"the",
"number",
"of",
"colors",
"to",
"generate",
"in",
"the",
"output",
"palette"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/fcn-xs/image_segmentaion.py#L47-L69
|
train
|
generates the colormap for visualizing the segmentation mask
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul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2kLpS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(722 - 673) + chr(54), 7525 - 7517), ehT0Px3KOsy9(chr(352 - 304) + '\x6f' + chr(1709 - 1659) + '\x37' + chr(805 - 753), 0o10), ehT0Px3KOsy9(chr(48) + chr(3344 - 3233) + '\x33' + chr(0b110001) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b11011 + 0o124) + '\061' + chr(0b111 + 0o60) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1282 - 1231) + chr(0b110110) + chr(0b100100 + 0o16), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2121 - 2070) + chr(0b110110) + chr(195 - 145), 8), ehT0Px3KOsy9(chr(1820 - 1772) + '\157' + chr(0b110010) + chr(53) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(52) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1148 - 1100) + chr(4634 - 4523) + '\061' + chr(2213 - 2158) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10000 + 0o43) + chr(52) + '\060', 37608 - 37600), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101110 + 0o5) + chr(1529 - 1476) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\060' + chr(55), 42033 - 42025), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b110101) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(0b101001 + 0o10) + chr(50) + chr(1784 - 1734), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\065' + chr(1546 - 1494), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b1000 + 0o54) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + chr(0b110001) + chr(0b110100) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11111 + 0o24) + chr(0b101111 + 0o3) + chr(1885 - 1837), 0o10), ehT0Px3KOsy9(chr(1317 - 1269) + '\157' + chr(1225 - 1174) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1820 - 1709) + '\061' + chr(1455 - 1406) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\064' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b110001) + chr(1401 - 1352), 1482 - 1474), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\x34' + chr(0b0 + 0o60), 8), ehT0Px3KOsy9(chr(500 - 452) + '\157' + '\062' + '\x33' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(2189 - 2141) + '\157' + '\x33' + chr(0b11100 + 0o26) + chr(0b11011 + 0o27), 58434 - 58426), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x35' + chr(0b100111 + 0o13), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8883 - 8772) + chr(0b110010) + chr(0b110101) + '\061', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(804 - 753) + chr(49) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(51) + chr(592 - 538) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7075 - 6964) + chr(0b110001) + chr(2337 - 2285) + '\067', 242 - 234), ehT0Px3KOsy9(chr(1005 - 957) + chr(0b111101 + 0o62) + '\x33' + '\065', 43647 - 43639), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x36' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\067' + chr(0b110101), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x36' + chr(0b100000 + 0o22), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b101011 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(697 - 649) + chr(0b110 + 0o151) + '\x33' + '\065' + chr(1772 - 1720), 8), ehT0Px3KOsy9(chr(48) + chr(0b1100011 + 0o14) + chr(0b110001) + '\x33' + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100101 + 0o112) + '\x33' + '\x36' + '\060', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110101) + chr(0b10010 + 0o36), 10466 - 10458)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'`'), chr(499 - 399) + '\145' + '\x63' + chr(6794 - 6683) + chr(0b11111 + 0o105) + chr(0b1100 + 0o131))(chr(0b11101 + 0o130) + '\x74' + '\146' + chr(0b101101) + chr(0b100100 + 0o24)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def POCOwB0Gm75I(iGYa__WP9qhJ=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100111 + 0o15) + '\060' + chr(0b110000), 0b1000)):
YmDQrNyA0N5W = [ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101011 + 0o4) + chr(0b10010 + 0o36), 0b1000)] * (iGYa__WP9qhJ * ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110011), 0b1000))
for tlORBuYsiw3X in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 8), iGYa__WP9qhJ):
GnaUWDNP8BvA = tlORBuYsiw3X
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011), 8) + ehT0Px3KOsy9(chr(0b110000) + chr(2312 - 2201) + chr(48), 8)] = ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b0 + 0o60), 8)
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9('\060' + '\x6f' + chr(728 - 677), 8) + ehT0Px3KOsy9(chr(418 - 370) + '\x6f' + chr(142 - 93), 0o10)] = ehT0Px3KOsy9('\x30' + '\157' + '\060', 8)
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063', 8) + ehT0Px3KOsy9(chr(833 - 785) + chr(0b1101111) + chr(1598 - 1548), 53026 - 53018)] = ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(2048 - 2000), 8)
WVxHKyX45z_L = ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\060', 8)
while GnaUWDNP8BvA > ehT0Px3KOsy9(chr(1887 - 1839) + chr(0b1101111) + chr(0b110000), 8):
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9(chr(495 - 447) + chr(11629 - 11518) + chr(0b110011), 8) + ehT0Px3KOsy9(chr(2273 - 2225) + chr(0b1101110 + 0o1) + chr(0b1000 + 0o50), 8)] |= (GnaUWDNP8BvA >> ehT0Px3KOsy9('\x30' + chr(111) + chr(956 - 908), 8) & ehT0Px3KOsy9('\060' + chr(0b1101011 + 0o4) + '\x31', 8)) << ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(2688 - 2633), 0b1000) - WVxHKyX45z_L
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011), 8) + ehT0Px3KOsy9(chr(0b110000) + chr(12155 - 12044) + chr(0b110001), 8)] |= (GnaUWDNP8BvA >> ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(5829 - 5718) + '\061', 8) & ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + chr(0b1010 + 0o47), 8)) << ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b110111), 8) - WVxHKyX45z_L
YmDQrNyA0N5W[tlORBuYsiw3X * ehT0Px3KOsy9(chr(48) + chr(111) + '\x33', 8) + ehT0Px3KOsy9('\060' + chr(111) + '\062', 8)] |= (GnaUWDNP8BvA >> ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(0b110010), 8) & ehT0Px3KOsy9(chr(1708 - 1660) + chr(111) + chr(1384 - 1335), 8)) << ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(287 - 232), 8) - WVxHKyX45z_L
WVxHKyX45z_L = WVxHKyX45z_L + ehT0Px3KOsy9(chr(908 - 860) + chr(0b1101111) + chr(49), 8)
GnaUWDNP8BvA >>= ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + '\063', 8)
return YmDQrNyA0N5W
|
apache/incubator-mxnet
|
example/fcn-xs/image_segmentaion.py
|
get_data
|
def get_data(img_path):
"""get the (1, 3, h, w) np.array data for the supplied image
Args:
img_path (string): the input image path
Returns:
np.array: image data in a (1, 3, h, w) shape
"""
mean = np.array([123.68, 116.779, 103.939]) # (R,G,B)
img = Image.open(img_path)
img = np.array(img, dtype=np.float32)
reshaped_mean = mean.reshape(1, 1, 3)
img = img - reshaped_mean
img = np.swapaxes(img, 0, 2)
img = np.swapaxes(img, 1, 2)
img = np.expand_dims(img, axis=0)
return img
|
python
|
def get_data(img_path):
"""get the (1, 3, h, w) np.array data for the supplied image
Args:
img_path (string): the input image path
Returns:
np.array: image data in a (1, 3, h, w) shape
"""
mean = np.array([123.68, 116.779, 103.939]) # (R,G,B)
img = Image.open(img_path)
img = np.array(img, dtype=np.float32)
reshaped_mean = mean.reshape(1, 1, 3)
img = img - reshaped_mean
img = np.swapaxes(img, 0, 2)
img = np.swapaxes(img, 1, 2)
img = np.expand_dims(img, axis=0)
return img
|
[
"def",
"get_data",
"(",
"img_path",
")",
":",
"mean",
"=",
"np",
".",
"array",
"(",
"[",
"123.68",
",",
"116.779",
",",
"103.939",
"]",
")",
"# (R,G,B)",
"img",
"=",
"Image",
".",
"open",
"(",
"img_path",
")",
"img",
"=",
"np",
".",
"array",
"(",
"img",
",",
"dtype",
"=",
"np",
".",
"float32",
")",
"reshaped_mean",
"=",
"mean",
".",
"reshape",
"(",
"1",
",",
"1",
",",
"3",
")",
"img",
"=",
"img",
"-",
"reshaped_mean",
"img",
"=",
"np",
".",
"swapaxes",
"(",
"img",
",",
"0",
",",
"2",
")",
"img",
"=",
"np",
".",
"swapaxes",
"(",
"img",
",",
"1",
",",
"2",
")",
"img",
"=",
"np",
".",
"expand_dims",
"(",
"img",
",",
"axis",
"=",
"0",
")",
"return",
"img"
] |
get the (1, 3, h, w) np.array data for the supplied image
Args:
img_path (string): the input image path
Returns:
np.array: image data in a (1, 3, h, w) shape
|
[
"get",
"the",
"(",
"1",
"3",
"h",
"w",
")",
"np",
".",
"array",
"data",
"for",
"the",
"supplied",
"image",
"Args",
":",
"img_path",
"(",
"string",
")",
":",
"the",
"input",
"image",
"path"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/fcn-xs/image_segmentaion.py#L71-L88
|
train
|
get the data for the supplied image in the order of the image in order
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24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YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(1488 - 1438) + chr(0b110100), 43119 - 43111), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(152 - 101) + chr(545 - 491), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3719 - 3608) + chr(51) + '\063' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(2299 - 2251) + chr(0b1101111) + chr(55) + chr(0b11000 + 0o37), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(54) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10110 + 0o40) + '\062', 51848 - 51840), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1001 + 0o50) + chr(0b11110 + 0o27) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + chr(51) + chr(0b110111) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(0b110101) + chr(1749 - 1699), 45543 - 45535), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1851 - 1799) + chr(0b10000 + 0o47), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2227 - 2177) + chr(54) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11010 + 0o125) + '\061' + '\065', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(11669 - 11558) + chr(0b110010) + chr(2267 - 2217) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b11001 + 0o30) + chr(0b11101 + 0o23), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11010 + 0o31) + '\x32' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10010 + 0o40) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b110001) + chr(50) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(54) + chr(0b100 + 0o61), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + '\x33' + '\x33' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(2745 - 2691) + '\x36', 40013 - 40005), ehT0Px3KOsy9(chr(0b110000) + chr(10380 - 10269) + '\x33' + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2326 - 2215) + chr(768 - 714) + chr(50), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b10111 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(6767 - 6656) + '\x31' + chr(1058 - 1007) + chr(0b110111), 53216 - 53208), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + '\062' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100111 + 0o10) + '\x31' + '\060' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + '\061' + '\067' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x31' + chr(0b1001 + 0o50), 9347 - 9339), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(1553 - 1505) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x30' + '\x31', 28564 - 28556), ehT0Px3KOsy9('\060' + '\157' + chr(52) + chr(0b110110), 24552 - 24544), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(364 - 310) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + '\063' + chr(49) + chr(0b11000 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x37' + chr(52), 45271 - 45263), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(343 - 291) + '\061', 4558 - 4550), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + '\x31' + chr(51) + '\x37', 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x35' + '\062', 7970 - 7962), ehT0Px3KOsy9(chr(89 - 41) + '\157' + '\x34' + chr(54), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(10864 - 10753) + '\x35' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b':'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(0b1011110 + 0o6) + chr(0b1100011 + 0o2))(chr(0b1110101) + chr(0b1110100) + chr(0b1010100 + 0o22) + chr(0b101101) + chr(0b1110 + 0o52)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Uif5YMYsaUYu(NvkLwGT0PRAi):
aJhItC_Vawlw = WqUC3KWvYVup.B0ePDhpqxN5n([123.68, 116.779, 103.939])
s63jeLEbd8fs = Xi3KfA6brWYX.open(NvkLwGT0PRAi)
s63jeLEbd8fs = WqUC3KWvYVup.B0ePDhpqxN5n(s63jeLEbd8fs, dtype=WqUC3KWvYVup.float32)
YjvgQe32ge7F = aJhItC_Vawlw.reshape(ehT0Px3KOsy9(chr(1188 - 1140) + chr(2200 - 2089) + '\061', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1 + 0o60), 8), ehT0Px3KOsy9('\060' + '\157' + '\x33', 36124 - 36116))
s63jeLEbd8fs = s63jeLEbd8fs - YjvgQe32ge7F
s63jeLEbd8fs = WqUC3KWvYVup.swapaxes(s63jeLEbd8fs, ehT0Px3KOsy9(chr(362 - 314) + '\x6f' + chr(1343 - 1295), 0o10), ehT0Px3KOsy9(chr(48) + chr(8580 - 8469) + chr(50), 0o10))
s63jeLEbd8fs = WqUC3KWvYVup.swapaxes(s63jeLEbd8fs, ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(135 - 86), 8), ehT0Px3KOsy9(chr(1464 - 1416) + chr(111) + '\062', 8))
s63jeLEbd8fs = WqUC3KWvYVup.expand_dims(s63jeLEbd8fs, axis=ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + chr(48), 8))
return s63jeLEbd8fs
|
apache/incubator-mxnet
|
example/fcn-xs/image_segmentaion.py
|
main
|
def main():
"""Module main execution"""
# Initialization variables - update to change your model and execution context
model_prefix = "FCN8s_VGG16"
epoch = 19
# By default, MXNet will run on the CPU. Change to ctx = mx.gpu() to run on GPU.
ctx = mx.cpu()
fcnxs, fcnxs_args, fcnxs_auxs = mx.model.load_checkpoint(model_prefix, epoch)
fcnxs_args["data"] = mx.nd.array(get_data(args.input), ctx)
data_shape = fcnxs_args["data"].shape
label_shape = (1, data_shape[2]*data_shape[3])
fcnxs_args["softmax_label"] = mx.nd.empty(label_shape, ctx)
exector = fcnxs.bind(ctx, fcnxs_args, args_grad=None, grad_req="null", aux_states=fcnxs_args)
exector.forward(is_train=False)
output = exector.outputs[0]
out_img = np.uint8(np.squeeze(output.asnumpy().argmax(axis=1)))
out_img = Image.fromarray(out_img)
out_img.putpalette(get_palette())
out_img.save(args.output)
|
python
|
def main():
"""Module main execution"""
# Initialization variables - update to change your model and execution context
model_prefix = "FCN8s_VGG16"
epoch = 19
# By default, MXNet will run on the CPU. Change to ctx = mx.gpu() to run on GPU.
ctx = mx.cpu()
fcnxs, fcnxs_args, fcnxs_auxs = mx.model.load_checkpoint(model_prefix, epoch)
fcnxs_args["data"] = mx.nd.array(get_data(args.input), ctx)
data_shape = fcnxs_args["data"].shape
label_shape = (1, data_shape[2]*data_shape[3])
fcnxs_args["softmax_label"] = mx.nd.empty(label_shape, ctx)
exector = fcnxs.bind(ctx, fcnxs_args, args_grad=None, grad_req="null", aux_states=fcnxs_args)
exector.forward(is_train=False)
output = exector.outputs[0]
out_img = np.uint8(np.squeeze(output.asnumpy().argmax(axis=1)))
out_img = Image.fromarray(out_img)
out_img.putpalette(get_palette())
out_img.save(args.output)
|
[
"def",
"main",
"(",
")",
":",
"# Initialization variables - update to change your model and execution context",
"model_prefix",
"=",
"\"FCN8s_VGG16\"",
"epoch",
"=",
"19",
"# By default, MXNet will run on the CPU. Change to ctx = mx.gpu() to run on GPU.",
"ctx",
"=",
"mx",
".",
"cpu",
"(",
")",
"fcnxs",
",",
"fcnxs_args",
",",
"fcnxs_auxs",
"=",
"mx",
".",
"model",
".",
"load_checkpoint",
"(",
"model_prefix",
",",
"epoch",
")",
"fcnxs_args",
"[",
"\"data\"",
"]",
"=",
"mx",
".",
"nd",
".",
"array",
"(",
"get_data",
"(",
"args",
".",
"input",
")",
",",
"ctx",
")",
"data_shape",
"=",
"fcnxs_args",
"[",
"\"data\"",
"]",
".",
"shape",
"label_shape",
"=",
"(",
"1",
",",
"data_shape",
"[",
"2",
"]",
"*",
"data_shape",
"[",
"3",
"]",
")",
"fcnxs_args",
"[",
"\"softmax_label\"",
"]",
"=",
"mx",
".",
"nd",
".",
"empty",
"(",
"label_shape",
",",
"ctx",
")",
"exector",
"=",
"fcnxs",
".",
"bind",
"(",
"ctx",
",",
"fcnxs_args",
",",
"args_grad",
"=",
"None",
",",
"grad_req",
"=",
"\"null\"",
",",
"aux_states",
"=",
"fcnxs_args",
")",
"exector",
".",
"forward",
"(",
"is_train",
"=",
"False",
")",
"output",
"=",
"exector",
".",
"outputs",
"[",
"0",
"]",
"out_img",
"=",
"np",
".",
"uint8",
"(",
"np",
".",
"squeeze",
"(",
"output",
".",
"asnumpy",
"(",
")",
".",
"argmax",
"(",
"axis",
"=",
"1",
")",
")",
")",
"out_img",
"=",
"Image",
".",
"fromarray",
"(",
"out_img",
")",
"out_img",
".",
"putpalette",
"(",
"get_palette",
"(",
")",
")",
"out_img",
".",
"save",
"(",
"args",
".",
"output",
")"
] |
Module main execution
|
[
"Module",
"main",
"execution"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/fcn-xs/image_segmentaion.py#L90-L110
|
train
|
Main function for the
module.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSR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EEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b0 + 0o63) + '\x34' + chr(449 - 397), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b101 + 0o60) + '\063', 22588 - 22580), ehT0Px3KOsy9(chr(879 - 831) + '\x6f' + chr(771 - 717) + chr(0b110 + 0o55), 62071 - 62063), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1011110 + 0o21) + '\063' + chr(2109 - 2054), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + '\x32' + chr(2415 - 2361) + '\067', 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b10101 + 0o34) + '\x31' + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(53) + chr(0b1100 + 0o46), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001001 + 0o46) + chr(51) + chr(0b11110 + 0o30) + chr(1576 - 1525), 0b1000), ehT0Px3KOsy9(chr(2134 - 2086) + chr(111) + chr(1124 - 1073) + chr(0b110111 + 0o0) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b110100 + 0o73) + '\067' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + '\x33' + chr(0b1010 + 0o51) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110101) + chr(0b110010 + 0o2), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(53) + chr(0b101101 + 0o5), 43444 - 43436), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(1694 - 1641) + chr(1210 - 1159), 8), ehT0Px3KOsy9(chr(926 - 878) + chr(111) + chr(0b11001 + 0o31) + chr(52) + chr(2152 - 2099), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(948 - 898) + chr(0b10010 + 0o43) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2446 - 2335) + chr(1337 - 1286) + chr(455 - 407) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(50) + '\061' + chr(1540 - 1486), 55222 - 55214), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(3151 - 3040) + chr(0b110011) + chr(0b1101 + 0o52) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + '\063' + chr(0b10000 + 0o42) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1438 - 1390) + chr(0b1101111) + '\063' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\x32' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + '\x31' + chr(0b110110) + chr(400 - 352), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b10101 + 0o34) + '\064' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(51) + chr(0b100001 + 0o22), 1885 - 1877), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(1345 - 1296) + chr(0b110010) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1283 - 1235) + chr(111) + chr(0b110011) + '\066' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x30' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(536 - 488) + chr(0b110100 + 0o73) + chr(2358 - 2308) + '\061' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3321 - 3210) + chr(0b110001) + '\067' + chr(0b11101 + 0o25), 19894 - 19886), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + '\x33' + chr(341 - 291) + chr(51), 0o10), ehT0Px3KOsy9(chr(1717 - 1669) + '\x6f' + '\063' + chr(520 - 471) + chr(0b10100 + 0o36), 6133 - 6125), ehT0Px3KOsy9('\x30' + chr(111) + chr(1629 - 1578) + chr(0b100101 + 0o17), 0o10), ehT0Px3KOsy9(chr(1318 - 1270) + '\157' + chr(0b110011) + chr(0b10111 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b110001 + 0o76) + '\063' + chr(0b10010 + 0o37) + chr(0b101 + 0o55), 8), ehT0Px3KOsy9('\060' + chr(8078 - 7967) + '\063' + '\x35' + chr(51), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\060' + chr(657 - 608), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(1776 - 1727) + chr(0b101101 + 0o11) + '\x33', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11100 + 0o31) + '\x30', 33612 - 33604)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xca'), chr(0b1001011 + 0o31) + chr(101) + chr(99) + chr(1669 - 1558) + chr(0b1000 + 0o134) + chr(443 - 342))(chr(5406 - 5289) + '\x74' + '\x66' + chr(0b111 + 0o46) + chr(0b11000 + 0o40)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def PGNrezus7XpS():
j1_eR7aRhKil = xafqLlk3kkUe(SXOLrMavuUCe(b"\xa2\xa8}'\xc4\x11|\xb4\xbf\x0e\xea"), chr(3245 - 3145) + chr(7985 - 7884) + '\143' + chr(0b10111 + 0o130) + '\144' + chr(101))('\x75' + chr(116) + '\146' + chr(45) + chr(0b11111 + 0o31))
LWTVW06OsTjl = ehT0Px3KOsy9(chr(1184 - 1136) + '\157' + '\x32' + '\063', 0b1000)
oM3jLo753XfX = CIVheOt0RKQX.cpu()
(A8GuWYz5OTfc, DPF1LK1ZFTFQ, cgSkDFrUHoa9) = CIVheOt0RKQX.model.load_checkpoint(j1_eR7aRhKil, LWTVW06OsTjl)
DPF1LK1ZFTFQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\x8aG~'), '\144' + '\x65' + chr(99) + chr(1534 - 1423) + chr(100) + '\x65')(chr(0b1000 + 0o155) + chr(0b101100 + 0o110) + chr(0b1100110) + chr(946 - 901) + chr(56))] = CIVheOt0RKQX.nd.B0ePDhpqxN5n(Uif5YMYsaUYu(kJDRfRhcZHjS.input), oM3jLo753XfX)
l48nAKgbtcOz = DPF1LK1ZFTFQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\x8aG~'), chr(3399 - 3299) + chr(101) + '\x63' + chr(111) + '\144' + '\x65')('\165' + chr(911 - 795) + chr(0b1100110) + chr(1607 - 1562) + '\070')].nauYfLglTpcb
U6Uq0p0KN__A = (ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(49), 27780 - 27772), l48nAKgbtcOz[ehT0Px3KOsy9(chr(766 - 718) + chr(0b1101111) + chr(0b110010), ord("\x08"))] * l48nAKgbtcOz[ehT0Px3KOsy9('\x30' + chr(0b111010 + 0o65) + '\x33', 0o10)])
DPF1LK1ZFTFQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\x84Uk\xda/R\xac\x94^\xbeN@'), chr(5400 - 5300) + chr(0b1001110 + 0o27) + chr(2936 - 2837) + chr(0b100010 + 0o115) + '\x64' + chr(2230 - 2129))(chr(13634 - 13517) + chr(0b1110 + 0o146) + '\x66' + chr(50 - 5) + '\x38')] = CIVheOt0RKQX.nd.empty(U6Uq0p0KN__A, oM3jLo753XfX)
gzc1ueaHmtAV = A8GuWYz5OTfc.bind(oM3jLo753XfX, DPF1LK1ZFTFQ, args_grad=None, grad_req=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a\x9e_s'), chr(0b101111 + 0o65) + '\145' + '\x63' + '\157' + '\x64' + '\x65')('\x75' + chr(116) + chr(7616 - 7514) + '\055' + chr(1311 - 1255)), aux_states=DPF1LK1ZFTFQ)
xafqLlk3kkUe(gzc1ueaHmtAV, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\x89Q|\xf4\x06\x7f\xbd\xber\xb6\x1e'), '\x64' + chr(0b101001 + 0o74) + chr(99) + chr(0b1101111) + chr(1473 - 1373) + chr(9304 - 9203))(chr(0b1110101) + chr(2699 - 2583) + chr(102) + chr(1650 - 1605) + chr(56)))(is_train=ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 0b1000))
e1jVqMSBZ01Y = gzc1ueaHmtAV.Dx_DllZ8uCko[ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\060', 8)]
c_jC_UFeRZLR = WqUC3KWvYVup.uint8(WqUC3KWvYVup.squeeze(e1jVqMSBZ01Y.asnumpy().argmax(axis=ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(0b110001), 8))))
c_jC_UFeRZLR = Xi3KfA6brWYX.fromarray(c_jC_UFeRZLR)
xafqLlk3kkUe(c_jC_UFeRZLR, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\x9eGo\xd6"O\x87\x8cZ'), '\144' + chr(101) + chr(99) + chr(0b1011100 + 0o23) + chr(0b10100 + 0o120) + '\x65')(chr(117) + '\164' + chr(0b100010 + 0o104) + chr(45) + chr(394 - 338)))(POCOwB0Gm75I())
xafqLlk3kkUe(c_jC_UFeRZLR, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\x8aEz'), '\x64' + chr(0b1000110 + 0o37) + '\143' + '\157' + chr(744 - 644) + chr(101))(chr(0b1110101) + '\164' + '\x66' + '\055' + '\x38'))(xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81\xdaYI\xc6\x03y\xb1\xa2\x0f\xedr'), chr(0b10011 + 0o121) + chr(5390 - 5289) + chr(0b1100011) + chr(0b0 + 0o157) + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(1146 - 1101) + chr(0b10100 + 0o44))))
|
apache/incubator-mxnet
|
example/ssd/dataset/concat_db.py
|
ConcatDB._check_classes
|
def _check_classes(self):
"""
check input imdbs, make sure they have same classes
"""
try:
self.classes = self.imdbs[0].classes
self.num_classes = len(self.classes)
except AttributeError:
# fine, if no classes is provided
pass
if self.num_classes > 0:
for db in self.imdbs:
assert self.classes == db.classes, "Multiple imdb must have same classes"
|
python
|
def _check_classes(self):
"""
check input imdbs, make sure they have same classes
"""
try:
self.classes = self.imdbs[0].classes
self.num_classes = len(self.classes)
except AttributeError:
# fine, if no classes is provided
pass
if self.num_classes > 0:
for db in self.imdbs:
assert self.classes == db.classes, "Multiple imdb must have same classes"
|
[
"def",
"_check_classes",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"classes",
"=",
"self",
".",
"imdbs",
"[",
"0",
"]",
".",
"classes",
"self",
".",
"num_classes",
"=",
"len",
"(",
"self",
".",
"classes",
")",
"except",
"AttributeError",
":",
"# fine, if no classes is provided",
"pass",
"if",
"self",
".",
"num_classes",
">",
"0",
":",
"for",
"db",
"in",
"self",
".",
"imdbs",
":",
"assert",
"self",
".",
"classes",
"==",
"db",
".",
"classes",
",",
"\"Multiple imdb must have same classes\""
] |
check input imdbs, make sure they have same classes
|
[
"check",
"input",
"imdbs",
"make",
"sure",
"they",
"have",
"same",
"classes"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/dataset/concat_db.py#L40-L53
|
train
|
check input imdbs make sure they have same classes
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZp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,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2021 - 1973) + chr(0b1100100 + 0o13) + chr(2513 - 2462) + '\x37' + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x35' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b11101 + 0o32) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(4681 - 4570) + chr(1738 - 1688) + '\x31', 44596 - 44588), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b110011) + '\x31', 62651 - 62643), ehT0Px3KOsy9(chr(1833 - 1785) + chr(0b1101111) + chr(51) + chr(2763 - 2708) + chr(0b11 + 0o63), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(579 - 528) + chr(1841 - 1793), 24002 - 23994), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(5339 - 5228) + '\x32' + chr(48) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(0b10110 + 0o33) + '\063' + '\064', 0o10), ehT0Px3KOsy9(chr(1380 - 1332) + chr(111) + chr(1969 - 1918) + '\067' + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(55) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(54) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6637 - 6526) + '\x33' + chr(0b110000) + chr(630 - 575), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + chr(49) + '\060' + chr(1198 - 1145), 0b1000), ehT0Px3KOsy9('\060' + chr(5218 - 5107) + '\x33' + '\x33' + '\x37', 55922 - 55914), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\062' + chr(2407 - 2356), 64662 - 64654), ehT0Px3KOsy9(chr(48) + chr(2184 - 2073) + chr(51) + chr(51) + '\064', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + chr(55) + chr(51), 0o10), ehT0Px3KOsy9(chr(1855 - 1807) + '\x6f' + chr(0b110001) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(5040 - 4929) + '\063' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(51) + chr(54), 42918 - 42910), ehT0Px3KOsy9(chr(1878 - 1830) + '\x6f' + chr(0b110101) + '\x30', 8), ehT0Px3KOsy9('\x30' + chr(551 - 440) + chr(50) + '\063', 26030 - 26022), ehT0Px3KOsy9(chr(642 - 594) + '\x6f' + chr(0b110001) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\062' + chr(0b110011), 8), ehT0Px3KOsy9(chr(579 - 531) + '\x6f' + chr(955 - 902) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(151 - 103) + '\157' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x32' + chr(51), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101100 + 0o103) + chr(2020 - 1969) + chr(53) + '\067', 0o10), ehT0Px3KOsy9(chr(1868 - 1820) + chr(8461 - 8350) + '\x33' + '\063' + chr(698 - 646), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\067' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(49) + chr(0b101000 + 0o12) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100110 + 0o14) + '\x32' + chr(0b100101 + 0o21), 11323 - 11315), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101111 + 0o7) + '\066', 20470 - 20462), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(50) + '\063' + chr(1404 - 1351), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\x32' + '\x31', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(48) + chr(975 - 920), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2235 - 2187) + '\x6f' + chr(0b111 + 0o56) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), '\144' + '\x65' + chr(0b100011 + 0o100) + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def QUwUjuOroXRi(oVre8I6UXc3b):
try:
oVre8I6UXc3b.anO3bg2_hMSE = oVre8I6UXc3b.imdbs[ehT0Px3KOsy9('\x30' + '\157' + chr(103 - 55), 0b1000)].anO3bg2_hMSE
oVre8I6UXc3b.i6loyAgxUM2t = c2A0yzQpDQB3(oVre8I6UXc3b.anO3bg2_hMSE)
except sHOWSIAKtU58:
pass
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x96\x1e\x12~w\x98\x99\xa0\xd5\x11\xcfZ'), '\x64' + chr(101) + '\143' + chr(111) + chr(100) + chr(5938 - 5837))(chr(0b1110101) + chr(0b11011 + 0o131) + '\x66' + chr(0b101101) + '\070')) > ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1826 - 1778), 8):
for fXTenaqZmXyd in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x96E\x1as}'), chr(100) + chr(0b1010111 + 0o16) + chr(5581 - 5482) + chr(2489 - 2378) + chr(0b101000 + 0o74) + chr(6277 - 6176))(chr(117) + chr(0b1110100) + chr(320 - 218) + '\x2d' + chr(0b11100 + 0o34))):
assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9eF1"l\xbe\xcc\x87\xe8\x11\xaek'), chr(100) + '\x65' + chr(4295 - 4196) + chr(111) + chr(0b110111 + 0o55) + '\145')('\165' + '\x74' + chr(0b1100110) + '\x2d' + '\070')) == xafqLlk3kkUe(fXTenaqZmXyd, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9eF1"l\xbe\xcc\x87\xe8\x11\xaek'), chr(0b11 + 0o141) + chr(0b11000 + 0o115) + '\x63' + chr(8649 - 8538) + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + chr(3517 - 3415) + chr(0b101101) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2]\x12eg\xa9\x92\xbd\xa05\x90J^\x14\xaa0\xac\xa7\xfcSmm;\x08`j~N"\xb0\xfe\x8e\xaf\xcf1\xe5'), '\144' + '\145' + chr(933 - 834) + chr(111) + chr(100) + chr(0b1010100 + 0o21))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(1112 - 1067) + '\070')
|
apache/incubator-mxnet
|
example/ssd/dataset/concat_db.py
|
ConcatDB._load_image_set_index
|
def _load_image_set_index(self, shuffle):
"""
get total number of images, init indices
Parameters
----------
shuffle : bool
whether to shuffle the initial indices
"""
self.num_images = 0
for db in self.imdbs:
self.num_images += db.num_images
indices = list(range(self.num_images))
if shuffle:
random.shuffle(indices)
return indices
|
python
|
def _load_image_set_index(self, shuffle):
"""
get total number of images, init indices
Parameters
----------
shuffle : bool
whether to shuffle the initial indices
"""
self.num_images = 0
for db in self.imdbs:
self.num_images += db.num_images
indices = list(range(self.num_images))
if shuffle:
random.shuffle(indices)
return indices
|
[
"def",
"_load_image_set_index",
"(",
"self",
",",
"shuffle",
")",
":",
"self",
".",
"num_images",
"=",
"0",
"for",
"db",
"in",
"self",
".",
"imdbs",
":",
"self",
".",
"num_images",
"+=",
"db",
".",
"num_images",
"indices",
"=",
"list",
"(",
"range",
"(",
"self",
".",
"num_images",
")",
")",
"if",
"shuffle",
":",
"random",
".",
"shuffle",
"(",
"indices",
")",
"return",
"indices"
] |
get total number of images, init indices
Parameters
----------
shuffle : bool
whether to shuffle the initial indices
|
[
"get",
"total",
"number",
"of",
"images",
"init",
"indices"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/dataset/concat_db.py#L55-L70
|
train
|
Load image set indices.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_O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,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2148 - 2100) + '\157' + '\x33' + chr(0b100 + 0o61) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000001 + 0o56) + '\x33' + '\065' + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110001) + chr(519 - 465), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11111 + 0o23) + '\064' + chr(0b101011 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\x31' + chr(51) + chr(677 - 628), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(0b101010 + 0o6) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x37' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11318 - 11207) + chr(0b110011) + chr(0b11011 + 0o33) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(1161 - 1110) + chr(2228 - 2178), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + '\064', 33455 - 33447), ehT0Px3KOsy9(chr(755 - 707) + chr(111) + '\x31' + chr(2827 - 2773) + '\066', 3752 - 3744), ehT0Px3KOsy9(chr(0b110000) + chr(1911 - 1800) + chr(49) + chr(0b110011) + '\x31', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b11001 + 0o31) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(854 - 806) + '\157' + chr(0b110001 + 0o1) + chr(0b110000) + '\066', 63653 - 63645), ehT0Px3KOsy9('\060' + '\x6f' + '\064', 30378 - 30370), ehT0Px3KOsy9(chr(1593 - 1545) + '\x6f' + chr(0b10110 + 0o34) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(49) + chr(291 - 242), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1 + 0o156) + chr(2432 - 2382) + '\062' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(2193 - 2142) + '\062', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110001) + chr(2601 - 2547), 0o10), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + chr(49) + chr(0b1 + 0o64) + chr(1324 - 1275), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(5470 - 5359) + '\x31' + chr(0b100011 + 0o20) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + '\063' + '\x35' + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + chr(2161 - 2110) + '\062' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110010) + chr(2161 - 2109), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(1831 - 1778) + chr(0b10100 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + chr(52) + '\066', 45195 - 45187), ehT0Px3KOsy9(chr(1010 - 962) + chr(111) + chr(51) + chr(0b110110) + chr(1197 - 1143), 25491 - 25483), ehT0Px3KOsy9('\x30' + chr(3436 - 3325) + '\062' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(512 - 464) + '\x6f' + chr(51) + chr(0b101101 + 0o5) + chr(0b110011), 8), ehT0Px3KOsy9(chr(1199 - 1151) + chr(3754 - 3643) + chr(1544 - 1494) + '\x37' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x36' + chr(0b1110 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(709 - 661) + chr(0b1111 + 0o140) + '\062' + chr(0b1000 + 0o56), 8), ehT0Px3KOsy9(chr(1052 - 1004) + chr(0b111101 + 0o62) + chr(627 - 578) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(2429 - 2318) + '\063' + chr(1790 - 1738) + '\067', 57526 - 57518), ehT0Px3KOsy9(chr(1730 - 1682) + chr(0b111100 + 0o63) + chr(51) + chr(0b0 + 0o67) + chr(1525 - 1477), 0o10), ehT0Px3KOsy9('\x30' + chr(536 - 425) + chr(764 - 715) + '\x32' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(2080 - 2032) + chr(0b1101111) + chr(0b11101 + 0o26) + chr(1631 - 1576) + chr(821 - 771), 44127 - 44119), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x32' + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110011) + '\x37', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(53) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7'), chr(100) + chr(101) + '\x63' + '\x6f' + '\x64' + '\145')(chr(117) + '\164' + '\x66' + chr(0b100011 + 0o12) + chr(1561 - 1505)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def t7r_EIJicfdI(oVre8I6UXc3b, iVWwODfFXHPF):
oVre8I6UXc3b.xf2cgVKUh6ft = ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b101001 + 0o7), 0b1000)
for fXTenaqZmXyd in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\x87\xea\xc3*'), chr(6350 - 6250) + chr(5206 - 5105) + chr(0b1100011) + chr(0b1101111) + chr(0b1010 + 0o132) + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(45) + chr(0b111000))):
oVre8I6UXc3b.xf2cgVKUh6ft += fXTenaqZmXyd.xf2cgVKUh6ft
pIcoaXENl5Pw = YyaZ4tpXu4lf(vQr8gNKaIaWE(oVre8I6UXc3b.xf2cgVKUh6ft))
if iVWwODfFXHPF:
xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\x82\xfb\xc7?\xef\xde'), chr(0b1011011 + 0o11) + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(8612 - 8511))(chr(3961 - 3844) + chr(10062 - 9946) + '\146' + chr(252 - 207) + chr(2711 - 2655)))(pIcoaXENl5Pw)
return pIcoaXENl5Pw
|
apache/incubator-mxnet
|
example/ssd/dataset/concat_db.py
|
ConcatDB._locate_index
|
def _locate_index(self, index):
"""
given index, find out sub-db and sub-index
Parameters
----------
index : int
index of a specific image
Returns
----------
a tuple (sub-db, sub-index)
"""
assert index >= 0 and index < self.num_images, "index out of range"
pos = self.image_set_index[index]
for k, v in enumerate(self.imdbs):
if pos >= v.num_images:
pos -= v.num_images
else:
return (k, pos)
|
python
|
def _locate_index(self, index):
"""
given index, find out sub-db and sub-index
Parameters
----------
index : int
index of a specific image
Returns
----------
a tuple (sub-db, sub-index)
"""
assert index >= 0 and index < self.num_images, "index out of range"
pos = self.image_set_index[index]
for k, v in enumerate(self.imdbs):
if pos >= v.num_images:
pos -= v.num_images
else:
return (k, pos)
|
[
"def",
"_locate_index",
"(",
"self",
",",
"index",
")",
":",
"assert",
"index",
">=",
"0",
"and",
"index",
"<",
"self",
".",
"num_images",
",",
"\"index out of range\"",
"pos",
"=",
"self",
".",
"image_set_index",
"[",
"index",
"]",
"for",
"k",
",",
"v",
"in",
"enumerate",
"(",
"self",
".",
"imdbs",
")",
":",
"if",
"pos",
">=",
"v",
".",
"num_images",
":",
"pos",
"-=",
"v",
".",
"num_images",
"else",
":",
"return",
"(",
"k",
",",
"pos",
")"
] |
given index, find out sub-db and sub-index
Parameters
----------
index : int
index of a specific image
Returns
----------
a tuple (sub-db, sub-index)
|
[
"given",
"index",
"find",
"out",
"sub",
"-",
"db",
"and",
"sub",
"-",
"index"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/ssd/dataset/concat_db.py#L72-L91
|
train
|
Given an index find out sub - db and sub - index.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,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6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110100) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(52) + chr(0b11000 + 0o37), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\x32' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(1600 - 1489) + chr(50) + chr(0b110100) + '\060', 0b1000), ehT0Px3KOsy9(chr(2037 - 1989) + chr(0b1101111) + chr(51) + chr(711 - 658) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b11110 + 0o26), 0o10), ehT0Px3KOsy9(chr(1382 - 1334) + '\157' + chr(0b110001) + chr(0b10101 + 0o35) + chr(0b101101 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(684 - 635) + chr(0b101010 + 0o6) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010111 + 0o30) + chr(51) + chr(55) + chr(0b101011 + 0o5), 0b1000), ehT0Px3KOsy9(chr(1088 - 1040) + chr(111) + chr(50) + chr(53) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(2571 - 2516) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(51) + chr(48) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3081 - 2970) + '\x31', 2716 - 2708), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\067' + chr(0b1101 + 0o44), 4856 - 4848), ehT0Px3KOsy9(chr(1610 - 1562) + chr(0b1101111) + chr(1431 - 1381) + chr(0b1011 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + chr(0b110010) + chr(52) + chr(0b110111), 24467 - 24459), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(48) + chr(49), 0b1000), ehT0Px3KOsy9(chr(1961 - 1913) + '\157' + '\063' + chr(0b110011) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b111 + 0o54) + chr(418 - 363) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(52) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\x37' + '\x31', 6681 - 6673), ehT0Px3KOsy9(chr(1515 - 1467) + '\x6f' + chr(1750 - 1695) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011 + 0o144) + chr(0b110010) + chr(1336 - 1287) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(1176 - 1123) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b1101 + 0o46) + '\x32', 32570 - 32562), ehT0Px3KOsy9('\060' + chr(6325 - 6214) + '\x33' + '\065' + chr(0b11000 + 0o30), 54257 - 54249), ehT0Px3KOsy9(chr(48) + chr(2626 - 2515) + chr(55 - 4) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + chr(629 - 578) + chr(1335 - 1286) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\x32' + '\063', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(192 - 141) + chr(0b11101 + 0o24), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3873 - 3762) + chr(1890 - 1838) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110011) + '\061', 21424 - 21416), ehT0Px3KOsy9('\x30' + chr(1927 - 1816) + chr(0b1110 + 0o45) + '\060' + chr(0b111 + 0o51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + '\061' + chr(53) + '\x30', 8960 - 8952), ehT0Px3KOsy9(chr(744 - 696) + chr(0b1101111) + chr(0b110001) + chr(0b10100 + 0o43) + chr(2012 - 1964), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110 + 0o57) + chr(2431 - 2379), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b101100 + 0o103) + '\062' + '\061' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6191 - 6080) + '\x31' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1492 - 1441) + chr(194 - 142) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b11101 + 0o26) + '\066', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b10101 + 0o40) + chr(947 - 899), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd'), chr(0b1100100) + chr(101) + '\143' + '\157' + chr(100) + chr(101))(chr(7479 - 7362) + chr(7420 - 7304) + chr(7342 - 7240) + chr(0b111 + 0o46) + chr(2963 - 2907)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def diqO0B0b4851(oVre8I6UXc3b, XdowRbJKZWL9):
assert XdowRbJKZWL9 >= ehT0Px3KOsy9('\060' + '\157' + '\x30', 0b1000) and XdowRbJKZWL9 < xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b\x81\xa0\xc3\x8aZ\x1d\x17\x90\x9b\xdd\xb5'), '\x64' + '\x65' + chr(99) + '\157' + '\144' + chr(0b100011 + 0o102))(chr(4487 - 4370) + chr(116) + chr(102) + chr(0b11111 + 0o16) + chr(56))), xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a\x89\xf6\xc5\x95,97\x8c\x8d\xd4\xa7!\x8br\xc9&\xb9'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(9635 - 9535) + '\x65')(chr(0b110111 + 0o76) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000))
NXd0aqYJd4lK = oVre8I6UXc3b.image_set_index[XdowRbJKZWL9]
for (OolUPRJhRaJd, cMbll0QYhULo) in YlkZvXL8qwsX(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a\x8a\xf6\xc2\x9e'), '\x64' + chr(7663 - 7562) + chr(627 - 528) + chr(0b1101111) + '\144' + chr(0b1001100 + 0o31))('\165' + chr(0b1110100) + '\x66' + '\055' + '\070'))):
if NXd0aqYJd4lK >= xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b\x81\xa0\xc3\x8aZ\x1d\x17\x90\x9b\xdd\xb5'), chr(1087 - 987) + chr(0b10110 + 0o117) + chr(0b1100011) + chr(1843 - 1732) + '\144' + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b110111 + 0o1))):
NXd0aqYJd4lK -= cMbll0QYhULo.xf2cgVKUh6ft
else:
return (OolUPRJhRaJd, NXd0aqYJd4lK)
|
apache/incubator-mxnet
|
example/ssd/dataset/concat_db.py
|
ConcatDB.image_path_from_index
|
def image_path_from_index(self, index):
"""
given image index, find out full path
Parameters
----------
index: int
index of a specific image
Returns
----------
full path of this image
"""
assert self.image_set_index is not None, "Dataset not initialized"
pos = self.image_set_index[index]
n_db, n_index = self._locate_index(index)
return self.imdbs[n_db].image_path_from_index(n_index)
|
python
|
def image_path_from_index(self, index):
"""
given image index, find out full path
Parameters
----------
index: int
index of a specific image
Returns
----------
full path of this image
"""
assert self.image_set_index is not None, "Dataset not initialized"
pos = self.image_set_index[index]
n_db, n_index = self._locate_index(index)
return self.imdbs[n_db].image_path_from_index(n_index)
|
[
"def",
"image_path_from_index",
"(",
"self",
",",
"index",
")",
":",
"assert",
"self",
".",
"image_set_index",
"is",
"not",
"None",
",",
"\"Dataset not initialized\"",
"pos",
"=",
"self",
".",
"image_set_index",
"[",
"index",
"]",
"n_db",
",",
"n_index",
"=",
"self",
".",
"_locate_index",
"(",
"index",
")",
"return",
"self",
".",
"imdbs",
"[",
"n_db",
"]",
".",
"image_path_from_index",
"(",
"n_index",
")"
] |
given image index, find out full path
Parameters
----------
index: int
index of a specific image
Returns
----------
full path of this image
|
[
"given",
"image",
"index",
"find",
"out",
"full",
"path"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/bl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,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(1929 - 1877), 47396 - 47388), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + '\062' + chr(0b110001) + chr(51), 0o10), ehT0Px3KOsy9(chr(824 - 776) + chr(10194 - 10083) + '\x33' + chr(0b11000 + 0o34) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1907 - 1859) + '\157' + chr(50) + chr(0b1011 + 0o54) + chr(0b10001 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(1548 - 1500) + '\157' + '\062' + '\x33' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(1697 - 1648) + '\x37' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001000 + 0o47) + '\x36' + chr(2034 - 1982), 41417 - 41409), ehT0Px3KOsy9(chr(430 - 382) + '\157' + chr(0b110000 + 0o3) + chr(0b10001 + 0o44) + chr(54), 0o10), ehT0Px3KOsy9(chr(2022 - 1974) + chr(8957 - 8846) + chr(1954 - 1903) + chr(0b100110 + 0o12) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(855 - 806) + chr(0b110011) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(2018 - 1970) + chr(0b1101111) + chr(0b1100 + 0o46) + chr(0b1001 + 0o55) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5961 - 5850) + chr(0b110001) + '\063' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(0b10110 + 0o35) + '\060' + chr(0b110101 + 0o2), 8), ehT0Px3KOsy9(chr(184 - 136) + chr(111) + '\067' + '\066', 0o10), ehT0Px3KOsy9(chr(235 - 187) + chr(0b1101111) + '\x33' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11100 + 0o30) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(50) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110001) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(437 - 382) + chr(2313 - 2264), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1078 - 1028) + chr(0b110011) + chr(48), 7749 - 7741), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1010101 + 0o32) + '\063' + chr(0b110110) + '\061', 0o10), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(51) + chr(0b1011 + 0o54) + chr(0b100100 + 0o21), 58422 - 58414), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\067' + chr(53), 42733 - 42725), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b110000) + chr(0b1000 + 0o51), 0b1000), ehT0Px3KOsy9(chr(656 - 608) + chr(4345 - 4234) + chr(0b100000 + 0o26) + chr(0b101011 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(3211 - 3100) + chr(0b110011) + chr(0b110111) + chr(2097 - 2048), 8), ehT0Px3KOsy9(chr(1318 - 1270) + chr(0b1101111) + '\x31' + '\061', 3046 - 3038), ehT0Px3KOsy9(chr(1310 - 1262) + '\157' + chr(49) + chr(0b100010 + 0o16) + chr(0b1011 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(868 - 820) + '\x6f' + chr(0b101001 + 0o12) + chr(720 - 668) + '\062', 8), ehT0Px3KOsy9('\060' + chr(11295 - 11184) + '\x31' + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(48) + chr(0b110001 + 0o2), 0b1000), ehT0Px3KOsy9(chr(1606 - 1558) + '\x6f' + '\x31' + '\x34' + chr(0b110101), 63204 - 63196), ehT0Px3KOsy9(chr(2217 - 2169) + '\157' + chr(0b110011) + chr(51) + chr(54), 0o10), ehT0Px3KOsy9(chr(1834 - 1786) + chr(0b1101111) + chr(833 - 784) + '\060' + chr(2489 - 2437), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(55) + '\066', 47124 - 47116), ehT0Px3KOsy9('\x30' + chr(925 - 814) + '\x37' + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110010 + 0o75) + chr(670 - 621) + '\061' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\062' + chr(53) + chr(0b10011 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10 + 0o60) + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\066' + chr(0b11000 + 0o36), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1928 - 1880) + chr(111) + '\x35' + chr(71 - 23), 43812 - 43804)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(0b1100100) + '\145' + chr(2010 - 1911) + chr(883 - 772) + chr(2980 - 2880) + '\x65')(chr(0b1000101 + 0o60) + chr(0b110111 + 0o75) + chr(4552 - 4450) + chr(0b101101) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zI9zRIe43_Vm(oVre8I6UXc3b, XdowRbJKZWL9):
assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'm\xe6\x83\xde\xfb#G\x8b\xb3\x02\xde5\xa3[g'), chr(0b1100100) + chr(101) + '\143' + chr(111) + chr(0b100010 + 0o102) + chr(0b1010111 + 0o16))(chr(0b1011101 + 0o30) + '\164' + '\x66' + chr(45) + chr(0b11011 + 0o35))) is not None, xafqLlk3kkUe(SXOLrMavuUCe(b'@\xea\x96\xd8\xed\x19@\xce\xa92\xc3{\xaePvV\xbe\xa9\x95\xf1\x8b\x98\xd9'), '\x64' + chr(101) + chr(99) + '\157' + chr(1785 - 1685) + '\x65')(chr(117) + chr(6220 - 6104) + '\x66' + chr(0b0 + 0o55) + '\x38')
NXd0aqYJd4lK = oVre8I6UXc3b.image_set_index[XdowRbJKZWL9]
(ds_Jj422nEcX, zUNlEHopzGfD) = oVre8I6UXc3b._locate_index(XdowRbJKZWL9)
return xafqLlk3kkUe(oVre8I6UXc3b.imdbs[ds_Jj422nEcX], xafqLlk3kkUe(SXOLrMavuUCe(b'm\xe6\x83\xde\xfb#D\x8f\xb35\xe8=\xb5Qr}\xbe\xa6\x9d\xfd\x89'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + chr(2001 - 1901) + chr(101))(chr(4805 - 4688) + '\x74' + chr(8521 - 8419) + '\x2d' + chr(589 - 533)))(zUNlEHopzGfD)
|
apache/incubator-mxnet
|
python/mxnet/callback.py
|
module_checkpoint
|
def module_checkpoint(mod, prefix, period=1, save_optimizer_states=False):
"""Callback to checkpoint Module to prefix every epoch.
Parameters
----------
mod : subclass of BaseModule
The module to checkpoint.
prefix : str
The file prefix for this checkpoint.
period : int
How many epochs to wait before checkpointing. Defaults to 1.
save_optimizer_states : bool
Indicates whether or not to save optimizer states for continued training.
Returns
-------
callback : function
The callback function that can be passed as iter_end_callback to fit.
"""
period = int(max(1, period))
# pylint: disable=unused-argument
def _callback(iter_no, sym=None, arg=None, aux=None):
"""The checkpoint function."""
if (iter_no + 1) % period == 0:
mod.save_checkpoint(prefix, iter_no + 1, save_optimizer_states)
return _callback
|
python
|
def module_checkpoint(mod, prefix, period=1, save_optimizer_states=False):
"""Callback to checkpoint Module to prefix every epoch.
Parameters
----------
mod : subclass of BaseModule
The module to checkpoint.
prefix : str
The file prefix for this checkpoint.
period : int
How many epochs to wait before checkpointing. Defaults to 1.
save_optimizer_states : bool
Indicates whether or not to save optimizer states for continued training.
Returns
-------
callback : function
The callback function that can be passed as iter_end_callback to fit.
"""
period = int(max(1, period))
# pylint: disable=unused-argument
def _callback(iter_no, sym=None, arg=None, aux=None):
"""The checkpoint function."""
if (iter_no + 1) % period == 0:
mod.save_checkpoint(prefix, iter_no + 1, save_optimizer_states)
return _callback
|
[
"def",
"module_checkpoint",
"(",
"mod",
",",
"prefix",
",",
"period",
"=",
"1",
",",
"save_optimizer_states",
"=",
"False",
")",
":",
"period",
"=",
"int",
"(",
"max",
"(",
"1",
",",
"period",
")",
")",
"# pylint: disable=unused-argument",
"def",
"_callback",
"(",
"iter_no",
",",
"sym",
"=",
"None",
",",
"arg",
"=",
"None",
",",
"aux",
"=",
"None",
")",
":",
"\"\"\"The checkpoint function.\"\"\"",
"if",
"(",
"iter_no",
"+",
"1",
")",
"%",
"period",
"==",
"0",
":",
"mod",
".",
"save_checkpoint",
"(",
"prefix",
",",
"iter_no",
"+",
"1",
",",
"save_optimizer_states",
")",
"return",
"_callback"
] |
Callback to checkpoint Module to prefix every epoch.
Parameters
----------
mod : subclass of BaseModule
The module to checkpoint.
prefix : str
The file prefix for this checkpoint.
period : int
How many epochs to wait before checkpointing. Defaults to 1.
save_optimizer_states : bool
Indicates whether or not to save optimizer states for continued training.
Returns
-------
callback : function
The callback function that can be passed as iter_end_callback to fit.
|
[
"Callback",
"to",
"checkpoint",
"Module",
"to",
"prefix",
"every",
"epoch",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/callback.py#L27-L52
|
train
|
Callback to checkpoint a module to prefix every epoch.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCV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reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + '\064' + chr(2934 - 2879), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(51) + chr(0b11000 + 0o31), 0o10), ehT0Px3KOsy9(chr(1607 - 1559) + '\x6f' + '\061' + chr(0b110010) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1000000 + 0o57) + '\x33' + '\065' + '\060', 0b1000), ehT0Px3KOsy9(chr(1564 - 1516) + chr(4592 - 4481) + chr(1729 - 1677) + chr(984 - 931), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(51) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(3977 - 3866) + chr(0b110011) + chr(50) + chr(436 - 385), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b101 + 0o62) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1385 - 1337) + '\x6f' + chr(55) + chr(0b110110), 23632 - 23624), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\066' + chr(0b11 + 0o63), 0o10), ehT0Px3KOsy9(chr(1418 - 1370) + chr(6910 - 6799) + chr(51) + chr(49) + chr(663 - 613), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b100110 + 0o111) + chr(49) + chr(0b10011 + 0o41) + chr(0b10000 + 0o44), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\x30' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(890 - 842) + chr(0b1101111) + chr(52) + chr(0b10010 + 0o44), 60316 - 60308), ehT0Px3KOsy9(chr(0b110000) + chr(11078 - 10967) + '\x31' + chr(50) + chr(0b1110 + 0o51), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10101 + 0o35) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + '\x31' + chr(0b11110 + 0o30) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1768 - 1657) + chr(50) + '\067' + chr(0b11111 + 0o21), 39581 - 39573), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110001) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8774 - 8663) + chr(0b110001) + chr(257 - 203) + '\067', 0o10), ehT0Px3KOsy9(chr(672 - 624) + '\x6f' + chr(2083 - 2033) + chr(50) + chr(0b101000 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(0b110001) + chr(1102 - 1052) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(0b100011 + 0o17) + chr(856 - 802) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b111100 + 0o63) + chr(51) + chr(2591 - 2538) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x36' + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b1000101 + 0o52) + chr(0b1011 + 0o46) + '\061' + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b111 + 0o57) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1542 - 1494) + chr(8717 - 8606) + chr(2046 - 1995) + chr(52) + chr(344 - 290), 50668 - 50660), ehT0Px3KOsy9(chr(1625 - 1577) + chr(111) + chr(55) + '\067', 41492 - 41484), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(0b110000) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(0b101 + 0o61) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7924 - 7813) + '\x33' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x33' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110001), 845 - 837), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x36' + '\067', 22462 - 22454), ehT0Px3KOsy9(chr(1123 - 1075) + chr(0b1101111) + chr(0b110011) + '\x34' + '\x37', 12 - 4), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b101100 + 0o6) + chr(311 - 258), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + '\x32' + chr(48) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7287 - 7176) + chr(668 - 619) + chr(0b11100 + 0o24) + chr(48), 33877 - 33869)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(494 - 441) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\t'), chr(287 - 187) + '\x65' + '\x63' + chr(0b1101111) + chr(8095 - 7995) + chr(101))(chr(0b1110101) + '\x74' + chr(0b100101 + 0o101) + '\x2d' + chr(2280 - 2224)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def EwevQJspRJKK(JHJR37KvkQhF, K1Ha0XjJTAE7, JKfNLw_NGs6k=ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(10053 - 9942) + chr(0b110001), 59967 - 59959), NOVHlewTW2ug=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', 0o10)):
JKfNLw_NGs6k = ehT0Px3KOsy9(tsdjvlgh9gDP(ehT0Px3KOsy9('\060' + chr(111) + chr(49), 8), JKfNLw_NGs6k))
def Mb3NlvW3npah(ZV3UD0feZaab, I7QF3KlS7cYz=None, LTE9MPUbqSos=None, bwxMVhRdvLNk=None):
if (ZV3UD0feZaab + ehT0Px3KOsy9(chr(603 - 555) + chr(111) + chr(0b110001), 8)) % JKfNLw_NGs6k == ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(0b110000), 8):
xafqLlk3kkUe(JHJR37KvkQhF, xafqLlk3kkUe(SXOLrMavuUCe(b'T8"\x8dz<\xbb\x1a]\x1d\xba\x0b+H#'), chr(9358 - 9258) + chr(0b1100101) + chr(99) + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(0b100001 + 0o123) + '\146' + chr(45) + chr(2619 - 2563)))(K1Ha0XjJTAE7, ZV3UD0feZaab + ehT0Px3KOsy9(chr(0b110000) + chr(8127 - 8016) + chr(0b110001), 8), NOVHlewTW2ug)
return Mb3NlvW3npah
|
apache/incubator-mxnet
|
python/mxnet/callback.py
|
do_checkpoint
|
def do_checkpoint(prefix, period=1):
"""A callback that saves a model checkpoint every few epochs.
Each checkpoint is made up of a couple of binary files: a model description file and a
parameters (weights and biases) file. The model description file is named
`prefix`--symbol.json and the parameters file is named `prefix`-`epoch_number`.params
Parameters
----------
prefix : str
Prefix for the checkpoint filenames.
period : int, optional
Interval (number of epochs) between checkpoints. Default `period` is 1.
Returns
-------
callback : function
A callback function that can be passed as `epoch_end_callback` to fit.
Example
-------
>>> module.fit(iterator, num_epoch=n_epoch,
... epoch_end_callback = mx.callback.do_checkpoint("mymodel", 1))
Start training with [cpu(0)]
Epoch[0] Resetting Data Iterator
Epoch[0] Time cost=0.100
Saved checkpoint to "mymodel-0001.params"
Epoch[1] Resetting Data Iterator
Epoch[1] Time cost=0.060
Saved checkpoint to "mymodel-0002.params"
"""
period = int(max(1, period))
def _callback(iter_no, sym, arg, aux):
"""The checkpoint function."""
if (iter_no + 1) % period == 0:
save_checkpoint(prefix, iter_no + 1, sym, arg, aux)
return _callback
|
python
|
def do_checkpoint(prefix, period=1):
"""A callback that saves a model checkpoint every few epochs.
Each checkpoint is made up of a couple of binary files: a model description file and a
parameters (weights and biases) file. The model description file is named
`prefix`--symbol.json and the parameters file is named `prefix`-`epoch_number`.params
Parameters
----------
prefix : str
Prefix for the checkpoint filenames.
period : int, optional
Interval (number of epochs) between checkpoints. Default `period` is 1.
Returns
-------
callback : function
A callback function that can be passed as `epoch_end_callback` to fit.
Example
-------
>>> module.fit(iterator, num_epoch=n_epoch,
... epoch_end_callback = mx.callback.do_checkpoint("mymodel", 1))
Start training with [cpu(0)]
Epoch[0] Resetting Data Iterator
Epoch[0] Time cost=0.100
Saved checkpoint to "mymodel-0001.params"
Epoch[1] Resetting Data Iterator
Epoch[1] Time cost=0.060
Saved checkpoint to "mymodel-0002.params"
"""
period = int(max(1, period))
def _callback(iter_no, sym, arg, aux):
"""The checkpoint function."""
if (iter_no + 1) % period == 0:
save_checkpoint(prefix, iter_no + 1, sym, arg, aux)
return _callback
|
[
"def",
"do_checkpoint",
"(",
"prefix",
",",
"period",
"=",
"1",
")",
":",
"period",
"=",
"int",
"(",
"max",
"(",
"1",
",",
"period",
")",
")",
"def",
"_callback",
"(",
"iter_no",
",",
"sym",
",",
"arg",
",",
"aux",
")",
":",
"\"\"\"The checkpoint function.\"\"\"",
"if",
"(",
"iter_no",
"+",
"1",
")",
"%",
"period",
"==",
"0",
":",
"save_checkpoint",
"(",
"prefix",
",",
"iter_no",
"+",
"1",
",",
"sym",
",",
"arg",
",",
"aux",
")",
"return",
"_callback"
] |
A callback that saves a model checkpoint every few epochs.
Each checkpoint is made up of a couple of binary files: a model description file and a
parameters (weights and biases) file. The model description file is named
`prefix`--symbol.json and the parameters file is named `prefix`-`epoch_number`.params
Parameters
----------
prefix : str
Prefix for the checkpoint filenames.
period : int, optional
Interval (number of epochs) between checkpoints. Default `period` is 1.
Returns
-------
callback : function
A callback function that can be passed as `epoch_end_callback` to fit.
Example
-------
>>> module.fit(iterator, num_epoch=n_epoch,
... epoch_end_callback = mx.callback.do_checkpoint("mymodel", 1))
Start training with [cpu(0)]
Epoch[0] Resetting Data Iterator
Epoch[0] Time cost=0.100
Saved checkpoint to "mymodel-0001.params"
Epoch[1] Resetting Data Iterator
Epoch[1] Time cost=0.060
Saved checkpoint to "mymodel-0002.params"
|
[
"A",
"callback",
"that",
"saves",
"a",
"model",
"checkpoint",
"every",
"few",
"epochs",
".",
"Each",
"checkpoint",
"is",
"made",
"up",
"of",
"a",
"couple",
"of",
"binary",
"files",
":",
"a",
"model",
"description",
"file",
"and",
"a",
"parameters",
"(",
"weights",
"and",
"biases",
")",
"file",
".",
"The",
"model",
"description",
"file",
"is",
"named",
"prefix",
"--",
"symbol",
".",
"json",
"and",
"the",
"parameters",
"file",
"is",
"named",
"prefix",
"-",
"epoch_number",
".",
"params"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/callback.py#L55-L90
|
train
|
A callback that saves a model checkpoint every few epochs.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E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EN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1818 - 1770) + '\x6f' + '\062' + chr(54) + '\065', 62812 - 62804), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(1941 - 1886) + chr(617 - 566), 0b1000), ehT0Px3KOsy9(chr(1604 - 1556) + '\157' + chr(0b111 + 0o54) + chr(2347 - 2296) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b110010) + '\064' + chr(0b110001), 61856 - 61848), ehT0Px3KOsy9(chr(0b110000) + chr(8748 - 8637) + chr(132 - 83) + '\061' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7420 - 7309) + chr(84 - 35) + chr(52) + chr(0b11111 + 0o24), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\x36' + chr(0b110 + 0o57), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110111) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b100101 + 0o14) + chr(0b110 + 0o60), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(0b110100) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(50) + '\067', 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(2140 - 2091) + '\060' + chr(0b11110 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110100) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b10 + 0o155) + chr(0b110000 + 0o1) + '\061', 0o10), ehT0Px3KOsy9(chr(774 - 726) + chr(111) + '\063' + chr(0b110001) + '\064', 0o10), ehT0Px3KOsy9(chr(894 - 846) + chr(0b1100100 + 0o13) + chr(0b110011 + 0o0) + chr(0b110000) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + '\062' + chr(52) + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b100110 + 0o13) + '\x36' + chr(0b101110 + 0o4), 15399 - 15391), ehT0Px3KOsy9(chr(331 - 283) + chr(111) + chr(0b110010) + chr(2233 - 2180) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(619 - 568), 0o10), ehT0Px3KOsy9(chr(804 - 756) + '\157' + '\x32' + chr(0b110101), 16422 - 16414), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(2227 - 2176) + '\067' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(11365 - 11254) + chr(0b10101 + 0o35) + chr(48) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1069 - 1021) + chr(2013 - 1902) + chr(0b1111 + 0o42) + '\062' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(1789 - 1741), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(1227 - 1177), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111 + 0o0) + chr(0b10101 + 0o36) + chr(55) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1884 - 1836) + chr(111) + chr(1034 - 983) + '\060' + chr(0b110011), 8), ehT0Px3KOsy9(chr(48) + chr(6596 - 6485) + '\x35' + '\060', 63710 - 63702), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110011) + chr(0b101101 + 0o12) + chr(0b101000 + 0o13), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101011 + 0o7) + chr(193 - 139) + chr(0b11000 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(53) + chr(1313 - 1263), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10011 + 0o40) + chr(0b100001 + 0o25) + chr(0b110001), 38267 - 38259), ehT0Px3KOsy9('\x30' + chr(5159 - 5048) + chr(0b10 + 0o57) + chr(0b100011 + 0o20) + '\064', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 13389 - 13381), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(967 - 917) + '\x35' + chr(0b101110 + 0o7), 8), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(2336 - 2283) + chr(0b101010 + 0o11), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(0b110001) + '\066' + chr(0b10010 + 0o45), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1217 - 1169) + chr(111) + chr(53) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b'), '\144' + '\145' + chr(0b1001110 + 0o25) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ShAHYgALVXVo(K1Ha0XjJTAE7, JKfNLw_NGs6k=ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x31', 8)):
JKfNLw_NGs6k = ehT0Px3KOsy9(tsdjvlgh9gDP(ehT0Px3KOsy9('\x30' + chr(0b1 + 0o156) + '\061', 8), JKfNLw_NGs6k))
def Mb3NlvW3npah(ZV3UD0feZaab, I7QF3KlS7cYz, LTE9MPUbqSos, bwxMVhRdvLNk):
if (ZV3UD0feZaab + ehT0Px3KOsy9(chr(988 - 940) + chr(111) + chr(49), 8)) % JKfNLw_NGs6k == ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(0b100001 + 0o17), 40874 - 40866):
igibI87Qc8pR(K1Ha0XjJTAE7, ZV3UD0feZaab + ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + '\x31', 8), I7QF3KlS7cYz, LTE9MPUbqSos, bwxMVhRdvLNk)
return Mb3NlvW3npah
|
apache/incubator-mxnet
|
python/mxnet/callback.py
|
log_train_metric
|
def log_train_metric(period, auto_reset=False):
"""Callback to log the training evaluation result every period.
Parameters
----------
period : int
The number of batch to log the training evaluation metric.
auto_reset : bool
Reset the metric after each log.
Returns
-------
callback : function
The callback function that can be passed as iter_epoch_callback to fit.
"""
def _callback(param):
"""The checkpoint function."""
if param.nbatch % period == 0 and param.eval_metric is not None:
name_value = param.eval_metric.get_name_value()
for name, value in name_value:
logging.info('Iter[%d] Batch[%d] Train-%s=%f',
param.epoch, param.nbatch, name, value)
if auto_reset:
param.eval_metric.reset_local()
return _callback
|
python
|
def log_train_metric(period, auto_reset=False):
"""Callback to log the training evaluation result every period.
Parameters
----------
period : int
The number of batch to log the training evaluation metric.
auto_reset : bool
Reset the metric after each log.
Returns
-------
callback : function
The callback function that can be passed as iter_epoch_callback to fit.
"""
def _callback(param):
"""The checkpoint function."""
if param.nbatch % period == 0 and param.eval_metric is not None:
name_value = param.eval_metric.get_name_value()
for name, value in name_value:
logging.info('Iter[%d] Batch[%d] Train-%s=%f',
param.epoch, param.nbatch, name, value)
if auto_reset:
param.eval_metric.reset_local()
return _callback
|
[
"def",
"log_train_metric",
"(",
"period",
",",
"auto_reset",
"=",
"False",
")",
":",
"def",
"_callback",
"(",
"param",
")",
":",
"\"\"\"The checkpoint function.\"\"\"",
"if",
"param",
".",
"nbatch",
"%",
"period",
"==",
"0",
"and",
"param",
".",
"eval_metric",
"is",
"not",
"None",
":",
"name_value",
"=",
"param",
".",
"eval_metric",
".",
"get_name_value",
"(",
")",
"for",
"name",
",",
"value",
"in",
"name_value",
":",
"logging",
".",
"info",
"(",
"'Iter[%d] Batch[%d] Train-%s=%f'",
",",
"param",
".",
"epoch",
",",
"param",
".",
"nbatch",
",",
"name",
",",
"value",
")",
"if",
"auto_reset",
":",
"param",
".",
"eval_metric",
".",
"reset_local",
"(",
")",
"return",
"_callback"
] |
Callback to log the training evaluation result every period.
Parameters
----------
period : int
The number of batch to log the training evaluation metric.
auto_reset : bool
Reset the metric after each log.
Returns
-------
callback : function
The callback function that can be passed as iter_epoch_callback to fit.
|
[
"Callback",
"to",
"log",
"the",
"training",
"evaluation",
"result",
"every",
"period",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/callback.py#L93-L117
|
train
|
Callback to log the training evaluation result every period.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6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px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(601 - 553) + chr(0b11000 + 0o127) + '\x31' + chr(0b11101 + 0o24) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b10000 + 0o42), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1440 - 1391) + chr(2079 - 2024) + chr(2185 - 2137), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101 + 0o55) + chr(51) + chr(493 - 440), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b110111) + '\060', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(2119 - 2067) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(635 - 584) + chr(1281 - 1226) + chr(54), 31898 - 31890), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(1117 - 1067) + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + chr(1052 - 1002) + chr(49) + chr(0b110111), 57285 - 57277), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(2250 - 2199) + chr(0b110010 + 0o3), 8), ehT0Px3KOsy9(chr(1081 - 1033) + '\x6f' + chr(50) + chr(62 - 10), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\061' + chr(2369 - 2318), 0o10), ehT0Px3KOsy9(chr(48) + chr(4248 - 4137) + '\063' + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b100 + 0o63), 0o10), ehT0Px3KOsy9('\x30' + chr(11917 - 11806) + '\x33' + chr(2244 - 2190) + chr(51), 0o10), ehT0Px3KOsy9(chr(935 - 887) + chr(0b1101011 + 0o4) + chr(631 - 580) + '\x36' + chr(157 - 106), 8), ehT0Px3KOsy9(chr(963 - 915) + '\x6f' + chr(0b110011) + '\x30' + chr(489 - 438), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(2033 - 1979), 0o10), ehT0Px3KOsy9('\060' + chr(5532 - 5421) + chr(2248 - 2197) + '\065' + chr(0b110011), 15223 - 15215), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b11101 + 0o25) + '\061' + chr(0b100011 + 0o15), 0o10), ehT0Px3KOsy9(chr(1354 - 1306) + '\x6f' + chr(0b11110 + 0o25) + chr(0b101110 + 0o7) + '\x33', 8), ehT0Px3KOsy9(chr(1626 - 1578) + chr(111) + '\062' + chr(0b10111 + 0o33), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x37' + chr(48), 52114 - 52106), ehT0Px3KOsy9('\x30' + chr(111) + chr(228 - 179) + chr(0b10110 + 0o36) + chr(2161 - 2106), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + '\062' + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1434 - 1382) + chr(1101 - 1048), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(51) + chr(1410 - 1362) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(2014 - 1966) + chr(0b1101111) + chr(0b110001 + 0o2) + '\x37' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101011 + 0o7) + '\x31' + chr(297 - 243), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\060' + chr(48), 22259 - 22251), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(50), 8), ehT0Px3KOsy9('\060' + chr(4309 - 4198) + '\061' + chr(1617 - 1566) + chr(1578 - 1525), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101100 + 0o103) + chr(50) + '\x37', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110010) + chr(160 - 105) + chr(1506 - 1455), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110110) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(3848 - 3737) + '\062' + chr(0b110111) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11054 - 10943) + '\062' + chr(1233 - 1182) + chr(0b11110 + 0o30), 37831 - 37823), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011 + 0o0) + chr(48) + chr(54), 37952 - 37944), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(48) + '\x34', 24039 - 24031)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(847 - 799) + chr(5484 - 5373) + chr(53) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'd'), chr(100) + chr(1958 - 1857) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(11426 - 11309) + chr(0b100101 + 0o117) + chr(4860 - 4758) + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def rxLsOAECuDYl(JKfNLw_NGs6k, sTAtXo6iq59_=ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + chr(48), 0b1000)):
def Mb3NlvW3npah(NOaGA2BHucaX):
if xafqLlk3kkUe(NOaGA2BHucaX, xafqLlk3kkUe(SXOLrMavuUCe(b'$p\x19\xe9\x1b\x8c'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(4197 - 4097) + chr(0b1100001 + 0o4))(chr(0b1110101) + chr(0b110111 + 0o75) + '\146' + chr(0b101101) + chr(0b11110 + 0o32))) % JKfNLw_NGs6k == ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8) and xafqLlk3kkUe(NOaGA2BHucaX, xafqLlk3kkUe(SXOLrMavuUCe(b"/d\x19\xf1'\x89\x9b\xd0\xfd\xf4w"), chr(100) + chr(101) + chr(1479 - 1380) + chr(111) + chr(100) + chr(6403 - 6302))(chr(12356 - 12239) + chr(0b101 + 0o157) + chr(0b0 + 0o146) + '\x2d' + chr(0b111000))) is not None:
txDPuHgFzOFb = NOaGA2BHucaX.eval_metric.get_name_value()
for (AIvJRzLdDfgF, QmmgWUB13VCJ) in txDPuHgFzOFb:
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x19%0\xe5\r\x87\x99\x93\xe5\xf1N '), chr(210 - 110) + '\145' + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(0b1110011 + 0o2) + chr(12815 - 12699) + '\146' + chr(0b11 + 0o52) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x03f\x1d\xef#\xc1\x9a\xf9\xaf\xdfu?y\x7f\xa8\xd6\xa7[\xcb\xdc\x99s\x91\t=\xc0\xb3\xc2\x10\xe8'), chr(100) + chr(101) + chr(7949 - 7850) + chr(7730 - 7619) + chr(0b101010 + 0o72) + chr(0b111010 + 0o53))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + '\070'), xafqLlk3kkUe(NOaGA2BHucaX, xafqLlk3kkUe(SXOLrMavuUCe(b'/b\x17\xfe\x10'), chr(930 - 830) + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(0b1111 + 0o126))('\165' + '\x74' + '\x66' + chr(0b101101) + '\x38')), xafqLlk3kkUe(NOaGA2BHucaX, xafqLlk3kkUe(SXOLrMavuUCe(b'$p\x19\xe9\x1b\x8c'), chr(0b1100100) + chr(0b1001101 + 0o30) + '\143' + chr(9050 - 8939) + '\x64' + chr(0b1100101 + 0o0))(chr(0b11110 + 0o127) + chr(116) + chr(0b110010 + 0o64) + '\055' + '\070')), AIvJRzLdDfgF, QmmgWUB13VCJ)
if sTAtXo6iq59_:
xafqLlk3kkUe(NOaGA2BHucaX.eval_metric, xafqLlk3kkUe(SXOLrMavuUCe(b'8w\x0b\xf8\x0c\xbb\x92\xcb\xec\xfcx'), chr(100) + chr(0b1100101) + chr(0b100100 + 0o77) + chr(0b1101111) + '\144' + chr(0b100111 + 0o76))(chr(0b1110101) + '\x74' + chr(0b1000101 + 0o41) + chr(0b101010 + 0o3) + chr(0b111000)))()
return Mb3NlvW3npah
|
apache/incubator-mxnet
|
python/mxnet/monitor.py
|
Monitor.install
|
def install(self, exe):
"""install callback to executor.
Supports installing to multiple exes.
Parameters
----------
exe : mx.executor.Executor
The Executor (returned by symbol.bind) to install to.
"""
exe.set_monitor_callback(self.stat_helper, self.monitor_all)
self.exes.append(exe)
|
python
|
def install(self, exe):
"""install callback to executor.
Supports installing to multiple exes.
Parameters
----------
exe : mx.executor.Executor
The Executor (returned by symbol.bind) to install to.
"""
exe.set_monitor_callback(self.stat_helper, self.monitor_all)
self.exes.append(exe)
|
[
"def",
"install",
"(",
"self",
",",
"exe",
")",
":",
"exe",
".",
"set_monitor_callback",
"(",
"self",
".",
"stat_helper",
",",
"self",
".",
"monitor_all",
")",
"self",
".",
"exes",
".",
"append",
"(",
"exe",
")"
] |
install callback to executor.
Supports installing to multiple exes.
Parameters
----------
exe : mx.executor.Executor
The Executor (returned by symbol.bind) to install to.
|
[
"install",
"callback",
"to",
"executor",
".",
"Supports",
"installing",
"to",
"multiple",
"exes",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/monitor.py#L76-L86
|
train
|
Install callback to executor.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9Flf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BM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b101011 + 0o104) + '\x32' + chr(1796 - 1747), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110011) + chr(2223 - 2168), 0o10), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(0b110011) + '\x37' + '\x31', 0o10), ehT0Px3KOsy9(chr(169 - 121) + chr(111) + chr(473 - 424) + chr(419 - 367) + chr(669 - 619), 0b1000), ehT0Px3KOsy9(chr(872 - 824) + '\x6f' + chr(0b110101) + chr(2246 - 2193), ord("\x08")), ehT0Px3KOsy9(chr(835 - 787) + chr(111) + '\x35' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9469 - 9358) + chr(2283 - 2232) + chr(0b101 + 0o53) + chr(0b100101 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + '\062' + '\x33' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(49) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\x36' + '\067', 42148 - 42140), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1101 + 0o44) + '\x31' + chr(50), 2182 - 2174), ehT0Px3KOsy9(chr(957 - 909) + chr(0b100101 + 0o112) + chr(0b110010 + 0o5) + chr(2765 - 2711), 0b1000), ehT0Px3KOsy9(chr(1700 - 1652) + chr(111) + chr(2331 - 2280) + chr(53) + chr(2733 - 2679), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b10100 + 0o37) + chr(2260 - 2212) + chr(1727 - 1672), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(53) + '\062', 48683 - 48675), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(51) + chr(0b11110 + 0o23), 0o10), ehT0Px3KOsy9(chr(720 - 672) + '\x6f' + '\062' + '\062' + '\061', 60673 - 60665), ehT0Px3KOsy9('\x30' + chr(9542 - 9431) + chr(0b110011) + chr(388 - 340), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10111 + 0o34) + chr(0b110000) + chr(0b110000 + 0o0), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111000 + 0o67) + '\x33' + chr(1991 - 1943) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(264 - 213) + chr(48) + '\067', 8), ehT0Px3KOsy9('\060' + chr(10612 - 10501) + chr(0b1110 + 0o44) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(2100 - 2051) + chr(0b110100 + 0o2) + chr(0b100111 + 0o15), 39338 - 39330), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b110011) + chr(0b110100) + '\x31', 19483 - 19475), ehT0Px3KOsy9('\x30' + chr(5925 - 5814) + chr(1123 - 1074) + '\063' + chr(0b10 + 0o63), ord("\x08")), ehT0Px3KOsy9(chr(956 - 908) + chr(0b100000 + 0o117) + chr(49) + chr(0b101110 + 0o7) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(203 - 152) + chr(0b110100) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + chr(0b11010 + 0o31) + '\x31' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110000) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110111) + '\x30', 30321 - 30313), ehT0Px3KOsy9(chr(366 - 318) + chr(0b1101111) + chr(52) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10111 + 0o32) + '\x34' + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(2256 - 2206) + chr(0b110100 + 0o1) + '\x32', 8), ehT0Px3KOsy9(chr(1642 - 1594) + chr(0b100100 + 0o113) + chr(0b110001) + chr(0b110101) + chr(512 - 461), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1010 + 0o47) + '\x30' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + chr(0b110001) + chr(51) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + '\062' + '\065' + chr(2411 - 2356), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(9751 - 9640) + chr(0b110001) + chr(0b11100 + 0o25), 3505 - 3497), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(5769 - 5658) + chr(0b11 + 0o57) + '\x30' + chr(1252 - 1197), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b110101) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'?'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1001001 + 0o33) + chr(7674 - 7573))('\x75' + '\x74' + chr(0b101111 + 0o67) + '\055' + chr(2542 - 2486)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def R6Vym14MZ8vW(oVre8I6UXc3b, fuwbpiKmfMe7):
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'b\xba\x8d=@@\xac\xf4\xf9\xd88a\x8d\xa6\xc65\xf3y\xa3\xa8'), chr(9979 - 9879) + chr(2142 - 2041) + chr(99) + '\x6f' + chr(4148 - 4048) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b10001 + 0o125) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'b\xab\x98\x16rG\xa7\xf1\xfd\xd28'), chr(0b1101 + 0o127) + chr(3526 - 3425) + chr(1077 - 978) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b11010 + 0o132) + chr(0b1100110) + chr(45) + '\x38')), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xb0\x97\x0bY@\xb0\xc2\xec\xdb&'), chr(0b10001 + 0o123) + chr(0b1001 + 0o134) + chr(99) + '\157' + '\x64' + chr(101))(chr(6780 - 6663) + chr(116) + chr(5659 - 5557) + chr(0b10111 + 0o26) + chr(56))))
xafqLlk3kkUe(oVre8I6UXc3b.exes, xafqLlk3kkUe(SXOLrMavuUCe(b'p\xaf\x89\x07CK'), chr(0b1010010 + 0o22) + chr(3175 - 3074) + chr(0b1100011) + chr(0b110011 + 0o74) + chr(0b10100 + 0o120) + '\145')(chr(12290 - 12173) + chr(0b1110100) + chr(0b110101 + 0o61) + chr(0b101101) + chr(0b111000)))(fuwbpiKmfMe7)
|
apache/incubator-mxnet
|
python/mxnet/monitor.py
|
Monitor.tic
|
def tic(self):
"""Start collecting stats for current batch.
Call before calling forward."""
if self.step % self.interval == 0:
for exe in self.exes:
for array in exe.arg_arrays:
array.wait_to_read()
for array in exe.aux_arrays:
array.wait_to_read()
self.queue = []
self.activated = True
self.step += 1
|
python
|
def tic(self):
"""Start collecting stats for current batch.
Call before calling forward."""
if self.step % self.interval == 0:
for exe in self.exes:
for array in exe.arg_arrays:
array.wait_to_read()
for array in exe.aux_arrays:
array.wait_to_read()
self.queue = []
self.activated = True
self.step += 1
|
[
"def",
"tic",
"(",
"self",
")",
":",
"if",
"self",
".",
"step",
"%",
"self",
".",
"interval",
"==",
"0",
":",
"for",
"exe",
"in",
"self",
".",
"exes",
":",
"for",
"array",
"in",
"exe",
".",
"arg_arrays",
":",
"array",
".",
"wait_to_read",
"(",
")",
"for",
"array",
"in",
"exe",
".",
"aux_arrays",
":",
"array",
".",
"wait_to_read",
"(",
")",
"self",
".",
"queue",
"=",
"[",
"]",
"self",
".",
"activated",
"=",
"True",
"self",
".",
"step",
"+=",
"1"
] |
Start collecting stats for current batch.
Call before calling forward.
|
[
"Start",
"collecting",
"stats",
"for",
"current",
"batch",
".",
"Call",
"before",
"calling",
"forward",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/monitor.py#L88-L99
|
train
|
Start collecting stats for current batch.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3E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iX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b110011) + chr(0b101110 + 0o6), 61318 - 61310), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b100111 + 0o13) + chr(48), 11943 - 11935), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1492 - 1442) + '\x30' + chr(0b101101 + 0o5), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2259 - 2208) + '\x32' + chr(0b101111 + 0o7), 52213 - 52205), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + chr(0b11011 + 0o26) + chr(2627 - 2575) + chr(0b100 + 0o54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11101 + 0o24) + chr(0b1101 + 0o51), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(55) + chr(0b100101 + 0o22), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\x30' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + chr(53), 43250 - 43242), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100001 + 0o20) + '\x34' + chr(49), 0o10), ehT0Px3KOsy9(chr(1793 - 1745) + chr(111) + '\063' + '\x32' + chr(410 - 360), 0o10), ehT0Px3KOsy9(chr(1166 - 1118) + chr(8961 - 8850) + '\x32' + chr(0b110000) + chr(76 - 24), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b11 + 0o64) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11000 + 0o32) + chr(0b11 + 0o62) + chr(0b110101), 43677 - 43669), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(280 - 231) + '\062' + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + '\x32' + chr(49) + '\064', 61175 - 61167), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\060' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1159 - 1111) + chr(0b1101111) + '\x33' + '\x32' + chr(0b1001 + 0o55), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1086 - 1035) + chr(1496 - 1447) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110101) + chr(0b110111), 54450 - 54442), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(50) + '\064' + chr(2119 - 2064), 65121 - 65113), ehT0Px3KOsy9(chr(0b110000) + chr(6919 - 6808) + '\061' + chr(0b110000) + chr(52), 19623 - 19615), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110100), 61369 - 61361), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100110 + 0o14) + '\067' + chr(0b11010 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1855 - 1744) + chr(0b110011) + '\066', 14838 - 14830), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11110 + 0o23) + '\x37' + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(2219 - 2165) + chr(0b100011 + 0o23), 0b1000), ehT0Px3KOsy9(chr(876 - 828) + chr(111) + '\062' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(2795 - 2741) + chr(117 - 62), 0o10), ehT0Px3KOsy9(chr(1777 - 1729) + chr(5429 - 5318) + chr(49) + chr(0b1011 + 0o50) + chr(0b101001 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(847 - 799) + chr(111) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(53) + chr(2510 - 2458), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11172 - 11061) + chr(51) + chr(0b11111 + 0o23) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000101 + 0o52) + chr(1427 - 1377) + '\064' + '\066', 45421 - 45413), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11001 + 0o32) + '\x34' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(145 - 95) + chr(0b110011) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(4800 - 4689) + chr(384 - 335) + '\061' + chr(54), 63845 - 63837), ehT0Px3KOsy9(chr(48) + chr(0b1010000 + 0o37) + chr(53) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(637 - 589) + '\x6f' + '\063' + chr(906 - 855) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\064' + chr(1816 - 1768), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b110011 + 0o74) + chr(2372 - 2319) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'2'), chr(0b10000 + 0o124) + chr(0b11111 + 0o106) + chr(0b1100011) + '\x6f' + chr(100) + '\x65')(chr(0b101110 + 0o107) + chr(116) + chr(102) + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def yTo1Kl5FmnsP(oVre8I6UXc3b):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x94\xf7\x90\x13O\x97\x80d\x15\xb1\xd1'), '\x64' + '\145' + chr(9166 - 9067) + '\157' + chr(0b1100100) + chr(3056 - 2955))('\165' + chr(0b1110100) + chr(4205 - 4103) + chr(0b101101) + '\x38')) % xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xbe\xf6\xb3\x12x\x9e\xa9'), chr(0b1100100) + chr(9344 - 9243) + chr(99) + '\x6f' + '\x64' + '\x65')('\165' + '\164' + '\146' + chr(0b101101) + chr(56))) == ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b101000 + 0o107) + '\060', 8):
for fuwbpiKmfMe7 in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'y\xa8\xe7\xa5'), chr(5652 - 5552) + chr(0b1011101 + 0o10) + '\x63' + '\x6f' + chr(0b1001011 + 0o31) + chr(0b1000000 + 0o45))(chr(5757 - 5640) + chr(8216 - 8100) + '\146' + chr(1015 - 970) + chr(56))):
for B0ePDhpqxN5n in xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'I\x99\xc6\xef\x02x\xc9\x84U4\x90\xc0'), '\x64' + chr(8969 - 8868) + chr(0b1010100 + 0o17) + '\157' + '\x64' + chr(0b1010000 + 0o25))('\x75' + '\x74' + '\146' + '\x2d' + '\070')):
xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xb1\xeb\xa2?z\x90\x9aw\x04\xb3\xe0'), chr(100) + chr(0b1100001 + 0o4) + chr(0b111101 + 0o46) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(8665 - 8549) + '\x66' + '\055' + '\070'))()
for B0ePDhpqxN5n in xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'H\x81\xd0\x9b%k\xc7\xad2+\x9f\xbd'), '\x64' + chr(0b1010111 + 0o16) + chr(4632 - 4533) + '\157' + chr(5333 - 5233) + chr(0b1100101))(chr(0b1110101) + chr(2151 - 2035) + '\x66' + '\x2d' + '\070')):
xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xb1\xeb\xa2?z\x90\x9aw\x04\xb3\xe0'), '\x64' + chr(0b101101 + 0o70) + chr(0b1100011) + chr(6319 - 6208) + chr(0b1011001 + 0o13) + chr(0b11011 + 0o112))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101100 + 0o1) + chr(0b111000)))()
oVre8I6UXc3b.Mg4Qu1R8AQg2 = []
oVre8I6UXc3b.l0gcUFijbwmZ = ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061', ord("\x08"))
oVre8I6UXc3b.kDuFsAhEatcU += ehT0Px3KOsy9('\060' + chr(111) + '\x31', 8)
|
apache/incubator-mxnet
|
python/mxnet/monitor.py
|
Monitor.toc
|
def toc(self):
"""End collecting for current batch and return results.
Call after computation of current batch.
Returns
-------
res : list of """
if not self.activated:
return []
for exe in self.exes:
for array in exe.arg_arrays:
array.wait_to_read()
for array in exe.aux_arrays:
array.wait_to_read()
for exe in self.exes:
for name, array in zip(exe._symbol.list_arguments(), exe.arg_arrays):
if self.re_prog.match(name):
self.queue.append((self.step, name, self.stat_func(array)))
for name, array in zip(exe._symbol.list_auxiliary_states(), exe.aux_arrays):
if self.re_prog.match(name):
self.queue.append((self.step, name, self.stat_func(array)))
self.activated = False
res = []
if self.sort:
self.queue.sort(key=lambda x: x[1])
for n, k, v_list in self.queue:
if isinstance(v_list, NDArray):
v_list = [v_list]
assert isinstance(v_list, list)
s = ''
for v in v_list:
assert isinstance(v, NDArray)
if v.shape == (1,):
s += str(v.asscalar()) + '\t'
else:
s += str(v.asnumpy()) + '\t'
res.append((n, k, s))
self.queue = []
return res
|
python
|
def toc(self):
"""End collecting for current batch and return results.
Call after computation of current batch.
Returns
-------
res : list of """
if not self.activated:
return []
for exe in self.exes:
for array in exe.arg_arrays:
array.wait_to_read()
for array in exe.aux_arrays:
array.wait_to_read()
for exe in self.exes:
for name, array in zip(exe._symbol.list_arguments(), exe.arg_arrays):
if self.re_prog.match(name):
self.queue.append((self.step, name, self.stat_func(array)))
for name, array in zip(exe._symbol.list_auxiliary_states(), exe.aux_arrays):
if self.re_prog.match(name):
self.queue.append((self.step, name, self.stat_func(array)))
self.activated = False
res = []
if self.sort:
self.queue.sort(key=lambda x: x[1])
for n, k, v_list in self.queue:
if isinstance(v_list, NDArray):
v_list = [v_list]
assert isinstance(v_list, list)
s = ''
for v in v_list:
assert isinstance(v, NDArray)
if v.shape == (1,):
s += str(v.asscalar()) + '\t'
else:
s += str(v.asnumpy()) + '\t'
res.append((n, k, s))
self.queue = []
return res
|
[
"def",
"toc",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"activated",
":",
"return",
"[",
"]",
"for",
"exe",
"in",
"self",
".",
"exes",
":",
"for",
"array",
"in",
"exe",
".",
"arg_arrays",
":",
"array",
".",
"wait_to_read",
"(",
")",
"for",
"array",
"in",
"exe",
".",
"aux_arrays",
":",
"array",
".",
"wait_to_read",
"(",
")",
"for",
"exe",
"in",
"self",
".",
"exes",
":",
"for",
"name",
",",
"array",
"in",
"zip",
"(",
"exe",
".",
"_symbol",
".",
"list_arguments",
"(",
")",
",",
"exe",
".",
"arg_arrays",
")",
":",
"if",
"self",
".",
"re_prog",
".",
"match",
"(",
"name",
")",
":",
"self",
".",
"queue",
".",
"append",
"(",
"(",
"self",
".",
"step",
",",
"name",
",",
"self",
".",
"stat_func",
"(",
"array",
")",
")",
")",
"for",
"name",
",",
"array",
"in",
"zip",
"(",
"exe",
".",
"_symbol",
".",
"list_auxiliary_states",
"(",
")",
",",
"exe",
".",
"aux_arrays",
")",
":",
"if",
"self",
".",
"re_prog",
".",
"match",
"(",
"name",
")",
":",
"self",
".",
"queue",
".",
"append",
"(",
"(",
"self",
".",
"step",
",",
"name",
",",
"self",
".",
"stat_func",
"(",
"array",
")",
")",
")",
"self",
".",
"activated",
"=",
"False",
"res",
"=",
"[",
"]",
"if",
"self",
".",
"sort",
":",
"self",
".",
"queue",
".",
"sort",
"(",
"key",
"=",
"lambda",
"x",
":",
"x",
"[",
"1",
"]",
")",
"for",
"n",
",",
"k",
",",
"v_list",
"in",
"self",
".",
"queue",
":",
"if",
"isinstance",
"(",
"v_list",
",",
"NDArray",
")",
":",
"v_list",
"=",
"[",
"v_list",
"]",
"assert",
"isinstance",
"(",
"v_list",
",",
"list",
")",
"s",
"=",
"''",
"for",
"v",
"in",
"v_list",
":",
"assert",
"isinstance",
"(",
"v",
",",
"NDArray",
")",
"if",
"v",
".",
"shape",
"==",
"(",
"1",
",",
")",
":",
"s",
"+=",
"str",
"(",
"v",
".",
"asscalar",
"(",
")",
")",
"+",
"'\\t'",
"else",
":",
"s",
"+=",
"str",
"(",
"v",
".",
"asnumpy",
"(",
")",
")",
"+",
"'\\t'",
"res",
".",
"append",
"(",
"(",
"n",
",",
"k",
",",
"s",
")",
")",
"self",
".",
"queue",
"=",
"[",
"]",
"return",
"res"
] |
End collecting for current batch and return results.
Call after computation of current batch.
Returns
-------
res : list of
|
[
"End",
"collecting",
"for",
"current",
"batch",
"and",
"return",
"results",
".",
"Call",
"after",
"computation",
"of",
"current",
"batch",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/monitor.py#L102-L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N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(9019 - 8908) + chr(868 - 819) + chr(0b1010 + 0o46) + chr(1713 - 1658), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + '\061' + chr(0b11010 + 0o32) + chr(0b110011), 41154 - 41146), ehT0Px3KOsy9('\060' + chr(4131 - 4020) + chr(0b110010) + chr(0b110000) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1061 - 1013) + chr(0b1101111) + chr(514 - 463) + chr(0b11100 + 0o33) + chr(0b1 + 0o60), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\x37' + chr(737 - 684), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b10000 + 0o44) + chr(50), 38927 - 38919), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(448 - 398) + chr(0b110010) + chr(1479 - 1424), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b110100) + '\x33', 62375 - 62367), ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + chr(0b110010) + chr(0b1101 + 0o51) + chr(0b11001 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(923 - 875) + '\157' + chr(0b110001 + 0o2) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(9354 - 9243) + '\061' + chr(0b110001) + '\063', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + chr(241 - 189) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(1969 - 1914) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\066' + chr(1618 - 1568), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b110001) + '\067' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11974 - 11863) + chr(0b11001 + 0o32) + chr(0b101010 + 0o10) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110010) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + '\x32' + chr(0b101010 + 0o7) + chr(0b101010 + 0o7), 32222 - 32214), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(53) + chr(0b100100 + 0o21), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(1860 - 1809) + chr(0b11110 + 0o31) + chr(1241 - 1187), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110101) + chr(86 - 34), 36741 - 36733), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\x33' + '\066' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101110 + 0o1) + chr(51) + '\x31' + chr(2357 - 2305), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1316 - 1267) + chr(54) + chr(1549 - 1500), 52126 - 52118), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(52) + chr(1171 - 1122), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(2076 - 2025) + chr(51) + chr(1698 - 1647), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(0b110011) + chr(0b110010) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(8215 - 8104) + '\x33' + chr(0b100111 + 0o15) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + chr(1136 - 1086) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + '\x31' + chr(55) + chr(48), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(49) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(11813 - 11702) + '\063' + chr(1106 - 1055) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + chr(49) + chr(0b10 + 0o65) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(702 - 591) + chr(0b101101 + 0o5) + '\x30' + chr(0b1101 + 0o47), 54730 - 54722), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b1100 + 0o46) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\066' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1487 - 1439) + chr(197 - 86) + chr(0b101111 + 0o3) + chr(0b100111 + 0o17) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(10589 - 10478) + chr(0b1000 + 0o52) + chr(0b110100) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(1920 - 1870) + chr(0b110001) + chr(0b110110), 42541 - 42533)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + chr(0b10101 + 0o33), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'i'), '\144' + '\x65' + '\143' + '\x6f' + '\x64' + '\x65')(chr(2567 - 2450) + '\x74' + chr(0b101000 + 0o76) + chr(0b1000 + 0o45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def xtkRyfFY6h6j(oVre8I6UXc3b):
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'+S\xe6c\xac;\x8b\xfdA\xc0v\x11'), chr(100) + chr(5197 - 5096) + chr(5019 - 4920) + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(3351 - 3249) + '\x2d' + chr(358 - 302))):
return []
for fuwbpiKmfMe7 in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'"\x1b\xe4s'), chr(0b1100100) + chr(0b100110 + 0o77) + '\143' + '\157' + chr(0b101 + 0o137) + chr(0b1100101))(chr(4053 - 3936) + chr(0b11011 + 0o131) + chr(7500 - 7398) + chr(45) + chr(56))):
for B0ePDhpqxN5n in xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12*\xc59\x9b\x0b\xd4\xd6s\xe2Y\x0f'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1011100 + 0o11))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + chr(2188 - 2132))):
xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'0\x02\xe8t\xa6\t\x8d\xc8Q\xd2z/'), chr(0b1100100) + '\x65' + chr(200 - 101) + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + chr(10189 - 10073) + chr(10374 - 10272) + '\055' + '\070'))()
for B0ePDhpqxN5n in xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'\x132\xd3M\xbc\x18\xda\xff\x14\xfdVr'), chr(100) + '\x65' + chr(0b10111 + 0o114) + '\157' + '\x64' + chr(0b1011010 + 0o13))(chr(0b1110101) + chr(0b1111 + 0o145) + chr(102) + '\055' + chr(0b100110 + 0o22))):
xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'0\x02\xe8t\xa6\t\x8d\xc8Q\xd2z/'), chr(100) + chr(2769 - 2668) + chr(7041 - 6942) + chr(0b1101111) + '\x64' + chr(8818 - 8717))(chr(12191 - 12074) + '\164' + chr(0b101001 + 0o75) + chr(0b101101) + chr(0b111000)))()
for fuwbpiKmfMe7 in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'"\x1b\xe4s'), chr(2717 - 2617) + chr(10164 - 10063) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(0b10101 + 0o43))):
for (AIvJRzLdDfgF, B0ePDhpqxN5n) in pZ0NK2y6HRbn(xafqLlk3kkUe(fuwbpiKmfMe7._symbol, xafqLlk3kkUe(SXOLrMavuUCe(b'+\n\xf2t\xa6\x1c\x90\xf0V\xda~%V\x89'), chr(0b100110 + 0o76) + chr(101) + chr(3303 - 3204) + chr(0b101111 + 0o100) + chr(7464 - 7364) + chr(1069 - 968))(chr(117) + chr(5896 - 5780) + chr(6890 - 6788) + chr(903 - 858) + chr(2297 - 2241)))(), xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12*\xc59\x9b\x0b\xd4\xd6s\xe2Y\x0f'), chr(100) + chr(8528 - 8427) + chr(0b101110 + 0o65) + chr(0b1000111 + 0o50) + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(45) + chr(0b1010 + 0o56)))):
if xafqLlk3kkUe(oVre8I6UXc3b.re_prog, xafqLlk3kkUe(SXOLrMavuUCe(b'*\x02\xf5c\x91'), chr(100) + chr(101) + chr(0b100101 + 0o76) + chr(111) + chr(4990 - 4890) + chr(101))('\x75' + '\x74' + '\146' + '\055' + chr(0b1010 + 0o56)))(AIvJRzLdDfgF):
xafqLlk3kkUe(oVre8I6UXc3b.queue, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x13\xf1e\x97\x19'), chr(100) + '\x65' + '\143' + chr(111) + chr(293 - 193) + chr(0b1011011 + 0o12))(chr(0b1010110 + 0o37) + chr(0b1101100 + 0o10) + chr(0b101 + 0o141) + chr(0b100110 + 0o7) + '\070'))((xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b",'\xf4F\x8a<\x8a\xd2B\xc3x\x1e"), chr(0b1100100) + '\x65' + '\143' + chr(0b10000 + 0o137) + '\x64' + chr(1211 - 1110))('\165' + '\x74' + chr(2045 - 1943) + chr(0b1100 + 0o41) + chr(2112 - 2056))), AIvJRzLdDfgF, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'4\x17\xe0t\xa6\x1b\x97\xf9@'), '\144' + chr(5025 - 4924) + chr(99) + chr(111) + '\x64' + chr(1553 - 1452))('\165' + chr(0b1010011 + 0o41) + chr(5179 - 5077) + chr(0b10100 + 0o31) + chr(0b100000 + 0o30)))(B0ePDhpqxN5n)))
for (AIvJRzLdDfgF, B0ePDhpqxN5n) in pZ0NK2y6HRbn(xafqLlk3kkUe(fuwbpiKmfMe7._symbol, xafqLlk3kkUe(SXOLrMavuUCe(b'+\n\xf2t\xa6\x1c\x97\xefJ\xdbr*P\x83m\x0b\xa56\xfd\xc8\x8d'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b10 + 0o155) + chr(100) + chr(4780 - 4679))('\165' + '\x74' + '\x66' + '\055' + chr(56)))(), xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'\x132\xd3M\xbc\x18\xda\xff\x14\xfdVr'), chr(831 - 731) + chr(0b1011011 + 0o12) + chr(7176 - 7077) + '\x6f' + chr(100) + chr(101))(chr(2361 - 2244) + '\x74' + chr(102) + chr(45) + '\x38'))):
if xafqLlk3kkUe(oVre8I6UXc3b.re_prog, xafqLlk3kkUe(SXOLrMavuUCe(b'*\x02\xf5c\x91'), chr(0b10010 + 0o122) + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + '\164' + chr(8673 - 8571) + chr(0b1110 + 0o37) + chr(0b111000)))(AIvJRzLdDfgF):
xafqLlk3kkUe(oVre8I6UXc3b.queue, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x13\xf1e\x97\x19'), chr(100) + '\145' + chr(0b111101 + 0o46) + chr(6950 - 6839) + chr(0b1001001 + 0o33) + chr(7120 - 7019))(chr(117) + '\x74' + chr(2966 - 2864) + chr(0b100010 + 0o13) + chr(0b111000)))((xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b",'\xf4F\x8a<\x8a\xd2B\xc3x\x1e"), chr(100) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b10101 + 0o120))('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(2137 - 2081))), AIvJRzLdDfgF, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'4\x17\xe0t\xa6\x1b\x97\xf9@'), '\x64' + chr(0b111010 + 0o53) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + chr(116) + '\x66' + chr(45) + '\070'))(B0ePDhpqxN5n)))
oVre8I6UXc3b.l0gcUFijbwmZ = ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + '\060', 8)
MsbwfslwLjRO = []
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'4\x0c\xf3t'), chr(100) + '\x65' + chr(0b101011 + 0o70) + chr(0b1001010 + 0o45) + chr(0b1 + 0o143) + chr(0b100011 + 0o102))('\165' + '\x74' + chr(0b1011001 + 0o15) + chr(45) + chr(56))):
xafqLlk3kkUe(oVre8I6UXc3b.queue, xafqLlk3kkUe(SXOLrMavuUCe(b'4\x0c\xf3t'), '\x64' + chr(3412 - 3311) + chr(0b110011 + 0o60) + chr(10345 - 10234) + chr(100) + '\x65')('\165' + chr(11315 - 11199) + chr(0b1100110) + '\x2d' + chr(56)))(key=lambda OeWW0F1dBPRQ: OeWW0F1dBPRQ[ehT0Px3KOsy9('\060' + chr(111) + chr(49), 0b1000)])
for (m1NkCryOw9Bx, OolUPRJhRaJd, x8oxX4jFkzHD) in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\n\x04\xb5Q\x8cL\xb0\xafb\xe6|y'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1001100 + 0o50) + '\x66' + '\055' + '\070')):
if PlSM16l2KDPD(x8oxX4jFkzHD, GdqFjMbtKL7s):
x8oxX4jFkzHD = [x8oxX4jFkzHD]
assert PlSM16l2KDPD(x8oxX4jFkzHD, YyaZ4tpXu4lf)
vGrByMSYMp9h = xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(181 - 81) + chr(0b100000 + 0o105) + chr(6057 - 5958) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(184 - 68) + chr(0b1100110) + '\055' + chr(56))
for cMbll0QYhULo in x8oxX4jFkzHD:
assert PlSM16l2KDPD(cMbll0QYhULo, GdqFjMbtKL7s)
if xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b')\x02\xf4Y\x9f1\x85\xfbw\xc7x)'), '\144' + '\x65' + '\143' + '\x6f' + chr(0b1111 + 0o125) + '\145')(chr(0b110100 + 0o101) + chr(0b11001 + 0o133) + chr(102) + chr(0b1001 + 0o44) + '\x38')) == (ehT0Px3KOsy9(chr(768 - 720) + chr(11372 - 11261) + chr(49), 8),):
vGrByMSYMp9h += M8_cKLkHVB2V(cMbll0QYhULo.asscalar()) + xafqLlk3kkUe(SXOLrMavuUCe(b'N'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b100100 + 0o113) + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b100 + 0o51) + chr(56))
else:
vGrByMSYMp9h += M8_cKLkHVB2V(cMbll0QYhULo.asnumpy()) + xafqLlk3kkUe(SXOLrMavuUCe(b'N'), chr(100) + chr(981 - 880) + chr(6542 - 6443) + '\x6f' + '\x64' + chr(9650 - 9549))('\165' + '\x74' + chr(102) + '\x2d' + chr(0b111000))
xafqLlk3kkUe(MsbwfslwLjRO, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x13\xf1e\x97\x19'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(2156 - 2056) + '\x65')(chr(0b110011 + 0o102) + chr(116) + chr(0b1100110) + chr(0b101000 + 0o5) + chr(0b11000 + 0o40)))((m1NkCryOw9Bx, OolUPRJhRaJd, vGrByMSYMp9h))
oVre8I6UXc3b.Mg4Qu1R8AQg2 = []
return MsbwfslwLjRO
|
apache/incubator-mxnet
|
python/mxnet/monitor.py
|
Monitor.toc_print
|
def toc_print(self):
"""End collecting and print results."""
res = self.toc()
for n, k, v in res:
logging.info('Batch: {:7d} {:30s} {:s}'.format(n, k, v))
|
python
|
def toc_print(self):
"""End collecting and print results."""
res = self.toc()
for n, k, v in res:
logging.info('Batch: {:7d} {:30s} {:s}'.format(n, k, v))
|
[
"def",
"toc_print",
"(",
"self",
")",
":",
"res",
"=",
"self",
".",
"toc",
"(",
")",
"for",
"n",
",",
"k",
",",
"v",
"in",
"res",
":",
"logging",
".",
"info",
"(",
"'Batch: {:7d} {:30s} {:s}'",
".",
"format",
"(",
"n",
",",
"k",
",",
"v",
")",
")"
] |
End collecting and print results.
|
[
"End",
"collecting",
"and",
"print",
"results",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/monitor.py#L142-L146
|
train
|
End collecting and print results.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0C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Pw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(1311 - 1262), 26158 - 26150), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + chr(0b1011 + 0o46) + chr(0b101011 + 0o13) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x31' + chr(0b110000), 57561 - 57553), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100101 + 0o14) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b11001 + 0o27), 6911 - 6903), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001 + 0o1) + chr(50) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110000) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7376 - 7265) + '\063' + chr(0b110010) + chr(609 - 555), 0b1000), ehT0Px3KOsy9('\x30' + chr(4267 - 4156) + chr(49) + chr(2214 - 2161) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3482 - 3371) + chr(0b110101) + chr(0b10 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(0b100101 + 0o14) + chr(0b110101) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b100111 + 0o13) + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + chr(0b11111 + 0o23) + chr(1389 - 1341) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11001 + 0o32) + chr(0b11110 + 0o24) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1520 - 1472) + chr(0b111011 + 0o64) + chr(54) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101101 + 0o4) + chr(0b1000 + 0o55) + chr(544 - 495), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b110001) + chr(0b101100 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110101) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(50) + chr(51) + '\061', 0b1000), ehT0Px3KOsy9(chr(1936 - 1888) + '\x6f' + chr(935 - 886) + '\x36' + chr(0b1001 + 0o54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\067' + chr(0b10 + 0o65), 0b1000), ehT0Px3KOsy9(chr(1289 - 1241) + chr(0b1101111) + '\066', 52490 - 52482), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110100) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\x34' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(53) + chr(0b110000 + 0o0), 0b1000), ehT0Px3KOsy9(chr(66 - 18) + chr(111) + chr(0b110101) + chr(0b101100 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(963 - 915) + chr(12210 - 12099) + chr(0b11010 + 0o33) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\x36' + chr(0b100011 + 0o24), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1111 + 0o44) + chr(0b110000), 14198 - 14190), ehT0Px3KOsy9(chr(910 - 862) + '\x6f' + '\x32' + '\x36' + '\x36', 57971 - 57963), ehT0Px3KOsy9(chr(48) + chr(111) + '\x36' + '\x31', 0o10), ehT0Px3KOsy9(chr(1452 - 1404) + chr(0b1101111) + chr(0b101100 + 0o6) + chr(846 - 797) + '\x35', 12790 - 12782), ehT0Px3KOsy9('\x30' + chr(10005 - 9894) + chr(1527 - 1477) + '\060', 62560 - 62552), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(9479 - 9368) + chr(0b11110 + 0o24) + chr(1137 - 1082) + chr(0b1011 + 0o51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1 + 0o61) + chr(0b10011 + 0o40), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1000 + 0o51) + chr(224 - 173) + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + '\062' + chr(49) + chr(537 - 482), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b10110 + 0o131) + '\067' + '\065', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b"'"), chr(2048 - 1948) + chr(101) + '\143' + chr(0b1101111) + chr(6453 - 6353) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def rAO22QHRzQ0M(oVre8I6UXc3b):
MsbwfslwLjRO = oVre8I6UXc3b.toc()
for (m1NkCryOw9Bx, OolUPRJhRaJd, cMbll0QYhULo) in MsbwfslwLjRO:
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'ZE\x00v]\xf0&\xe1\x06B4:'), '\x64' + chr(7743 - 7642) + chr(6862 - 6763) + '\157' + chr(5491 - 5391) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'K\x13<m@\xa9a\xadV\x19\n,\xa6\xa9\rZ\xbb\x1e\xe4U\x04<\x91\x18'), chr(735 - 635) + chr(9210 - 9109) + chr(0b1100011) + chr(111) + chr(100) + chr(3350 - 3249))(chr(1710 - 1593) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'_F:a`\xf2\x12\xe5<^\x0b;'), '\x64' + chr(10081 - 9980) + chr(976 - 877) + chr(9313 - 9202) + chr(100) + chr(0b1100101))(chr(6984 - 6867) + '\164' + chr(102) + '\055' + chr(0b111000)))(m1NkCryOw9Bx, OolUPRJhRaJd, cMbll0QYhULo))
|
apache/incubator-mxnet
|
example/rnn/old/bucket_io.py
|
BucketSentenceIter.make_data_iter_plan
|
def make_data_iter_plan(self):
"make a random data iteration plan"
# truncate each bucket into multiple of batch-size
bucket_n_batches = []
for i in range(len(self.data)):
bucket_n_batches.append(np.floor((self.data[i]) / self.batch_size))
self.data[i] = self.data[i][:int(bucket_n_batches[i]*self.batch_size)]
bucket_plan = np.hstack([np.zeros(n, int)+i for i, n in enumerate(bucket_n_batches)])
np.random.shuffle(bucket_plan)
bucket_idx_all = [np.random.permutation(len(x)) for x in self.data]
self.bucket_plan = bucket_plan
self.bucket_idx_all = bucket_idx_all
self.bucket_curr_idx = [0 for x in self.data]
self.data_buffer = []
self.label_buffer = []
for i_bucket in range(len(self.data)):
if not self.model_parallel:
data = np.zeros((self.batch_size, self.buckets[i_bucket]))
label = np.zeros((self.batch_size, self.buckets[i_bucket]))
self.data_buffer.append(data)
self.label_buffer.append(label)
else:
data = np.zeros((self.buckets[i_bucket], self.batch_size))
self.data_buffer.append(data)
if self.model_parallel:
# Transpose data if model parallel
for i in range(len(self.data)):
bucket_data = self.data[i]
self.data[i] = np.transpose(bucket_data)
|
python
|
def make_data_iter_plan(self):
"make a random data iteration plan"
# truncate each bucket into multiple of batch-size
bucket_n_batches = []
for i in range(len(self.data)):
bucket_n_batches.append(np.floor((self.data[i]) / self.batch_size))
self.data[i] = self.data[i][:int(bucket_n_batches[i]*self.batch_size)]
bucket_plan = np.hstack([np.zeros(n, int)+i for i, n in enumerate(bucket_n_batches)])
np.random.shuffle(bucket_plan)
bucket_idx_all = [np.random.permutation(len(x)) for x in self.data]
self.bucket_plan = bucket_plan
self.bucket_idx_all = bucket_idx_all
self.bucket_curr_idx = [0 for x in self.data]
self.data_buffer = []
self.label_buffer = []
for i_bucket in range(len(self.data)):
if not self.model_parallel:
data = np.zeros((self.batch_size, self.buckets[i_bucket]))
label = np.zeros((self.batch_size, self.buckets[i_bucket]))
self.data_buffer.append(data)
self.label_buffer.append(label)
else:
data = np.zeros((self.buckets[i_bucket], self.batch_size))
self.data_buffer.append(data)
if self.model_parallel:
# Transpose data if model parallel
for i in range(len(self.data)):
bucket_data = self.data[i]
self.data[i] = np.transpose(bucket_data)
|
[
"def",
"make_data_iter_plan",
"(",
"self",
")",
":",
"# truncate each bucket into multiple of batch-size",
"bucket_n_batches",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"data",
")",
")",
":",
"bucket_n_batches",
".",
"append",
"(",
"np",
".",
"floor",
"(",
"(",
"self",
".",
"data",
"[",
"i",
"]",
")",
"/",
"self",
".",
"batch_size",
")",
")",
"self",
".",
"data",
"[",
"i",
"]",
"=",
"self",
".",
"data",
"[",
"i",
"]",
"[",
":",
"int",
"(",
"bucket_n_batches",
"[",
"i",
"]",
"*",
"self",
".",
"batch_size",
")",
"]",
"bucket_plan",
"=",
"np",
".",
"hstack",
"(",
"[",
"np",
".",
"zeros",
"(",
"n",
",",
"int",
")",
"+",
"i",
"for",
"i",
",",
"n",
"in",
"enumerate",
"(",
"bucket_n_batches",
")",
"]",
")",
"np",
".",
"random",
".",
"shuffle",
"(",
"bucket_plan",
")",
"bucket_idx_all",
"=",
"[",
"np",
".",
"random",
".",
"permutation",
"(",
"len",
"(",
"x",
")",
")",
"for",
"x",
"in",
"self",
".",
"data",
"]",
"self",
".",
"bucket_plan",
"=",
"bucket_plan",
"self",
".",
"bucket_idx_all",
"=",
"bucket_idx_all",
"self",
".",
"bucket_curr_idx",
"=",
"[",
"0",
"for",
"x",
"in",
"self",
".",
"data",
"]",
"self",
".",
"data_buffer",
"=",
"[",
"]",
"self",
".",
"label_buffer",
"=",
"[",
"]",
"for",
"i_bucket",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"data",
")",
")",
":",
"if",
"not",
"self",
".",
"model_parallel",
":",
"data",
"=",
"np",
".",
"zeros",
"(",
"(",
"self",
".",
"batch_size",
",",
"self",
".",
"buckets",
"[",
"i_bucket",
"]",
")",
")",
"label",
"=",
"np",
".",
"zeros",
"(",
"(",
"self",
".",
"batch_size",
",",
"self",
".",
"buckets",
"[",
"i_bucket",
"]",
")",
")",
"self",
".",
"data_buffer",
".",
"append",
"(",
"data",
")",
"self",
".",
"label_buffer",
".",
"append",
"(",
"label",
")",
"else",
":",
"data",
"=",
"np",
".",
"zeros",
"(",
"(",
"self",
".",
"buckets",
"[",
"i_bucket",
"]",
",",
"self",
".",
"batch_size",
")",
")",
"self",
".",
"data_buffer",
".",
"append",
"(",
"data",
")",
"if",
"self",
".",
"model_parallel",
":",
"# Transpose data if model parallel",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"self",
".",
"data",
")",
")",
":",
"bucket_data",
"=",
"self",
".",
"data",
"[",
"i",
"]",
"self",
".",
"data",
"[",
"i",
"]",
"=",
"np",
".",
"transpose",
"(",
"bucket_data",
")"
] |
make a random data iteration plan
|
[
"make",
"a",
"random",
"data",
"iteration",
"plan"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/old/bucket_io.py#L200-L233
|
train
|
make a random data iteration plan
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,O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4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(1831 - 1720) + chr(834 - 785) + chr(1448 - 1400) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(3421 - 3310) + '\x37' + chr(0b11001 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b111 + 0o56) + chr(1958 - 1905), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + chr(2308 - 2259) + chr(0b1011 + 0o47) + chr(0b1110 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1000101 + 0o52) + chr(0b1111 + 0o41), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(1734 - 1685) + chr(2316 - 2263), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110101) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b100000 + 0o21) + chr(0b110111) + chr(1250 - 1195), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(0b100100 + 0o15) + '\067' + chr(55), 8), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + '\x35' + chr(0b1101 + 0o47), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\067' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(717 - 669) + chr(0b1101111) + '\x33' + '\x30' + chr(54), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b110111) + chr(0b101100 + 0o7), 7802 - 7794), ehT0Px3KOsy9('\060' + '\x6f' + chr(2371 - 2321) + chr(55) + chr(0b110001), 25345 - 25337), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(220 - 170) + '\061' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(3725 - 3614) + '\x33' + '\065' + chr(0b110100), 23665 - 23657), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1578 - 1528) + chr(53) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1101 - 1053) + '\x6f' + '\x36', 63023 - 63015), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010 + 0o1) + chr(52) + chr(0b11101 + 0o27), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + chr(54) + chr(49), 62970 - 62962), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b110110) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(54) + chr(1904 - 1852), 60083 - 60075), ehT0Px3KOsy9(chr(860 - 812) + '\x6f' + '\x33' + chr(1988 - 1937), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b10011 + 0o35) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\064' + '\x35', 46117 - 46109), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + '\061' + chr(0b110010) + '\x34', 62090 - 62082), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x31' + '\064' + chr(0b11101 + 0o30), 9399 - 9391), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1458 - 1409) + '\x35' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010011 + 0o34) + chr(51) + '\065' + '\x34', 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + chr(0b111 + 0o52) + '\x32' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100 + 0o57) + '\061' + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1010 + 0o47) + '\063' + chr(2087 - 2037), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110110) + chr(0b101011 + 0o10), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + '\x32' + '\x31' + chr(0b1000 + 0o53), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101111 + 0o2) + chr(48) + chr(51), 0b1000), ehT0Px3KOsy9(chr(764 - 716) + chr(6549 - 6438) + chr(51) + chr(1297 - 1248) + chr(709 - 661), 46036 - 46028), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + '\x32' + chr(0b110001) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\x34' + chr(2586 - 2533), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(51) + chr(55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + chr(0b100 + 0o61) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'n'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b110001 + 0o63) + chr(0b1100101))(chr(9032 - 8915) + '\164' + chr(102) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def UeJvsCuqyLBn(oVre8I6UXc3b):
C5NjDNeIgvUG = []
for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15u\xc39p{iI\x1aJ\xf9\x8e'), chr(0b1100100) + chr(0b1111 + 0o126) + chr(0b1100010 + 0o1) + chr(0b1001 + 0o146) + '\144' + chr(0b1100101))('\x75' + chr(116) + chr(0b101101 + 0o71) + chr(45) + '\x38')))):
xafqLlk3kkUe(C5NjDNeIgvUG, xafqLlk3kkUe(SXOLrMavuUCe(b'!I\xdd6n)'), '\144' + '\x65' + chr(0b1100011) + chr(0b1010010 + 0o35) + '\144' + chr(0b1100101))(chr(117) + chr(745 - 629) + chr(0b1100110) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'&U\xc2<r'), '\144' + '\145' + chr(99) + chr(111) + '\x64' + chr(101))(chr(0b100010 + 0o123) + '\x74' + '\x66' + '\055' + '\x38'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15u\xc39p{iI\x1aJ\xf9\x8e'), '\x64' + chr(0b101111 + 0o66) + chr(99) + '\x6f' + chr(100) + chr(0b100100 + 0o101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56)))[WVxHKyX45z_L] / xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b')A\x947Z4H>\x12y\xc7\x9f'), '\144' + chr(1352 - 1251) + '\x63' + chr(0b1000011 + 0o54) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + chr(102) + '\055' + chr(0b100001 + 0o27)))))
oVre8I6UXc3b.ULnjp6D6efFH[WVxHKyX45z_L] = oVre8I6UXc3b.ULnjp6D6efFH[WVxHKyX45z_L][:ehT0Px3KOsy9(C5NjDNeIgvUG[WVxHKyX45z_L] * oVre8I6UXc3b.ix9dZyeAmUxY)]
nL6oMkbWPKNR = WqUC3KWvYVup.hstack([WqUC3KWvYVup.zeros(m1NkCryOw9Bx, ehT0Px3KOsy9) + WVxHKyX45z_L for (WVxHKyX45z_L, m1NkCryOw9Bx) in YlkZvXL8qwsX(C5NjDNeIgvUG)])
xafqLlk3kkUe(WqUC3KWvYVup.random, xafqLlk3kkUe(SXOLrMavuUCe(b'3Q\xd85f!H'), chr(100) + chr(0b11010 + 0o113) + chr(1665 - 1566) + chr(0b1101000 + 0o7) + chr(100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))(nL6oMkbWPKNR)
LNVSW4Bqe9c_ = [WqUC3KWvYVup.random.permutation(c2A0yzQpDQB3(OeWW0F1dBPRQ)) for OeWW0F1dBPRQ in oVre8I6UXc3b.ULnjp6D6efFH]
oVre8I6UXc3b.nL6oMkbWPKNR = nL6oMkbWPKNR
oVre8I6UXc3b.LNVSW4Bqe9c_ = LNVSW4Bqe9c_
oVre8I6UXc3b.bzbJ9EWssJk1 = [ehT0Px3KOsy9(chr(677 - 629) + '\157' + '\x30', 8) for OeWW0F1dBPRQ in oVre8I6UXc3b.ULnjp6D6efFH]
oVre8I6UXc3b.FkYPgejisPnh = []
oVre8I6UXc3b.Z2V5t7Ty7FSA = []
for F9J47squXGVG in vQr8gNKaIaWE(c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15u\xc39p{iI\x1aJ\xf9\x8e'), '\144' + '\x65' + chr(3867 - 3768) + chr(111) + chr(8945 - 8845) + chr(101))(chr(5841 - 5724) + chr(0b1110100) + chr(0b1100110) + chr(0b11011 + 0o22) + chr(2512 - 2456))))):
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'-V\xc96l\x12]\x1e\rM\xd3\xaa\x9e\xd5'), '\144' + chr(0b1001111 + 0o26) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')('\x75' + chr(10955 - 10839) + chr(0b1011111 + 0o7) + chr(299 - 254) + chr(0b110001 + 0o7))):
ULnjp6D6efFH = WqUC3KWvYVup.zeros((oVre8I6UXc3b.ix9dZyeAmUxY, oVre8I6UXc3b.buckets[F9J47squXGVG]))
TRUOLFLuD08x = WqUC3KWvYVup.zeros((oVre8I6UXc3b.ix9dZyeAmUxY, oVre8I6UXc3b.buckets[F9J47squXGVG]))
xafqLlk3kkUe(oVre8I6UXc3b.data_buffer, xafqLlk3kkUe(SXOLrMavuUCe(b'!I\xdd6n)'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b11000 + 0o127) + chr(100) + chr(101))('\x75' + chr(116) + chr(7413 - 7311) + chr(0b101101 + 0o0) + chr(2465 - 2409)))(ULnjp6D6efFH)
xafqLlk3kkUe(oVre8I6UXc3b.label_buffer, xafqLlk3kkUe(SXOLrMavuUCe(b'!I\xdd6n)'), chr(0b1100001 + 0o3) + chr(4820 - 4719) + chr(8420 - 8321) + chr(0b1100011 + 0o14) + '\x64' + chr(0b1001001 + 0o34))('\165' + chr(0b10 + 0o162) + chr(102) + chr(0b100100 + 0o11) + '\070'))(TRUOLFLuD08x)
else:
ULnjp6D6efFH = WqUC3KWvYVup.zeros((oVre8I6UXc3b.buckets[F9J47squXGVG], oVre8I6UXc3b.ix9dZyeAmUxY))
xafqLlk3kkUe(oVre8I6UXc3b.data_buffer, xafqLlk3kkUe(SXOLrMavuUCe(b'!I\xdd6n)'), chr(0b1100001 + 0o3) + '\145' + '\143' + chr(3299 - 3188) + chr(1693 - 1593) + chr(0b1100101))(chr(11807 - 11690) + '\x74' + chr(5163 - 5061) + chr(45) + chr(0b111000)))(ULnjp6D6efFH)
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'-V\xc96l\x12]\x1e\rM\xd3\xaa\x9e\xd5'), chr(100) + chr(0b1001100 + 0o31) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b101001 + 0o74))('\x75' + chr(0b1011000 + 0o34) + '\x66' + '\x2d' + chr(56))):
for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15u\xc39p{iI\x1aJ\xf9\x8e'), chr(0b1000100 + 0o40) + chr(0b100110 + 0o77) + chr(0b1100011) + chr(0b10111 + 0o130) + '\x64' + '\x65')('\x75' + chr(2215 - 2099) + chr(7549 - 7447) + chr(45) + chr(1956 - 1900))))):
oVpmaT2TOQWG = oVre8I6UXc3b.ULnjp6D6efFH[WVxHKyX45z_L]
oVre8I6UXc3b.ULnjp6D6efFH[WVxHKyX45z_L] = WqUC3KWvYVup.transpose(oVpmaT2TOQWG)
|
apache/incubator-mxnet
|
amalgamation/amalgamation.py
|
expand
|
def expand(x, pending, stage):
"""
Expand the pending files in the current stage.
Parameters
----------
x: str
The file to expand.
pending : str
The list of pending files to expand.
stage: str
The current stage for file expansion, used for matching the prefix of files.
"""
if x in history and x not in ['mshadow/mshadow/expr_scalar-inl.h']: # MULTIPLE includes
return
if x in pending:
#print('loop found: {} in {}'.format(x, pending))
return
whtspace = ' ' * expand.treeDepth
expand.fileCount += 1
comment = u"//=====[{:3d}] STAGE:{:>4} {}EXPANDING: {} =====\n\n".format(expand.fileCount, stage, whtspace, x)
out.write(comment.encode('ascii'))
print(comment)
with open(x, 'rb') as x_h:
for line in x_h.readlines():
uline = line.decode('utf-8')
if '#define DMLC_LOG_STACK_TRACE 1' in uline.strip():
# Do not enable stacktrace logging
continue
if uline.find('#include') < 0:
out.write(line)
continue
if uline.strip().find('#include') > 0:
print(uline)
continue
m = re1.search(uline)
if not m:
m = re2.search(uline)
if m:
path = m.groups()[0]
else:
m = re3.search(uline)
if m:
path = 'execinfo.h'
else:
print(uline + ' not found')
continue
h = path.strip('./') if "../3rdparty/" not in path else path
if h.endswith('complex.h') and x.endswith('openblas_config.h'):
source = ''
elif h.startswith('ps/'):
source = '../3rdparty/ps-lite/include/' + h
else:
source = find_source(h, x, stage)
if not source:
if (h not in blacklist and
h not in sysheaders and
'mkl' not in h and
'nnpack' not in h and
'tensorrt' not in h and
not h.endswith('.cuh')): sysheaders.append(h)
else:
expand.treeDepth += 1
expand(source, pending + [x], stage)
expand.treeDepth -= 1
out.write(u"//===== EXPANDED : {} =====\n\n".format(x).encode('ascii'))
history.add(x)
|
python
|
def expand(x, pending, stage):
"""
Expand the pending files in the current stage.
Parameters
----------
x: str
The file to expand.
pending : str
The list of pending files to expand.
stage: str
The current stage for file expansion, used for matching the prefix of files.
"""
if x in history and x not in ['mshadow/mshadow/expr_scalar-inl.h']: # MULTIPLE includes
return
if x in pending:
#print('loop found: {} in {}'.format(x, pending))
return
whtspace = ' ' * expand.treeDepth
expand.fileCount += 1
comment = u"//=====[{:3d}] STAGE:{:>4} {}EXPANDING: {} =====\n\n".format(expand.fileCount, stage, whtspace, x)
out.write(comment.encode('ascii'))
print(comment)
with open(x, 'rb') as x_h:
for line in x_h.readlines():
uline = line.decode('utf-8')
if '#define DMLC_LOG_STACK_TRACE 1' in uline.strip():
# Do not enable stacktrace logging
continue
if uline.find('#include') < 0:
out.write(line)
continue
if uline.strip().find('#include') > 0:
print(uline)
continue
m = re1.search(uline)
if not m:
m = re2.search(uline)
if m:
path = m.groups()[0]
else:
m = re3.search(uline)
if m:
path = 'execinfo.h'
else:
print(uline + ' not found')
continue
h = path.strip('./') if "../3rdparty/" not in path else path
if h.endswith('complex.h') and x.endswith('openblas_config.h'):
source = ''
elif h.startswith('ps/'):
source = '../3rdparty/ps-lite/include/' + h
else:
source = find_source(h, x, stage)
if not source:
if (h not in blacklist and
h not in sysheaders and
'mkl' not in h and
'nnpack' not in h and
'tensorrt' not in h and
not h.endswith('.cuh')): sysheaders.append(h)
else:
expand.treeDepth += 1
expand(source, pending + [x], stage)
expand.treeDepth -= 1
out.write(u"//===== EXPANDED : {} =====\n\n".format(x).encode('ascii'))
history.add(x)
|
[
"def",
"expand",
"(",
"x",
",",
"pending",
",",
"stage",
")",
":",
"if",
"x",
"in",
"history",
"and",
"x",
"not",
"in",
"[",
"'mshadow/mshadow/expr_scalar-inl.h'",
"]",
":",
"# MULTIPLE includes",
"return",
"if",
"x",
"in",
"pending",
":",
"#print('loop found: {} in {}'.format(x, pending))",
"return",
"whtspace",
"=",
"' '",
"*",
"expand",
".",
"treeDepth",
"expand",
".",
"fileCount",
"+=",
"1",
"comment",
"=",
"u\"//=====[{:3d}] STAGE:{:>4} {}EXPANDING: {} =====\\n\\n\"",
".",
"format",
"(",
"expand",
".",
"fileCount",
",",
"stage",
",",
"whtspace",
",",
"x",
")",
"out",
".",
"write",
"(",
"comment",
".",
"encode",
"(",
"'ascii'",
")",
")",
"print",
"(",
"comment",
")",
"with",
"open",
"(",
"x",
",",
"'rb'",
")",
"as",
"x_h",
":",
"for",
"line",
"in",
"x_h",
".",
"readlines",
"(",
")",
":",
"uline",
"=",
"line",
".",
"decode",
"(",
"'utf-8'",
")",
"if",
"'#define DMLC_LOG_STACK_TRACE 1'",
"in",
"uline",
".",
"strip",
"(",
")",
":",
"# Do not enable stacktrace logging",
"continue",
"if",
"uline",
".",
"find",
"(",
"'#include'",
")",
"<",
"0",
":",
"out",
".",
"write",
"(",
"line",
")",
"continue",
"if",
"uline",
".",
"strip",
"(",
")",
".",
"find",
"(",
"'#include'",
")",
">",
"0",
":",
"print",
"(",
"uline",
")",
"continue",
"m",
"=",
"re1",
".",
"search",
"(",
"uline",
")",
"if",
"not",
"m",
":",
"m",
"=",
"re2",
".",
"search",
"(",
"uline",
")",
"if",
"m",
":",
"path",
"=",
"m",
".",
"groups",
"(",
")",
"[",
"0",
"]",
"else",
":",
"m",
"=",
"re3",
".",
"search",
"(",
"uline",
")",
"if",
"m",
":",
"path",
"=",
"'execinfo.h'",
"else",
":",
"print",
"(",
"uline",
"+",
"' not found'",
")",
"continue",
"h",
"=",
"path",
".",
"strip",
"(",
"'./'",
")",
"if",
"\"../3rdparty/\"",
"not",
"in",
"path",
"else",
"path",
"if",
"h",
".",
"endswith",
"(",
"'complex.h'",
")",
"and",
"x",
".",
"endswith",
"(",
"'openblas_config.h'",
")",
":",
"source",
"=",
"''",
"elif",
"h",
".",
"startswith",
"(",
"'ps/'",
")",
":",
"source",
"=",
"'../3rdparty/ps-lite/include/'",
"+",
"h",
"else",
":",
"source",
"=",
"find_source",
"(",
"h",
",",
"x",
",",
"stage",
")",
"if",
"not",
"source",
":",
"if",
"(",
"h",
"not",
"in",
"blacklist",
"and",
"h",
"not",
"in",
"sysheaders",
"and",
"'mkl'",
"not",
"in",
"h",
"and",
"'nnpack'",
"not",
"in",
"h",
"and",
"'tensorrt'",
"not",
"in",
"h",
"and",
"not",
"h",
".",
"endswith",
"(",
"'.cuh'",
")",
")",
":",
"sysheaders",
".",
"append",
"(",
"h",
")",
"else",
":",
"expand",
".",
"treeDepth",
"+=",
"1",
"expand",
"(",
"source",
",",
"pending",
"+",
"[",
"x",
"]",
",",
"stage",
")",
"expand",
".",
"treeDepth",
"-=",
"1",
"out",
".",
"write",
"(",
"u\"//===== EXPANDED : {} =====\\n\\n\"",
".",
"format",
"(",
"x",
")",
".",
"encode",
"(",
"'ascii'",
")",
")",
"history",
".",
"add",
"(",
"x",
")"
] |
Expand the pending files in the current stage.
Parameters
----------
x: str
The file to expand.
pending : str
The list of pending files to expand.
stage: str
The current stage for file expansion, used for matching the prefix of files.
|
[
"Expand",
"the",
"pending",
"files",
"in",
"the",
"current",
"stage",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/amalgamation/amalgamation.py#L112-L182
|
train
|
Expand the pending files in the current stage.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5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ttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(50) + chr(0b100000 + 0o20) + chr(0b110001 + 0o1), 0o10), ehT0Px3KOsy9('\060' + chr(11651 - 11540) + chr(0b110010) + '\063' + chr(0b110100), 41810 - 41802), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + '\063' + chr(0b110001) + '\x37', 56516 - 56508), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x36' + chr(0b101100 + 0o5), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1363 - 1314) + chr(48) + chr(0b1011 + 0o50), 5538 - 5530), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + '\062' + '\x32' + chr(54), 35933 - 35925), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\x34' + chr(0b110010), 23782 - 23774), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + '\x33' + chr(0b110001) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1794 - 1746) + '\x6f' + '\x32' + chr(0b101000 + 0o10) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1672 - 1622) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1674 - 1626) + '\157' + '\x35' + chr(2694 - 2641), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b111010 + 0o65) + chr(176 - 127) + chr(1983 - 1932) + chr(1050 - 999), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(290 - 235) + '\063', 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\x33' + chr(0b11100 + 0o32) + chr(53), 0o10), ehT0Px3KOsy9(chr(287 - 239) + '\157' + chr(0b11111 + 0o22) + chr(0b110110) + chr(2703 - 2650), 0o10), ehT0Px3KOsy9(chr(2171 - 2123) + chr(0b1101111) + chr(0b110011) + chr(2028 - 1974) + chr(0b100101 + 0o22), 35821 - 35813), ehT0Px3KOsy9(chr(0b110000) + chr(2943 - 2832) + chr(51) + chr(569 - 517) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b110101) + chr(54), 1975 - 1967), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\067' + '\061', 50792 - 50784), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + '\061' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1100 + 0o143) + chr(0b110010) + chr(50) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\065' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8163 - 8052) + chr(0b110010) + '\x37' + chr(404 - 349), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(538 - 488) + chr(53) + chr(0b11100 + 0o33), 0b1000), ehT0Px3KOsy9(chr(48) + chr(202 - 91) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(149 - 98) + '\061' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8322 - 8211) + chr(51) + chr(1311 - 1262) + chr(0b10011 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b101011 + 0o13) + chr(1521 - 1473), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4837 - 4726) + chr(847 - 798) + chr(55) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + '\067' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(405 - 357) + chr(0b1101111) + chr(1710 - 1661) + '\063' + chr(2646 - 2591), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b11 + 0o56) + chr(0b110111) + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(3642 - 3531) + chr(1567 - 1518) + chr(0b1 + 0o64) + chr(1373 - 1322), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\x32' + '\x31', 58583 - 58575), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(50) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10101 + 0o34) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100001 + 0o21) + '\062' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(50) + '\x36' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1674 - 1623) + '\066' + chr(0b110100), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2032 - 1984) + chr(3809 - 3698) + chr(0b10111 + 0o36) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xac'), chr(100) + chr(101) + chr(99) + chr(330 - 219) + chr(0b1100100) + chr(101))('\165' + chr(4036 - 3920) + chr(0b100111 + 0o77) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nEql5NvrUbPD(OeWW0F1dBPRQ, gF1nSwSD4r19, VRrhsVxQMv59):
if OeWW0F1dBPRQ in sD1K7SLfPnDB and OeWW0F1dBPRQ not in [xafqLlk3kkUe(SXOLrMavuUCe(b"\xef\xef\xa7\xd0'\xf9\x95\xe5\xeaeE:\xdf\x9a\x02\xd8\x84\x16\t\xfe\xcd\x9e\xdc\xceo\xad\xbf\x9d\x13\xd73W\x03"), chr(5604 - 5504) + chr(0b10110 + 0o117) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(0b111100 + 0o71) + '\x74' + chr(959 - 857) + '\055' + chr(129 - 73))]:
return
if OeWW0F1dBPRQ in gF1nSwSD4r19:
return
szhuVQ9S2NcE = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xbc'), '\144' + '\x65' + chr(99) + '\157' + '\x64' + '\145')(chr(6210 - 6093) + chr(11468 - 11352) + '\x66' + chr(0b101101) + '\x38') * nEql5NvrUbPD.treeDepth
nEql5NvrUbPD.nES1G53kHUVE += ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', ord("\x08"))
mUoZPwXPQG1p = xafqLlk3kkUe(SXOLrMavuUCe(b'\xad\xb3\xf2\x8c~\xab\xdf\x91\xfc,\x1e?\xc6\xa8U\xa4\xb5/>\xc9\xa8\x96\x85\x917\xb1\xed\xcb\x07\xfc\x07)*_\x17@\xdf\xf0:\xd4\xf9\xe1\xef\x8c~\xab\xdf\xf7\x8d\x1c'), chr(0b1010011 + 0o21) + chr(101) + '\143' + chr(0b1101111) + chr(0b101000 + 0o74) + '\145')(chr(3082 - 2965) + chr(12055 - 11939) + chr(831 - 729) + chr(1138 - 1093) + chr(0b111000)).V4roHaS3Ppej(nEql5NvrUbPD.nES1G53kHUVE, VRrhsVxQMv59, szhuVQ9S2NcE, OeWW0F1dBPRQ)
xafqLlk3kkUe(UkrMp_I0RDmo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xee\xa6\xc5&'), chr(2633 - 2533) + chr(0b1000111 + 0o36) + '\143' + chr(111) + '\144' + chr(101))(chr(117) + chr(7462 - 7346) + '\146' + '\x2d' + chr(56)))(xafqLlk3kkUe(mUoZPwXPQG1p, xafqLlk3kkUe(SXOLrMavuUCe(b"\xe7\xf2\xac\xde'\xf3"), '\x64' + chr(9146 - 9045) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1010000 + 0o45) + chr(0b1110100) + chr(0b11 + 0o143) + chr(0b100101 + 0o10) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xef\xac\xd8*'), '\x64' + chr(0b10110 + 0o117) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(2285 - 2168) + chr(0b1110100) + chr(1664 - 1562) + '\055' + chr(1733 - 1677))))
zLUzGokYBM2Z(mUoZPwXPQG1p)
with _fwkIVCGgtAN(OeWW0F1dBPRQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xfe'), chr(0b100110 + 0o76) + chr(0b1100101) + chr(99) + chr(0b1010110 + 0o31) + '\144' + chr(2377 - 2276))(chr(6205 - 6088) + '\x74' + chr(102) + chr(0b101101) + '\070')) as LW2_NBT_Up5O:
for LycYkDpyelF6 in xafqLlk3kkUe(LW2_NBT_Up5O, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xf9\xae\xd5/\xff\x8c\xaf\xf4'), chr(100) + chr(101) + '\x63' + '\157' + chr(0b1100100) + chr(0b100011 + 0o102))('\x75' + chr(1542 - 1426) + chr(0b11101 + 0o111) + chr(0b101101) + '\x38'))():
dsfUEnLnmssF = LycYkDpyelF6.decode(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xe8\xa9\x9c{'), '\144' + chr(0b1100101) + chr(99) + chr(5843 - 5732) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1773 - 1728) + chr(0b1001 + 0o57)))
if xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\xf8\xaa\xd7*\xf8\x87\xea\xc3[a\x18\xe4\xb9:\xb0\xbe=-\xcd\xd1\xa6\xe0\xfbQ\x8d\x8e\xf5Z\x88'), chr(100) + '\145' + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(9375 - 9258) + chr(116) + '\x66' + chr(0b101101) + chr(2015 - 1959)) in xafqLlk3kkUe(dsfUEnLnmssF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xe8\xbd\xd83'), chr(0b1100100) + chr(0b1001101 + 0o30) + '\143' + chr(0b1000110 + 0o51) + chr(0b1100100) + chr(0b1100010 + 0o3))('\165' + chr(0b1110100 + 0o0) + chr(102) + chr(45) + chr(56)))():
continue
if xafqLlk3kkUe(dsfUEnLnmssF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\xf5\xa1\xd5'), chr(0b11 + 0o141) + chr(0b111010 + 0o53) + '\143' + chr(0b111111 + 0o60) + chr(0b1100100) + chr(10151 - 10050))(chr(6085 - 5968) + '\164' + '\x66' + '\x2d' + chr(0b11101 + 0o33)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\xf5\xa1\xd2/\xe3\x86\xaf'), '\x64' + '\145' + chr(5090 - 4991) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b101000 + 0o76) + chr(0b101101) + '\x38')) < ehT0Px3KOsy9(chr(1586 - 1538) + chr(111) + '\060', 8):
xafqLlk3kkUe(UkrMp_I0RDmo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xee\xa6\xc5&'), chr(0b1100100) + '\x65' + chr(7834 - 7735) + '\x6f' + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(350 - 248) + '\x2d' + chr(0b11000 + 0o40)))(LycYkDpyelF6)
continue
if xafqLlk3kkUe(dsfUEnLnmssF.strip(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\xf5\xa1\xd5'), chr(0b1100100) + chr(0b1100101) + chr(0b1010000 + 0o23) + chr(2844 - 2733) + '\x64' + chr(0b1100101))(chr(5383 - 5266) + '\164' + chr(0b1100000 + 0o6) + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\xf5\xa1\xd2/\xe3\x86\xaf'), '\x64' + chr(0b0 + 0o145) + chr(9292 - 9193) + chr(0b1101111) + chr(4056 - 3956) + '\145')('\x75' + chr(0b1110100) + chr(9250 - 9148) + '\x2d' + chr(0b111000 + 0o0))) > ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(6292 - 6181) + chr(48), 8):
zLUzGokYBM2Z(dsfUEnLnmssF)
continue
r8ufID9JCHnI = P8B6hjrLnAWh.search(dsfUEnLnmssF)
if not r8ufID9JCHnI:
r8ufID9JCHnI = NEZhpVSJzNYM.search(dsfUEnLnmssF)
if r8ufID9JCHnI:
EaCjyhZptSer = r8ufID9JCHnI.groups()[ehT0Px3KOsy9(chr(0b110000) + chr(1068 - 957) + chr(0b101001 + 0o7), 8)]
else:
r8ufID9JCHnI = JSTL5mSFLY8L.search(dsfUEnLnmssF)
if r8ufID9JCHnI:
EaCjyhZptSer = xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xe4\xaa\xd2*\xf8\x84\xa5\xa9~'), '\144' + chr(4182 - 4081) + chr(0b1100011) + chr(0b1001110 + 0o41) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(7396 - 7280) + chr(0b1000010 + 0o44) + '\x2d' + chr(0b111000))
else:
zLUzGokYBM2Z(dsfUEnLnmssF + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xf2\xa0\xc5c\xf0\x8d\xbf\xe9r'), chr(100) + chr(511 - 410) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(4423 - 4307) + chr(0b10010 + 0o124) + chr(0b101101) + chr(56)))
continue
sz4HVsFVF8nL = EaCjyhZptSer.strip(xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3'), chr(0b1010 + 0o132) + '\145' + '\143' + '\157' + '\144' + chr(2432 - 2331))(chr(117) + chr(12640 - 12524) + chr(0b1100110) + '\x2d' + chr(0b111000))) if xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb2\xe0\x821\xf2\x92\xab\xf5bTt'), '\x64' + '\x65' + '\x63' + chr(0b1001100 + 0o43) + chr(2305 - 2205) + chr(6611 - 6510))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(333 - 288) + chr(0b11100 + 0o34)) not in EaCjyhZptSer else EaCjyhZptSer
if xafqLlk3kkUe(sz4HVsFVF8nL, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xf2\xab\xc24\xff\x96\xa2'), '\x64' + '\x65' + '\x63' + chr(0b111100 + 0o63) + chr(100) + chr(0b1000101 + 0o40))(chr(0b1110101) + '\x74' + chr(0b10101 + 0o121) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xf3\xa2\xc1/\xf3\x9a\xe4\xef'), chr(0b1100 + 0o130) + '\145' + chr(99) + chr(0b111001 + 0o66) + chr(0b1100100) + chr(3307 - 3206))('\165' + chr(478 - 362) + chr(0b1100110) + chr(0b110 + 0o47) + chr(0b111000))) and xafqLlk3kkUe(OeWW0F1dBPRQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xf2\xab\xc24\xff\x96\xa2'), chr(1575 - 1475) + '\x65' + chr(99) + chr(0b1101111) + chr(336 - 236) + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\xec\xaa\xdf!\xfa\x83\xb9\xd8uB5\xdd\x9c\x12\xd9\x89'), '\144' + chr(101) + chr(1747 - 1648) + '\x6f' + chr(7254 - 7154) + '\145')(chr(12562 - 12445) + '\x74' + chr(102) + chr(0b1000 + 0o45) + '\070')):
Qas9W3D0Xbzi = xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(100) + chr(1659 - 1558) + chr(8694 - 8595) + chr(0b1001110 + 0o41) + '\144' + chr(0b1100101))('\x75' + chr(0b100100 + 0o120) + chr(0b1100110) + chr(45) + chr(56))
elif xafqLlk3kkUe(sz4HVsFVF8nL, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xe8\xae\xc37\xe5\x95\xa3\xf3~'), chr(6204 - 6104) + chr(0b101001 + 0o74) + chr(0b111011 + 0o50) + chr(111) + chr(0b1100100) + chr(5556 - 5455))(chr(3681 - 3564) + chr(0b1001011 + 0o51) + chr(102) + chr(1762 - 1717) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2\xef\xe0'), chr(0b1010110 + 0o16) + chr(0b1000011 + 0o42) + chr(99) + chr(0b100010 + 0o115) + chr(100) + chr(0b1100101))(chr(117) + chr(4459 - 4343) + chr(8281 - 8179) + chr(45) + chr(2850 - 2794))):
Qas9W3D0Xbzi = xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb2\xe0\x821\xf2\x92\xab\xf5bTt\xcb\x86X\x9b\x88\x1a\x1c\xa3\xfb\x83\xdc\xc3v\xa8\xa8\x9f'), chr(0b1001000 + 0o34) + chr(0b1100101) + '\x63' + chr(0b1011001 + 0o26) + chr(0b101 + 0o137) + chr(0b1100101))(chr(0b1110101) + chr(0b110000 + 0o104) + chr(9300 - 9198) + chr(45) + chr(0b111000)) + sz4HVsFVF8nL
else:
Qas9W3D0Xbzi = xhhobh7hGGn_(sz4HVsFVF8nL, OeWW0F1dBPRQ, VRrhsVxQMv59)
if not Qas9W3D0Xbzi:
if sz4HVsFVF8nL not in TOIA4F3b9ATP and sz4HVsFVF8nL not in wyVSCz3xhTID and (xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xf7\xa3'), chr(100) + '\x65' + '\x63' + chr(10366 - 10255) + chr(100) + chr(101))(chr(117) + chr(0b1011001 + 0o33) + chr(0b1100110) + chr(0b11000 + 0o25) + '\x38') not in sz4HVsFVF8nL) and (xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\xf2\xbf\xd0 \xfd'), chr(7931 - 7831) + chr(101) + chr(4563 - 4464) + chr(0b101000 + 0o107) + chr(0b1100100) + '\x65')('\x75' + chr(9057 - 8941) + chr(0b1100101 + 0o1) + chr(0b11001 + 0o24) + '\070') not in sz4HVsFVF8nL) and (xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xf9\xa1\xc2,\xe4\x90\xbe'), '\144' + chr(0b1100101) + '\143' + '\x6f' + chr(100) + chr(0b11011 + 0o112))('\165' + chr(3038 - 2922) + chr(0b1100110) + chr(45) + chr(0b101110 + 0o12)) not in sz4HVsFVF8nL) and (not xafqLlk3kkUe(sz4HVsFVF8nL, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xf2\xab\xc24\xff\x96\xa2'), chr(0b100 + 0o140) + chr(101) + '\x63' + chr(3229 - 3118) + chr(100) + chr(6976 - 6875))('\165' + chr(5877 - 5761) + '\146' + chr(0b1000 + 0o45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xff\xba\xd9'), chr(100) + '\x65' + '\x63' + chr(8293 - 8182) + chr(0b110 + 0o136) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + '\070'))):
xafqLlk3kkUe(wyVSCz3xhTID, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xec\xbf\xd4-\xf2'), '\144' + '\145' + chr(0b1100011) + chr(1139 - 1028) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b10101 + 0o43)))(sz4HVsFVF8nL)
else:
nEql5NvrUbPD.GwHbA6Yff6r4 += ehT0Px3KOsy9(chr(1046 - 998) + '\x6f' + '\061', 8)
nEql5NvrUbPD(Qas9W3D0Xbzi, gF1nSwSD4r19 + [OeWW0F1dBPRQ], VRrhsVxQMv59)
nEql5NvrUbPD.GwHbA6Yff6r4 -= ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1001001 + 0o46) + '\061', 8)
xafqLlk3kkUe(UkrMp_I0RDmo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xee\xa6\xc5&'), chr(0b11100 + 0o110) + '\x65' + chr(0b1100011) + chr(0b1101101 + 0o2) + chr(0b1100100) + chr(9841 - 9740))(chr(0b1110101) + chr(5856 - 5740) + '\146' + chr(48 - 3) + chr(0b1000 + 0o60)))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xad\xb3\xf2\x8c~\xab\xdf\xea\xc2N}\x1a\xf5\xb10\xb3\xc1NC\xac\xe9\x90\x9f\x92>\xf1\xf0\x8dp\xb3'), '\x64' + chr(0b101011 + 0o72) + chr(170 - 71) + chr(111) + chr(5057 - 4957) + chr(0b11 + 0o142))('\165' + chr(0b1110100) + chr(0b1 + 0o145) + chr(45) + '\x38').format(OeWW0F1dBPRQ), xafqLlk3kkUe(SXOLrMavuUCe(b"\xe7\xf2\xac\xde'\xf3"), chr(0b1100100) + chr(0b10110 + 0o117) + chr(99) + chr(0b11101 + 0o122) + '\x64' + '\145')('\x75' + '\x74' + chr(0b1100110) + chr(285 - 240) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xef\xac\xd8*'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1000101 + 0o40))('\165' + '\164' + '\146' + chr(0b11111 + 0o16) + '\070')))
xafqLlk3kkUe(sD1K7SLfPnDB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xd6\xff\xc0z\xf5\xa5\xff\xddY\x7fh'), '\144' + chr(0b10111 + 0o116) + chr(99) + '\x6f' + chr(0b110011 + 0o61) + chr(0b1011100 + 0o11))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101010 + 0o3) + chr(0b10010 + 0o46)))(OeWW0F1dBPRQ)
|
apache/incubator-mxnet
|
example/gluon/data.py
|
get_imagenet_iterator
|
def get_imagenet_iterator(root, batch_size, num_workers, data_shape=224, dtype='float32'):
"""Dataset loader with preprocessing."""
train_dir = os.path.join(root, 'train')
train_transform, val_transform = get_imagenet_transforms(data_shape, dtype)
logging.info("Loading image folder %s, this may take a bit long...", train_dir)
train_dataset = ImageFolderDataset(train_dir, transform=train_transform)
train_data = DataLoader(train_dataset, batch_size, shuffle=True,
last_batch='discard', num_workers=num_workers)
val_dir = os.path.join(root, 'val')
if not os.path.isdir(os.path.expanduser(os.path.join(root, 'val', 'n01440764'))):
user_warning = 'Make sure validation images are stored in one subdir per category, a helper script is available at https://git.io/vNQv1'
raise ValueError(user_warning)
logging.info("Loading image folder %s, this may take a bit long...", val_dir)
val_dataset = ImageFolderDataset(val_dir, transform=val_transform)
val_data = DataLoader(val_dataset, batch_size, last_batch='keep', num_workers=num_workers)
return DataLoaderIter(train_data, dtype), DataLoaderIter(val_data, dtype)
|
python
|
def get_imagenet_iterator(root, batch_size, num_workers, data_shape=224, dtype='float32'):
"""Dataset loader with preprocessing."""
train_dir = os.path.join(root, 'train')
train_transform, val_transform = get_imagenet_transforms(data_shape, dtype)
logging.info("Loading image folder %s, this may take a bit long...", train_dir)
train_dataset = ImageFolderDataset(train_dir, transform=train_transform)
train_data = DataLoader(train_dataset, batch_size, shuffle=True,
last_batch='discard', num_workers=num_workers)
val_dir = os.path.join(root, 'val')
if not os.path.isdir(os.path.expanduser(os.path.join(root, 'val', 'n01440764'))):
user_warning = 'Make sure validation images are stored in one subdir per category, a helper script is available at https://git.io/vNQv1'
raise ValueError(user_warning)
logging.info("Loading image folder %s, this may take a bit long...", val_dir)
val_dataset = ImageFolderDataset(val_dir, transform=val_transform)
val_data = DataLoader(val_dataset, batch_size, last_batch='keep', num_workers=num_workers)
return DataLoaderIter(train_data, dtype), DataLoaderIter(val_data, dtype)
|
[
"def",
"get_imagenet_iterator",
"(",
"root",
",",
"batch_size",
",",
"num_workers",
",",
"data_shape",
"=",
"224",
",",
"dtype",
"=",
"'float32'",
")",
":",
"train_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"'train'",
")",
"train_transform",
",",
"val_transform",
"=",
"get_imagenet_transforms",
"(",
"data_shape",
",",
"dtype",
")",
"logging",
".",
"info",
"(",
"\"Loading image folder %s, this may take a bit long...\"",
",",
"train_dir",
")",
"train_dataset",
"=",
"ImageFolderDataset",
"(",
"train_dir",
",",
"transform",
"=",
"train_transform",
")",
"train_data",
"=",
"DataLoader",
"(",
"train_dataset",
",",
"batch_size",
",",
"shuffle",
"=",
"True",
",",
"last_batch",
"=",
"'discard'",
",",
"num_workers",
"=",
"num_workers",
")",
"val_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"'val'",
")",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"os",
".",
"path",
".",
"expanduser",
"(",
"os",
".",
"path",
".",
"join",
"(",
"root",
",",
"'val'",
",",
"'n01440764'",
")",
")",
")",
":",
"user_warning",
"=",
"'Make sure validation images are stored in one subdir per category, a helper script is available at https://git.io/vNQv1'",
"raise",
"ValueError",
"(",
"user_warning",
")",
"logging",
".",
"info",
"(",
"\"Loading image folder %s, this may take a bit long...\"",
",",
"val_dir",
")",
"val_dataset",
"=",
"ImageFolderDataset",
"(",
"val_dir",
",",
"transform",
"=",
"val_transform",
")",
"val_data",
"=",
"DataLoader",
"(",
"val_dataset",
",",
"batch_size",
",",
"last_batch",
"=",
"'keep'",
",",
"num_workers",
"=",
"num_workers",
")",
"return",
"DataLoaderIter",
"(",
"train_data",
",",
"dtype",
")",
",",
"DataLoaderIter",
"(",
"val_data",
",",
"dtype",
")"
] |
Dataset loader with preprocessing.
|
[
"Dataset",
"loader",
"with",
"preprocessing",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/data.py#L76-L91
|
train
|
Dataset loader with preprocessing.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPz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kGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(51) + '\x37', 54548 - 54540), ehT0Px3KOsy9('\x30' + chr(9568 - 9457) + '\x33' + '\061' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\061' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(753 - 703) + chr(52) + '\064', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(0b110111) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + '\062' + chr(0b101011 + 0o5) + chr(0b110011), 16516 - 16508), ehT0Px3KOsy9('\060' + chr(4407 - 4296) + chr(0b1010 + 0o50) + chr(0b10110 + 0o36) + chr(0b1110 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(349 - 301) + chr(10382 - 10271) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(12045 - 11934) + chr(0b101111 + 0o2) + chr(0b11010 + 0o35) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + '\x34', 8), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b100011 + 0o114) + '\x33' + chr(0b100000 + 0o20), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(712 - 662) + chr(52) + chr(2140 - 2092), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(1698 - 1647) + chr(1778 - 1728), 20380 - 20372), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b110000) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b110011) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1388 - 1340) + chr(111) + chr(0b1011 + 0o50) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1805 - 1757) + '\x6f' + '\x33' + '\065' + chr(0b100100 + 0o23), 40210 - 40202), ehT0Px3KOsy9('\060' + chr(0b1011001 + 0o26) + '\061' + '\x36' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(55) + chr(0b10010 + 0o41), 10868 - 10860), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(1450 - 1400) + chr(1989 - 1935) + chr(0b1 + 0o61), 0o10), ehT0Px3KOsy9(chr(1514 - 1466) + chr(9224 - 9113) + chr(377 - 327) + chr(672 - 624) + chr(51), 8), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(51) + chr(53) + chr(2022 - 1967), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b11011 + 0o34) + chr(0b110011 + 0o4), 0b1000), ehT0Px3KOsy9(chr(2113 - 2065) + chr(111) + '\062' + chr(0b110100) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\x31' + '\066' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(2151 - 2102) + chr(630 - 576) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(7240 - 7129) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(196 - 148) + '\157' + chr(49) + '\061' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1010 + 0o50) + chr(0b1 + 0o57) + chr(0b11000 + 0o31), 24997 - 24989), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b110001) + chr(50) + chr(2609 - 2557), 0o10), ehT0Px3KOsy9(chr(411 - 363) + chr(859 - 748) + chr(0b1001 + 0o50) + '\x32' + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(4708 - 4597) + '\062' + '\065' + '\065', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\066' + chr(1852 - 1804), 49433 - 49425), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(55) + chr(55), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b11000 + 0o127) + '\061' + chr(0b110001) + chr(0b11100 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(2235 - 2182), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100010 + 0o17) + chr(0b110011 + 0o4) + '\066', 49564 - 49556), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(51) + chr(0b110101) + chr(1492 - 1442), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + '\x32' + chr(51) + '\067', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b10111 + 0o130) + chr(53) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1'), '\144' + '\145' + chr(0b101100 + 0o67) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1101100 + 0o11) + chr(0b1110100) + chr(1108 - 1006) + chr(0b101101) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ZilzCEehYwxd(FiL2Xt3u2AMN, ix9dZyeAmUxY, c1aWEsj_NmYg, l48nAKgbtcOz=ehT0Px3KOsy9(chr(48) + chr(10513 - 10402) + chr(0b10111 + 0o34) + chr(73 - 21) + chr(0b101001 + 0o7), ord("\x08")), jSV9IKnemH7K=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xa1{\xa9\xd0\x0f\xb1'), chr(0b1001 + 0o133) + chr(0b1100101) + chr(2030 - 1931) + chr(111) + chr(0b1001 + 0o133) + chr(3361 - 3260))('\165' + '\164' + chr(0b1100100 + 0o2) + '\x2d' + chr(0b111000))):
x9cwAbV6Ol7j = oqhJDdMJfuwx.path._oWXztVNnqHF(FiL2Xt3u2AMN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xbfu\xa1\xca'), chr(0b1001101 + 0o27) + chr(0b1100101) + chr(0b10001 + 0o122) + chr(0b11011 + 0o124) + chr(6588 - 6488) + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + '\x2d' + chr(0b111000)))
(CX5qLWLEao_w, iLSZlJf2KEuh) = CFKjihlWe8I_(l48nAKgbtcOz, jSV9IKnemH7K)
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xfa\\\xb0\xd1_\xe4\x90k\x10fs'), chr(2691 - 2591) + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\145')('\165' + chr(0b1110100) + '\x66' + chr(0b1011 + 0o42) + chr(0b10100 + 0o44)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3\xa2u\xac\xcdR\xe4\x87h\x11]\x7f\xc5\xfa\xa57r\x8b\x13\x89\x92\xa6\x9c\x93\x83\x00\x19o?\xa195\xd4\x90\xcb+\x0e\x1b\xca\xfe\xbf\xaf}\xbc\x84P\xec\xc9fR\x126'), chr(5151 - 5051) + chr(0b1100101) + chr(5670 - 5571) + '\157' + '\144' + chr(101))('\x75' + chr(0b1010111 + 0o35) + chr(7503 - 7401) + chr(860 - 815) + chr(0b1 + 0o67)), x9cwAbV6Ol7j)
_H7HhX1OiYNO = Wl1V7xDazlzY(x9cwAbV6Ol7j, transform=CX5qLWLEao_w)
sW8AagBcZuuj = PwIcmKxFD79o(_H7HhX1OiYNO, ix9dZyeAmUxY, shuffle=ehT0Px3KOsy9('\060' + chr(111) + chr(0b100 + 0o55), 8), last_batch=xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xa4g\xab\xc5N\xe7'), chr(2725 - 2625) + '\145' + chr(0b1010001 + 0o22) + chr(0b1101111) + chr(0b10110 + 0o116) + chr(0b11010 + 0o113))(chr(12260 - 12143) + chr(0b1011111 + 0o25) + '\x66' + chr(0b101101) + '\x38'), num_workers=c1aWEsj_NmYg)
pTdyqaT5XcE4 = oqhJDdMJfuwx.path._oWXztVNnqHF(FiL2Xt3u2AMN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\xacx'), chr(0b101000 + 0o74) + '\145' + chr(0b111100 + 0o47) + chr(0b1010011 + 0o34) + chr(6310 - 6210) + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(0b111 + 0o46) + chr(0b110100 + 0o4)))
if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xbep\xa1\xd6'), chr(0b100101 + 0o77) + chr(1129 - 1028) + chr(0b100000 + 0o103) + chr(111) + '\144' + '\x65')(chr(0b1011000 + 0o35) + '\x74' + '\x66' + chr(0b101101) + '\x38'))(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa\xb5d\xa9\xcaX\xf6\xd4d\x0e'), chr(0b10101 + 0o117) + chr(7727 - 7626) + chr(0b1011110 + 0o5) + chr(0b1001011 + 0o44) + chr(0b11100 + 0o110) + chr(101))(chr(0b11010 + 0o133) + chr(0b110011 + 0o101) + chr(0b11011 + 0o113) + chr(45) + '\x38'))(xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xa2C\x90\xdeH\xd5\xe9o\rt^'), chr(100) + chr(0b100001 + 0o104) + chr(4807 - 4708) + chr(3480 - 3369) + chr(0b111111 + 0o45) + chr(0b1000000 + 0o45))('\x75' + chr(0b1110100) + chr(102) + '\x2d' + chr(762 - 706)))(FiL2Xt3u2AMN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\xacx'), chr(100) + chr(0b1 + 0o144) + chr(99) + '\157' + chr(0b1100100) + chr(0b1010111 + 0o16))(chr(0b1110101) + chr(0b1010111 + 0o35) + chr(102) + '\055' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xfd%\xfc\x90\x0c\xb4\x915'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(0b1100100) + '\145')(chr(117) + '\164' + '\x66' + '\055' + '\070')))):
S7AKDSMJ6N2Q = xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2\xac\x7f\xad\x84O\xf6\xd5d\\Jy\xcc\xb3\xa79j\x86\x19\x95\x92\xea\x82\xde\xc4\x11\x02&-\xf31t\xde\xc4\xd08\x00\x1a\xca\xf6\xf1\xed{\xa6\xc1\x1c\xf0\xd2c\x18Uj\x80\xaa\xa6*>\x8c\x17\x8f\xd7\xe4\x80\xcd\xdaXQgl\xe918\xdd\xd5\xcdj\x16\x1d\x98\xf6\xef\xb94\xa1\xd7\x1c\xe2\xd1`\x15Py\xc2\xb6\xa6x\x7f\x9bV\x93\xc6\xf7\x9f\xcc\x99[^a%\xf5z=\xc2\x9f\xc9\x044\x08\xdb'), chr(4152 - 4052) + '\x65' + chr(0b100110 + 0o75) + chr(0b101101 + 0o102) + chr(100) + chr(7035 - 6934))(chr(9741 - 9624) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000))
raise q1QCh3W88sgk(S7AKDSMJ6N2Q)
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xfa\\\xb0\xd1_\xe4\x90k\x10fs'), '\x64' + chr(101) + '\x63' + chr(111) + chr(5798 - 5698) + '\x65')('\x75' + '\x74' + '\146' + chr(575 - 530) + chr(0b101010 + 0o16)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3\xa2u\xac\xcdR\xe4\x87h\x11]\x7f\xc5\xfa\xa57r\x8b\x13\x89\x92\xa6\x9c\x93\x83\x00\x19o?\xa195\xd4\x90\xcb+\x0e\x1b\xca\xfe\xbf\xaf}\xbc\x84P\xec\xc9fR\x126'), '\144' + chr(0b1100101) + chr(0b101010 + 0o71) + chr(111) + chr(9331 - 9231) + chr(1292 - 1191))(chr(0b111101 + 0o70) + '\164' + chr(102) + '\055' + '\x38'), pTdyqaT5XcE4)
gxDmn9wk6Nhg = Wl1V7xDazlzY(pTdyqaT5XcE4, transform=iLSZlJf2KEuh)
Fqf3aMH2G9yX = PwIcmKxFD79o(gxDmn9wk6Nhg, ix9dZyeAmUxY, last_batch=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xa8q\xb8'), '\144' + '\x65' + '\143' + '\157' + chr(0b1001011 + 0o31) + chr(101))(chr(11196 - 11079) + '\164' + chr(0b1100110) + chr(1718 - 1673) + chr(56)), num_workers=c1aWEsj_NmYg)
return (aMDxdrfCJYjz(sW8AagBcZuuj, jSV9IKnemH7K), aMDxdrfCJYjz(Fqf3aMH2G9yX, jSV9IKnemH7K))
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
create
|
def create(embedding_name, **kwargs):
"""Creates an instance of token embedding.
Creates a token embedding instance by loading embedding vectors from an externally hosted
pre-trained token embedding file, such as those of GloVe and FastText. To get all the valid
`embedding_name` and `pretrained_file_name`, use
`mxnet.contrib.text.embedding.get_pretrained_file_names()`.
Parameters
----------
embedding_name : str
The token embedding name (case-insensitive).
Returns
-------
An instance of `mxnet.contrib.text.glossary._TokenEmbedding`:
A token embedding instance that loads embedding vectors from an externally hosted
pre-trained token embedding file.
"""
create_text_embedding = registry.get_create_func(_TokenEmbedding, 'token embedding')
return create_text_embedding(embedding_name, **kwargs)
|
python
|
def create(embedding_name, **kwargs):
"""Creates an instance of token embedding.
Creates a token embedding instance by loading embedding vectors from an externally hosted
pre-trained token embedding file, such as those of GloVe and FastText. To get all the valid
`embedding_name` and `pretrained_file_name`, use
`mxnet.contrib.text.embedding.get_pretrained_file_names()`.
Parameters
----------
embedding_name : str
The token embedding name (case-insensitive).
Returns
-------
An instance of `mxnet.contrib.text.glossary._TokenEmbedding`:
A token embedding instance that loads embedding vectors from an externally hosted
pre-trained token embedding file.
"""
create_text_embedding = registry.get_create_func(_TokenEmbedding, 'token embedding')
return create_text_embedding(embedding_name, **kwargs)
|
[
"def",
"create",
"(",
"embedding_name",
",",
"*",
"*",
"kwargs",
")",
":",
"create_text_embedding",
"=",
"registry",
".",
"get_create_func",
"(",
"_TokenEmbedding",
",",
"'token embedding'",
")",
"return",
"create_text_embedding",
"(",
"embedding_name",
",",
"*",
"*",
"kwargs",
")"
] |
Creates an instance of token embedding.
Creates a token embedding instance by loading embedding vectors from an externally hosted
pre-trained token embedding file, such as those of GloVe and FastText. To get all the valid
`embedding_name` and `pretrained_file_name`, use
`mxnet.contrib.text.embedding.get_pretrained_file_names()`.
Parameters
----------
embedding_name : str
The token embedding name (case-insensitive).
Returns
-------
An instance of `mxnet.contrib.text.glossary._TokenEmbedding`:
A token embedding instance that loads embedding vectors from an externally hosted
pre-trained token embedding file.
|
[
"Creates",
"an",
"instance",
"of",
"token",
"embedding",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L63-L87
|
train
|
Creates an instance of token embedding.
|
Pu7Z6IJCgH3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LA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(11090 - 10979) + '\063' + '\x33' + chr(0b10100 + 0o35), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(54) + chr(108 - 59), 0o10), ehT0Px3KOsy9('\x30' + chr(789 - 678) + chr(0b110011) + chr(0b110 + 0o56), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6504 - 6393) + chr(50) + chr(50) + chr(0b101011 + 0o11), 33221 - 33213), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(0b110011) + chr(0b110010) + chr(2420 - 2365), 52237 - 52229), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b111 + 0o57) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110001) + chr(0b1000 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11111 + 0o120) + '\x32' + chr(2012 - 1959), 33321 - 33313), ehT0Px3KOsy9(chr(784 - 736) + chr(0b1101111) + '\061' + chr(54) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9(chr(2301 - 2253) + chr(0b1101111) + '\063' + chr(50) + chr(1853 - 1798), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(51) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110110) + chr(0b101100 + 0o4), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2320 - 2271) + chr(55), 33693 - 33685), ehT0Px3KOsy9('\060' + '\157' + '\064' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(731 - 683) + chr(0b1011001 + 0o26) + chr(2056 - 2007) + '\061' + chr(0b100011 + 0o15), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110100) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9(chr(48) + chr(618 - 507) + '\061' + chr(2103 - 2055), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x37' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11101 + 0o26), 60813 - 60805), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1282 - 1233) + '\065' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(530 - 475) + chr(1750 - 1699), 0o10), ehT0Px3KOsy9(chr(527 - 479) + chr(111) + chr(49) + chr(0b100110 + 0o21) + chr(1517 - 1462), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b100011 + 0o114) + chr(711 - 661) + chr(1733 - 1684) + chr(1879 - 1828), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101101 + 0o4) + chr(0b100 + 0o55) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o47) + chr(0b101000 + 0o11) + chr(0b110010), 16066 - 16058), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(50) + '\067', 9719 - 9711), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(0b100011 + 0o20) + chr(0b100000 + 0o23) + chr(1957 - 1903), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(51) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1748 - 1697) + chr(50) + chr(0b110110), 35727 - 35719), ehT0Px3KOsy9('\x30' + chr(0b1101101 + 0o2) + chr(49) + chr(2388 - 2338) + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9('\x30' + chr(5491 - 5380) + chr(49) + chr(2898 - 2843) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(804 - 755) + '\x37' + chr(0b100101 + 0o14), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10111 + 0o34) + '\066' + chr(54), 0o10), ehT0Px3KOsy9(chr(2251 - 2203) + chr(0b10101 + 0o132) + '\x32' + chr(51) + '\066', 55179 - 55171), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10100 + 0o36) + chr(51) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\067' + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11001 + 0o32) + chr(0b110110) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + chr(1538 - 1488) + '\x30' + chr(0b1011 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(52) + chr(2016 - 1961), 44908 - 44900)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + '\x35' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7'), '\x64' + '\x65' + chr(0b100001 + 0o102) + chr(111) + chr(0b100001 + 0o103) + chr(101))(chr(0b1110101) + '\x74' + '\x66' + chr(935 - 890) + chr(0b101000 + 0o20)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zXm8hKpI6bmL(NaStYlodLLD8, **M8EIoTs2GJXE):
G2WgGWaN4iIr = U24OBsRcVqkJ.get_create_func(vzwtCDuivtb7, xafqLlk3kkUe(SXOLrMavuUCe(b'\xad\xdew\xf1\xb9\x90\xefx\x10\xb2?\x14fH/'), '\x64' + chr(0b1100101) + chr(8818 - 8719) + '\x6f' + chr(0b10010 + 0o122) + chr(0b1100101))('\x75' + '\164' + chr(0b1010001 + 0o25) + chr(0b101101) + chr(0b10101 + 0o43)))
return G2WgGWaN4iIr(NaStYlodLLD8, **M8EIoTs2GJXE)
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
get_pretrained_file_names
|
def get_pretrained_file_names(embedding_name=None):
"""Get valid token embedding names and their pre-trained file names.
To load token embedding vectors from an externally hosted pre-trained token embedding file,
such as those of GloVe and FastText, one should use
`mxnet.contrib.text.embedding.create(embedding_name, pretrained_file_name)`.
This method returns all the valid names of `pretrained_file_name` for the specified
`embedding_name`. If `embedding_name` is set to None, this method returns all the valid
names of `embedding_name` with their associated `pretrained_file_name`.
Parameters
----------
embedding_name : str or None, default None
The pre-trained token embedding name.
Returns
-------
dict or list:
A list of all the valid pre-trained token embedding file names (`pretrained_file_name`)
for the specified token embedding name (`embedding_name`). If the text embeding name is
set to None, returns a dict mapping each valid token embedding name to a list of valid
pre-trained files (`pretrained_file_name`). They can be plugged into
`mxnet.contrib.text.embedding.create(embedding_name,
pretrained_file_name)`.
"""
text_embedding_reg = registry.get_registry(_TokenEmbedding)
if embedding_name is not None:
if embedding_name not in text_embedding_reg:
raise KeyError('Cannot find `embedding_name` %s. Use '
'`get_pretrained_file_names('
'embedding_name=None).keys()` to get all the valid embedding '
'names.' % embedding_name)
return list(text_embedding_reg[embedding_name].pretrained_file_name_sha1.keys())
else:
return {embedding_name: list(embedding_cls.pretrained_file_name_sha1.keys())
for embedding_name, embedding_cls in registry.get_registry(_TokenEmbedding).items()}
|
python
|
def get_pretrained_file_names(embedding_name=None):
"""Get valid token embedding names and their pre-trained file names.
To load token embedding vectors from an externally hosted pre-trained token embedding file,
such as those of GloVe and FastText, one should use
`mxnet.contrib.text.embedding.create(embedding_name, pretrained_file_name)`.
This method returns all the valid names of `pretrained_file_name` for the specified
`embedding_name`. If `embedding_name` is set to None, this method returns all the valid
names of `embedding_name` with their associated `pretrained_file_name`.
Parameters
----------
embedding_name : str or None, default None
The pre-trained token embedding name.
Returns
-------
dict or list:
A list of all the valid pre-trained token embedding file names (`pretrained_file_name`)
for the specified token embedding name (`embedding_name`). If the text embeding name is
set to None, returns a dict mapping each valid token embedding name to a list of valid
pre-trained files (`pretrained_file_name`). They can be plugged into
`mxnet.contrib.text.embedding.create(embedding_name,
pretrained_file_name)`.
"""
text_embedding_reg = registry.get_registry(_TokenEmbedding)
if embedding_name is not None:
if embedding_name not in text_embedding_reg:
raise KeyError('Cannot find `embedding_name` %s. Use '
'`get_pretrained_file_names('
'embedding_name=None).keys()` to get all the valid embedding '
'names.' % embedding_name)
return list(text_embedding_reg[embedding_name].pretrained_file_name_sha1.keys())
else:
return {embedding_name: list(embedding_cls.pretrained_file_name_sha1.keys())
for embedding_name, embedding_cls in registry.get_registry(_TokenEmbedding).items()}
|
[
"def",
"get_pretrained_file_names",
"(",
"embedding_name",
"=",
"None",
")",
":",
"text_embedding_reg",
"=",
"registry",
".",
"get_registry",
"(",
"_TokenEmbedding",
")",
"if",
"embedding_name",
"is",
"not",
"None",
":",
"if",
"embedding_name",
"not",
"in",
"text_embedding_reg",
":",
"raise",
"KeyError",
"(",
"'Cannot find `embedding_name` %s. Use '",
"'`get_pretrained_file_names('",
"'embedding_name=None).keys()` to get all the valid embedding '",
"'names.'",
"%",
"embedding_name",
")",
"return",
"list",
"(",
"text_embedding_reg",
"[",
"embedding_name",
"]",
".",
"pretrained_file_name_sha1",
".",
"keys",
"(",
")",
")",
"else",
":",
"return",
"{",
"embedding_name",
":",
"list",
"(",
"embedding_cls",
".",
"pretrained_file_name_sha1",
".",
"keys",
"(",
")",
")",
"for",
"embedding_name",
",",
"embedding_cls",
"in",
"registry",
".",
"get_registry",
"(",
"_TokenEmbedding",
")",
".",
"items",
"(",
")",
"}"
] |
Get valid token embedding names and their pre-trained file names.
To load token embedding vectors from an externally hosted pre-trained token embedding file,
such as those of GloVe and FastText, one should use
`mxnet.contrib.text.embedding.create(embedding_name, pretrained_file_name)`.
This method returns all the valid names of `pretrained_file_name` for the specified
`embedding_name`. If `embedding_name` is set to None, this method returns all the valid
names of `embedding_name` with their associated `pretrained_file_name`.
Parameters
----------
embedding_name : str or None, default None
The pre-trained token embedding name.
Returns
-------
dict or list:
A list of all the valid pre-trained token embedding file names (`pretrained_file_name`)
for the specified token embedding name (`embedding_name`). If the text embeding name is
set to None, returns a dict mapping each valid token embedding name to a list of valid
pre-trained files (`pretrained_file_name`). They can be plugged into
`mxnet.contrib.text.embedding.create(embedding_name,
pretrained_file_name)`.
|
[
"Get",
"valid",
"token",
"embedding",
"names",
"and",
"their",
"pre",
"-",
"trained",
"file",
"names",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L90-L130
|
train
|
Get all the pre - trained token embedding file names.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIw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UoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(931 - 883) + chr(9598 - 9487) + chr(0b110001) + chr(684 - 635) + chr(0b10101 + 0o33), 65136 - 65128), ehT0Px3KOsy9(chr(48) + chr(9531 - 9420) + chr(1320 - 1269) + '\063' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1406 - 1358) + chr(1842 - 1731) + chr(2388 - 2334) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1100100 + 0o13) + '\063' + chr(0b110100) + '\x34', 62654 - 62646), ehT0Px3KOsy9(chr(2056 - 2008) + chr(11870 - 11759) + '\063' + chr(0b110011) + chr(0b110111), 33982 - 33974), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(319 - 268) + chr(49) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(716 - 666) + '\065' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1494 - 1443) + chr(0b110101) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(11726 - 11615) + chr(55) + chr(364 - 312), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x37' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1100110 + 0o11) + chr(2854 - 2800) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(92 - 43) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1272 - 1224) + chr(2310 - 2199) + '\061' + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b10110 + 0o41) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(53) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(0b10111 + 0o37) + chr(0b101011 + 0o12), 18865 - 18857), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + chr(53), 0b1000), ehT0Px3KOsy9(chr(1306 - 1258) + chr(0b110010 + 0o75) + '\063', 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(7977 - 7866) + chr(51) + chr(1720 - 1665) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(0b1001 + 0o51) + chr(909 - 855) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b110111) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(598 - 549) + chr(48) + chr(2356 - 2303), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x36' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110000 + 0o77) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5462 - 5351) + chr(0b100010 + 0o21) + chr(0b110010) + chr(52), 65129 - 65121), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(2071 - 2023) + chr(0b1101111) + chr(674 - 624) + chr(53) + chr(0b10101 + 0o42), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011110 + 0o21) + chr(0b110011) + chr(0b101100 + 0o5), 0b1000), ehT0Px3KOsy9('\060' + chr(215 - 104) + chr(0b100111 + 0o12) + '\065' + chr(0b110001), 12569 - 12561), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b1011 + 0o50) + chr(0b1 + 0o66), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(247 - 193) + '\x34', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100101 + 0o20) + chr(50), 0o10), ehT0Px3KOsy9(chr(1043 - 995) + '\157' + '\062' + chr(54) + chr(1865 - 1810), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b101101 + 0o12) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1125 - 1077) + '\157' + '\x31' + chr(0b110010) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1608 - 1497) + chr(52) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x37' + '\x34', 8), ehT0Px3KOsy9(chr(701 - 653) + '\157' + '\x32' + '\062' + '\067', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(3520 - 3409) + '\x35' + chr(2274 - 2226), 51717 - 51709)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'f'), chr(0b1100100) + '\145' + '\143' + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(9373 - 9271) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def XM03faprGd1d(NaStYlodLLD8=None):
bQ8XSY0g4GnM = U24OBsRcVqkJ.get_registry(vzwtCDuivtb7)
if NaStYlodLLD8 is not None:
if NaStYlodLLD8 not in bQ8XSY0g4GnM:
raise RQ6CSRrFArYB(xafqLlk3kkUe(SXOLrMavuUCe(b"\x0b\xbcZ\x8a\xb0\xbf\x8b\x8fU\x12P\xacf\x10\xd1O\xd0Qg\x90\xdf\x9c\x1a\xdea\xb9h\xcf1<\x1a\xf1\x14\xbf\xc4\x18u@[\xf2<\x82D\x96\xba\xbf\xd9\x88U\x12Q\xe8Y\x13\xd5A\xd0jm\x98\xdc\x9e6\x98e\xb9o\xcau}\x00\xb1S\xb5\xd9\x1c8E\x01\xd9'\xb3Q\xcd\xf1\xa0\xce\x90OT\x1d\xec&\x01\xd3\r\xd2Pw\xd9\xd0\x97)\x90t\xbch\x8fgx\x05\xb6P\xca\xd2\x107EX\xf3!\xb3S\xc4\xb1\xaa\xc6\x8cOR"), '\144' + chr(7218 - 7117) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(0b111000)) % NaStYlodLLD8)
return YyaZ4tpXu4lf(xafqLlk3kkUe(bQ8XSY0g4GnM[NaStYlodLLD8].pretrained_file_name_sha1, xafqLlk3kkUe(SXOLrMavuUCe(b'#\xb8M\x97'), chr(0b110000 + 0o64) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(5464 - 5363))('\165' + '\x74' + chr(0b1101 + 0o131) + '\x2d' + chr(56)))())
else:
return {NaStYlodLLD8: YyaZ4tpXu4lf(xafqLlk3kkUe(DfnHKd7kwKeq.pretrained_file_name_sha1, xafqLlk3kkUe(SXOLrMavuUCe(b'#\xb8M\x97'), '\x64' + '\145' + chr(0b1001101 + 0o26) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + chr(814 - 758)))()) for (NaStYlodLLD8, DfnHKd7kwKeq) in xafqLlk3kkUe(U24OBsRcVqkJ.get_registry(vzwtCDuivtb7), xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\xa7B\x81\x96\x91\x98\xa0P/|\xb5'), chr(6267 - 6167) + '\145' + '\143' + '\157' + chr(9232 - 9132) + '\145')('\x75' + chr(8532 - 8416) + '\146' + '\x2d' + chr(678 - 622)))()}
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
_TokenEmbedding._load_embedding
|
def _load_embedding(self, pretrained_file_path, elem_delim, init_unknown_vec, encoding='utf8'):
"""Load embedding vectors from the pre-trained token embedding file.
For every unknown token, if its representation `self.unknown_token` is encountered in the
pre-trained token embedding file, index 0 of `self.idx_to_vec` maps to the pre-trained token
embedding vector loaded from the file; otherwise, index 0 of `self.idx_to_vec` maps to the
text embedding vector initialized by `init_unknown_vec`.
If a token is encountered multiple times in the pre-trained text embedding file, only the
first-encountered token embedding vector will be loaded and the rest will be skipped.
"""
pretrained_file_path = os.path.expanduser(pretrained_file_path)
if not os.path.isfile(pretrained_file_path):
raise ValueError('`pretrained_file_path` must be a valid path to '
'the pre-trained token embedding file.')
logging.info('Loading pre-trained token embedding vectors from %s', pretrained_file_path)
vec_len = None
all_elems = []
tokens = set()
loaded_unknown_vec = None
line_num = 0
with io.open(pretrained_file_path, 'r', encoding=encoding) as f:
for line in f:
line_num += 1
elems = line.rstrip().split(elem_delim)
assert len(elems) > 1, 'At line %d of the pre-trained text embedding file: the ' \
'data format of the pre-trained token embedding file %s ' \
'is unexpected.' % (line_num, pretrained_file_path)
token, elems = elems[0], [float(i) for i in elems[1:]]
if token == self.unknown_token and loaded_unknown_vec is None:
loaded_unknown_vec = elems
tokens.add(self.unknown_token)
elif token in tokens:
warnings.warn('At line %d of the pre-trained token embedding file: the '
'embedding vector for token %s has been loaded and a duplicate '
'embedding for the same token is seen and skipped.' %
(line_num, token))
elif len(elems) == 1:
warnings.warn('At line %d of the pre-trained text embedding file: token %s '
'with 1-dimensional vector %s is likely a header and is '
'skipped.' % (line_num, token, elems))
else:
if vec_len is None:
vec_len = len(elems)
# Reserve a vector slot for the unknown token at the very beggining because
# the unknown index is 0.
all_elems.extend([0] * vec_len)
else:
assert len(elems) == vec_len, \
'At line %d of the pre-trained token embedding file: the dimension ' \
'of token %s is %d but the dimension of previous tokens is %d. ' \
'Dimensions of all the tokens must be the same.' \
% (line_num, token, len(elems), vec_len)
all_elems.extend(elems)
self._idx_to_token.append(token)
self._token_to_idx[token] = len(self._idx_to_token) - 1
tokens.add(token)
self._vec_len = vec_len
self._idx_to_vec = nd.array(all_elems).reshape((-1, self.vec_len))
if loaded_unknown_vec is None:
self._idx_to_vec[C.UNKNOWN_IDX] = init_unknown_vec(shape=self.vec_len)
else:
self._idx_to_vec[C.UNKNOWN_IDX] = nd.array(loaded_unknown_vec)
|
python
|
def _load_embedding(self, pretrained_file_path, elem_delim, init_unknown_vec, encoding='utf8'):
"""Load embedding vectors from the pre-trained token embedding file.
For every unknown token, if its representation `self.unknown_token` is encountered in the
pre-trained token embedding file, index 0 of `self.idx_to_vec` maps to the pre-trained token
embedding vector loaded from the file; otherwise, index 0 of `self.idx_to_vec` maps to the
text embedding vector initialized by `init_unknown_vec`.
If a token is encountered multiple times in the pre-trained text embedding file, only the
first-encountered token embedding vector will be loaded and the rest will be skipped.
"""
pretrained_file_path = os.path.expanduser(pretrained_file_path)
if not os.path.isfile(pretrained_file_path):
raise ValueError('`pretrained_file_path` must be a valid path to '
'the pre-trained token embedding file.')
logging.info('Loading pre-trained token embedding vectors from %s', pretrained_file_path)
vec_len = None
all_elems = []
tokens = set()
loaded_unknown_vec = None
line_num = 0
with io.open(pretrained_file_path, 'r', encoding=encoding) as f:
for line in f:
line_num += 1
elems = line.rstrip().split(elem_delim)
assert len(elems) > 1, 'At line %d of the pre-trained text embedding file: the ' \
'data format of the pre-trained token embedding file %s ' \
'is unexpected.' % (line_num, pretrained_file_path)
token, elems = elems[0], [float(i) for i in elems[1:]]
if token == self.unknown_token and loaded_unknown_vec is None:
loaded_unknown_vec = elems
tokens.add(self.unknown_token)
elif token in tokens:
warnings.warn('At line %d of the pre-trained token embedding file: the '
'embedding vector for token %s has been loaded and a duplicate '
'embedding for the same token is seen and skipped.' %
(line_num, token))
elif len(elems) == 1:
warnings.warn('At line %d of the pre-trained text embedding file: token %s '
'with 1-dimensional vector %s is likely a header and is '
'skipped.' % (line_num, token, elems))
else:
if vec_len is None:
vec_len = len(elems)
# Reserve a vector slot for the unknown token at the very beggining because
# the unknown index is 0.
all_elems.extend([0] * vec_len)
else:
assert len(elems) == vec_len, \
'At line %d of the pre-trained token embedding file: the dimension ' \
'of token %s is %d but the dimension of previous tokens is %d. ' \
'Dimensions of all the tokens must be the same.' \
% (line_num, token, len(elems), vec_len)
all_elems.extend(elems)
self._idx_to_token.append(token)
self._token_to_idx[token] = len(self._idx_to_token) - 1
tokens.add(token)
self._vec_len = vec_len
self._idx_to_vec = nd.array(all_elems).reshape((-1, self.vec_len))
if loaded_unknown_vec is None:
self._idx_to_vec[C.UNKNOWN_IDX] = init_unknown_vec(shape=self.vec_len)
else:
self._idx_to_vec[C.UNKNOWN_IDX] = nd.array(loaded_unknown_vec)
|
[
"def",
"_load_embedding",
"(",
"self",
",",
"pretrained_file_path",
",",
"elem_delim",
",",
"init_unknown_vec",
",",
"encoding",
"=",
"'utf8'",
")",
":",
"pretrained_file_path",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"pretrained_file_path",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"pretrained_file_path",
")",
":",
"raise",
"ValueError",
"(",
"'`pretrained_file_path` must be a valid path to '",
"'the pre-trained token embedding file.'",
")",
"logging",
".",
"info",
"(",
"'Loading pre-trained token embedding vectors from %s'",
",",
"pretrained_file_path",
")",
"vec_len",
"=",
"None",
"all_elems",
"=",
"[",
"]",
"tokens",
"=",
"set",
"(",
")",
"loaded_unknown_vec",
"=",
"None",
"line_num",
"=",
"0",
"with",
"io",
".",
"open",
"(",
"pretrained_file_path",
",",
"'r'",
",",
"encoding",
"=",
"encoding",
")",
"as",
"f",
":",
"for",
"line",
"in",
"f",
":",
"line_num",
"+=",
"1",
"elems",
"=",
"line",
".",
"rstrip",
"(",
")",
".",
"split",
"(",
"elem_delim",
")",
"assert",
"len",
"(",
"elems",
")",
">",
"1",
",",
"'At line %d of the pre-trained text embedding file: the '",
"'data format of the pre-trained token embedding file %s '",
"'is unexpected.'",
"%",
"(",
"line_num",
",",
"pretrained_file_path",
")",
"token",
",",
"elems",
"=",
"elems",
"[",
"0",
"]",
",",
"[",
"float",
"(",
"i",
")",
"for",
"i",
"in",
"elems",
"[",
"1",
":",
"]",
"]",
"if",
"token",
"==",
"self",
".",
"unknown_token",
"and",
"loaded_unknown_vec",
"is",
"None",
":",
"loaded_unknown_vec",
"=",
"elems",
"tokens",
".",
"add",
"(",
"self",
".",
"unknown_token",
")",
"elif",
"token",
"in",
"tokens",
":",
"warnings",
".",
"warn",
"(",
"'At line %d of the pre-trained token embedding file: the '",
"'embedding vector for token %s has been loaded and a duplicate '",
"'embedding for the same token is seen and skipped.'",
"%",
"(",
"line_num",
",",
"token",
")",
")",
"elif",
"len",
"(",
"elems",
")",
"==",
"1",
":",
"warnings",
".",
"warn",
"(",
"'At line %d of the pre-trained text embedding file: token %s '",
"'with 1-dimensional vector %s is likely a header and is '",
"'skipped.'",
"%",
"(",
"line_num",
",",
"token",
",",
"elems",
")",
")",
"else",
":",
"if",
"vec_len",
"is",
"None",
":",
"vec_len",
"=",
"len",
"(",
"elems",
")",
"# Reserve a vector slot for the unknown token at the very beggining because",
"# the unknown index is 0.",
"all_elems",
".",
"extend",
"(",
"[",
"0",
"]",
"*",
"vec_len",
")",
"else",
":",
"assert",
"len",
"(",
"elems",
")",
"==",
"vec_len",
",",
"'At line %d of the pre-trained token embedding file: the dimension '",
"'of token %s is %d but the dimension of previous tokens is %d. '",
"'Dimensions of all the tokens must be the same.'",
"%",
"(",
"line_num",
",",
"token",
",",
"len",
"(",
"elems",
")",
",",
"vec_len",
")",
"all_elems",
".",
"extend",
"(",
"elems",
")",
"self",
".",
"_idx_to_token",
".",
"append",
"(",
"token",
")",
"self",
".",
"_token_to_idx",
"[",
"token",
"]",
"=",
"len",
"(",
"self",
".",
"_idx_to_token",
")",
"-",
"1",
"tokens",
".",
"add",
"(",
"token",
")",
"self",
".",
"_vec_len",
"=",
"vec_len",
"self",
".",
"_idx_to_vec",
"=",
"nd",
".",
"array",
"(",
"all_elems",
")",
".",
"reshape",
"(",
"(",
"-",
"1",
",",
"self",
".",
"vec_len",
")",
")",
"if",
"loaded_unknown_vec",
"is",
"None",
":",
"self",
".",
"_idx_to_vec",
"[",
"C",
".",
"UNKNOWN_IDX",
"]",
"=",
"init_unknown_vec",
"(",
"shape",
"=",
"self",
".",
"vec_len",
")",
"else",
":",
"self",
".",
"_idx_to_vec",
"[",
"C",
".",
"UNKNOWN_IDX",
"]",
"=",
"nd",
".",
"array",
"(",
"loaded_unknown_vec",
")"
] |
Load embedding vectors from the pre-trained token embedding file.
For every unknown token, if its representation `self.unknown_token` is encountered in the
pre-trained token embedding file, index 0 of `self.idx_to_vec` maps to the pre-trained token
embedding vector loaded from the file; otherwise, index 0 of `self.idx_to_vec` maps to the
text embedding vector initialized by `init_unknown_vec`.
If a token is encountered multiple times in the pre-trained text embedding file, only the
first-encountered token embedding vector will be loaded and the rest will be skipped.
|
[
"Load",
"embedding",
"vectors",
"from",
"the",
"pre",
"-",
"trained",
"token",
"embedding",
"file",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L232-L303
|
train
|
Load embedding vectors from the pre - trained token embedding file.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2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,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o31) + chr(1718 - 1666) + '\x37', 0o10), ehT0Px3KOsy9(chr(1538 - 1490) + '\157' + chr(436 - 381) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\063' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(282 - 234) + '\x6f' + chr(0b10001 + 0o40) + chr(49) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(6035 - 5924) + '\x31' + chr(0b1101 + 0o45) + chr(489 - 441), 0o10), ehT0Px3KOsy9('\060' + chr(7853 - 7742) + chr(0b100111 + 0o12) + chr(0b110000) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 24385 - 24377), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b100010 + 0o21) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(614 - 566) + chr(0b101101 + 0o102) + '\063' + chr(0b11100 + 0o31) + chr(55), 0b1000), ehT0Px3KOsy9(chr(2254 - 2206) + chr(0b1001001 + 0o46) + chr(51) + chr(51) + chr(164 - 115), 0o10), ehT0Px3KOsy9(chr(1354 - 1306) + chr(10777 - 10666) + '\064' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101010 + 0o5) + '\x32' + chr(49) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(1638 - 1587) + '\x31' + chr(2439 - 2384), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + chr(0b0 + 0o61) + '\067' + chr(484 - 435), 0o10), ehT0Px3KOsy9(chr(1089 - 1041) + chr(0b111010 + 0o65) + chr(54) + chr(48), 58970 - 58962), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\064' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(11492 - 11381) + chr(1634 - 1585) + '\061' + chr(0b101011 + 0o6), 0b1000), ehT0Px3KOsy9(chr(554 - 506) + chr(4132 - 4021) + chr(0b1011 + 0o47) + '\x34' + chr(0b100110 + 0o15), 0o10), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + '\061' + chr(0b110001) + '\061', 8), ehT0Px3KOsy9(chr(213 - 165) + chr(0b1101111) + '\x32' + chr(0b100001 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b101010 + 0o15) + chr(53), 45876 - 45868), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(1001 - 953) + chr(0b11011 + 0o26), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(50) + chr(0b110111) + chr(2366 - 2312), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(811 - 762) + chr(0b101011 + 0o7), 59769 - 59761), ehT0Px3KOsy9(chr(48) + chr(0b110000 + 0o77) + chr(0b110100) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2110 - 2060) + '\x36' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b100110 + 0o16), 50888 - 50880), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + '\x37' + '\065', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2784 - 2729) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101101 + 0o2) + '\x35' + chr(1420 - 1368), 31202 - 31194), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b110000) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(502 - 452) + '\067' + '\x30', 23039 - 23031), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\063' + chr(306 - 252), 8), ehT0Px3KOsy9(chr(1394 - 1346) + chr(111) + chr(50) + chr(0b101010 + 0o15) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(0b110101) + chr(0b100100 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b111110 + 0o61) + '\061' + chr(0b110011) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b110001) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9('\060' + chr(12298 - 12187) + '\062' + '\061' + chr(0b110110), 3524 - 3516), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1982 - 1934) + '\157' + chr(0b110100) + chr(0b1010 + 0o52), 57903 - 57895)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1033 - 985) + '\x6f' + '\x35' + chr(2154 - 2106), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), chr(0b10001 + 0o123) + chr(0b1001 + 0o134) + chr(0b1100011) + chr(3713 - 3602) + chr(2260 - 2160) + '\145')(chr(0b1110101) + chr(0b1100010 + 0o22) + '\146' + chr(0b101101) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zfzGXRyGFUGg(oVre8I6UXc3b, uXQk1ENoMRh9, e4wECtESStno, NWw8bwbtUG_8, _pPd9lb_XZ4K=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2K8t'), '\144' + chr(0b1100101) + chr(0b110 + 0o135) + chr(111) + '\x64' + chr(101))('\x75' + '\x74' + chr(980 - 878) + chr(1578 - 1533) + chr(250 - 194))):
uXQk1ENoMRh9 = oqhJDdMJfuwx.path.expanduser(uXQk1ENoMRh9)
if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xceL8%<#'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b100000 + 0o104) + chr(0b1100101))(chr(117) + chr(12432 - 12316) + chr(0b1100110) + chr(45) + chr(1312 - 1256)))(uXQk1ENoMRh9):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7O,)$4`\xb7\x81\xbcA\xd5\xa9\x10\\\x82\x16\xd3(f\x95\xa1\x9e\xa7T\xc1h\xdd_I\xa7\xd9~\xcd\x896c\xea T\xc6K6l$)!\xaa\x87\xbc\x05\xfa\xbd\x1c\x1d\x93;\xc2 |\x98\xa5\x9e\xbeN\xd9y\x93\x1dI\xea\xda;\xdf\x8c3d\xe9 B\xceS;b'), chr(0b1100100) + chr(0b1100101) + chr(0b1011010 + 0o11) + chr(0b1101111) + chr(0b1100000 + 0o4) + chr(0b1101 + 0o130))(chr(0b1000000 + 0o65) + chr(10897 - 10781) + '\x66' + '\x2d' + chr(0b111000)))
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x08\x164%%f\xe9\x85\xb5\x7f\xe1'), chr(0b1000001 + 0o43) + chr(0b1100101) + chr(4384 - 4285) + chr(111) + chr(0b1100100) + '\x65')(chr(5834 - 5717) + '\164' + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xebP?(9(f\xfe\x9f\xab@\xa7\xbb\x0bQ\x8e'\xc6-2\x89\xae\xd5\xafO\x92y\x90_I\xe3\xdc7\xd5\x8fz|\xebcP\xc8M-l64n\xb3\xcf\xfcV"), chr(0b1011110 + 0o6) + chr(101) + chr(1247 - 1148) + '\x6f' + chr(100) + chr(0b1100010 + 0o3))('\165' + chr(3304 - 3188) + chr(0b1000001 + 0o45) + chr(0b101101 + 0o0) + chr(1732 - 1676)), uXQk1ENoMRh9)
tm7e5yWWt13l = None
aRhXW0vnmL8N = []
Sz7tXxaCGqJ1 = MVEN8G6CxlvR()
IfPImsG9PT5s = None
zT87VDg2dYJA = ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101110 + 0o1) + '\x30', 8)
with xafqLlk3kkUe(Bey9a5LqdaFa, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8O;"'), chr(2308 - 2208) + chr(0b1100101) + chr(892 - 793) + chr(5604 - 5493) + chr(0b1100100) + '\145')(chr(117) + '\164' + chr(0b1001010 + 0o34) + chr(0b1110 + 0o37) + chr(0b100111 + 0o21)))(uXQk1ENoMRh9, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(0b100101 + 0o101) + chr(137 - 92) + '\x38'), encoding=_pPd9lb_XZ4K) as EGyt1xfPT1P6:
for LycYkDpyelF6 in EGyt1xfPT1P6:
zT87VDg2dYJA += ehT0Px3KOsy9('\060' + chr(4782 - 4671) + '\061', 8)
z3PcWqQQ__QP = LycYkDpyelF6.rstrip().split(e4wECtESStno)
assert c2A0yzQpDQB3(z3PcWqQQ__QP) > ehT0Px3KOsy9('\x30' + '\157' + chr(0b1001 + 0o50), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6K~ 9(d\xfe\xca\xbd\x05\xe5\xa9YD\x8f,\x839`\x98\xec\xca\xb8@\xdbr\x98Y\x0c\xf3\xdd&\xcf\xc8?g\xece@\xc3V0+p h\xb2\x8a\xe3\x05\xfe\xa7\x1c\x10\x83(\xd7(2\x9b\xae\xcc\xa7@\xc6<\x92[\x0c\xf3\xd0;\x9b\x98(o\xa3tV\xc6V0)4fu\xb1\x84\xbcK\xaa\xaa\x14R\x82-\xc7 |\x9a\xe1\xd8\xa3M\xd7<\xd8N\x0c\xee\xcb~\xce\x86?r\xfeeG\xd3Z:b'), chr(0b111000 + 0o54) + chr(0b1000100 + 0o41) + '\143' + '\157' + '\144' + chr(0b1001110 + 0o27))(chr(0b1001111 + 0o46) + '\164' + '\x66' + chr(1599 - 1554) + chr(56)) % (zT87VDg2dYJA, uXQk1ENoMRh9)
(mTy3fac_AqJ5, z3PcWqQQ__QP) = (z3PcWqQQ__QP[ehT0Px3KOsy9(chr(2002 - 1954) + '\x6f' + chr(0b1100 + 0o44), 8)], [kkSX4ccExqw4(WVxHKyX45z_L) for WVxHKyX45z_L in z3PcWqQQ__QP[ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(49), 8):]])
if mTy3fac_AqJ5 == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2Q5"?1o\x81\x9b\xb6N\xef\xa1'), '\144' + chr(101) + '\143' + chr(111) + chr(0b110 + 0o136) + chr(1679 - 1578))(chr(117) + chr(0b10100 + 0o140) + '\x66' + chr(690 - 645) + chr(56))) and IfPImsG9PT5s is None:
IfPImsG9PT5s = z3PcWqQQ__QP
xafqLlk3kkUe(Sz7tXxaCGqJ1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2un=i%F\xeb\xb5\x96w\xb9'), '\144' + chr(101) + chr(99) + chr(7267 - 7156) + chr(8915 - 8815) + '\x65')('\x75' + chr(116) + chr(102) + chr(45) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2Q5"?1o\x81\x9b\xb6N\xef\xa1'), chr(100) + chr(9108 - 9007) + chr(99) + chr(111) + '\x64' + chr(6610 - 6509))(chr(117) + chr(0b1101010 + 0o12) + chr(0b1100110) + chr(0b101 + 0o50) + chr(2842 - 2786))))
elif mTy3fac_AqJ5 in Sz7tXxaCGqJ1:
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9{\x1b"\x1e\x04`\xbc\xa9\x97n\xe7'), '\x64' + '\145' + chr(2911 - 2812) + chr(111) + '\144' + chr(3351 - 3250))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + chr(2090 - 2034)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6K~ 9(d\xfe\xca\xbd\x05\xe5\xa9YD\x8f,\x839`\x98\xec\xca\xb8@\xdbr\x98Y\x0c\xf3\xd75\xde\x86zo\xe3bA\xc3[7"7fg\xb7\x83\xbc\x1f\xaa\xbb\x11U\xc7,\xce+w\x99\xa5\xd7\xa4F\x92j\x98^X\xe8\xca~\xdd\x87(*\xfaoO\xc2Q~i#fi\xbf\x9c\xf9G\xef\xaa\x17\x10\x8b&\xc2-w\x99\xe1\xdf\xa4E\x92}\xddYY\xf7\xd47\xd8\x89.o\xaeeI\xc5Z:(9(f\xfe\x89\xb6W\xaa\xbb\x11U\xc7i\xd0(\x7f\x98\xe1\xca\xa5J\xd7r\xddT_\xa7\xcb;\xde\x86zk\xe0d\x04\xd4T7< #e\xf0'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(101))('\x75' + chr(0b100110 + 0o116) + '\146' + chr(1095 - 1050) + chr(0b111000)) % (zT87VDg2dYJA, mTy3fac_AqJ5))
elif c2A0yzQpDQB3(z3PcWqQQ__QP) == ehT0Px3KOsy9(chr(0b110000) + chr(4658 - 4547) + '\061', 8):
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9{\x1b"\x1e\x04`\xbc\xa9\x97n\xe7'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1000001 + 0o56) + '\x64' + chr(5289 - 5188))(chr(0b10 + 0o163) + chr(0b1000011 + 0o61) + '\146' + chr(0b1010 + 0o43) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6K~ 9(d\xfe\xca\xbd\x05\xe5\xa9YD\x8f,\x839`\x98\xec\xca\xb8@\xdbr\x98Y\x0c\xf3\xdd&\xcf\xc8?g\xece@\xc3V0+p h\xb2\x8a\xe3\x05\xfe\xa0\x12U\x89i\x86:2\x8a\xa8\xca\xa2\x01\x831\x99TA\xe2\xd6-\xd2\x874k\xe2 R\xc2\\*#"f$\xad\xcf\xb0V\xaa\xa3\x10[\x82%\xdais\xdd\xa9\xdb\xabE\xd7n\xdd\\B\xe3\x987\xc8\xc8)a\xe7pT\xc2[p'), '\144' + '\145' + chr(4418 - 4319) + chr(0b101011 + 0o104) + chr(100) + chr(6297 - 6196))('\x75' + chr(12069 - 11953) + chr(102) + chr(0b11010 + 0o23) + chr(1226 - 1170)) % (zT87VDg2dYJA, mTy3fac_AqJ5, z3PcWqQQ__QP))
else:
if tm7e5yWWt13l is None:
tm7e5yWWt13l = c2A0yzQpDQB3(z3PcWqQQ__QP)
xafqLlk3kkUe(aRhXW0vnmL8N, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2G*)>"'), chr(100) + chr(0b1000111 + 0o36) + chr(0b1100011) + '\157' + chr(0b1001010 + 0o32) + chr(2238 - 2137))('\165' + chr(7442 - 7326) + chr(0b1000000 + 0o46) + chr(45) + chr(0b110 + 0o62)))([ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), 8)] * tm7e5yWWt13l)
else:
assert c2A0yzQpDQB3(z3PcWqQQ__QP) == tm7e5yWWt13l, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6K~ 9(d\xfe\xca\xbd\x05\xe5\xa9YD\x8f,\x839`\x98\xec\xca\xb8@\xdbr\x98Y\x0c\xf3\xd75\xde\x86zo\xe3bA\xc3[7"7fg\xb7\x83\xbc\x1f\xaa\xbb\x11U\xc7-\xca$w\x93\xb2\xd7\xa5O\x92s\x9b\x1dX\xe8\xd3;\xd5\xc8\x7fy\xaeiW\x87\x1a:l23u\xfe\x9b\xb1@\xaa\xab\x10]\x82\'\xd0 }\x93\xe1\xd1\xac\x01\xc2n\x98KE\xe8\xcd-\x9b\x9c5a\xebnW\x87V-lu"/\xfe\xab\xb0H\xef\xa1\nY\x88\'\xd0i}\x9b\xe1\xdf\xa6M\x92h\x95X\x0c\xf3\xd75\xde\x86)*\xe3uW\xd3\x1f<)p2i\xbb\xcf\xaaD\xe7\xaaW'), chr(0b110001 + 0o63) + '\x65' + '\x63' + '\x6f' + chr(100) + chr(101))(chr(117) + chr(116) + '\146' + chr(0b101011 + 0o2) + chr(0b11100 + 0o34)) % (zT87VDg2dYJA, mTy3fac_AqJ5, c2A0yzQpDQB3(z3PcWqQQ__QP), tm7e5yWWt13l)
xafqLlk3kkUe(aRhXW0vnmL8N, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2G*)>"'), chr(0b10000 + 0o124) + chr(0b1001100 + 0o31) + '\x63' + chr(0b101100 + 0o103) + '\144' + chr(0b1100101))(chr(9285 - 9168) + chr(0b110100 + 0o100) + chr(7196 - 7094) + chr(45) + chr(0b111000)))(z3PcWqQQ__QP)
xafqLlk3kkUe(oVre8I6UXc3b._idx_to_token, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6O.)>"'), chr(0b1100100) + chr(0b1010001 + 0o24) + '\143' + chr(0b100101 + 0o112) + '\144' + chr(3182 - 3081))('\165' + chr(0b1110100) + '\x66' + chr(0b100 + 0o51) + chr(56)))(mTy3fac_AqJ5)
oVre8I6UXc3b.YKKFeQNGEjAm[mTy3fac_AqJ5] = c2A0yzQpDQB3(oVre8I6UXc3b._idx_to_token) - ehT0Px3KOsy9(chr(48) + chr(5627 - 5516) + chr(49), 8)
xafqLlk3kkUe(Sz7tXxaCGqJ1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2un=i%F\xeb\xb5\x96w\xb9'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\x64' + chr(6247 - 6146))(chr(0b1101101 + 0o10) + chr(0b1100011 + 0o21) + chr(102) + chr(45) + chr(0b111000)))(mTy3fac_AqJ5)
oVre8I6UXc3b.M14dIVjuKNC5 = tm7e5yWWt13l
oVre8I6UXc3b.dQYSagyNxAqH = Vy_CFRcuYrTj.array(aRhXW0vnmL8N).reshape((-ehT0Px3KOsy9(chr(48) + chr(0b1101011 + 0o4) + chr(0b1101 + 0o44), 8), oVre8I6UXc3b.vec_len))
if IfPImsG9PT5s is None:
oVre8I6UXc3b.dQYSagyNxAqH[GjrcPZV7TjBn.wzEajaiiZdat] = NWw8bwbtUG_8(shape=oVre8I6UXc3b.vec_len)
else:
oVre8I6UXc3b.dQYSagyNxAqH[GjrcPZV7TjBn.wzEajaiiZdat] = Vy_CFRcuYrTj.B0ePDhpqxN5n(IfPImsG9PT5s)
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
_TokenEmbedding._set_idx_to_vec_by_embeddings
|
def _set_idx_to_vec_by_embeddings(self, token_embeddings, vocab_len, vocab_idx_to_token):
"""Sets the mapping between token indices and token embedding vectors.
Parameters
----------
token_embeddings : instance or list `mxnet.contrib.text.embedding._TokenEmbedding`
One or multiple pre-trained token embeddings to load. If it is a list of multiple
embeddings, these embedding vectors will be concatenated for each token.
vocab_len : int
Length of vocabulary whose tokens are indexed in the token embedding.
vocab_idx_to_token: list of str
A list of indexed tokens in the vocabulary. These tokens are indexed in the token
embedding.
"""
new_vec_len = sum(embed.vec_len for embed in token_embeddings)
new_idx_to_vec = nd.zeros(shape=(vocab_len, new_vec_len))
col_start = 0
# Concatenate all the embedding vectors in token_embeddings.
for embed in token_embeddings:
col_end = col_start + embed.vec_len
# Cancatenate vectors of the unknown token.
new_idx_to_vec[0, col_start:col_end] = embed.idx_to_vec[0]
new_idx_to_vec[1:, col_start:col_end] = embed.get_vecs_by_tokens(vocab_idx_to_token[1:])
col_start = col_end
self._vec_len = new_vec_len
self._idx_to_vec = new_idx_to_vec
|
python
|
def _set_idx_to_vec_by_embeddings(self, token_embeddings, vocab_len, vocab_idx_to_token):
"""Sets the mapping between token indices and token embedding vectors.
Parameters
----------
token_embeddings : instance or list `mxnet.contrib.text.embedding._TokenEmbedding`
One or multiple pre-trained token embeddings to load. If it is a list of multiple
embeddings, these embedding vectors will be concatenated for each token.
vocab_len : int
Length of vocabulary whose tokens are indexed in the token embedding.
vocab_idx_to_token: list of str
A list of indexed tokens in the vocabulary. These tokens are indexed in the token
embedding.
"""
new_vec_len = sum(embed.vec_len for embed in token_embeddings)
new_idx_to_vec = nd.zeros(shape=(vocab_len, new_vec_len))
col_start = 0
# Concatenate all the embedding vectors in token_embeddings.
for embed in token_embeddings:
col_end = col_start + embed.vec_len
# Cancatenate vectors of the unknown token.
new_idx_to_vec[0, col_start:col_end] = embed.idx_to_vec[0]
new_idx_to_vec[1:, col_start:col_end] = embed.get_vecs_by_tokens(vocab_idx_to_token[1:])
col_start = col_end
self._vec_len = new_vec_len
self._idx_to_vec = new_idx_to_vec
|
[
"def",
"_set_idx_to_vec_by_embeddings",
"(",
"self",
",",
"token_embeddings",
",",
"vocab_len",
",",
"vocab_idx_to_token",
")",
":",
"new_vec_len",
"=",
"sum",
"(",
"embed",
".",
"vec_len",
"for",
"embed",
"in",
"token_embeddings",
")",
"new_idx_to_vec",
"=",
"nd",
".",
"zeros",
"(",
"shape",
"=",
"(",
"vocab_len",
",",
"new_vec_len",
")",
")",
"col_start",
"=",
"0",
"# Concatenate all the embedding vectors in token_embeddings.",
"for",
"embed",
"in",
"token_embeddings",
":",
"col_end",
"=",
"col_start",
"+",
"embed",
".",
"vec_len",
"# Cancatenate vectors of the unknown token.",
"new_idx_to_vec",
"[",
"0",
",",
"col_start",
":",
"col_end",
"]",
"=",
"embed",
".",
"idx_to_vec",
"[",
"0",
"]",
"new_idx_to_vec",
"[",
"1",
":",
",",
"col_start",
":",
"col_end",
"]",
"=",
"embed",
".",
"get_vecs_by_tokens",
"(",
"vocab_idx_to_token",
"[",
"1",
":",
"]",
")",
"col_start",
"=",
"col_end",
"self",
".",
"_vec_len",
"=",
"new_vec_len",
"self",
".",
"_idx_to_vec",
"=",
"new_idx_to_vec"
] |
Sets the mapping between token indices and token embedding vectors.
Parameters
----------
token_embeddings : instance or list `mxnet.contrib.text.embedding._TokenEmbedding`
One or multiple pre-trained token embeddings to load. If it is a list of multiple
embeddings, these embedding vectors will be concatenated for each token.
vocab_len : int
Length of vocabulary whose tokens are indexed in the token embedding.
vocab_idx_to_token: list of str
A list of indexed tokens in the vocabulary. These tokens are indexed in the token
embedding.
|
[
"Sets",
"the",
"mapping",
"between",
"token",
"indices",
"and",
"token",
"embedding",
"vectors",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L314-L343
|
train
|
Sets the mapping between token indices and token embedding vectors.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9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P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\x33' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(6123 - 6012) + chr(2234 - 2185) + chr(1189 - 1141) + chr(49), 43864 - 43856), ehT0Px3KOsy9('\x30' + chr(0b110 + 0o151) + chr(0b100011 + 0o22) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110000) + chr(0b1010 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(1356 - 1306), 18838 - 18830), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110 + 0o55) + '\064' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1184 - 1136) + chr(111) + '\061' + chr(0b110111) + chr(49), 50282 - 50274), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(2970 - 2915) + chr(2949 - 2894), 0o10), ehT0Px3KOsy9(chr(1783 - 1735) + '\x6f' + chr(0b101 + 0o55) + chr(2042 - 1990) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(164 - 116) + '\157' + chr(0b110010) + '\x36' + chr(0b100011 + 0o24), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(96 - 46) + chr(1889 - 1837), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(1646 - 1592) + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\066' + chr(0b110110 + 0o0), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b110010) + '\064' + chr(0b11000 + 0o37), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1101 + 0o46) + chr(0b1000 + 0o52), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(52) + '\067', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1673 - 1624) + chr(0b110010) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(12007 - 11896) + '\x32' + '\066' + chr(48), 42657 - 42649), ehT0Px3KOsy9(chr(797 - 749) + '\x6f' + chr(0b10011 + 0o36) + '\060' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x31' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + '\x33' + chr(0b11101 + 0o27) + chr(2322 - 2268), 9005 - 8997), ehT0Px3KOsy9('\x30' + chr(111) + chr(1221 - 1171) + '\067' + chr(52), 18254 - 18246), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b110011), 27296 - 27288), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x37' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(11142 - 11031) + '\061' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1245 - 1197) + chr(241 - 130) + chr(2303 - 2253) + chr(0b110110) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(10248 - 10137) + '\061' + '\064' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(2023 - 1975) + chr(4021 - 3910) + chr(0b10001 + 0o41) + chr(0b100011 + 0o23) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(50) + chr(51) + '\x33', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(1857 - 1808) + chr(51) + chr(52), 18350 - 18342), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + chr(49) + chr(0b110011) + chr(54 - 3), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(4734 - 4623) + chr(0b110010) + chr(0b1 + 0o65) + '\060', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110001) + chr(0b10101 + 0o41), 12888 - 12880), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x31' + chr(54) + '\060', 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + '\065' + chr(0b10101 + 0o35), 19861 - 19853), ehT0Px3KOsy9('\060' + chr(5312 - 5201) + '\063' + chr(1104 - 1053) + chr(1008 - 955), 0o10), ehT0Px3KOsy9('\060' + chr(1370 - 1259) + '\x31' + '\x34' + chr(2211 - 2158), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(2172 - 2122) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + '\x31' + chr(0b110110) + chr(2236 - 2181), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o44) + chr(1920 - 1872), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), chr(100) + '\x65' + chr(7220 - 7121) + '\x6f' + chr(4140 - 4040) + chr(685 - 584))(chr(117) + '\164' + chr(0b10111 + 0o117) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def lyB79vhijy8Z(oVre8I6UXc3b, LgyAzSCxLEVQ, IucSF1nnDzxe, C4ahwmPkBLZB):
eE_JFjJ5tyVE = xkxBmo49x2An((DSKhI6I667G0.vec_len for DSKhI6I667G0 in LgyAzSCxLEVQ))
igoPDVaYPfUK = Vy_CFRcuYrTj.zeros(shape=(IucSF1nnDzxe, eE_JFjJ5tyVE))
huXcdxd8rpKc = ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(1375 - 1327), 0o10)
for DSKhI6I667G0 in LgyAzSCxLEVQ:
M0UuunEjeizy = huXcdxd8rpKc + DSKhI6I667G0.vec_len
igoPDVaYPfUK[ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100100 + 0o14), 8), huXcdxd8rpKc:M0UuunEjeizy] = DSKhI6I667G0.idx_to_vec[ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 8)]
igoPDVaYPfUK[ehT0Px3KOsy9('\x30' + '\x6f' + '\x31', 8):, huXcdxd8rpKc:M0UuunEjeizy] = DSKhI6I667G0.get_vecs_by_tokens(C4ahwmPkBLZB[ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001), 8):])
huXcdxd8rpKc = M0UuunEjeizy
oVre8I6UXc3b.M14dIVjuKNC5 = eE_JFjJ5tyVE
oVre8I6UXc3b.dQYSagyNxAqH = igoPDVaYPfUK
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
_TokenEmbedding.get_vecs_by_tokens
|
def get_vecs_by_tokens(self, tokens, lower_case_backup=False):
"""Look up embedding vectors of tokens.
Parameters
----------
tokens : str or list of strs
A token or a list of tokens.
lower_case_backup : bool, default False
If False, each token in the original case will be looked up; if True, each token in the
original case will be looked up first, if not found in the keys of the property
`token_to_idx`, the token in the lower case will be looked up.
Returns
-------
mxnet.ndarray.NDArray:
The embedding vector(s) of the token(s). According to numpy conventions, if `tokens` is
a string, returns a 1-D NDArray of shape `self.vec_len`; if `tokens` is a list of
strings, returns a 2-D NDArray of shape=(len(tokens), self.vec_len).
"""
to_reduce = False
if not isinstance(tokens, list):
tokens = [tokens]
to_reduce = True
if not lower_case_backup:
indices = [self.token_to_idx.get(token, C.UNKNOWN_IDX) for token in tokens]
else:
indices = [self.token_to_idx[token] if token in self.token_to_idx
else self.token_to_idx.get(token.lower(), C.UNKNOWN_IDX)
for token in tokens]
vecs = nd.Embedding(nd.array(indices), self.idx_to_vec, self.idx_to_vec.shape[0],
self.idx_to_vec.shape[1])
return vecs[0] if to_reduce else vecs
|
python
|
def get_vecs_by_tokens(self, tokens, lower_case_backup=False):
"""Look up embedding vectors of tokens.
Parameters
----------
tokens : str or list of strs
A token or a list of tokens.
lower_case_backup : bool, default False
If False, each token in the original case will be looked up; if True, each token in the
original case will be looked up first, if not found in the keys of the property
`token_to_idx`, the token in the lower case will be looked up.
Returns
-------
mxnet.ndarray.NDArray:
The embedding vector(s) of the token(s). According to numpy conventions, if `tokens` is
a string, returns a 1-D NDArray of shape `self.vec_len`; if `tokens` is a list of
strings, returns a 2-D NDArray of shape=(len(tokens), self.vec_len).
"""
to_reduce = False
if not isinstance(tokens, list):
tokens = [tokens]
to_reduce = True
if not lower_case_backup:
indices = [self.token_to_idx.get(token, C.UNKNOWN_IDX) for token in tokens]
else:
indices = [self.token_to_idx[token] if token in self.token_to_idx
else self.token_to_idx.get(token.lower(), C.UNKNOWN_IDX)
for token in tokens]
vecs = nd.Embedding(nd.array(indices), self.idx_to_vec, self.idx_to_vec.shape[0],
self.idx_to_vec.shape[1])
return vecs[0] if to_reduce else vecs
|
[
"def",
"get_vecs_by_tokens",
"(",
"self",
",",
"tokens",
",",
"lower_case_backup",
"=",
"False",
")",
":",
"to_reduce",
"=",
"False",
"if",
"not",
"isinstance",
"(",
"tokens",
",",
"list",
")",
":",
"tokens",
"=",
"[",
"tokens",
"]",
"to_reduce",
"=",
"True",
"if",
"not",
"lower_case_backup",
":",
"indices",
"=",
"[",
"self",
".",
"token_to_idx",
".",
"get",
"(",
"token",
",",
"C",
".",
"UNKNOWN_IDX",
")",
"for",
"token",
"in",
"tokens",
"]",
"else",
":",
"indices",
"=",
"[",
"self",
".",
"token_to_idx",
"[",
"token",
"]",
"if",
"token",
"in",
"self",
".",
"token_to_idx",
"else",
"self",
".",
"token_to_idx",
".",
"get",
"(",
"token",
".",
"lower",
"(",
")",
",",
"C",
".",
"UNKNOWN_IDX",
")",
"for",
"token",
"in",
"tokens",
"]",
"vecs",
"=",
"nd",
".",
"Embedding",
"(",
"nd",
".",
"array",
"(",
"indices",
")",
",",
"self",
".",
"idx_to_vec",
",",
"self",
".",
"idx_to_vec",
".",
"shape",
"[",
"0",
"]",
",",
"self",
".",
"idx_to_vec",
".",
"shape",
"[",
"1",
"]",
")",
"return",
"vecs",
"[",
"0",
"]",
"if",
"to_reduce",
"else",
"vecs"
] |
Look up embedding vectors of tokens.
Parameters
----------
tokens : str or list of strs
A token or a list of tokens.
lower_case_backup : bool, default False
If False, each token in the original case will be looked up; if True, each token in the
original case will be looked up first, if not found in the keys of the property
`token_to_idx`, the token in the lower case will be looked up.
Returns
-------
mxnet.ndarray.NDArray:
The embedding vector(s) of the token(s). According to numpy conventions, if `tokens` is
a string, returns a 1-D NDArray of shape `self.vec_len`; if `tokens` is a list of
strings, returns a 2-D NDArray of shape=(len(tokens), self.vec_len).
|
[
"Look",
"up",
"embedding",
"vectors",
"of",
"tokens",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L366-L403
|
train
|
Returns an embedding vector of the tokens.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6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VEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b1011 + 0o54) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\061' + '\x33', 31123 - 31115), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\063' + chr(122 - 73), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b10101 + 0o36) + chr(51) + chr(2592 - 2538), 27816 - 27808), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(1965 - 1916) + chr(0b0 + 0o62), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(362 - 312) + chr(1331 - 1280) + chr(49), 0o10), ehT0Px3KOsy9(chr(1229 - 1181) + chr(0b100 + 0o153) + chr(0b110001) + chr(54) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1634 - 1584) + '\x33' + chr(0b110000), 53767 - 53759), ehT0Px3KOsy9(chr(1119 - 1071) + chr(0b11 + 0o154) + '\x32' + chr(0b110010) + chr(0b1111 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(1691 - 1642) + chr(0b110011), 15539 - 15531), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1738 - 1689) + '\x32' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + '\x32' + chr(0b10101 + 0o35) + chr(0b1100 + 0o47), 28072 - 28064), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b10110 + 0o34) + '\063', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(550 - 499) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b10 + 0o155) + chr(0b110010) + chr(0b11010 + 0o27) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\066' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11100 + 0o27) + chr(0b110111) + chr(598 - 548), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(51) + chr(822 - 769), 5437 - 5429), ehT0Px3KOsy9('\x30' + chr(2353 - 2242) + '\063' + chr(389 - 337) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(2662 - 2551) + chr(0b100011 + 0o20) + chr(1985 - 1934) + '\x30', 44058 - 44050), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + chr(0b110001) + '\061' + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x37' + chr(1128 - 1073), 0b1000), ehT0Px3KOsy9(chr(48) + chr(922 - 811) + '\061' + '\060' + chr(0b10010 + 0o36), 0b1000), ehT0Px3KOsy9('\060' + chr(4745 - 4634) + chr(1640 - 1589) + chr(55) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(2304 - 2256) + chr(0b1101111) + chr(1421 - 1370) + chr(0b110101) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(508 - 460) + '\x6f' + '\x31' + chr(0b110100) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(2328 - 2279) + chr(0b10101 + 0o37) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\067' + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(5749 - 5638) + chr(49) + chr(0b110000) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + '\x31' + chr(0b101000 + 0o12) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\x33' + chr(48), 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\x32' + chr(0b110100) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b110000) + '\x30', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(2404 - 2354) + chr(0b110110) + chr(0b11010 + 0o26), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + '\062' + chr(0b110001) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011111 + 0o20) + chr(50) + chr(52) + chr(335 - 287), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1000001 + 0o56) + '\x32' + '\x35' + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(424 - 374) + '\067' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1020 - 972) + chr(0b1101111) + chr(51) + '\x35' + chr(0b10111 + 0o40), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1231 - 1183) + chr(111) + chr(53) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x97'), chr(100) + chr(101) + chr(0b1001011 + 0o30) + chr(0b1100010 + 0o15) + '\x64' + chr(6475 - 6374))(chr(8901 - 8784) + '\164' + '\x66' + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def rLEZZhmKj8Sn(oVre8I6UXc3b, Sz7tXxaCGqJ1, itHm7aj8KxYu=ehT0Px3KOsy9(chr(1339 - 1291) + chr(8381 - 8270) + chr(399 - 351), 0b1000)):
RpH3swGUALc5 = ehT0Px3KOsy9(chr(2175 - 2127) + '\x6f' + chr(0b110000), 8)
if not PlSM16l2KDPD(Sz7tXxaCGqJ1, YyaZ4tpXu4lf):
Sz7tXxaCGqJ1 = [Sz7tXxaCGqJ1]
RpH3swGUALc5 = ehT0Px3KOsy9('\x30' + chr(1808 - 1697) + chr(0b10101 + 0o34), 60809 - 60801)
if not itHm7aj8KxYu:
pIcoaXENl5Pw = [oVre8I6UXc3b.token_to_idx.get(mTy3fac_AqJ5, GjrcPZV7TjBn.wzEajaiiZdat) for mTy3fac_AqJ5 in Sz7tXxaCGqJ1]
else:
pIcoaXENl5Pw = [oVre8I6UXc3b.token_to_idx[mTy3fac_AqJ5] if mTy3fac_AqJ5 in oVre8I6UXc3b.token_to_idx else oVre8I6UXc3b.token_to_idx.get(mTy3fac_AqJ5.lower(), GjrcPZV7TjBn.wzEajaiiZdat) for mTy3fac_AqJ5 in Sz7tXxaCGqJ1]
aJQuXi3xbLyB = Vy_CFRcuYrTj.Embedding(Vy_CFRcuYrTj.B0ePDhpqxN5n(pIcoaXENl5Pw), oVre8I6UXc3b.idx_to_vec, oVre8I6UXc3b.idx_to_vec.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', 8)], oVre8I6UXc3b.idx_to_vec.nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 8)])
return aJQuXi3xbLyB[ehT0Px3KOsy9(chr(48) + chr(0b101 + 0o152) + chr(48), 8)] if RpH3swGUALc5 else aJQuXi3xbLyB
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
_TokenEmbedding.update_token_vectors
|
def update_token_vectors(self, tokens, new_vectors):
"""Updates embedding vectors for tokens.
Parameters
----------
tokens : str or a list of strs
A token or a list of tokens whose embedding vector are to be updated.
new_vectors : mxnet.ndarray.NDArray
An NDArray to be assigned to the embedding vectors of `tokens`. Its length must be equal
to the number of `tokens` and its width must be equal to the dimension of embeddings of
the glossary. If `tokens` is a singleton, it must be 1-D or 2-D. If `tokens` is a list
of multiple strings, it must be 2-D.
"""
assert self.idx_to_vec is not None, 'The property `idx_to_vec` has not been properly set.'
if not isinstance(tokens, list) or len(tokens) == 1:
assert isinstance(new_vectors, nd.NDArray) and len(new_vectors.shape) in [1, 2], \
'`new_vectors` must be a 1-D or 2-D NDArray if `tokens` is a singleton.'
if not isinstance(tokens, list):
tokens = [tokens]
if len(new_vectors.shape) == 1:
new_vectors = new_vectors.expand_dims(0)
else:
assert isinstance(new_vectors, nd.NDArray) and len(new_vectors.shape) == 2, \
'`new_vectors` must be a 2-D NDArray if `tokens` is a list of multiple strings.'
assert new_vectors.shape == (len(tokens), self.vec_len), \
'The length of new_vectors must be equal to the number of tokens and the width of' \
'new_vectors must be equal to the dimension of embeddings of the glossary.'
indices = []
for token in tokens:
if token in self.token_to_idx:
indices.append(self.token_to_idx[token])
else:
raise ValueError('Token %s is unknown. To update the embedding vector for an '
'unknown token, please specify it explicitly as the '
'`unknown_token` %s in `tokens`. This is to avoid unintended '
'updates.' % (token, self.idx_to_token[C.UNKNOWN_IDX]))
self._idx_to_vec[nd.array(indices)] = new_vectors
|
python
|
def update_token_vectors(self, tokens, new_vectors):
"""Updates embedding vectors for tokens.
Parameters
----------
tokens : str or a list of strs
A token or a list of tokens whose embedding vector are to be updated.
new_vectors : mxnet.ndarray.NDArray
An NDArray to be assigned to the embedding vectors of `tokens`. Its length must be equal
to the number of `tokens` and its width must be equal to the dimension of embeddings of
the glossary. If `tokens` is a singleton, it must be 1-D or 2-D. If `tokens` is a list
of multiple strings, it must be 2-D.
"""
assert self.idx_to_vec is not None, 'The property `idx_to_vec` has not been properly set.'
if not isinstance(tokens, list) or len(tokens) == 1:
assert isinstance(new_vectors, nd.NDArray) and len(new_vectors.shape) in [1, 2], \
'`new_vectors` must be a 1-D or 2-D NDArray if `tokens` is a singleton.'
if not isinstance(tokens, list):
tokens = [tokens]
if len(new_vectors.shape) == 1:
new_vectors = new_vectors.expand_dims(0)
else:
assert isinstance(new_vectors, nd.NDArray) and len(new_vectors.shape) == 2, \
'`new_vectors` must be a 2-D NDArray if `tokens` is a list of multiple strings.'
assert new_vectors.shape == (len(tokens), self.vec_len), \
'The length of new_vectors must be equal to the number of tokens and the width of' \
'new_vectors must be equal to the dimension of embeddings of the glossary.'
indices = []
for token in tokens:
if token in self.token_to_idx:
indices.append(self.token_to_idx[token])
else:
raise ValueError('Token %s is unknown. To update the embedding vector for an '
'unknown token, please specify it explicitly as the '
'`unknown_token` %s in `tokens`. This is to avoid unintended '
'updates.' % (token, self.idx_to_token[C.UNKNOWN_IDX]))
self._idx_to_vec[nd.array(indices)] = new_vectors
|
[
"def",
"update_token_vectors",
"(",
"self",
",",
"tokens",
",",
"new_vectors",
")",
":",
"assert",
"self",
".",
"idx_to_vec",
"is",
"not",
"None",
",",
"'The property `idx_to_vec` has not been properly set.'",
"if",
"not",
"isinstance",
"(",
"tokens",
",",
"list",
")",
"or",
"len",
"(",
"tokens",
")",
"==",
"1",
":",
"assert",
"isinstance",
"(",
"new_vectors",
",",
"nd",
".",
"NDArray",
")",
"and",
"len",
"(",
"new_vectors",
".",
"shape",
")",
"in",
"[",
"1",
",",
"2",
"]",
",",
"'`new_vectors` must be a 1-D or 2-D NDArray if `tokens` is a singleton.'",
"if",
"not",
"isinstance",
"(",
"tokens",
",",
"list",
")",
":",
"tokens",
"=",
"[",
"tokens",
"]",
"if",
"len",
"(",
"new_vectors",
".",
"shape",
")",
"==",
"1",
":",
"new_vectors",
"=",
"new_vectors",
".",
"expand_dims",
"(",
"0",
")",
"else",
":",
"assert",
"isinstance",
"(",
"new_vectors",
",",
"nd",
".",
"NDArray",
")",
"and",
"len",
"(",
"new_vectors",
".",
"shape",
")",
"==",
"2",
",",
"'`new_vectors` must be a 2-D NDArray if `tokens` is a list of multiple strings.'",
"assert",
"new_vectors",
".",
"shape",
"==",
"(",
"len",
"(",
"tokens",
")",
",",
"self",
".",
"vec_len",
")",
",",
"'The length of new_vectors must be equal to the number of tokens and the width of'",
"'new_vectors must be equal to the dimension of embeddings of the glossary.'",
"indices",
"=",
"[",
"]",
"for",
"token",
"in",
"tokens",
":",
"if",
"token",
"in",
"self",
".",
"token_to_idx",
":",
"indices",
".",
"append",
"(",
"self",
".",
"token_to_idx",
"[",
"token",
"]",
")",
"else",
":",
"raise",
"ValueError",
"(",
"'Token %s is unknown. To update the embedding vector for an '",
"'unknown token, please specify it explicitly as the '",
"'`unknown_token` %s in `tokens`. This is to avoid unintended '",
"'updates.'",
"%",
"(",
"token",
",",
"self",
".",
"idx_to_token",
"[",
"C",
".",
"UNKNOWN_IDX",
"]",
")",
")",
"self",
".",
"_idx_to_vec",
"[",
"nd",
".",
"array",
"(",
"indices",
")",
"]",
"=",
"new_vectors"
] |
Updates embedding vectors for tokens.
Parameters
----------
tokens : str or a list of strs
A token or a list of tokens whose embedding vector are to be updated.
new_vectors : mxnet.ndarray.NDArray
An NDArray to be assigned to the embedding vectors of `tokens`. Its length must be equal
to the number of `tokens` and its width must be equal to the dimension of embeddings of
the glossary. If `tokens` is a singleton, it must be 1-D or 2-D. If `tokens` is a list
of multiple strings, it must be 2-D.
|
[
"Updates",
"embedding",
"vectors",
"for",
"tokens",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L405-L447
|
train
|
Updates the embedding vectors for the given list of tokens.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeA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vg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(902 - 854) + '\157' + chr(49) + '\065' + chr(652 - 598), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2050 - 1999) + chr(2558 - 2507) + chr(0b11110 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(0b10011 + 0o37) + chr(0b110001 + 0o4) + chr(0b100 + 0o56), 27468 - 27460), ehT0Px3KOsy9(chr(48) + chr(111) + '\067' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9(chr(1108 - 1060) + chr(7736 - 7625) + chr(0b11 + 0o57) + '\x32' + chr(736 - 683), 0o10), ehT0Px3KOsy9(chr(790 - 742) + chr(111) + chr(2148 - 2099) + '\x30' + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1018 - 907) + chr(0b110001) + chr(1967 - 1914) + chr(1596 - 1543), 18115 - 18107), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110 + 0o60) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(49) + '\060' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(913 - 858) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1519 - 1471) + chr(0b10011 + 0o134) + '\061' + '\x32' + chr(1941 - 1888), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + '\x33' + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(237 - 186) + chr(0b1110 + 0o43) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(2216 - 2168) + '\x6f' + chr(651 - 598) + chr(1618 - 1566), ord("\x08")), ehT0Px3KOsy9(chr(1825 - 1777) + chr(0b1101111) + chr(54) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + chr(9879 - 9768) + chr(2357 - 2307) + '\060' + chr(1412 - 1364), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\x37' + '\064', 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(0b1001 + 0o51) + '\060' + chr(0b10100 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(1212 - 1164) + '\157' + chr(1557 - 1504) + chr(0b100010 + 0o21), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(80 - 31) + chr(55) + chr(0b110100), 8), ehT0Px3KOsy9('\060' + chr(3393 - 3282) + chr(1781 - 1730) + chr(49) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5781 - 5670) + chr(80 - 31) + chr(0b110000) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(2181 - 2133) + '\x6f' + chr(0b110001) + chr(1742 - 1688) + chr(0b1 + 0o64), 0b1000), ehT0Px3KOsy9(chr(343 - 295) + '\157' + '\x33' + chr(53) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(1580 - 1529) + chr(0b100100 + 0o22), 0o10), ehT0Px3KOsy9(chr(1165 - 1117) + chr(0b1101111) + '\x33' + chr(0b110111) + chr(52), 5795 - 5787), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\064' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(1263 - 1214) + chr(0b1010 + 0o51) + chr(0b110111), 29259 - 29251), ehT0Px3KOsy9(chr(1728 - 1680) + chr(0b111011 + 0o64) + chr(51) + chr(0b110010) + chr(1497 - 1443), ord("\x08")), ehT0Px3KOsy9(chr(2117 - 2069) + chr(0b1101111) + chr(1985 - 1935) + chr(54) + '\x33', 0o10), ehT0Px3KOsy9(chr(1774 - 1726) + '\157' + chr(49) + chr(1407 - 1355) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o47) + '\x32' + '\063', 0o10), ehT0Px3KOsy9(chr(1628 - 1580) + chr(0b110000 + 0o77) + chr(0b101110 + 0o5) + chr(0b110101), 52606 - 52598), ehT0Px3KOsy9(chr(0b110000) + chr(7115 - 7004) + '\062' + chr(0b110011) + '\066', 7403 - 7395), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b1 + 0o64) + chr(2307 - 2258), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(54) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\x37' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1110 + 0o141) + chr(503 - 453) + chr(64 - 10) + chr(53), 8776 - 8768), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\067' + chr(52), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(769 - 721), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'@'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1000011 + 0o54) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b100011 + 0o103) + chr(0b101101) + chr(2679 - 2623)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jb0TZDPAkNb6(oVre8I6UXc3b, Sz7tXxaCGqJ1, w2cuYSiLrmx8):
assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xbe\xd2g\x08\xfa\x1b\x1b\x13%'), chr(8459 - 8359) + chr(0b110110 + 0o57) + chr(0b1000100 + 0o37) + '\x6f' + chr(8577 - 8477) + chr(8323 - 8222))(chr(0b1 + 0o164) + chr(116) + chr(0b111101 + 0o51) + chr(0b101101) + chr(0b11110 + 0o32))) is not None, xafqLlk3kkUe(SXOLrMavuUCe(b':\xb2\xcf\x18\x0c\xe7+\x1d\x134M,<\xaaET\xf8#\xf1D#\xbd&\x16\x8a\xfe\x94\x84,\xf6\xdd\x0f\xa7=\xfc\x0c\x90T\x95\x0c\x1c\xb5\xda]\x0e\xf9=M\x05#M{'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101 + 0o142) + chr(4724 - 4624) + '\145')(chr(0b1010111 + 0o36) + chr(5726 - 5610) + chr(0b1011010 + 0o14) + '\x2d' + '\070')
if not PlSM16l2KDPD(Sz7tXxaCGqJ1, YyaZ4tpXu4lf) or c2A0yzQpDQB3(Sz7tXxaCGqJ1) == ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x31', 0o10):
assert PlSM16l2KDPD(w2cuYSiLrmx8, xafqLlk3kkUe(Vy_CFRcuYrTj, xafqLlk3kkUe(SXOLrMavuUCe(b' \x9e\xebJ\x0e\xf4='), '\144' + chr(1910 - 1809) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b100 + 0o64)))) and c2A0yzQpDQB3(xafqLlk3kkUe(w2cuYSiLrmx8, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xbb\xdfa\x1a\xd9#\x01"6Z7'), chr(0b1001000 + 0o34) + '\145' + chr(4439 - 4340) + chr(0b1101111) + '\144' + chr(0b111011 + 0o52))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + chr(0b111000)))) in [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1000 + 0o51), 8), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(50), ord("\x08"))], xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xb4\xcfO#\xe3!\x0e\x02)K&|\xeaAE\xf3\x08\xa5I\x19\xeb"U\xdb\xf3\xb8\xc50\xa4\x93R\xfeY\xbe\'\xb1{\xc7\x0e\x0f\xa3\x8aQ\x1a\xb5$\x19\x19-\\;o\xaa\x0cY\xf3\\\xe4\x0b\x0f\xa2-\x12\x86\xbb\x88\x8a1\xf8'), chr(0b1010011 + 0o21) + '\145' + chr(8874 - 8775) + chr(5576 - 5465) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(61 - 16) + '\x38')
if not PlSM16l2KDPD(Sz7tXxaCGqJ1, YyaZ4tpXu4lf):
Sz7tXxaCGqJ1 = [Sz7tXxaCGqJ1]
if c2A0yzQpDQB3(xafqLlk3kkUe(w2cuYSiLrmx8, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xbb\xdfa\x1a\xd9#\x01"6Z7'), chr(100) + '\145' + chr(6894 - 6795) + chr(5226 - 5115) + '\x64' + chr(9074 - 8973))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(336 - 291) + '\x38'))) == ehT0Px3KOsy9(chr(1051 - 1003) + chr(0b1101111) + '\061', 8):
w2cuYSiLrmx8 = w2cuYSiLrmx8.expand_dims(ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(421 - 373), 0b1000))
else:
assert PlSM16l2KDPD(w2cuYSiLrmx8, xafqLlk3kkUe(Vy_CFRcuYrTj, xafqLlk3kkUe(SXOLrMavuUCe(b' \x9e\xebJ\x0e\xf4='), '\144' + chr(0b1100101) + '\143' + chr(0b10001 + 0o136) + '\144' + chr(0b1100101))(chr(7410 - 7293) + '\164' + chr(102) + '\055' + '\070'))) and c2A0yzQpDQB3(xafqLlk3kkUe(w2cuYSiLrmx8, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xbb\xdfa\x1a\xd9#\x01"6Z7'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(3484 - 3383))(chr(0b1110101) + chr(0b101010 + 0o112) + '\x66' + chr(45) + chr(56)))) == ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(2124 - 2074), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xb4\xcfO#\xe3!\x0e\x02)K&|\xeaAE\xf3\x08\xa5I\x19\xeb"U\xd8\xf3\xb8\xc5\x11\x92\xf2\x12\xa1|\xe7I\x9c\\\x95\x1c\x1a\xb5\xc1]\x12\xe6$M\x1f5\x194<\xa6EC\xf4\\\xeaM\\\xa66\x19\x9e\xb7\x8c\x89:\xf6\xc0\x14\xa1t\xf0\x0e\x86\x14'), chr(0b1001 + 0o133) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1010101 + 0o17) + chr(101))(chr(117) + '\x74' + '\x66' + chr(0b1110 + 0o37) + '\070')
assert xafqLlk3kkUe(w2cuYSiLrmx8, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\xbb\xdfa\x1a\xd9#\x01"6Z7'), '\144' + chr(0b1110 + 0o127) + chr(99) + chr(3823 - 3712) + chr(0b1011111 + 0o5) + chr(0b1011001 + 0o14))(chr(0b1011011 + 0o32) + chr(1992 - 1876) + '\x66' + chr(215 - 170) + '\070')) == (c2A0yzQpDQB3(Sz7tXxaCGqJ1), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x18\xbf\xc9g\x10\xf0*'), '\144' + '\x65' + '\x63' + '\x6f' + '\144' + chr(2704 - 2603))(chr(117) + chr(0b1110100) + chr(0b0 + 0o146) + chr(0b11101 + 0o20) + chr(0b110 + 0o62)))), xafqLlk3kkUe(SXOLrMavuUCe(b":\xb2\xcf\x18\x10\xf0*\n\x02.\x19:z\xeaBU\xf7#\xf3N\x1f\xbf,\x07\x99\xfe\x91\x90,\xa2\x93\x02\xb6=\xfb\x18\x80[\xd9\\\x1a\xb5\x8aL\x14\xf0d\x03\x03+[0n\xeaCV\xa0\x08\xea@\x19\xa50U\x8b\xb0\x98\xc5+\xbe\xd6@\xa4t\xfa\x1d\x9d\x1a\xda\x1a\x00\xbf\xddg\n\xf0'\x19\x194Juq\xbf_D\xa0\x1e\xe0\x0b\x19\xba6\x14\x86\xfe\x88\x8a\x7f\xa2\xdb\x05\xf3y\xf7\x04\x90T\xc6\x15\x01\xb4\x8aW\x1a\xb5!\x00\x14#]1u\xa4KC\xa0\x13\xe3\x0b\x08\xa3&U\x8d\xb2\x93\x96,\xb7\xc1\x19\xfd"), chr(0b1101 + 0o127) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b111010 + 0o52) + chr(101))(chr(7631 - 7514) + '\164' + '\146' + chr(1165 - 1120) + '\x38')
pIcoaXENl5Pw = []
for mTy3fac_AqJ5 in Sz7tXxaCGqJ1:
if mTy3fac_AqJ5 in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a\xb5\xc1]\x12\xca0\x02)/]-'), chr(100) + '\145' + '\143' + chr(111) + chr(6073 - 5973) + '\145')(chr(117) + chr(116) + chr(0b111010 + 0o54) + '\x2d' + chr(56))):
xafqLlk3kkUe(pIcoaXENl5Pw, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\xaa\xda]\x12\xf1'), '\144' + chr(0b10 + 0o143) + chr(2114 - 2015) + chr(0b1011 + 0o144) + '\x64' + chr(0b1100101))(chr(6359 - 6242) + chr(6596 - 6480) + '\x66' + chr(0b1111 + 0o36) + '\x38'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a\xb5\xc1]\x12\xca0\x02)/]-'), chr(760 - 660) + chr(0b1100101) + chr(0b1100011) + chr(3195 - 3084) + chr(0b1100100) + chr(0b101001 + 0o74))(chr(0b1110101) + chr(0b1110100) + chr(2565 - 2463) + chr(677 - 632) + '\x38'))[mTy3fac_AqJ5])
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b':\xb5\xc1]\x12\xb5a\x1eV/Jui\xa4G^\xef\x0b\xeb\x05\\\x9f,U\x9f\xae\x98\x84+\xb3\x93\x14\xbbx\xbe\x0c\x98X\xd0\x18\n\xb3\xc4_\\\xe3!\x0e\x02)Kuz\xa5^\x10\xe1\x12\xa5^\x12\xa0-\x1a\x9d\xb0\xdc\x910\xbd\xd6\x0e\xff=\xee\x05\x90[\xc6\x19N\xa9\xda]\x1f\xfc"\x14V/Muy\xb2\\\\\xe9\x1f\xec_\x10\xb2c\x14\x99\xfe\x88\x8d:\xf6\xd3\x15\xbdv\xf0\x06\x82T\xea\x08\x01\xb1\xcfV\x1c\xb5a\x1eV/Wu|\xbeC[\xe5\x12\xf6KR\xeb\x17\x1d\x83\xad\xdc\x8c,\xf6\xc7\x0f\xf3|\xe8\x06\x9c^\x95\t\x00\xb3\xc4L\x19\xfb \x08\x12fL%x\xabXU\xf3R'), chr(223 - 123) + chr(101) + '\x63' + chr(0b1011 + 0o144) + chr(1400 - 1300) + chr(0b101000 + 0o75))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070') % (mTy3fac_AqJ5, xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xbe\xd2g\x08\xfa\x1b\x19\x19-\\;'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(100) + '\145')(chr(117) + chr(0b1101 + 0o147) + '\146' + chr(0b111 + 0o46) + chr(0b111000)))[xafqLlk3kkUe(GjrcPZV7TjBn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\xa0\xefY\x16\xf4-\x04,"X!'), chr(0b1100100) + chr(0b0 + 0o145) + chr(9142 - 9043) + chr(0b1101111) + '\144' + chr(0b111 + 0o136))(chr(0b1110101) + '\164' + chr(5022 - 4920) + chr(0b1 + 0o54) + '\070'))]))
oVre8I6UXc3b.dQYSagyNxAqH[Vy_CFRcuYrTj.B0ePDhpqxN5n(pIcoaXENl5Pw)] = w2cuYSiLrmx8
|
apache/incubator-mxnet
|
python/mxnet/contrib/text/embedding.py
|
_TokenEmbedding._check_pretrained_file_names
|
def _check_pretrained_file_names(cls, pretrained_file_name):
"""Checks if a pre-trained token embedding file name is valid.
Parameters
----------
pretrained_file_name : str
The pre-trained token embedding file.
"""
embedding_name = cls.__name__.lower()
if pretrained_file_name not in cls.pretrained_file_name_sha1:
raise KeyError('Cannot find pretrained file %s for token embedding %s. Valid '
'pretrained files for embedding %s: %s' %
(pretrained_file_name, embedding_name, embedding_name,
', '.join(cls.pretrained_file_name_sha1.keys())))
|
python
|
def _check_pretrained_file_names(cls, pretrained_file_name):
"""Checks if a pre-trained token embedding file name is valid.
Parameters
----------
pretrained_file_name : str
The pre-trained token embedding file.
"""
embedding_name = cls.__name__.lower()
if pretrained_file_name not in cls.pretrained_file_name_sha1:
raise KeyError('Cannot find pretrained file %s for token embedding %s. Valid '
'pretrained files for embedding %s: %s' %
(pretrained_file_name, embedding_name, embedding_name,
', '.join(cls.pretrained_file_name_sha1.keys())))
|
[
"def",
"_check_pretrained_file_names",
"(",
"cls",
",",
"pretrained_file_name",
")",
":",
"embedding_name",
"=",
"cls",
".",
"__name__",
".",
"lower",
"(",
")",
"if",
"pretrained_file_name",
"not",
"in",
"cls",
".",
"pretrained_file_name_sha1",
":",
"raise",
"KeyError",
"(",
"'Cannot find pretrained file %s for token embedding %s. Valid '",
"'pretrained files for embedding %s: %s'",
"%",
"(",
"pretrained_file_name",
",",
"embedding_name",
",",
"embedding_name",
",",
"', '",
".",
"join",
"(",
"cls",
".",
"pretrained_file_name_sha1",
".",
"keys",
"(",
")",
")",
")",
")"
] |
Checks if a pre-trained token embedding file name is valid.
Parameters
----------
pretrained_file_name : str
The pre-trained token embedding file.
|
[
"Checks",
"if",
"a",
"pre",
"-",
"trained",
"token",
"embedding",
"file",
"name",
"is",
"valid",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/text/embedding.py#L450-L465
|
train
|
Checks if a pre - trained token embedding file name is valid.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7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wYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(8846 - 8735) + chr(51) + '\064' + '\x35', 6560 - 6552), ehT0Px3KOsy9(chr(0b110000) + chr(6103 - 5992) + chr(49) + '\061' + chr(55), 44336 - 44328), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10111 + 0o32) + chr(53) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110000) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100110 + 0o14) + '\061' + '\x30', 26023 - 26015), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1011001 + 0o26) + chr(49) + chr(0b1100 + 0o47) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101001 + 0o6) + '\061' + '\x32' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1001100 + 0o43) + chr(51) + '\060' + '\065', 0b1000), ehT0Px3KOsy9(chr(2050 - 2002) + chr(0b1101111) + '\063' + chr(0b110011 + 0o2) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1100110 + 0o11) + '\061' + '\x31' + chr(0b1011 + 0o45), 0o10), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(594 - 544) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110001) + chr(0b110110), 62012 - 62004), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b10011 + 0o40) + chr(0b110111), 31169 - 31161), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(11642 - 11531) + chr(2736 - 2681) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(1648 - 1599) + chr(0b1001 + 0o50), 3241 - 3233), ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + '\x31' + chr(55) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\067' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b110110) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + '\x37' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(0b1110 + 0o45) + chr(0b110000) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(0b101111 + 0o2) + chr(2274 - 2226), 13267 - 13259), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + chr(1224 - 1169) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(1607 - 1559), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b10111 + 0o40) + chr(664 - 610), 26240 - 26232), ehT0Px3KOsy9(chr(1303 - 1255) + chr(0b1010011 + 0o34) + chr(1229 - 1178) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\x37' + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + '\x32' + chr(2603 - 2551) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(9823 - 9712) + '\061' + '\061', 0b1000), ehT0Px3KOsy9(chr(412 - 364) + chr(111) + chr(0b101000 + 0o11) + '\060' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(3214 - 3103) + chr(54) + chr(0b110010), 18007 - 17999), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\061' + '\064' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b101010 + 0o105) + chr(0b111 + 0o54) + chr(141 - 87) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b11 + 0o60) + chr(0b110 + 0o55) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011011 + 0o24) + chr(0b10111 + 0o36) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110111) + chr(107 - 55), 8), ehT0Px3KOsy9('\060' + chr(915 - 804) + chr(0b110001) + chr(679 - 628) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1111 + 0o43) + chr(0b10000 + 0o42) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b11100 + 0o123) + '\x32' + '\062' + '\x37', 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(0b110011) + '\063', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1304 - 1256) + chr(111) + chr(53) + chr(0b110000), 51928 - 51920)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb'), chr(3989 - 3889) + '\x65' + chr(8980 - 8881) + chr(0b1100001 + 0o16) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def VexY8Uh7Tpvr(NSstowUUZlxS, yKp9qVtCIJSF):
NaStYlodLLD8 = NSstowUUZlxS.__name__.lower()
if yKp9qVtCIJSF not in xafqLlk3kkUe(NSstowUUZlxS, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95=\x0c3\xfa88\xab\x89H\x17p\xa73[\x96\x15\\\xdb^\x9b{WiO'), '\x64' + chr(101) + chr(8133 - 8034) + chr(0b1101111) + '\144' + '\x65')('\x75' + '\x74' + '\x66' + chr(0b11011 + 0o22) + '\x38')):
raise RQ6CSRrFArYB(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6.\x07)\xe7-q\xa3\x85B,6\xbe-[\xbd\t\\\xdfU\xa1l\x1fn\x17w\x99\x86,6\x12\x03\x99\xab\r\x885\xfc\xf2u\xc5*\x04%\xed=5\xac\x82Kh3\xbdq\x1e\x9f\x1aQ\xdf_\xe4xMm\ni\x9d\xcfg VE\x90\xb0A\x99)\xb7\xf1t\x97o\x0c*\xea<5\xa1\x85B/6\xeb,\x04\xe9^N'), chr(100) + chr(0b101001 + 0o74) + chr(8796 - 8697) + '\x6f' + '\x64' + '\x65')('\x75' + chr(8598 - 8482) + '\x66' + chr(518 - 473) + chr(0b111000)) % (yKp9qVtCIJSF, NaStYlodLLD8, NaStYlodLLD8, xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9o'), '\x64' + chr(5375 - 5274) + chr(3374 - 3275) + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(8890 - 8788) + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xba >\x1f\xf2-\x07\x8b\x82]\x00P'), '\144' + chr(9587 - 9486) + chr(99) + chr(0b101011 + 0o104) + chr(7449 - 7349) + chr(0b1001001 + 0o34))(chr(12103 - 11986) + '\164' + chr(339 - 237) + '\055' + chr(56)))(xafqLlk3kkUe(NSstowUUZlxS.pretrained_file_name_sha1, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e*\x104'), chr(0b101100 + 0o70) + chr(0b111001 + 0o54) + '\x63' + '\157' + chr(0b1100100) + '\x65')(chr(0b100111 + 0o116) + chr(0b1110100) + '\146' + '\055' + '\070'))())))
|
apache/incubator-mxnet
|
example/bayesian-methods/algos.py
|
calc_grad
|
def calc_grad(exe, exe_grads, params, X, Y, label_name=None, outgrad_f=None):
"""Calculate gradient"""
exe.copy_params_from(params)
exe.arg_dict['data'][:] = X
if outgrad_f is None:
exe.arg_dict[label_name][:] = Y
exe.forward(is_train=True)
exe.backward()
else:
exe.forward(is_train=True)
exe.backward(outgrad_f(exe.outpus, Y))
for k, v in exe_grads.items():
v.wait_to_read()
|
python
|
def calc_grad(exe, exe_grads, params, X, Y, label_name=None, outgrad_f=None):
"""Calculate gradient"""
exe.copy_params_from(params)
exe.arg_dict['data'][:] = X
if outgrad_f is None:
exe.arg_dict[label_name][:] = Y
exe.forward(is_train=True)
exe.backward()
else:
exe.forward(is_train=True)
exe.backward(outgrad_f(exe.outpus, Y))
for k, v in exe_grads.items():
v.wait_to_read()
|
[
"def",
"calc_grad",
"(",
"exe",
",",
"exe_grads",
",",
"params",
",",
"X",
",",
"Y",
",",
"label_name",
"=",
"None",
",",
"outgrad_f",
"=",
"None",
")",
":",
"exe",
".",
"copy_params_from",
"(",
"params",
")",
"exe",
".",
"arg_dict",
"[",
"'data'",
"]",
"[",
":",
"]",
"=",
"X",
"if",
"outgrad_f",
"is",
"None",
":",
"exe",
".",
"arg_dict",
"[",
"label_name",
"]",
"[",
":",
"]",
"=",
"Y",
"exe",
".",
"forward",
"(",
"is_train",
"=",
"True",
")",
"exe",
".",
"backward",
"(",
")",
"else",
":",
"exe",
".",
"forward",
"(",
"is_train",
"=",
"True",
")",
"exe",
".",
"backward",
"(",
"outgrad_f",
"(",
"exe",
".",
"outpus",
",",
"Y",
")",
")",
"for",
"k",
",",
"v",
"in",
"exe_grads",
".",
"items",
"(",
")",
":",
"v",
".",
"wait_to_read",
"(",
")"
] |
Calculate gradient
|
[
"Calculate",
"gradient"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/bayesian-methods/algos.py#L37-L49
|
train
|
Calculate gradient of the experiment.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,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SwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b11000 + 0o34) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b101001 + 0o10) + '\x33' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x35' + chr(0b110111), 39452 - 39444), ehT0Px3KOsy9(chr(511 - 463) + chr(0b1101111) + '\061' + '\063' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\x35' + '\x37', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b110011) + chr(873 - 818) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + chr(810 - 761) + '\x32', 48794 - 48786), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(2217 - 2166) + chr(52) + chr(1217 - 1167), 21160 - 21152), ehT0Px3KOsy9(chr(1151 - 1103) + '\157' + '\x32' + '\x32' + '\066', 42019 - 42011), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(1820 - 1770) + '\x30' + '\067', 0b1000), ehT0Px3KOsy9(chr(459 - 411) + chr(10646 - 10535) + chr(0b10110 + 0o34) + '\061', 0o10), ehT0Px3KOsy9(chr(943 - 895) + chr(0b10010 + 0o135) + chr(0b110010) + chr(55) + chr(0b11111 + 0o23), 0o10), ehT0Px3KOsy9(chr(48) + chr(2277 - 2166) + chr(49) + chr(49) + chr(48), 7390 - 7382), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b10 + 0o65) + chr(0b10 + 0o65), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b10 + 0o60) + chr(2100 - 2049) + '\x32', 26063 - 26055), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + chr(2106 - 2051), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2094 - 2044) + chr(0b110000) + chr(0b100000 + 0o21), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(51) + '\066' + chr(0b0 + 0o65), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11011 + 0o124) + chr(1783 - 1734) + chr(0b10110 + 0o40) + chr(0b110001), 59548 - 59540), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(2082 - 2028) + chr(54), 58785 - 58777), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101101 + 0o2) + chr(0b110100) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\x35' + chr(2180 - 2125), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(48) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b110001) + '\x37', 0b1000), ehT0Px3KOsy9(chr(752 - 704) + '\157' + chr(52) + chr(833 - 783), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(830 - 779) + '\x36' + chr(0b101110 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\066' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(2890 - 2779) + chr(50) + '\066' + chr(0b1101 + 0o43), 0b1000), ehT0Px3KOsy9(chr(1340 - 1292) + '\x6f' + '\x33' + chr(2103 - 2052) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\060' + chr(0b1001 + 0o50), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(81 - 32) + chr(2521 - 2470) + chr(0b101010 + 0o12), 35892 - 35884), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(1307 - 1258) + '\063' + chr(55), 29400 - 29392), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\065' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(2910 - 2799) + chr(0b110011) + '\x37' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(0b110101) + '\065', 9310 - 9302), ehT0Px3KOsy9(chr(0b110000) + chr(11071 - 10960) + '\x33' + chr(0b110101 + 0o0) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1952 - 1902) + chr(0b1011 + 0o46) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\x35' + chr(55), 38812 - 38804), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b110010) + chr(50) + chr(0b110100 + 0o1), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(0b110101) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\t'), '\x64' + '\x65' + chr(99) + '\157' + chr(0b1100100) + '\145')('\165' + chr(0b11100 + 0o130) + '\x66' + chr(45) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def UxqAAsuoVAYj(fuwbpiKmfMe7, _KVnxr8aGJwo, nEbJZ4wfte2w, xEgrFJ0REugl, cirEqDm6EMgP, APgAOoKpDmoS=None, Bp2CwWyOEC3A=None):
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'D1\xdf#\xf0\x8ak\x90\xf7\xeab\xe5.\xcd\xf5Z'), chr(100) + chr(3875 - 3774) + '\x63' + chr(0b1010100 + 0o33) + chr(100) + chr(2006 - 1905))('\165' + chr(116) + chr(0b10010 + 0o124) + '\x2d' + '\x38'))(nEbJZ4wfte2w)
fuwbpiKmfMe7.XXPvg13AmiwJ[xafqLlk3kkUe(SXOLrMavuUCe(b'C?\xdb;'), '\144' + chr(0b1100101) + '\x63' + chr(10799 - 10688) + '\x64' + '\145')(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + '\070')][:] = xEgrFJ0REugl
if Bp2CwWyOEC3A is None:
fuwbpiKmfMe7.XXPvg13AmiwJ[APgAOoKpDmoS][:] = cirEqDm6EMgP
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'`<\xcd9\xec\xb2_\xac\xd0\xca{\x8f'), chr(100) + '\x65' + '\143' + chr(111) + '\x64' + chr(101))(chr(117) + chr(2780 - 2664) + '\x66' + '\055' + chr(0b111000)))(is_train=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 22965 - 22957))
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'E?\xcc1\xd8\x9bx\x86'), chr(100) + chr(0b111011 + 0o52) + chr(99) + chr(2378 - 2267) + chr(100) + chr(0b1100101))(chr(11071 - 10954) + '\x74' + chr(102) + chr(0b1001 + 0o44) + chr(0b110101 + 0o3)))()
else:
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'`<\xcd9\xec\xb2_\xac\xd0\xca{\x8f'), chr(8916 - 8816) + '\145' + '\x63' + chr(0b1101111) + chr(3513 - 3413) + chr(0b1011101 + 0o10))(chr(117) + chr(0b1110100) + chr(6348 - 6246) + chr(311 - 266) + chr(0b111000)))(is_train=ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(258 - 209), 8))
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'E?\xcc1\xd8\x9bx\x86'), chr(100) + chr(5007 - 4906) + chr(0b1100011) + '\157' + chr(8175 - 8075) + chr(0b1100101))(chr(117) + chr(802 - 686) + '\146' + '\055' + chr(0b1100 + 0o54)))(Bp2CwWyOEC3A(xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'H+\xdb*\xda\x89'), chr(7372 - 7272) + chr(101) + chr(0b1000001 + 0o42) + '\x6f' + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + '\146' + '\055' + '\070')), cirEqDm6EMgP))
for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(_KVnxr8aGJwo, xafqLlk3kkUe(SXOLrMavuUCe(b'i$\xd9?\xe6\xa09\xab\xfa\xd4Y\x83'), '\x64' + chr(0b1011001 + 0o14) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110001 + 0o4) + chr(116) + '\x66' + chr(45) + chr(0b111000)))():
xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'P?\xc6.\xf0\x8ee\xbd\xe4\xe2p\xde'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + chr(100) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b1000 + 0o45) + '\070'))()
|
apache/incubator-mxnet
|
example/bayesian-methods/algos.py
|
step_HMC
|
def step_HMC(exe, exe_params, exe_grads, label_key, noise_precision, prior_precision, L=10, eps=1E-6):
"""Generate the implementation of step HMC"""
init_params = {k: v.copyto(v.context) for k, v in exe_params.items()}
end_params = {k: v.copyto(v.context) for k, v in exe_params.items()}
init_momentums = {k: mx.random.normal(0, 1, v.shape) for k, v in init_params.items()}
end_momentums = {k: v.copyto(v.context) for k, v in init_momentums.items()}
init_potential = calc_potential(exe, init_params, label_key, noise_precision, prior_precision)
# 0. Calculate Initial Energy and Kinetic
init_kinetic = sum([nd.sum(nd.square(momentum)) / 2.0
for momentum in init_momentums.values()]).asscalar()
# 1. Make a half step for momentum at the beginning
exe.copy_params_from(end_params)
exe.forward(is_train=True)
exe.backward()
for k, v in exe_grads.items():
v.wait_to_read()
for k, momentum in end_momentums.items():
momentum[:] = momentum - (eps / 2) * exe_grads[k]
# 2. Alternate full steps for position and momentum
for i in range(L):
# 2.1 Full step for position
for k, param in exe_params.items():
param[:] = param + eps * end_momentums[k]
# 2.2 Full step for the momentum, except at the end of trajectory we perform a half step
exe.forward(is_train=True)
exe.backward()
for v in exe_grads.values():
v.wait_to_read()
if i != L - 1:
for k, momentum in end_momentums.items():
momentum[:] = momentum - eps * exe_grads[k]
else:
for k, momentum in end_momentums.items():
# We should reverse the sign of the momentum at the end
momentum[:] = -(momentum - eps / 2.0 * exe_grads[k])
copy_param(exe, end_params)
# 3. Calculate acceptance ratio and accept/reject the move
end_potential = calc_potential(exe, end_params, label_key, noise_precision, prior_precision)
end_kinetic = sum([nd.sum(nd.square(momentum)) / 2.0
for momentum in end_momentums.values()]).asscalar()
# print init_potential, init_kinetic, end_potential, end_kinetic
r = numpy.random.rand(1)
if r < numpy.exp(-(end_potential + end_kinetic) + (init_potential + init_kinetic)):
exe.copy_params_from(end_params)
return end_params, 1
else:
exe.copy_params_from(init_params)
return init_params, 0
|
python
|
def step_HMC(exe, exe_params, exe_grads, label_key, noise_precision, prior_precision, L=10, eps=1E-6):
"""Generate the implementation of step HMC"""
init_params = {k: v.copyto(v.context) for k, v in exe_params.items()}
end_params = {k: v.copyto(v.context) for k, v in exe_params.items()}
init_momentums = {k: mx.random.normal(0, 1, v.shape) for k, v in init_params.items()}
end_momentums = {k: v.copyto(v.context) for k, v in init_momentums.items()}
init_potential = calc_potential(exe, init_params, label_key, noise_precision, prior_precision)
# 0. Calculate Initial Energy and Kinetic
init_kinetic = sum([nd.sum(nd.square(momentum)) / 2.0
for momentum in init_momentums.values()]).asscalar()
# 1. Make a half step for momentum at the beginning
exe.copy_params_from(end_params)
exe.forward(is_train=True)
exe.backward()
for k, v in exe_grads.items():
v.wait_to_read()
for k, momentum in end_momentums.items():
momentum[:] = momentum - (eps / 2) * exe_grads[k]
# 2. Alternate full steps for position and momentum
for i in range(L):
# 2.1 Full step for position
for k, param in exe_params.items():
param[:] = param + eps * end_momentums[k]
# 2.2 Full step for the momentum, except at the end of trajectory we perform a half step
exe.forward(is_train=True)
exe.backward()
for v in exe_grads.values():
v.wait_to_read()
if i != L - 1:
for k, momentum in end_momentums.items():
momentum[:] = momentum - eps * exe_grads[k]
else:
for k, momentum in end_momentums.items():
# We should reverse the sign of the momentum at the end
momentum[:] = -(momentum - eps / 2.0 * exe_grads[k])
copy_param(exe, end_params)
# 3. Calculate acceptance ratio and accept/reject the move
end_potential = calc_potential(exe, end_params, label_key, noise_precision, prior_precision)
end_kinetic = sum([nd.sum(nd.square(momentum)) / 2.0
for momentum in end_momentums.values()]).asscalar()
# print init_potential, init_kinetic, end_potential, end_kinetic
r = numpy.random.rand(1)
if r < numpy.exp(-(end_potential + end_kinetic) + (init_potential + init_kinetic)):
exe.copy_params_from(end_params)
return end_params, 1
else:
exe.copy_params_from(init_params)
return init_params, 0
|
[
"def",
"step_HMC",
"(",
"exe",
",",
"exe_params",
",",
"exe_grads",
",",
"label_key",
",",
"noise_precision",
",",
"prior_precision",
",",
"L",
"=",
"10",
",",
"eps",
"=",
"1E-6",
")",
":",
"init_params",
"=",
"{",
"k",
":",
"v",
".",
"copyto",
"(",
"v",
".",
"context",
")",
"for",
"k",
",",
"v",
"in",
"exe_params",
".",
"items",
"(",
")",
"}",
"end_params",
"=",
"{",
"k",
":",
"v",
".",
"copyto",
"(",
"v",
".",
"context",
")",
"for",
"k",
",",
"v",
"in",
"exe_params",
".",
"items",
"(",
")",
"}",
"init_momentums",
"=",
"{",
"k",
":",
"mx",
".",
"random",
".",
"normal",
"(",
"0",
",",
"1",
",",
"v",
".",
"shape",
")",
"for",
"k",
",",
"v",
"in",
"init_params",
".",
"items",
"(",
")",
"}",
"end_momentums",
"=",
"{",
"k",
":",
"v",
".",
"copyto",
"(",
"v",
".",
"context",
")",
"for",
"k",
",",
"v",
"in",
"init_momentums",
".",
"items",
"(",
")",
"}",
"init_potential",
"=",
"calc_potential",
"(",
"exe",
",",
"init_params",
",",
"label_key",
",",
"noise_precision",
",",
"prior_precision",
")",
"# 0. Calculate Initial Energy and Kinetic",
"init_kinetic",
"=",
"sum",
"(",
"[",
"nd",
".",
"sum",
"(",
"nd",
".",
"square",
"(",
"momentum",
")",
")",
"/",
"2.0",
"for",
"momentum",
"in",
"init_momentums",
".",
"values",
"(",
")",
"]",
")",
".",
"asscalar",
"(",
")",
"# 1. Make a half step for momentum at the beginning",
"exe",
".",
"copy_params_from",
"(",
"end_params",
")",
"exe",
".",
"forward",
"(",
"is_train",
"=",
"True",
")",
"exe",
".",
"backward",
"(",
")",
"for",
"k",
",",
"v",
"in",
"exe_grads",
".",
"items",
"(",
")",
":",
"v",
".",
"wait_to_read",
"(",
")",
"for",
"k",
",",
"momentum",
"in",
"end_momentums",
".",
"items",
"(",
")",
":",
"momentum",
"[",
":",
"]",
"=",
"momentum",
"-",
"(",
"eps",
"/",
"2",
")",
"*",
"exe_grads",
"[",
"k",
"]",
"# 2. Alternate full steps for position and momentum",
"for",
"i",
"in",
"range",
"(",
"L",
")",
":",
"# 2.1 Full step for position",
"for",
"k",
",",
"param",
"in",
"exe_params",
".",
"items",
"(",
")",
":",
"param",
"[",
":",
"]",
"=",
"param",
"+",
"eps",
"*",
"end_momentums",
"[",
"k",
"]",
"# 2.2 Full step for the momentum, except at the end of trajectory we perform a half step",
"exe",
".",
"forward",
"(",
"is_train",
"=",
"True",
")",
"exe",
".",
"backward",
"(",
")",
"for",
"v",
"in",
"exe_grads",
".",
"values",
"(",
")",
":",
"v",
".",
"wait_to_read",
"(",
")",
"if",
"i",
"!=",
"L",
"-",
"1",
":",
"for",
"k",
",",
"momentum",
"in",
"end_momentums",
".",
"items",
"(",
")",
":",
"momentum",
"[",
":",
"]",
"=",
"momentum",
"-",
"eps",
"*",
"exe_grads",
"[",
"k",
"]",
"else",
":",
"for",
"k",
",",
"momentum",
"in",
"end_momentums",
".",
"items",
"(",
")",
":",
"# We should reverse the sign of the momentum at the end",
"momentum",
"[",
":",
"]",
"=",
"-",
"(",
"momentum",
"-",
"eps",
"/",
"2.0",
"*",
"exe_grads",
"[",
"k",
"]",
")",
"copy_param",
"(",
"exe",
",",
"end_params",
")",
"# 3. Calculate acceptance ratio and accept/reject the move",
"end_potential",
"=",
"calc_potential",
"(",
"exe",
",",
"end_params",
",",
"label_key",
",",
"noise_precision",
",",
"prior_precision",
")",
"end_kinetic",
"=",
"sum",
"(",
"[",
"nd",
".",
"sum",
"(",
"nd",
".",
"square",
"(",
"momentum",
")",
")",
"/",
"2.0",
"for",
"momentum",
"in",
"end_momentums",
".",
"values",
"(",
")",
"]",
")",
".",
"asscalar",
"(",
")",
"# print init_potential, init_kinetic, end_potential, end_kinetic",
"r",
"=",
"numpy",
".",
"random",
".",
"rand",
"(",
"1",
")",
"if",
"r",
"<",
"numpy",
".",
"exp",
"(",
"-",
"(",
"end_potential",
"+",
"end_kinetic",
")",
"+",
"(",
"init_potential",
"+",
"init_kinetic",
")",
")",
":",
"exe",
".",
"copy_params_from",
"(",
"end_params",
")",
"return",
"end_params",
",",
"1",
"else",
":",
"exe",
".",
"copy_params_from",
"(",
"init_params",
")",
"return",
"init_params",
",",
"0"
] |
Generate the implementation of step HMC
|
[
"Generate",
"the",
"implementation",
"of",
"step",
"HMC"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/bayesian-methods/algos.py#L52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SQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(2155 - 2106) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7107 - 6996) + chr(52) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b101111 + 0o4) + '\x37', 21923 - 21915), ehT0Px3KOsy9(chr(350 - 302) + chr(0b1101111) + chr(0b110011) + '\060' + chr(0b101 + 0o54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11029 - 10918) + chr(0b110010) + chr(53) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x34' + chr(0b100111 + 0o20), 28794 - 28786), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(4660 - 4549) + '\061' + chr(52) + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11001 + 0o32) + chr(55) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(465 - 410) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\060', 4433 - 4425), ehT0Px3KOsy9('\x30' + chr(0b1011011 + 0o24) + chr(0b110000 + 0o2) + '\065' + chr(54), 8), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\x35' + chr(54), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(54) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(54) + chr(0b10100 + 0o43), 8362 - 8354), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1216 - 1168) + chr(2751 - 2640) + '\x31' + '\x37' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\064', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b110001) + chr(2199 - 2149) + chr(0b1100 + 0o45), 0b1000), ehT0Px3KOsy9(chr(48) + chr(323 - 212) + '\061' + chr(0b110001) + '\065', 0o10), ehT0Px3KOsy9(chr(2281 - 2233) + '\x6f' + chr(0b110 + 0o54) + '\x36' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + chr(50) + chr(52), 8), ehT0Px3KOsy9(chr(277 - 229) + '\x6f' + chr(0b110011) + chr(0b110011) + '\067', 54182 - 54174), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1010 + 0o46), 0b1000), ehT0Px3KOsy9(chr(48) + chr(4431 - 4320) + '\x32' + chr(1637 - 1587), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\066' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(718 - 670) + chr(0b1101111) + '\062' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(8871 - 8760) + chr(50) + '\060' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + '\x35' + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\063' + chr(1568 - 1517), 44318 - 44310), ehT0Px3KOsy9('\060' + '\157' + chr(0b1100 + 0o45) + chr(1643 - 1590) + '\x35', 26132 - 26124), ehT0Px3KOsy9(chr(0b110000) + chr(5717 - 5606) + chr(0b110010) + chr(978 - 927) + '\061', 22839 - 22831), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(3191 - 3080) + chr(0b110001) + '\x34' + chr(54), 34359 - 34351), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + '\062' + chr(0b111 + 0o60) + '\x36', 38801 - 38793), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(54) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1853 - 1805) + chr(111) + chr(51) + chr(0b110101) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\062' + chr(48) + chr(0b1000 + 0o55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(51) + chr(0b10100 + 0o42) + chr(527 - 476), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10369 - 10258) + '\x33' + '\x30' + chr(2182 - 2132), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9(chr(1698 - 1650) + '\x6f' + chr(0b10110 + 0o35) + chr(0b110011) + chr(0b110010), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(5271 - 5160) + '\065' + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b' '), chr(100) + '\145' + chr(99) + '\157' + chr(100) + chr(0b1100000 + 0o5))(chr(117) + '\164' + chr(6069 - 5967) + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def f5K7739NK3cu(fuwbpiKmfMe7, _xYMNIi_kptB, _KVnxr8aGJwo, AyZ0ziQigspL, E9rQ2AW8Y03A, LMjSKn1dXNXz, N2hHLFodXT_J=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\062', 0b1000), ANx8zFubz7L8=1e-06):
oZNFuAsgrYEN = {OolUPRJhRaJd: cMbll0QYhULo.copyto(cMbll0QYhULo.context) for (OolUPRJhRaJd, cMbll0QYhULo) in _xYMNIi_kptB.NzveIZ3IlSH9()}
ChUvNwHWQ5FS = {OolUPRJhRaJd: cMbll0QYhULo.copyto(cMbll0QYhULo.context) for (OolUPRJhRaJd, cMbll0QYhULo) in _xYMNIi_kptB.NzveIZ3IlSH9()}
uCBBh0LkjpeM = {OolUPRJhRaJd: CIVheOt0RKQX.random.normal(ehT0Px3KOsy9(chr(48) + chr(10062 - 9951) + chr(0b100110 + 0o12), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b100111 + 0o12), 0o10), cMbll0QYhULo.nauYfLglTpcb) for (OolUPRJhRaJd, cMbll0QYhULo) in oZNFuAsgrYEN.NzveIZ3IlSH9()}
ZKFopBPOBe3E = {OolUPRJhRaJd: cMbll0QYhULo.copyto(cMbll0QYhULo.context) for (OolUPRJhRaJd, cMbll0QYhULo) in uCBBh0LkjpeM.NzveIZ3IlSH9()}
xhchPWaVofGf = Whgm0kXz_mS0(fuwbpiKmfMe7, oZNFuAsgrYEN, AyZ0ziQigspL, E9rQ2AW8Y03A, LMjSKn1dXNXz)
lIAwEHDXJgxI = xkxBmo49x2An([Vy_CFRcuYrTj.sum(Vy_CFRcuYrTj.square(Molg6BU43Z5y)) / 2.0 for Molg6BU43Z5y in uCBBh0LkjpeM.values()]).asscalar()
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'mK/\xb8\xf1\x97\x03\x88_}\xdd\xf1VES\x14'), '\144' + '\145' + chr(0b1100011) + chr(11470 - 11359) + '\144' + chr(9526 - 9425))('\165' + chr(0b111000 + 0o74) + chr(5864 - 5762) + '\055' + chr(0b110010 + 0o6)))(ChUvNwHWQ5FS)
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'IF=\xa2\xed\xaf7\xb4x]\xc4\x9b'), '\144' + chr(0b1011010 + 0o13) + chr(4784 - 4685) + '\x6f' + '\144' + '\145')('\x75' + chr(0b10011 + 0o141) + chr(0b1001010 + 0o34) + '\x2d' + chr(0b10111 + 0o41)))(is_train=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', 8))
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'lE<\xaa\xd9\x86\x10\x9e'), chr(9439 - 9339) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(12786 - 12669) + '\x74' + chr(0b1000011 + 0o43) + chr(0b101101) + chr(0b100001 + 0o27)))()
for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(_KVnxr8aGJwo, xafqLlk3kkUe(SXOLrMavuUCe(b'@^)\xa4\xe7\xbdQ\xb3RC\xe6\x97'), '\144' + '\145' + '\143' + '\x6f' + '\x64' + '\x65')('\165' + chr(0b1110100) + chr(7294 - 7192) + chr(0b10000 + 0o35) + chr(0b111000)))():
xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'yE6\xb5\xf1\x93\r\xa5Lu\xcf\xca'), chr(0b1100100) + '\x65' + chr(6032 - 5933) + '\157' + chr(0b1100100) + chr(0b1000 + 0o135))('\x75' + '\x74' + chr(0b1100011 + 0o3) + chr(45) + chr(2373 - 2317)))()
for (OolUPRJhRaJd, Molg6BU43Z5y) in xafqLlk3kkUe(ZKFopBPOBe3E, xafqLlk3kkUe(SXOLrMavuUCe(b'@^)\xa4\xe7\xbdQ\xb3RC\xe6\x97'), chr(6498 - 6398) + chr(5905 - 5804) + chr(99) + chr(0b1101111) + '\144' + chr(913 - 812))('\165' + chr(0b111111 + 0o65) + '\x66' + chr(515 - 470) + '\070'))():
Molg6BU43Z5y[:] = Molg6BU43Z5y - ANx8zFubz7L8 / ehT0Px3KOsy9('\x30' + '\157' + chr(0b10011 + 0o37), 0b1000) * _KVnxr8aGJwo[OolUPRJhRaJd]
for WVxHKyX45z_L in vQr8gNKaIaWE(N2hHLFodXT_J):
for (OolUPRJhRaJd, NOaGA2BHucaX) in xafqLlk3kkUe(_xYMNIi_kptB, xafqLlk3kkUe(SXOLrMavuUCe(b'@^)\xa4\xe7\xbdQ\xb3RC\xe6\x97'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(10491 - 10380) + chr(0b1000000 + 0o44) + '\145')(chr(0b1110101) + chr(116) + chr(6776 - 6674) + chr(0b101101) + '\070'))():
NOaGA2BHucaX[:] = NOaGA2BHucaX + ANx8zFubz7L8 * ZKFopBPOBe3E[OolUPRJhRaJd]
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'IF=\xa2\xed\xaf7\xb4x]\xc4\x9b'), '\x64' + '\145' + chr(99) + chr(0b1101 + 0o142) + chr(100) + chr(483 - 382))(chr(12203 - 12086) + chr(0b1101111 + 0o5) + '\x66' + '\x2d' + chr(0b11 + 0o65)))(is_train=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1011 + 0o46), 8))
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'lE<\xaa\xd9\x86\x10\x9e'), '\144' + chr(0b1100101) + chr(0b110101 + 0o56) + chr(0b1101111) + '\x64' + chr(2899 - 2798))('\x75' + chr(0b1110100) + '\146' + chr(0b101101) + chr(1156 - 1100)))()
for cMbll0QYhULo in xafqLlk3kkUe(_KVnxr8aGJwo, xafqLlk3kkUe(SXOLrMavuUCe(b']t1\x82\xe0\x92W\xcev!\xca\xcc'), '\x64' + chr(101) + chr(6011 - 5912) + chr(0b1101111) + chr(2070 - 1970) + '\145')(chr(0b1110101) + '\x74' + chr(102) + '\055' + '\070'))():
xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'yE6\xb5\xf1\x93\r\xa5Lu\xcf\xca'), chr(294 - 194) + '\x65' + '\143' + '\157' + '\144' + '\x65')('\x75' + chr(116) + '\x66' + '\x2d' + '\070'))()
if WVxHKyX45z_L != N2hHLFodXT_J - ehT0Px3KOsy9('\060' + chr(11279 - 11168) + chr(49), 8):
for (OolUPRJhRaJd, Molg6BU43Z5y) in xafqLlk3kkUe(ZKFopBPOBe3E, xafqLlk3kkUe(SXOLrMavuUCe(b'@^)\xa4\xe7\xbdQ\xb3RC\xe6\x97'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + '\070'))():
Molg6BU43Z5y[:] = Molg6BU43Z5y - ANx8zFubz7L8 * _KVnxr8aGJwo[OolUPRJhRaJd]
else:
for (OolUPRJhRaJd, Molg6BU43Z5y) in xafqLlk3kkUe(ZKFopBPOBe3E, xafqLlk3kkUe(SXOLrMavuUCe(b'@^)\xa4\xe7\xbdQ\xb3RC\xe6\x97'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(160 - 60) + chr(0b1100101))(chr(0b1110101) + '\164' + '\x66' + '\055' + chr(0b111000)))():
Molg6BU43Z5y[:] = -(Molg6BU43Z5y - ANx8zFubz7L8 / 2.0 * _KVnxr8aGJwo[OolUPRJhRaJd])
BD7LIbAHmKDb(fuwbpiKmfMe7, ChUvNwHWQ5FS)
Uu_zAwGXo5e4 = Whgm0kXz_mS0(fuwbpiKmfMe7, ChUvNwHWQ5FS, AyZ0ziQigspL, E9rQ2AW8Y03A, LMjSKn1dXNXz)
zDOF426ORdyA = xkxBmo49x2An([Vy_CFRcuYrTj.sum(Vy_CFRcuYrTj.square(Molg6BU43Z5y)) / 2.0 for Molg6BU43Z5y in ZKFopBPOBe3E.values()]).asscalar()
JWG5qApaeJkp = n8mpNwkrxOdz.random.rand(ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + chr(0b11101 + 0o24), 8))
if JWG5qApaeJkp < xafqLlk3kkUe(n8mpNwkrxOdz, xafqLlk3kkUe(SXOLrMavuUCe(b'k\\/'), '\144' + chr(0b1100101) + chr(99) + chr(7496 - 7385) + '\144' + chr(0b0 + 0o145))(chr(117) + '\164' + '\146' + '\055' + '\x38'))(-(Uu_zAwGXo5e4 + zDOF426ORdyA) + (xhchPWaVofGf + lIAwEHDXJgxI)):
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'mK/\xb8\xf1\x97\x03\x88_}\xdd\xf1VES\x14'), '\144' + chr(6709 - 6608) + chr(2391 - 2292) + chr(111) + '\x64' + chr(7935 - 7834))('\165' + chr(116) + '\x66' + chr(0b100100 + 0o11) + chr(0b111 + 0o61)))(ChUvNwHWQ5FS)
return (ChUvNwHWQ5FS, ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + chr(1863 - 1814), 8))
else:
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'mK/\xb8\xf1\x97\x03\x88_}\xdd\xf1VES\x14'), chr(7513 - 7413) + chr(0b100100 + 0o101) + '\143' + chr(11429 - 11318) + chr(100) + '\x65')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(155 - 99)))(oZNFuAsgrYEN)
return (oZNFuAsgrYEN, ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110000), 8))
|
apache/incubator-mxnet
|
example/bayesian-methods/algos.py
|
HMC
|
def HMC(sym, data_inputs, X, Y, X_test, Y_test, sample_num,
initializer=None, noise_precision=1 / 9.0, prior_precision=0.1,
learning_rate=1E-6, L=10, dev=mx.gpu()):
"""Generate the implementation of HMC"""
label_key = list(set(data_inputs.keys()) - set(['data']))[0]
exe, exe_params, exe_grads, _ = get_executor(sym, dev, data_inputs, initializer)
exe.arg_dict['data'][:] = X
exe.arg_dict[label_key][:] = Y
sample_pool = []
accept_num = 0
start = time.time()
for i in range(sample_num):
sample_params, is_accept = step_HMC(exe, exe_params, exe_grads, label_key, noise_precision,
prior_precision, L, learning_rate)
accept_num += is_accept
if (i + 1) % 10 == 0:
sample_pool.append(sample_params)
if (i + 1) % 100000 == 0:
end = time.time()
print("Current Iter Num: %d" % (i + 1), "Time Spent: %f" % (end - start), "MSE:",
sample_test_regression(exe, X=X_test, Y=Y_test, sample_pool=sample_pool,
minibatch_size=Y.shape[0],
save_path='regression_HMC.txt'))
start = time.time()
exe.copy_params_from(sample_params)
print('accept ratio', accept_num / float(sample_num))
return sample_pool
|
python
|
def HMC(sym, data_inputs, X, Y, X_test, Y_test, sample_num,
initializer=None, noise_precision=1 / 9.0, prior_precision=0.1,
learning_rate=1E-6, L=10, dev=mx.gpu()):
"""Generate the implementation of HMC"""
label_key = list(set(data_inputs.keys()) - set(['data']))[0]
exe, exe_params, exe_grads, _ = get_executor(sym, dev, data_inputs, initializer)
exe.arg_dict['data'][:] = X
exe.arg_dict[label_key][:] = Y
sample_pool = []
accept_num = 0
start = time.time()
for i in range(sample_num):
sample_params, is_accept = step_HMC(exe, exe_params, exe_grads, label_key, noise_precision,
prior_precision, L, learning_rate)
accept_num += is_accept
if (i + 1) % 10 == 0:
sample_pool.append(sample_params)
if (i + 1) % 100000 == 0:
end = time.time()
print("Current Iter Num: %d" % (i + 1), "Time Spent: %f" % (end - start), "MSE:",
sample_test_regression(exe, X=X_test, Y=Y_test, sample_pool=sample_pool,
minibatch_size=Y.shape[0],
save_path='regression_HMC.txt'))
start = time.time()
exe.copy_params_from(sample_params)
print('accept ratio', accept_num / float(sample_num))
return sample_pool
|
[
"def",
"HMC",
"(",
"sym",
",",
"data_inputs",
",",
"X",
",",
"Y",
",",
"X_test",
",",
"Y_test",
",",
"sample_num",
",",
"initializer",
"=",
"None",
",",
"noise_precision",
"=",
"1",
"/",
"9.0",
",",
"prior_precision",
"=",
"0.1",
",",
"learning_rate",
"=",
"1E-6",
",",
"L",
"=",
"10",
",",
"dev",
"=",
"mx",
".",
"gpu",
"(",
")",
")",
":",
"label_key",
"=",
"list",
"(",
"set",
"(",
"data_inputs",
".",
"keys",
"(",
")",
")",
"-",
"set",
"(",
"[",
"'data'",
"]",
")",
")",
"[",
"0",
"]",
"exe",
",",
"exe_params",
",",
"exe_grads",
",",
"_",
"=",
"get_executor",
"(",
"sym",
",",
"dev",
",",
"data_inputs",
",",
"initializer",
")",
"exe",
".",
"arg_dict",
"[",
"'data'",
"]",
"[",
":",
"]",
"=",
"X",
"exe",
".",
"arg_dict",
"[",
"label_key",
"]",
"[",
":",
"]",
"=",
"Y",
"sample_pool",
"=",
"[",
"]",
"accept_num",
"=",
"0",
"start",
"=",
"time",
".",
"time",
"(",
")",
"for",
"i",
"in",
"range",
"(",
"sample_num",
")",
":",
"sample_params",
",",
"is_accept",
"=",
"step_HMC",
"(",
"exe",
",",
"exe_params",
",",
"exe_grads",
",",
"label_key",
",",
"noise_precision",
",",
"prior_precision",
",",
"L",
",",
"learning_rate",
")",
"accept_num",
"+=",
"is_accept",
"if",
"(",
"i",
"+",
"1",
")",
"%",
"10",
"==",
"0",
":",
"sample_pool",
".",
"append",
"(",
"sample_params",
")",
"if",
"(",
"i",
"+",
"1",
")",
"%",
"100000",
"==",
"0",
":",
"end",
"=",
"time",
".",
"time",
"(",
")",
"print",
"(",
"\"Current Iter Num: %d\"",
"%",
"(",
"i",
"+",
"1",
")",
",",
"\"Time Spent: %f\"",
"%",
"(",
"end",
"-",
"start",
")",
",",
"\"MSE:\"",
",",
"sample_test_regression",
"(",
"exe",
",",
"X",
"=",
"X_test",
",",
"Y",
"=",
"Y_test",
",",
"sample_pool",
"=",
"sample_pool",
",",
"minibatch_size",
"=",
"Y",
".",
"shape",
"[",
"0",
"]",
",",
"save_path",
"=",
"'regression_HMC.txt'",
")",
")",
"start",
"=",
"time",
".",
"time",
"(",
")",
"exe",
".",
"copy_params_from",
"(",
"sample_params",
")",
"print",
"(",
"'accept ratio'",
",",
"accept_num",
"/",
"float",
"(",
"sample_num",
")",
")",
"return",
"sample_pool"
] |
Generate the implementation of HMC
|
[
"Generate",
"the",
"implementation",
"of",
"HMC"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/bayesian-methods/algos.py#L103-L130
|
train
|
Generate the implementation of HMC
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv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Dw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(148 - 100) + chr(4891 - 4780) + chr(2335 - 2285) + chr(52) + '\065', 0o10), ehT0Px3KOsy9(chr(893 - 845) + '\157' + chr(601 - 551) + chr(0b111 + 0o55) + chr(1206 - 1158), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(53) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(2765 - 2711) + chr(786 - 733), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + '\060', 0b1000), ehT0Px3KOsy9(chr(2022 - 1974) + chr(8575 - 8464) + chr(0b101110 + 0o3) + '\x34' + '\x30', 60815 - 60807), ehT0Px3KOsy9(chr(48) + chr(0b100110 + 0o111) + chr(1100 - 1051) + '\x30' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100110 + 0o14) + chr(0b110111) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(50) + chr(52) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x30' + chr(0b11011 + 0o32), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110011) + '\060', 61103 - 61095), ehT0Px3KOsy9('\060' + chr(3284 - 3173) + chr(0b100010 + 0o17) + '\x32' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101100 + 0o13) + '\065', 0o10), ehT0Px3KOsy9(chr(1973 - 1925) + chr(0b1010010 + 0o35) + chr(2047 - 1996) + chr(0b10000 + 0o43) + chr(0b110011), 1442 - 1434), ehT0Px3KOsy9('\060' + '\157' + chr(1339 - 1289) + chr(0b110111) + '\064', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(1761 - 1711) + chr(0b110100) + chr(1582 - 1529), 8), ehT0Px3KOsy9(chr(420 - 372) + chr(0b1101111) + chr(0b101111 + 0o2) + '\061' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + chr(0b110000 + 0o2) + chr(50) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11100 + 0o27) + '\060' + chr(1815 - 1764), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b11111 + 0o25) + chr(0b110110), 50945 - 50937), ehT0Px3KOsy9('\x30' + chr(0b1011001 + 0o26) + chr(0b110101) + chr(1176 - 1122), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110100) + chr(0b100011 + 0o17), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(1243 - 1190) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(2893 - 2782) + chr(0b101110 + 0o3) + chr(0b110010 + 0o1) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000101 + 0o52) + chr(0b11110 + 0o23) + chr(0b110011) + chr(0b11101 + 0o27), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\x37' + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54), 29195 - 29187), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(1252 - 1201) + '\065' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1010 + 0o145) + chr(0b110010) + chr(53) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\066' + chr(0b1111 + 0o43), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + '\x31' + chr(0b1110 + 0o51) + chr(0b110001), 27937 - 27929), ehT0Px3KOsy9(chr(48) + chr(0b11 + 0o154) + chr(1485 - 1436) + '\064' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(811 - 700) + chr(0b101010 + 0o7) + chr(0b11001 + 0o30) + chr(956 - 905), 0b1000), ehT0Px3KOsy9(chr(1661 - 1613) + '\x6f' + '\x33' + chr(49) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5102 - 4991) + '\x31' + chr(0b110100), 1412 - 1404), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(436 - 387) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10110 + 0o35) + '\060' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(11884 - 11773) + '\x32' + chr(1512 - 1459) + chr(480 - 432), 901 - 893), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101001 + 0o10) + chr(0b110101) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(48) + chr(0b11011 + 0o34), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1100101 + 0o12) + '\065' + chr(603 - 555), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b'), chr(100) + '\145' + '\143' + '\x6f' + chr(0b111110 + 0o46) + '\145')(chr(3607 - 3490) + chr(116) + chr(0b1100000 + 0o6) + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def bTRd72HmOHW6(I7QF3KlS7cYz, Cw9XGdlwj874, xEgrFJ0REugl, cirEqDm6EMgP, iWSGU7PkZMSJ, kEjec_nbBPWJ, q9PELYXemwBY, kwfuYzkY5C57=None, E9rQ2AW8Y03A=ehT0Px3KOsy9(chr(0b110000) + chr(0b10000 + 0o137) + chr(0b110001), ord("\x08")) / 9.0, LMjSKn1dXNXz=0.1, QGSIpd_yUNzU=1e-06, N2hHLFodXT_J=ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + chr(49) + chr(0b101001 + 0o11), 37886 - 37878), KUGShP2Xd_zs=xafqLlk3kkUe(CIVheOt0RKQX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xd0X'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(0b1011 + 0o152) + chr(11933 - 11817) + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b111000)))()):
AyZ0ziQigspL = YyaZ4tpXu4lf(MVEN8G6CxlvR(Cw9XGdlwj874.keys()) - MVEN8G6CxlvR([xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xc1Y\x14'), chr(0b10011 + 0o121) + chr(101) + chr(99) + '\157' + '\x64' + chr(0b1101 + 0o130))(chr(0b1110011 + 0o2) + chr(0b1110100) + chr(0b10111 + 0o117) + chr(186 - 141) + '\070')]))[ehT0Px3KOsy9(chr(1178 - 1130) + '\157' + '\x30', 8)]
(fuwbpiKmfMe7, _xYMNIi_kptB, _KVnxr8aGJwo, VNGQdHSFPrso) = bFGS9HILXfPg(I7QF3KlS7cYz, KUGShP2Xd_zs, Cw9XGdlwj874, kwfuYzkY5C57)
fuwbpiKmfMe7.XXPvg13AmiwJ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xc1Y\x14'), chr(0b10 + 0o142) + chr(0b1100101) + chr(99) + chr(0b1001 + 0o146) + chr(100) + '\145')(chr(0b1110101) + chr(0b1100110 + 0o16) + chr(0b11010 + 0o114) + chr(1051 - 1006) + chr(56))][:] = xEgrFJ0REugl
fuwbpiKmfMe7.XXPvg13AmiwJ[AyZ0ziQigspL][:] = cirEqDm6EMgP
QV6apTHv2usV = []
AY5CnJTd0yJR = ehT0Px3KOsy9(chr(48) + chr(111) + chr(822 - 774), 8)
avRbFsnfJxQj = ltvhPP4VhXre.time()
for WVxHKyX45z_L in vQr8gNKaIaWE(q9PELYXemwBY):
(MpQV1nVmaeYH, gcK3BnZiRZAX) = f5K7739NK3cu(fuwbpiKmfMe7, _xYMNIi_kptB, _KVnxr8aGJwo, AyZ0ziQigspL, E9rQ2AW8Y03A, LMjSKn1dXNXz, N2hHLFodXT_J, QGSIpd_yUNzU)
AY5CnJTd0yJR += gcK3BnZiRZAX
if (WVxHKyX45z_L + ehT0Px3KOsy9(chr(1428 - 1380) + chr(0b1101010 + 0o5) + '\061', 8)) % ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + '\x31' + chr(2081 - 2031), 8) == ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1110 + 0o42), 8):
xafqLlk3kkUe(QV6apTHv2usV, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc4\xd0]\x10n\x04'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(3699 - 3588) + chr(0b1100100) + chr(101))(chr(8005 - 7888) + chr(116) + chr(0b11 + 0o143) + chr(0b101101) + '\070'))(MpQV1nVmaeYH)
if (WVxHKyX45z_L + ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001), 8)) % ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1001100 + 0o43) + chr(248 - 197) + chr(48) + chr(51) + chr(0b1011 + 0o47) + '\064' + '\x30', 0o10) == ehT0Px3KOsy9(chr(48) + chr(0b111000 + 0o67) + '\060', 8):
whWDZq5_lP01 = ltvhPP4VhXre.time()
zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\xd5_\x07e\x0e4\x9c\xea\xf1\xfd"\x1d\x95\xc9\xc8v\xb5\xe6\x02'), chr(9256 - 9156) + '\145' + '\143' + '\157' + '\x64' + '\145')('\165' + chr(0b1011001 + 0o33) + '\146' + '\x2d' + chr(0b1010 + 0o56)) % (WVxHKyX45z_L + ehT0Px3KOsy9(chr(1316 - 1268) + chr(0b1101111) + '\061', 8)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xc9@\x10 30\xd9\xcd\xf1\xa2p\x18\xbd'), chr(0b110011 + 0o61) + '\x65' + '\x63' + chr(0b1010100 + 0o33) + chr(100) + '\x65')(chr(0b111110 + 0o67) + chr(6822 - 6706) + '\x66' + chr(1242 - 1197) + chr(56)) % (whWDZq5_lP01 - avRbFsnfJxQj), xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xf3hO'), chr(7940 - 7840) + chr(0b1100101) + chr(0b1001001 + 0o32) + chr(0b1101111) + chr(3425 - 3325) + chr(101))(chr(6543 - 6426) + chr(116) + chr(9836 - 9734) + '\x2d' + chr(0b11 + 0o65)), c_OlWkqJYd4m(fuwbpiKmfMe7, X=iWSGU7PkZMSJ, Y=kEjec_nbBPWJ, sample_pool=QV6apTHv2usV, minibatch_size=xafqLlk3kkUe(cirEqDm6EMgP, xafqLlk3kkUe(SXOLrMavuUCe(b"\xcb\xc1X,f,'\xd0\xf7\xf5\xfb2"), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(730 - 630) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)))[ehT0Px3KOsy9('\060' + '\157' + chr(48), 8)], save_path=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xc5J\x07e\x133\xd5\xcc\xeb\xc7\x18p\x98\x92\xd14\xe1'), '\144' + chr(0b1100101) + '\143' + chr(0b1010011 + 0o34) + chr(0b111001 + 0o53) + chr(0b110111 + 0o56))(chr(0b1000111 + 0o56) + '\x74' + chr(102) + chr(0b10100 + 0o31) + chr(2615 - 2559))))
avRbFsnfJxQj = ltvhPP4VhXre.time()
xafqLlk3kkUe(fuwbpiKmfMe7, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\xcf]\x0c_\x10!\xce\xc2\xe8\xeb\x0f[\xa9\xd3\xc8'), '\144' + '\x65' + chr(0b1100 + 0o127) + chr(0b1101111) + chr(100) + '\x65')(chr(0b10000 + 0o145) + chr(7151 - 7035) + '\x66' + chr(0b101101) + chr(0b1111 + 0o51)))(MpQV1nVmaeYH)
zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc4\xc3N\x10p\x14`\xce\xc2\xf1\xf1?'), '\x64' + chr(0b111100 + 0o51) + '\143' + chr(0b10001 + 0o136) + chr(6302 - 6202) + '\x65')('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(1743 - 1687)), AY5CnJTd0yJR / kkSX4ccExqw4(q9PELYXemwBY))
return QV6apTHv2usV
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.