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/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_mean
|
def reduce_mean(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by mean value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'mean', new_attrs, inputs
|
python
|
def reduce_mean(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by mean value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'mean', new_attrs, inputs
|
[
"def",
"reduce_mean",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"return",
"'mean'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce the array along a given axis by mean value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"mean",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L620-L623
|
train
|
Reduce the array along a given axis by mean value.
|
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(792 - 744) + '\157' + chr(1998 - 1947) + chr(50) + chr(51), 48180 - 48172), ehT0Px3KOsy9('\x30' + chr(10370 - 10259) + chr(606 - 557) + chr(0b101101 + 0o11) + chr(2421 - 2366), 48320 - 48312), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b101 + 0o53) + chr(1586 - 1535), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(1910 - 1862) + chr(0b1101111) + '\x32' + '\064' + '\x31', 0o10), ehT0Px3KOsy9(chr(697 - 649) + '\x6f' + '\x33' + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\066' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b111 + 0o53) + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + chr(0b110010) + '\x33' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(2184 - 2136) + '\157' + '\x33' + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b110001) + chr(0b110001) + '\x37', 53868 - 53860), ehT0Px3KOsy9('\060' + chr(3550 - 3439) + '\x33' + '\065' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(11342 - 11231) + '\061' + '\060' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(0b11101 + 0o25) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(0b110001) + '\x37' + chr(0b110100), 23728 - 23720), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\064' + chr(0b11010 + 0o32), 29849 - 29841), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11000 + 0o33) + chr(1474 - 1419) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\x35' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(2253 - 2142) + chr(0b100000 + 0o26) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1580 - 1469) + chr(0b11111 + 0o22) + chr(0b0 + 0o66) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b110111 + 0o70) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(2154 - 2106) + chr(0b1011111 + 0o20) + chr(0b110 + 0o53) + chr(51) + chr(0b100010 + 0o23), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(54) + chr(2481 - 2426), 0o10), ehT0Px3KOsy9(chr(48) + chr(1420 - 1309) + '\x31' + chr(0b110011) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + chr(51) + chr(1649 - 1598) + chr(0b10111 + 0o34), 0o10), ehT0Px3KOsy9('\060' + chr(11945 - 11834) + chr(0b110011) + chr(1776 - 1727) + '\x33', 5584 - 5576), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2372 - 2322) + '\x33' + '\067', 47104 - 47096), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o55) + chr(55), 8), ehT0Px3KOsy9(chr(48) + chr(0b1000001 + 0o56) + '\x34' + chr(0b10110 + 0o36), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x31' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(8029 - 7918) + chr(51) + chr(52) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1289 - 1239) + chr(1432 - 1378) + '\061', 63740 - 63732), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\061' + chr(0b100000 + 0o22) + chr(2280 - 2226), 0b1000), ehT0Px3KOsy9(chr(398 - 350) + chr(0b1101111) + chr(99 - 50) + chr(0b110111) + '\060', 24594 - 24586), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1258 - 1208) + chr(0b110000) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1100111 + 0o10) + chr(0b110011) + chr(0b10111 + 0o34), 0b1000), ehT0Px3KOsy9('\060' + chr(10180 - 10069) + chr(53) + chr(1814 - 1763), 26423 - 26415), ehT0Px3KOsy9(chr(0b110000) + chr(3957 - 3846) + chr(1228 - 1176) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100100 + 0o113) + chr(0b110010) + chr(51) + chr(51), 0b1000), ehT0Px3KOsy9(chr(832 - 784) + chr(9391 - 9280) + chr(50) + chr(0b110100) + '\x37', 57251 - 57243)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(1387 - 1334) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), '\144' + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(0b100101 + 0o100))(chr(117) + '\x74' + '\x66' + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jC5WnQwm7mmx(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x0f&\xb2'), chr(266 - 166) + chr(0b1100101) + chr(99) + chr(0b1011111 + 0o20) + chr(6954 - 6854) + chr(101))('\x75' + '\164' + chr(0b1100110) + '\055' + '\x38'): xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x0f*\xb2'), chr(100) + chr(2689 - 2588) + '\143' + chr(111) + chr(100) + chr(0b1001101 + 0o30))(chr(117) + chr(883 - 767) + '\146' + chr(45) + '\x38')})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\x12"\xaf'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1001100 + 0o43) + chr(100) + chr(0b110 + 0o137))('\165' + chr(116) + chr(0b11101 + 0o111) + '\055' + '\070'), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_min
|
def reduce_min(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by minimum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'min', new_attrs, inputs
|
python
|
def reduce_min(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by minimum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'min', new_attrs, inputs
|
[
"def",
"reduce_min",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"return",
"'min'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce the array along a given axis by minimum value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"minimum",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L625-L628
|
train
|
Reduce the array along a given axis by minimum value.
|
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,bdLuls3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ZiX,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(0b111 + 0o51) + '\157' + chr(1498 - 1445) + chr(51), 60815 - 60807), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x37' + chr(0b100011 + 0o21), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1 + 0o156) + chr(0b110011) + chr(54 - 6) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6880 - 6769) + chr(0b10 + 0o57) + chr(49) + '\061', 41459 - 41451), ehT0Px3KOsy9('\x30' + chr(0b10011 + 0o134) + '\067' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(50) + chr(0b10000 + 0o41) + chr(0b110010), 22843 - 22835), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(594 - 546) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b111 + 0o55) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\x36' + chr(0b10 + 0o64), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011110 + 0o21) + chr(51) + chr(2342 - 2293) + chr(0b110001 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b110000 + 0o77) + '\061' + '\064' + chr(1877 - 1824), 44958 - 44950), ehT0Px3KOsy9(chr(48) + chr(11292 - 11181) + chr(0b110101) + chr(0b1101 + 0o52), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\062' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\066' + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1204 - 1156) + '\157' + '\x31' + chr(2673 - 2618) + chr(229 - 177), 53812 - 53804), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(53) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101001 + 0o6) + '\x32' + chr(0b101010 + 0o15) + chr(0b110 + 0o53), 47263 - 47255), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110000 + 0o2) + '\x37' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(3394 - 3283) + chr(0b11001 + 0o32) + chr(0b100100 + 0o15) + '\060', 20081 - 20073), ehT0Px3KOsy9(chr(2057 - 2009) + chr(0b1010000 + 0o37) + chr(817 - 767) + '\062' + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(707 - 596) + '\061' + chr(0b110010) + chr(177 - 124), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(2105 - 2056) + chr(0b10100 + 0o41), 0o10), ehT0Px3KOsy9('\x30' + chr(7936 - 7825) + chr(0b101011 + 0o6) + '\062' + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1001 + 0o50) + chr(2751 - 2697) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(4406 - 4295) + chr(49) + '\x35' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b1110 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + chr(51) + chr(0b110001) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(110 - 62) + chr(5784 - 5673) + chr(0b101000 + 0o12) + '\x32' + chr(730 - 682), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(1075 - 1020) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(2350 - 2296) + '\060', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\063' + chr(0b110010) + chr(0b101 + 0o61), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11266 - 11155) + '\062' + chr(0b100101 + 0o14) + chr(0b101000 + 0o17), 62316 - 62308), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(444 - 393) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + chr(407 - 357) + chr(0b100010 + 0o17) + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(54) + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b110010 + 0o5) + chr(0b1110 + 0o42), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\060' + chr(55), 52147 - 52139), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(1579 - 1530) + '\x35', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(10878 - 10767) + '\x35' + chr(48), 533 - 525)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x05'), chr(1841 - 1741) + chr(0b1100101) + chr(0b111000 + 0o53) + chr(111) + chr(100) + chr(101))(chr(117) + chr(0b11100 + 0o130) + chr(0b1100110) + chr(0b101101) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def lta0tvIzWdOd(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'JQY\xb1'), chr(3571 - 3471) + '\145' + chr(0b1001101 + 0o26) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(0b111000)): xafqLlk3kkUe(SXOLrMavuUCe(b'JQU\xb1'), chr(5749 - 5649) + chr(101) + chr(1086 - 987) + chr(111) + '\x64' + chr(7888 - 7787))(chr(0b1110101) + chr(5527 - 5411) + chr(0b1100110) + chr(1956 - 1911) + chr(0b111000))})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'F@R'), chr(1866 - 1766) + chr(0b1100101) + '\143' + chr(111) + '\144' + chr(419 - 318))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070'), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_sum
|
def reduce_sum(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by sum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'sum', new_attrs, inputs
|
python
|
def reduce_sum(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by sum value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'sum', new_attrs, inputs
|
[
"def",
"reduce_sum",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"return",
"'sum'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce the array along a given axis by sum value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"sum",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L630-L633
|
train
|
Reduce the array along a given axis by sum value.
|
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,qqrhSmCS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VFey,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(0b1101111 + 0o0) + '\063' + chr(2199 - 2144) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(7785 - 7674) + '\x31' + '\x35' + chr(173 - 122), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(1054 - 999) + '\066', 0b1000), ehT0Px3KOsy9(chr(170 - 122) + '\x6f' + chr(760 - 711) + chr(1661 - 1606) + chr(1475 - 1427), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10 + 0o57), 0b1000), ehT0Px3KOsy9('\x30' + chr(2262 - 2151) + chr(0b110011) + chr(2471 - 2419), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + '\x33' + chr(1683 - 1633) + chr(55), 0b1000), ehT0Px3KOsy9(chr(561 - 513) + chr(0b1101111) + chr(0b110011) + chr(1013 - 965) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9540 - 9429) + chr(0b11010 + 0o31) + '\x32' + '\x37', 8), ehT0Px3KOsy9(chr(48) + chr(0b1001000 + 0o47) + chr(2635 - 2580) + chr(0b1001 + 0o56), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + '\062' + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100100 + 0o113) + '\062' + chr(2313 - 2261) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\061' + chr(0b110101) + chr(2257 - 2208), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1843 - 1732) + chr(49) + chr(0b10100 + 0o37) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1219 - 1171) + chr(0b1101111) + chr(0b110111) + '\067', 8), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(5359 - 5248) + chr(145 - 96) + chr(0b0 + 0o60) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(329 - 281) + '\157' + chr(0b110001) + chr(0b110001) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10100 + 0o36) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110001) + chr(2521 - 2467), 0b1000), ehT0Px3KOsy9(chr(1624 - 1576) + chr(111) + chr(0b110111) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(55) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(2183 - 2135) + chr(7056 - 6945) + chr(1335 - 1284) + chr(0b101110 + 0o7) + chr(0b1101 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(399 - 349) + chr(0b11110 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(1189 - 1141) + chr(0b1101111) + '\062' + chr(48) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10100 + 0o37) + chr(0b110001) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b110101) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9913 - 9802) + chr(0b110100) + chr(0b110000 + 0o4), 53549 - 53541), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(1302 - 1254) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + '\061' + '\060' + chr(2729 - 2675), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11101 + 0o26) + chr(1645 - 1594) + chr(0b10100 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1215 - 1164) + '\x33' + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(0b11011 + 0o30) + chr(0b110 + 0o56), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\x32', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(7973 - 7862) + chr(0b110010) + chr(876 - 826) + chr(335 - 280), 0o10), ehT0Px3KOsy9(chr(1115 - 1067) + '\x6f' + chr(55) + chr(1221 - 1170), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\060' + chr(0b110000), 8), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + chr(0b10001 + 0o42) + chr(0b110001) + chr(1021 - 970), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10800 - 10689) + chr(0b110001) + chr(537 - 485) + '\x31', 42876 - 42868), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\061' + '\065', 51271 - 51263)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6'), chr(0b11 + 0o141) + '\145' + '\143' + chr(0b1101111) + '\144' + chr(4133 - 4032))(chr(0b1011000 + 0o35) + chr(0b1110100) + '\x66' + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def O3yRJHXcfeTa(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\x13\x1b\x0b'), chr(100) + chr(101) + chr(5365 - 5266) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(7161 - 7044) + chr(0b1110100) + '\146' + chr(0b10000 + 0o35) + chr(0b11 + 0o65)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\x13\x17\x0b'), chr(0b1100100) + chr(116 - 15) + chr(0b1011100 + 0o7) + chr(6394 - 6283) + chr(0b1100100) + '\145')(chr(10547 - 10430) + chr(116) + chr(0b1100110) + chr(1844 - 1799) + '\070')})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\x1e\x13'), '\x64' + chr(5985 - 5884) + chr(0b110101 + 0o56) + chr(9454 - 9343) + chr(915 - 815) + chr(101))(chr(117) + '\164' + '\146' + chr(45) + chr(1809 - 1753)), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_prod
|
def reduce_prod(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by product value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'prod', new_attrs, inputs
|
python
|
def reduce_prod(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by product value"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'prod', new_attrs, inputs
|
[
"def",
"reduce_prod",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"return",
"'prod'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce the array along a given axis by product value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"product",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775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bn,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(1968 - 1920) + '\157' + chr(133 - 82) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(0b110010) + '\x36' + chr(0b101001 + 0o14), 9562 - 9554), ehT0Px3KOsy9(chr(727 - 679) + chr(111) + chr(0b1001 + 0o52) + chr(788 - 738), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x30' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(1484 - 1435) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\061' + '\x37' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b0 + 0o62) + chr(51) + '\x35', 39281 - 39273), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(5059 - 4948) + chr(1753 - 1704) + '\061' + chr(2020 - 1967), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11640 - 11529) + chr(613 - 564) + chr(0b101110 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4058 - 3947) + chr(560 - 509) + '\x36' + '\061', 59883 - 59875), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1001 + 0o51) + '\x31' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2105 - 1994) + '\062' + '\061' + '\064', 12207 - 12199), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000111 + 0o50) + '\061' + chr(0b101001 + 0o16) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b110101 + 0o72) + chr(0b110010) + '\x35' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1 + 0o61) + chr(0b110000) + '\060', 50794 - 50786), ehT0Px3KOsy9('\x30' + '\x6f' + chr(960 - 911) + '\060' + chr(2358 - 2307), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11101 + 0o24) + chr(0b110100) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\x33' + chr(0b110101) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\x35' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\x34' + '\066', 26313 - 26305), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\066' + chr(54), 29813 - 29805), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\x35' + chr(0b100111 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100010 + 0o15) + chr(0b110011) + chr(0b110000) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110100) + chr(0b11 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(1312 - 1264) + '\x6f' + chr(0b110011) + chr(0b101010 + 0o12) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(51) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1947 - 1899) + chr(0b1101111) + chr(0b10011 + 0o36) + '\x34' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(10755 - 10644) + chr(0b110001 + 0o0) + chr(0b110111) + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101000 + 0o12) + chr(0b101101 + 0o5) + chr(211 - 163), 32447 - 32439), ehT0Px3KOsy9('\x30' + chr(4595 - 4484) + chr(0b1010 + 0o55) + chr(0b10 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b110010) + chr(49) + chr(0b1101 + 0o43), 63143 - 63135), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(620 - 572) + chr(0b110010 + 0o75) + chr(0b1010 + 0o50) + chr(967 - 917) + chr(0b10100 + 0o36), 26074 - 26066), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(52) + '\x36', 8), ehT0Px3KOsy9(chr(678 - 630) + chr(0b11100 + 0o123) + chr(0b110011) + chr(0b10 + 0o63), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(0b11000 + 0o33) + chr(2100 - 2049) + chr(2175 - 2124), 0o10), ehT0Px3KOsy9(chr(670 - 622) + chr(111) + '\x32' + chr(51), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(671 - 618) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xda'), chr(0b1100100) + '\145' + chr(0b1011001 + 0o12) + '\157' + chr(562 - 462) + chr(101))(chr(4711 - 4594) + chr(0b1110100) + chr(0b1100100 + 0o2) + '\055' + chr(0b10010 + 0o46)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Bh6XDexadRc6(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x95\xcd\x7f\xb3'), chr(4615 - 4515) + chr(101) + '\x63' + '\157' + chr(100) + '\145')(chr(117) + chr(0b1110100) + chr(0b111101 + 0o51) + '\x2d' + chr(0b111000)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x95\xcds\xb3'), chr(0b1100100) + '\x65' + chr(6630 - 6531) + '\x6f' + chr(100) + '\x65')(chr(3185 - 3068) + '\164' + '\146' + chr(508 - 463) + chr(56))})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\x84\xc7u\xa4'), chr(6025 - 5925) + chr(101) + chr(0b11010 + 0o111) + chr(9173 - 9062) + chr(100) + '\x65')(chr(8368 - 8251) + chr(12775 - 12659) + '\x66' + chr(45) + chr(0b111000)), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_log_sum
|
def reduce_log_sum(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by log sum value"""
keep_dims = True if 'keepdims' not in attrs else attrs.get('keepdims')
sum_op = symbol.sum(inputs[0], axis=attrs.get('axes'),
keepdims=keep_dims)
log_sym = symbol.log(sum_op)
return log_sym, attrs, inputs
|
python
|
def reduce_log_sum(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by log sum value"""
keep_dims = True if 'keepdims' not in attrs else attrs.get('keepdims')
sum_op = symbol.sum(inputs[0], axis=attrs.get('axes'),
keepdims=keep_dims)
log_sym = symbol.log(sum_op)
return log_sym, attrs, inputs
|
[
"def",
"reduce_log_sum",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"keep_dims",
"=",
"True",
"if",
"'keepdims'",
"not",
"in",
"attrs",
"else",
"attrs",
".",
"get",
"(",
"'keepdims'",
")",
"sum_op",
"=",
"symbol",
".",
"sum",
"(",
"inputs",
"[",
"0",
"]",
",",
"axis",
"=",
"attrs",
".",
"get",
"(",
"'axes'",
")",
",",
"keepdims",
"=",
"keep_dims",
")",
"log_sym",
"=",
"symbol",
".",
"log",
"(",
"sum_op",
")",
"return",
"log_sym",
",",
"attrs",
",",
"inputs"
] |
Reduce the array along a given axis by log sum value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"log",
"sum",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e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1G5VS3dE_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(50) + '\x30' + '\x35', 0b1000), ehT0Px3KOsy9(chr(375 - 327) + chr(1387 - 1276) + chr(0b110011) + chr(0b111 + 0o60) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(527 - 479) + chr(0b1101111) + chr(0b110011) + chr(586 - 534) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(0b1 + 0o61) + chr(0b110011) + chr(0b110001), 21671 - 21663), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(0b110011) + chr(52) + chr(0b110011), 37525 - 37517), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1430 - 1381) + chr(1568 - 1520) + chr(48), 56040 - 56032), ehT0Px3KOsy9(chr(48) + chr(6298 - 6187) + chr(0b101101 + 0o4) + chr(2734 - 2681) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\061' + chr(0b10100 + 0o36), 32349 - 32341), ehT0Px3KOsy9(chr(48) + chr(0b1011 + 0o144) + '\x32' + '\x30' + chr(55), 5531 - 5523), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(2640 - 2587) + chr(0b10100 + 0o35), 8), ehT0Px3KOsy9(chr(1158 - 1110) + chr(111) + '\062' + chr(0b110011) + '\060', 35566 - 35558), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101011 + 0o7) + chr(0b100111 + 0o14) + chr(0b0 + 0o62), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2222 - 2173), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b11101 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b110101) + chr(50), 28554 - 28546), ehT0Px3KOsy9(chr(324 - 276) + chr(280 - 169) + '\x31' + chr(52) + chr(796 - 747), 57842 - 57834), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + chr(51) + '\x35' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9707 - 9596) + chr(0b100101 + 0o16) + chr(297 - 248) + chr(0b10001 + 0o44), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + '\063' + chr(53) + chr(124 - 72), 28654 - 28646), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + '\061' + '\x37' + chr(1832 - 1783), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x33' + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2323 - 2274) + '\x34' + chr(55), 56039 - 56031), ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + chr(51) + chr(0b100000 + 0o25) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(719 - 608) + chr(0b100111 + 0o13) + '\061' + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001001 + 0o46) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b11011 + 0o25) + chr(0b10 + 0o60), 0o10), ehT0Px3KOsy9(chr(384 - 336) + '\x6f' + chr(2098 - 2046) + chr(1562 - 1513), 58155 - 58147), ehT0Px3KOsy9('\x30' + '\x6f' + chr(62 - 11) + '\067' + chr(0b110 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(0b110011) + chr(0b11010 + 0o26) + chr(0b110000), 20573 - 20565), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + chr(0b100010 + 0o21) + '\x32' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(52) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(1745 - 1697) + chr(0b1101111) + '\x33' + chr(53) + chr(0b110110), 8), ehT0Px3KOsy9('\060' + chr(0b1101010 + 0o5) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(0b100110 + 0o17) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1903 - 1853) + '\x35' + '\x34', 37791 - 37783), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x31' + chr(579 - 528), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(2813 - 2759), 0b1000), ehT0Px3KOsy9(chr(1464 - 1416) + chr(111) + chr(0b100111 + 0o12) + chr(0b110100) + chr(0b110001), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(0b101 + 0o53), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b100100 + 0o100) + chr(0b1100101))(chr(0b1110101) + '\164' + '\146' + chr(0b101000 + 0o5) + chr(481 - 425)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def u1hzFjhgebWC(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
ifw9pap17BzX = ehT0Px3KOsy9('\060' + '\157' + chr(1973 - 1924), 8) if xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\x9a\x85\xe9\x87)\x049'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b11001 + 0o114))(chr(13533 - 13416) + '\x74' + chr(0b1100110) + chr(0b101101) + '\070') not in oIhwMA96NShQ else oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\x9a\x85\xe9\x87)\x049'), chr(0b1100100) + chr(0b1011001 + 0o14) + '\x63' + chr(0b1101111) + chr(0b111010 + 0o52) + '\145')(chr(117) + chr(0b1011100 + 0o30) + chr(0b1100110) + '\x2d' + chr(733 - 677)))
p4dpx5hjy13i = Usr5ykvL2UZF.xkxBmo49x2An(vXoupepMtCXU[ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x30', 6724 - 6716)], axis=oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\x87\x85\xea'), chr(100) + chr(0b1011100 + 0o11) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b10001 + 0o124))('\x75' + chr(0b1110100) + '\146' + chr(1936 - 1891) + chr(56))), keepdims=ifw9pap17BzX)
cmLT_y8qOU3q = Usr5ykvL2UZF.log(p4dpx5hjy13i)
return (cmLT_y8qOU3q, oIhwMA96NShQ, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_log_sum_exp
|
def reduce_log_sum_exp(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by log sum exp value"""
keep_dims = True if 'keepdims' not in attrs else attrs.get('keepdims')
exp_op = symbol.exp(inputs[0])
sum_op = symbol.sum(exp_op, axis=attrs.get('axes'),
keepdims=keep_dims)
log_sym = symbol.log(sum_op)
return log_sym, attrs, inputs
|
python
|
def reduce_log_sum_exp(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by log sum exp value"""
keep_dims = True if 'keepdims' not in attrs else attrs.get('keepdims')
exp_op = symbol.exp(inputs[0])
sum_op = symbol.sum(exp_op, axis=attrs.get('axes'),
keepdims=keep_dims)
log_sym = symbol.log(sum_op)
return log_sym, attrs, inputs
|
[
"def",
"reduce_log_sum_exp",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"keep_dims",
"=",
"True",
"if",
"'keepdims'",
"not",
"in",
"attrs",
"else",
"attrs",
".",
"get",
"(",
"'keepdims'",
")",
"exp_op",
"=",
"symbol",
".",
"exp",
"(",
"inputs",
"[",
"0",
"]",
")",
"sum_op",
"=",
"symbol",
".",
"sum",
"(",
"exp_op",
",",
"axis",
"=",
"attrs",
".",
"get",
"(",
"'axes'",
")",
",",
"keepdims",
"=",
"keep_dims",
")",
"log_sym",
"=",
"symbol",
".",
"log",
"(",
"sum_op",
")",
"return",
"log_sym",
",",
"attrs",
",",
"inputs"
] |
Reduce the array along a given axis by log sum exp value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"log",
"sum",
"exp",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L648-L655
|
train
|
Reduce the array along a given axis by log sum exp value
|
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,OT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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(0b110000) + chr(630 - 519) + '\x32' + chr(51) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10010 + 0o41) + '\060' + '\060', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(50) + chr(55) + chr(1339 - 1290), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(55) + chr(1999 - 1946), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(2050 - 2002) + '\x6f' + '\062' + '\x37' + chr(0b101010 + 0o11), 58616 - 58608), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b11 + 0o60) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(0b110011) + chr(0b110 + 0o54) + chr(2226 - 2177), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(2324 - 2269) + '\x31', 16981 - 16973), ehT0Px3KOsy9(chr(0b110000) + chr(1426 - 1315) + chr(49) + chr(53) + chr(0b110000), 21977 - 21969), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(0b110010) + '\x33', 0b1000), ehT0Px3KOsy9(chr(514 - 466) + chr(478 - 367) + chr(49) + chr(0b100110 + 0o13) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b110100) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + chr(0b10001 + 0o37), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + chr(51) + chr(626 - 576) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110101) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(7670 - 7559) + chr(49) + chr(52) + chr(743 - 694), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(1208 - 1157) + '\x35', 31964 - 31956), ehT0Px3KOsy9('\x30' + '\157' + chr(2051 - 2002) + '\x33' + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6489 - 6378) + chr(0b11 + 0o60) + chr(834 - 786) + '\061', 3355 - 3347), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + '\061' + chr(0b11110 + 0o26) + '\x33', 0o10), ehT0Px3KOsy9(chr(1759 - 1711) + chr(111) + chr(51) + chr(54) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(175 - 125) + '\x34' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + chr(1937 - 1886) + '\060' + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1921 - 1872), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101 + 0o57) + chr(0b100010 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101010 + 0o5) + chr(0b110010) + chr(0b110111) + chr(0b1101 + 0o46), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2599 - 2548) + chr(0b10100 + 0o42) + chr(0b101101 + 0o10), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064' + chr(48), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(51) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(2176 - 2128) + chr(6639 - 6528) + chr(0b110001) + '\065' + '\063', 3669 - 3661), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(803 - 752) + chr(52) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(443 - 332) + '\x33' + chr(0b110000 + 0o0) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101110 + 0o5) + '\x30', 8), ehT0Px3KOsy9(chr(2181 - 2133) + chr(111) + '\x36', 41677 - 41669), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1406 - 1355) + '\062' + chr(0b110110), 62472 - 62464)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(279 - 231) + chr(0b1101111) + '\x35' + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1'), '\144' + '\x65' + '\143' + chr(6039 - 5928) + chr(0b11111 + 0o105) + chr(0b1000 + 0o135))(chr(0b11101 + 0o130) + chr(0b1110100) + chr(2378 - 2276) + chr(1935 - 1890) + chr(0b110010 + 0o6)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def eArhOjBlyRGY(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
ifw9pap17BzX = ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + '\061', 8) if xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xa5\xdcMH\xd2\xa0,'), '\144' + '\x65' + chr(0b1111 + 0o124) + chr(111) + '\144' + chr(4616 - 4515))(chr(0b1101000 + 0o15) + '\164' + chr(102) + chr(45) + chr(0b111000)) not in oIhwMA96NShQ else oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xa5\xdcMH\xd2\xa0,'), '\x64' + chr(4529 - 4428) + chr(8274 - 8175) + '\x6f' + '\x64' + chr(0b11101 + 0o110))('\165' + chr(0b1110100) + chr(0b1110 + 0o130) + chr(1691 - 1646) + '\070'))
yZeXRVIkxMOM = Usr5ykvL2UZF.exp(vXoupepMtCXU[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000), ord("\x08"))])
p4dpx5hjy13i = Usr5ykvL2UZF.xkxBmo49x2An(yZeXRVIkxMOM, axis=oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xb8\xdcN'), chr(0b10101 + 0o117) + '\145' + chr(0b110010 + 0o61) + '\157' + '\144' + chr(101))(chr(117) + '\164' + chr(0b1010101 + 0o21) + '\x2d' + chr(0b111000))), keepdims=ifw9pap17BzX)
cmLT_y8qOU3q = Usr5ykvL2UZF.log(p4dpx5hjy13i)
return (cmLT_y8qOU3q, oIhwMA96NShQ, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_sum_square
|
def reduce_sum_square(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by sum square value"""
square_op = symbol.square(inputs[0])
sum_op = symbol.sum(square_op, axis=attrs.get('axes'),
keepdims=attrs.get('keepdims'))
return sum_op, attrs, inputs
|
python
|
def reduce_sum_square(attrs, inputs, proto_obj):
"""Reduce the array along a given axis by sum square value"""
square_op = symbol.square(inputs[0])
sum_op = symbol.sum(square_op, axis=attrs.get('axes'),
keepdims=attrs.get('keepdims'))
return sum_op, attrs, inputs
|
[
"def",
"reduce_sum_square",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"square_op",
"=",
"symbol",
".",
"square",
"(",
"inputs",
"[",
"0",
"]",
")",
"sum_op",
"=",
"symbol",
".",
"sum",
"(",
"square_op",
",",
"axis",
"=",
"attrs",
".",
"get",
"(",
"'axes'",
")",
",",
"keepdims",
"=",
"attrs",
".",
"get",
"(",
"'keepdims'",
")",
")",
"return",
"sum_op",
",",
"attrs",
",",
"inputs"
] |
Reduce the array along a given axis by sum square value
|
[
"Reduce",
"the",
"array",
"along",
"a",
"given",
"axis",
"by",
"sum",
"square",
"value"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L657-L662
|
train
|
Reduce the array along a given axis by sum square value
|
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,QWgp4ELTm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2KDPD,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(1268 - 1220) + '\157' + chr(0b110011) + '\x33' + chr(1005 - 953), 0b1000), ehT0Px3KOsy9('\x30' + chr(6760 - 6649) + '\062' + chr(0b100010 + 0o17) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(50) + chr(1973 - 1920), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100100 + 0o22) + '\x32', 62817 - 62809), ehT0Px3KOsy9(chr(0b110000) + chr(1143 - 1032) + chr(0b101001 + 0o11) + '\062' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(51) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(2005 - 1954) + chr(1081 - 1031) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(448 - 337) + '\x31' + chr(55) + '\x33', 185 - 177), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + chr(8489 - 8378) + chr(920 - 870) + chr(0b10110 + 0o41) + chr(0b11 + 0o56), 0b1000), ehT0Px3KOsy9(chr(641 - 593) + '\157' + chr(49) + chr(0b1001 + 0o47) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\065' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1253 - 1142) + '\064' + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\064' + '\066', 0o10), ehT0Px3KOsy9(chr(174 - 126) + chr(0b1101111) + chr(526 - 477) + chr(52) + chr(0b11100 + 0o26), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\067' + chr(50), 21664 - 21656), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + '\x31' + chr(0b11110 + 0o27) + '\060', 48505 - 48497), ehT0Px3KOsy9(chr(1205 - 1157) + chr(111) + chr(51) + chr(2348 - 2298) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(1304 - 1254) + chr(0b110100) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(716 - 668) + chr(0b100010 + 0o115) + chr(0b10000 + 0o43) + '\x35' + '\063', 14345 - 14337), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b110001) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(2052 - 1999) + chr(287 - 235), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1354 - 1243) + chr(0b110010) + chr(50) + chr(54), 3364 - 3356), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1100 + 0o143) + '\062' + chr(1575 - 1523) + chr(296 - 247), 54612 - 54604), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(0b1011 + 0o50) + chr(0b11101 + 0o30) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2158 - 2109) + '\060' + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063', 53496 - 53488), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\065' + chr(0b111 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2301 - 2252) + chr(0b100010 + 0o24) + chr(2106 - 2051), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100010 + 0o17) + chr(0b110100) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(774 - 723) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + chr(2310 - 2259), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x36' + '\x37', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100001 + 0o21) + chr(0b110001) + chr(0b10010 + 0o41), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10006 - 9895) + chr(0b110011) + chr(0b11001 + 0o34), 0b1000), ehT0Px3KOsy9(chr(1860 - 1812) + '\157' + chr(0b110010) + chr(144 - 94) + chr(0b101110 + 0o11), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x30' + chr(1170 - 1119), 0o10), ehT0Px3KOsy9(chr(1670 - 1622) + chr(111) + '\x32' + '\x34' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5859 - 5748) + '\x32' + chr(423 - 368) + chr(2258 - 2206), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110101) + chr(729 - 681), 60113 - 60105)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2'), chr(6702 - 6602) + '\145' + chr(99) + chr(111) + chr(1822 - 1722) + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def V_0yQYh23esD(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
vxKv7imkwS9R = Usr5ykvL2UZF.square(vXoupepMtCXU[ehT0Px3KOsy9(chr(0b110000) + chr(7401 - 7290) + '\060', 0o10)])
p4dpx5hjy13i = Usr5ykvL2UZF.xkxBmo49x2An(vxKv7imkwS9R, axis=oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xf4\xb0A'), chr(0b110111 + 0o55) + '\x65' + '\x63' + chr(111) + '\144' + chr(944 - 843))(chr(117) + '\x74' + '\x66' + chr(838 - 793) + chr(56))), keepdims=oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xe9\xb0B\xf6\xb2\xba\x08'), chr(0b10001 + 0o123) + '\x65' + chr(99) + '\157' + '\x64' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(0b101011 + 0o2) + '\070')))
return (p4dpx5hjy13i, oIhwMA96NShQ, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_l1
|
def reduce_l1(attrs, inputs, proto_obj):
"""Reduce input tensor by l1 normalization."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'ord' : 1})
return 'norm', new_attrs, inputs
|
python
|
def reduce_l1(attrs, inputs, proto_obj):
"""Reduce input tensor by l1 normalization."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'ord' : 1})
return 'norm', new_attrs, inputs
|
[
"def",
"reduce_l1",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"new_attrs",
"=",
"translation_utils",
".",
"_add_extra_attributes",
"(",
"new_attrs",
",",
"{",
"'ord'",
":",
"1",
"}",
")",
"return",
"'norm'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce input tensor by l1 normalization.
|
[
"Reduce",
"input",
"tensor",
"by",
"l1",
"normalization",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L664-L669
|
train
|
Reduce input tensor by l1 normalization.
|
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,pz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zGokYBM2Z,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(11551 - 11440) + chr(0b110011) + chr(0b100101 + 0o14) + chr(2070 - 2015), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(48) + chr(1313 - 1260), 30294 - 30286), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\063' + '\062' + chr(51), 8075 - 8067), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b101011 + 0o12) + chr(54), 55816 - 55808), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2185 - 2134) + '\060' + chr(0b101 + 0o62), 0b1000), ehT0Px3KOsy9('\060' + chr(6107 - 5996) + chr(0b110001) + '\x33' + chr(52), 0b1000), ehT0Px3KOsy9(chr(1935 - 1887) + chr(0b1101111) + chr(0b101011 + 0o7) + chr(53) + '\067', 64170 - 64162), ehT0Px3KOsy9('\x30' + chr(0b101100 + 0o103) + chr(0b110010) + chr(2147 - 2097) + chr(0b101001 + 0o15), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b101000 + 0o10) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(1284 - 1235) + chr(0b110000) + '\x31', 46515 - 46507), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + '\062' + '\063' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b0 + 0o157) + '\063' + chr(1288 - 1234) + '\x34', 52606 - 52598), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(867 - 817) + chr(61 - 6) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110010) + chr(481 - 429) + chr(0b101010 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + chr(9346 - 9235) + chr(0b110011) + '\x32' + '\063', 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\064' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101000 + 0o107) + chr(840 - 789) + chr(0b110101) + chr(55), 28104 - 28096), ehT0Px3KOsy9(chr(1212 - 1164) + '\157' + chr(0b110011) + chr(1334 - 1283) + chr(0b101000 + 0o16), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b100011 + 0o16), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8000 - 7889) + '\063' + chr(0b101010 + 0o15) + '\x32', 3834 - 3826), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b10 + 0o64) + chr(0b101110 + 0o2), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(51) + '\065' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1588 - 1538) + chr(55) + chr(0b11011 + 0o30), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010 + 0o0) + '\x30' + chr(629 - 578), 2703 - 2695), ehT0Px3KOsy9(chr(1732 - 1684) + chr(3173 - 3062) + chr(221 - 170) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(52) + '\x30', 50565 - 50557), ehT0Px3KOsy9(chr(1752 - 1704) + chr(2231 - 2120) + '\063' + chr(1339 - 1287) + chr(0b11101 + 0o24), 31934 - 31926), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x36' + chr(0b101101 + 0o11), 35248 - 35240), ehT0Px3KOsy9('\x30' + chr(8599 - 8488) + chr(0b110001) + '\061' + '\x31', 47885 - 47877), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2040 - 1991) + '\066' + chr(0b100100 + 0o17), 0o10), ehT0Px3KOsy9(chr(1675 - 1627) + chr(10204 - 10093) + chr(0b10000 + 0o42) + chr(0b110000) + chr(132 - 83), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(52) + chr(2276 - 2221), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b11010 + 0o30) + '\x31' + chr(63 - 13), 446 - 438), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\x34' + chr(0b100101 + 0o14), 33528 - 33520), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1011011 + 0o24) + chr(51) + '\062', 55282 - 55274), ehT0Px3KOsy9(chr(647 - 599) + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b100100 + 0o23), 0o10), ehT0Px3KOsy9(chr(48) + chr(8468 - 8357) + chr(49) + '\x33' + chr(52), 8), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(50) + chr(53) + chr(68 - 14), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(543 - 432) + '\x33' + chr(982 - 934) + chr(0b100101 + 0o16), 0o10), ehT0Px3KOsy9(chr(48) + chr(2281 - 2170) + chr(49) + chr(0b110100) + chr(0b111 + 0o52), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1352 - 1304) + chr(111) + chr(53) + chr(0b1000 + 0o50), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1'), chr(6195 - 6095) + chr(1544 - 1443) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b10100 + 0o121))(chr(0b110 + 0o157) + chr(0b110101 + 0o77) + chr(0b1100011 + 0o3) + '\x2d' + chr(2130 - 2074)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def m9zvPpW_FpRl(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xae=\xb6\x1d'), chr(0b1100100) + chr(2532 - 2431) + '\x63' + chr(9430 - 9319) + '\144' + chr(1474 - 1373))('\x75' + chr(0b10101 + 0o137) + chr(8354 - 8252) + chr(0b10100 + 0o31) + chr(0b101001 + 0o17)): xafqLlk3kkUe(SXOLrMavuUCe(b'\xae=\xba\x1d'), '\144' + '\145' + chr(0b1100011) + chr(12240 - 12129) + chr(100) + chr(0b11101 + 0o110))(chr(117) + chr(116) + '\x66' + '\055' + '\070')})
Oynw8flqk0TY = e_2m_ddtWLQF._add_extra_attributes(Oynw8flqk0TY, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xa07\xb7'), '\144' + chr(0b111111 + 0o46) + chr(99) + '\157' + '\x64' + '\145')('\x75' + chr(0b101010 + 0o112) + chr(0b1100110) + '\x2d' + '\070'): ehT0Px3KOsy9('\060' + chr(6188 - 6077) + '\x31', ord("\x08"))})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1*\xa1\x03'), '\144' + chr(0b1010011 + 0o22) + '\143' + chr(111) + chr(100) + '\145')(chr(117) + '\164' + '\146' + chr(0b101101) + chr(0b0 + 0o70)), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
reduce_l2
|
def reduce_l2(attrs, inputs, proto_obj):
"""Reduce input tensor by l2 normalization."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'norm', new_attrs, inputs
|
python
|
def reduce_l2(attrs, inputs, proto_obj):
"""Reduce input tensor by l2 normalization."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'axes':'axis'})
return 'norm', new_attrs, inputs
|
[
"def",
"reduce_l2",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'axes'",
":",
"'axis'",
"}",
")",
"return",
"'norm'",
",",
"new_attrs",
",",
"inputs"
] |
Reduce input tensor by l2 normalization.
|
[
"Reduce",
"input",
"tensor",
"by",
"l2",
"normalization",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L679-L682
|
train
|
Reduce input tensor by l2 normalization.
|
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,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x22bkKPdt5d,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(130 - 79) + '\065' + chr(656 - 607), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\060' + chr(1967 - 1916), 6607 - 6599), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1001100 + 0o43) + '\061' + chr(0b110101) + chr(0b110011), 9661 - 9653), ehT0Px3KOsy9('\x30' + chr(111) + '\x37' + chr(0b100 + 0o54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(380 - 331) + chr(0b100001 + 0o24), 0b1000), ehT0Px3KOsy9('\060' + chr(3828 - 3717) + '\x32' + chr(0b110000) + '\060', 0o10), ehT0Px3KOsy9(chr(1969 - 1921) + '\157' + chr(51) + '\063' + '\x36', 55181 - 55173), ehT0Px3KOsy9('\x30' + chr(8297 - 8186) + '\x32' + chr(0b11101 + 0o30) + chr(874 - 826), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1282 - 1232) + chr(0b110111) + '\064', 0b1000), ehT0Px3KOsy9(chr(676 - 628) + chr(0b1011100 + 0o23) + '\061' + chr(0b110011) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1511 - 1460) + chr(1052 - 997) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + '\x31' + '\x36' + chr(1096 - 1042), 15631 - 15623), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100110 + 0o15) + '\x32' + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2340 - 2290) + '\063' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(0b11000 + 0o34) + '\x33', 38627 - 38619), ehT0Px3KOsy9(chr(1001 - 953) + chr(0b1000000 + 0o57) + chr(2070 - 2021) + '\066' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1033 - 985) + chr(0b1011010 + 0o25) + chr(51) + chr(0b1011 + 0o53) + '\063', 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b11001 + 0o31) + chr(55) + '\061', 27123 - 27115), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110011) + chr(0b101010 + 0o10) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + chr(0b10110 + 0o35), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(455 - 344) + '\061' + '\x34' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11010 + 0o125) + chr(0b10000 + 0o43) + chr(51) + chr(0b10010 + 0o43), 0o10), ehT0Px3KOsy9(chr(2277 - 2229) + '\x6f' + '\062' + chr(0b1010 + 0o51) + chr(0b10010 + 0o42), 8221 - 8213), ehT0Px3KOsy9(chr(48) + chr(3152 - 3041) + chr(757 - 706) + '\x37' + chr(49), 35633 - 35625), ehT0Px3KOsy9(chr(48) + chr(3753 - 3642) + '\062' + chr(1012 - 960) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010 + 0o145) + chr(0b110100) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b110011) + chr(1318 - 1270), 0o10), ehT0Px3KOsy9(chr(1566 - 1518) + chr(0b101100 + 0o103) + chr(0b101111 + 0o4) + chr(0b110011) + chr(0b1011 + 0o54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(719 - 669) + '\065' + '\061', 0o10), ehT0Px3KOsy9(chr(746 - 698) + '\157' + '\061' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(10816 - 10705) + chr(51) + chr(0b110010) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100000 + 0o22) + chr(1627 - 1579), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o32) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + '\063' + chr(2553 - 2502) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(1904 - 1855) + '\062' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + '\x33' + '\066' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(11035 - 10924) + chr(0b110001) + chr(54) + chr(0b1100 + 0o50), 0b1000), ehT0Px3KOsy9(chr(948 - 900) + '\157' + chr(0b101010 + 0o11) + chr(0b110011) + '\064', 38265 - 38257), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b1000 + 0o50) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(2221 - 2110) + '\063' + '\066' + chr(0b100001 + 0o25), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + '\065' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7'), '\x64' + chr(0b1100101) + chr(99) + chr(1551 - 1440) + chr(0b11100 + 0o110) + '\x65')('\x75' + chr(7263 - 7147) + '\x66' + chr(0b101101) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def fTKEHu_kmwKg(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\xbb\x0eK'), chr(2218 - 2118) + '\x65' + '\143' + chr(0b101000 + 0o107) + chr(5828 - 5728) + chr(7947 - 7846))('\x75' + chr(116) + chr(8536 - 8434) + chr(0b100011 + 0o12) + chr(347 - 291)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x88\xbb\x02K'), '\144' + '\x65' + '\x63' + chr(0b1011111 + 0o20) + '\144' + '\145')(chr(10748 - 10631) + chr(0b10000 + 0o144) + chr(102) + chr(45) + '\x38')})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\x87\xac\x19U'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b110 + 0o157) + chr(116) + '\x66' + chr(45) + '\070'), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
avg_pooling
|
def avg_pooling(attrs, inputs, proto_obj):
""" Average pooling"""
new_attrs = translation_utils._fix_attribute_names(attrs,
{'kernel_shape': 'kernel',
'strides': 'stride',
'pads': 'pad',
})
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'pooling_convention': 'valid'
})
new_op = translation_utils._fix_pooling('avg', inputs, new_attrs)
return new_op, new_attrs, inputs
|
python
|
def avg_pooling(attrs, inputs, proto_obj):
""" Average pooling"""
new_attrs = translation_utils._fix_attribute_names(attrs,
{'kernel_shape': 'kernel',
'strides': 'stride',
'pads': 'pad',
})
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'pooling_convention': 'valid'
})
new_op = translation_utils._fix_pooling('avg', inputs, new_attrs)
return new_op, new_attrs, inputs
|
[
"def",
"avg_pooling",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'kernel_shape'",
":",
"'kernel'",
",",
"'strides'",
":",
"'stride'",
",",
"'pads'",
":",
"'pad'",
",",
"}",
")",
"new_attrs",
"=",
"translation_utils",
".",
"_add_extra_attributes",
"(",
"new_attrs",
",",
"{",
"'pooling_convention'",
":",
"'valid'",
"}",
")",
"new_op",
"=",
"translation_utils",
".",
"_fix_pooling",
"(",
"'avg'",
",",
"inputs",
",",
"new_attrs",
")",
"return",
"new_op",
",",
"new_attrs",
",",
"inputs"
] |
Average pooling
|
[
"Average",
"pooling"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L684-L696
|
train
|
Average pooling of a single resource.
|
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,QWgp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lSM16l2KDPD,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(0b1 + 0o156) + '\x33' + chr(54) + '\063', 49693 - 49685), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + '\062' + '\x35' + chr(54), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1111 + 0o42) + '\x34' + '\062', 0o10), ehT0Px3KOsy9(chr(1156 - 1108) + chr(0b1101111) + chr(0b110001 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\x31' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2558 - 2507) + chr(0b110011) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b100010 + 0o20) + '\066' + chr(0b101001 + 0o14), 0b1000), ehT0Px3KOsy9(chr(844 - 796) + '\x6f' + chr(0b101011 + 0o7) + chr(1302 - 1252) + chr(0b10001 + 0o44), 63212 - 63204), ehT0Px3KOsy9('\060' + chr(3030 - 2919) + chr(0b110011) + chr(723 - 670), 57950 - 57942), ehT0Px3KOsy9(chr(0b110000) + chr(896 - 785) + chr(1984 - 1935) + chr(0b110010) + chr(0b11000 + 0o34), 13120 - 13112), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(0b110010) + '\x31' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(0b1100 + 0o47) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(11506 - 11395) + chr(0b110001) + chr(0b110011) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1000000 + 0o57) + chr(0b110011) + chr(0b110110) + chr(301 - 250), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(55) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(433 - 379) + chr(0b11 + 0o55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b101010 + 0o11) + chr(0b110001), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101001 + 0o10) + '\063' + chr(736 - 688), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\063' + chr(0b110100) + '\x33', 45152 - 45144), ehT0Px3KOsy9(chr(1081 - 1033) + chr(0b1101111) + chr(0b101100 + 0o12) + chr(0b110001), 11115 - 11107), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(4812 - 4701) + '\x32' + '\062' + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + '\061' + chr(2084 - 2031) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11585 - 11474) + chr(400 - 349) + chr(0b110000) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(9203 - 9092) + '\x35' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(0b1110 + 0o44) + '\060' + chr(53), 3905 - 3897), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11101 + 0o26) + chr(1261 - 1211) + chr(2840 - 2785), 39114 - 39106), ehT0Px3KOsy9(chr(417 - 369) + chr(5209 - 5098) + chr(0b110001) + '\x33' + chr(1674 - 1624), 23127 - 23119), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(8421 - 8310) + chr(0b110011) + chr(0b101001 + 0o11) + chr(2134 - 2083), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(362 - 313) + chr(0b11 + 0o56) + chr(53), 63903 - 63895), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b110000 + 0o77) + chr(0b110010) + chr(53) + chr(1862 - 1811), 0o10), ehT0Px3KOsy9(chr(2104 - 2056) + chr(9557 - 9446) + '\061' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010 + 0o0) + chr(0b1010 + 0o55) + chr(810 - 755), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\x33' + chr(0b10010 + 0o41) + chr(0b110110), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\x31' + chr(0b11101 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(452 - 404) + chr(0b1101111) + chr(0b110010) + chr(0b1111 + 0o45) + chr(0b100100 + 0o15), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(53) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1780 - 1732) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(52) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(54) + chr(2357 - 2303), 8970 - 8962), ehT0Px3KOsy9(chr(1510 - 1462) + chr(111) + '\065' + chr(2251 - 2198), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(2212 - 2159) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd'), chr(100) + chr(101) + chr(6545 - 6446) + chr(0b1101110 + 0o1) + chr(0b1100100) + '\145')('\165' + chr(728 - 612) + '\x66' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def emGgmtNEXryY(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xcb\x10l\xe9\xb2\xea\xe6u5\xfe\xfc'), '\144' + chr(0b1100101) + chr(99) + chr(188 - 77) + chr(9998 - 9898) + '\145')(chr(0b11011 + 0o132) + chr(116) + chr(0b1100110) + '\x2d' + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xcb\x10l\xe9\xb2'), chr(0b11 + 0o141) + chr(0b1001011 + 0o32) + chr(0b100010 + 0o101) + chr(0b1101111) + chr(100) + chr(101))(chr(0b110111 + 0o76) + chr(0b1000010 + 0o62) + chr(664 - 562) + chr(45) + chr(0b110 + 0o62)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\xda\x10k\xe8\xbb\xc6'), chr(0b111100 + 0o50) + chr(0b1010010 + 0o23) + chr(0b111100 + 0o47) + chr(0b1001111 + 0o40) + '\144' + '\145')(chr(0b1000101 + 0o60) + chr(0b1110100) + chr(0b100101 + 0o101) + '\055' + '\x38'): xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\xda\x10k\xe8\xbb'), chr(886 - 786) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(324 - 224) + chr(0b1100101))(chr(0b1001100 + 0o51) + chr(116) + chr(0b101011 + 0o73) + '\055' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x83\xcf\x06q'), chr(0b101110 + 0o66) + '\x65' + chr(7637 - 7538) + chr(0b1000010 + 0o55) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b111111 + 0o65) + chr(102) + '\x2d' + chr(2027 - 1971)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x83\xcf\x06'), chr(0b100111 + 0o75) + chr(7342 - 7241) + chr(0b1100011) + chr(7575 - 7464) + chr(0b1 + 0o143) + chr(101))('\165' + chr(0b111110 + 0o66) + '\146' + chr(45) + chr(0b110111 + 0o1))})
Oynw8flqk0TY = e_2m_ddtWLQF._add_extra_attributes(Oynw8flqk0TY, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x83\xc1\rn\xe5\xb0\xd2\xca~;\xe0\xef<\x9d\xc8\xd9\xf66'), chr(0b1100100) + chr(5359 - 5258) + chr(515 - 416) + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + chr(11287 - 11171) + '\146' + chr(0b101101) + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xcf\x0ek\xe8'), '\x64' + chr(9915 - 9814) + '\143' + '\157' + chr(100) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + '\x38')})
TBwkgC8btT1p = e_2m_ddtWLQF._fix_pooling(xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\xd8\x05'), '\x64' + chr(0b1001111 + 0o26) + chr(0b1001010 + 0o31) + chr(111) + chr(3610 - 3510) + chr(9498 - 9397))(chr(0b1110101) + '\164' + chr(603 - 501) + chr(0b101011 + 0o2) + '\070'), vXoupepMtCXU, Oynw8flqk0TY)
return (TBwkgC8btT1p, Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
lp_pooling
|
def lp_pooling(attrs, inputs, proto_obj):
"""LP Pooling"""
p_value = attrs.get('p', 2)
new_attrs = translation_utils._fix_attribute_names(attrs,
{'kernel_shape': 'kernel',
'strides': 'stride',
'pads': 'pad'
})
new_attrs = translation_utils._remove_attributes(new_attrs, ['p'])
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'pooling_convention': 'valid',
'p_value': p_value
})
new_op = translation_utils._fix_pooling('lp', inputs, new_attrs)
return new_op, new_attrs, inputs
|
python
|
def lp_pooling(attrs, inputs, proto_obj):
"""LP Pooling"""
p_value = attrs.get('p', 2)
new_attrs = translation_utils._fix_attribute_names(attrs,
{'kernel_shape': 'kernel',
'strides': 'stride',
'pads': 'pad'
})
new_attrs = translation_utils._remove_attributes(new_attrs, ['p'])
new_attrs = translation_utils._add_extra_attributes(new_attrs,
{'pooling_convention': 'valid',
'p_value': p_value
})
new_op = translation_utils._fix_pooling('lp', inputs, new_attrs)
return new_op, new_attrs, inputs
|
[
"def",
"lp_pooling",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"p_value",
"=",
"attrs",
".",
"get",
"(",
"'p'",
",",
"2",
")",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'kernel_shape'",
":",
"'kernel'",
",",
"'strides'",
":",
"'stride'",
",",
"'pads'",
":",
"'pad'",
"}",
")",
"new_attrs",
"=",
"translation_utils",
".",
"_remove_attributes",
"(",
"new_attrs",
",",
"[",
"'p'",
"]",
")",
"new_attrs",
"=",
"translation_utils",
".",
"_add_extra_attributes",
"(",
"new_attrs",
",",
"{",
"'pooling_convention'",
":",
"'valid'",
",",
"'p_value'",
":",
"p_value",
"}",
")",
"new_op",
"=",
"translation_utils",
".",
"_fix_pooling",
"(",
"'lp'",
",",
"inputs",
",",
"new_attrs",
")",
"return",
"new_op",
",",
"new_attrs",
",",
"inputs"
] |
LP Pooling
|
[
"LP",
"Pooling"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L698-L712
|
train
|
LP Pooling operator.
|
Pu7Z6IJ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oZqKLA6,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(9586 - 9475) + '\062' + chr(949 - 900) + '\061', 0o10), ehT0Px3KOsy9(chr(195 - 147) + '\157' + chr(0b1011 + 0o46) + chr(48) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b110010) + chr(1004 - 954), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(0b11101 + 0o32) + chr(1028 - 976), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + '\x31' + '\x32' + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(8268 - 8157) + '\062' + chr(0b101111 + 0o5), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(0b110110 + 0o0) + chr(2375 - 2326), 0b1000), ehT0Px3KOsy9(chr(1343 - 1295) + '\x6f' + '\x31' + chr(986 - 933) + chr(1248 - 1195), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100110 + 0o14) + '\067' + chr(0b110000), 29984 - 29976), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2486 - 2435) + chr(0b110001) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\061', 0b1000), ehT0Px3KOsy9(chr(932 - 884) + chr(5949 - 5838) + '\062' + chr(0b110010) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + chr(0b101111 + 0o2) + '\065' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1335 - 1287) + '\157' + '\061' + chr(53) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + '\062' + '\x33' + chr(98 - 44), 0o10), ehT0Px3KOsy9('\060' + chr(1828 - 1717) + '\x36' + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(899 - 849) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(2730 - 2619) + '\062' + chr(0b110111) + chr(0b110100), 1135 - 1127), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(1183 - 1132) + '\061' + chr(48), 32838 - 32830), ehT0Px3KOsy9('\x30' + chr(4495 - 4384) + '\063' + '\x31' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(51) + chr(150 - 97), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + '\x32' + '\063' + '\062', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b100 + 0o55) + chr(51) + chr(0b1 + 0o65), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(48) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(1369 - 1258) + chr(0b110100) + '\064', 56604 - 56596), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1000 + 0o51) + chr(1165 - 1113) + chr(0b11100 + 0o27), 59292 - 59284), ehT0Px3KOsy9(chr(0b110000) + chr(6392 - 6281) + chr(49) + '\x32' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1110 + 0o44) + chr(50) + chr(0b10101 + 0o41), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + chr(54) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(55) + chr(667 - 614), 0o10), ehT0Px3KOsy9(chr(48) + chr(6882 - 6771) + '\x31' + '\x33' + chr(0b110110), 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b110100 + 0o73) + chr(49) + chr(530 - 482) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(1090 - 1040) + chr(54) + chr(0b1011 + 0o51), 35318 - 35310), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(876 - 821) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1984 - 1933) + chr(2037 - 1987) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b110100) + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11011 + 0o27) + '\060' + '\064', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1913 - 1862) + chr(842 - 794) + '\065', 0b1000), ehT0Px3KOsy9(chr(1735 - 1687) + chr(0b1101111) + chr(50) + '\062' + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b100111 + 0o110) + chr(2332 - 2278) + chr(1616 - 1564), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + chr(0b110101) + chr(0b10000 + 0o40), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7'), '\x64' + '\x65' + '\143' + '\157' + '\x64' + '\145')('\165' + '\x74' + chr(0b1011011 + 0o13) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def cva5Xnix06UK(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
ISoGSZZI5hde = oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9'), chr(6329 - 6229) + chr(5212 - 5111) + '\143' + chr(0b1011010 + 0o25) + chr(0b10001 + 0o123) + chr(7335 - 7234))('\165' + chr(8833 - 8717) + '\x66' + chr(45) + chr(0b10101 + 0o43)), ehT0Px3KOsy9(chr(2248 - 2200) + chr(10821 - 10710) + chr(0b101001 + 0o11), ord("\x08")))
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2" \x921xn\x1e\xd0\xadi\xf7'), chr(0b1000100 + 0o40) + chr(1950 - 1849) + '\143' + '\157' + chr(3787 - 3687) + '\x65')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b1 + 0o54) + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2" \x921x'), '\x64' + chr(101) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(0b1110 + 0o147) + chr(0b100010 + 0o122) + chr(102) + chr(0b1001 + 0o44) + chr(2120 - 2064)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa3 \x950qB'), chr(100) + '\x65' + chr(6280 - 6181) + chr(0b1101111) + '\x64' + chr(10152 - 10051))(chr(5371 - 5254) + chr(0b1110100) + '\146' + '\x2d' + '\x38'): xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa3 \x950q'), chr(0b110010 + 0o62) + '\x65' + chr(0b110001 + 0o62) + '\157' + chr(7531 - 7431) + chr(0b1100101))(chr(6560 - 6443) + chr(0b1011111 + 0o25) + chr(974 - 872) + chr(1041 - 996) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9&6\x8f'), chr(0b1010011 + 0o21) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + chr(3153 - 3052))(chr(0b100 + 0o161) + '\x74' + '\146' + chr(0b10111 + 0o26) + chr(0b111000)): xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9&6'), chr(100) + chr(5830 - 5729) + chr(99) + '\157' + '\144' + '\x65')('\165' + '\x74' + chr(102) + chr(45) + chr(0b10 + 0o66))})
Oynw8flqk0TY = e_2m_ddtWLQF._remove_attributes(Oynw8flqk0TY, [xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9'), '\144' + '\145' + chr(0b1 + 0o142) + chr(6732 - 6621) + '\x64' + chr(0b1001111 + 0o26))('\x75' + '\x74' + chr(8616 - 8514) + '\055' + chr(1632 - 1576))])
Oynw8flqk0TY = e_2m_ddtWLQF._add_extra_attributes(Oynw8flqk0TY, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9(=\x90=zV2\xdb\xa3w\xe4\x0e\x01\xea_\xbf\xd2'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b111110 + 0o61) + '\144' + chr(5289 - 5188))(chr(117) + '\x74' + chr(3370 - 3268) + chr(0b100100 + 0o11) + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\xff&>\x950'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b111001 + 0o66) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b11 + 0o161) + chr(102) + chr(0b101101) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\x18$\x9d8aT'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(3661 - 3561) + '\145')(chr(3503 - 3386) + '\x74' + chr(0b110100 + 0o62) + chr(0b10011 + 0o32) + '\x38'): ISoGSZZI5hde})
TBwkgC8btT1p = e_2m_ddtWLQF._fix_pooling(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe57'), chr(100) + chr(101) + chr(99) + chr(6830 - 6719) + '\x64' + chr(4865 - 4764))(chr(117) + '\x74' + chr(8000 - 7898) + chr(0b101101) + '\070'), vXoupepMtCXU, Oynw8flqk0TY)
return (TBwkgC8btT1p, Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
max_roi_pooling
|
def max_roi_pooling(attrs, inputs, proto_obj):
"""Max ROI Pooling."""
new_attrs = translation_utils._fix_attribute_names(attrs,
{'pooled_shape': 'pooled_size',
'spatial_scale': 'spatial_scale'
})
return 'ROIPooling', new_attrs, inputs
|
python
|
def max_roi_pooling(attrs, inputs, proto_obj):
"""Max ROI Pooling."""
new_attrs = translation_utils._fix_attribute_names(attrs,
{'pooled_shape': 'pooled_size',
'spatial_scale': 'spatial_scale'
})
return 'ROIPooling', new_attrs, inputs
|
[
"def",
"max_roi_pooling",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'pooled_shape'",
":",
"'pooled_size'",
",",
"'spatial_scale'",
":",
"'spatial_scale'",
"}",
")",
"return",
"'ROIPooling'",
",",
"new_attrs",
",",
"inputs"
] |
Max ROI Pooling.
|
[
"Max",
"ROI",
"Pooling",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L729-L735
|
train
|
Max ROI Pooling.
|
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,BXIwDASQ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R9h,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(49) + chr(0b1 + 0o64) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + '\x32', 0o10), ehT0Px3KOsy9(chr(1455 - 1407) + '\x6f' + chr(0b110010) + chr(52) + chr(0b101010 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7089 - 6978) + '\062' + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b11011 + 0o27) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(4638 - 4527) + chr(2000 - 1951) + '\065' + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(0b1100 + 0o45) + chr(52) + chr(0b11101 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101100 + 0o6) + '\062' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8689 - 8578) + '\065' + chr(156 - 102), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b11110 + 0o22) + chr(54), 43946 - 43938), ehT0Px3KOsy9(chr(48) + chr(10768 - 10657) + '\x33' + '\065' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5785 - 5674) + chr(0b110010) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1232 - 1184) + '\x6f' + chr(1819 - 1769) + '\066' + '\065', 2733 - 2725), ehT0Px3KOsy9(chr(0b110000) + chr(4838 - 4727) + '\062' + chr(53) + chr(569 - 521), 42111 - 42103), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b0 + 0o62) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\x30' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11433 - 11322) + chr(0b101010 + 0o11) + '\061' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + '\062' + chr(84 - 33) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1116 - 1005) + '\x31' + chr(2414 - 2362) + chr(201 - 148), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x30' + chr(2142 - 2093), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1000111 + 0o50) + '\x32' + chr(806 - 756) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1092 - 1044) + chr(0b1000011 + 0o54) + chr(0b10101 + 0o36) + chr(0b11111 + 0o21) + chr(0b101001 + 0o10), 8), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1000101 + 0o52) + chr(0b110011) + '\061' + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011001 + 0o26) + chr(0b11101 + 0o26) + '\x31' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(7513 - 7402) + '\061' + '\x37' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1599 - 1551) + chr(111) + '\x32' + '\065' + chr(0b100000 + 0o26), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x34' + chr(1052 - 998), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b101101 + 0o3) + chr(0b110000), 64239 - 64231), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11110 + 0o23) + chr(48) + chr(2770 - 2716), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1409 - 1298) + '\x33' + chr(0b110000) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + chr(1176 - 1065) + chr(0b10100 + 0o36) + '\061' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(0b11100 + 0o25) + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1101 + 0o45) + chr(0b110100) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1345 - 1295) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b110011) + '\062', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(2034 - 1982), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4996 - 4885) + '\063' + chr(520 - 470) + chr(0b1110 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(191 - 143) + '\x6f' + '\x33' + chr(49) + '\x31', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(11355 - 11244) + chr(0b110101) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'@'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(9982 - 9871) + chr(0b0 + 0o144) + chr(101))(chr(0b10001 + 0o144) + '\164' + chr(0b110000 + 0o66) + chr(45) + chr(1847 - 1791)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def f_F8pTLe5G6w(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\x1em\xcd\xfe6\x0b8\xe3F\xa7\x9ft'), '\144' + chr(101) + '\143' + '\x6f' + chr(100) + chr(0b1011 + 0o132))('\165' + chr(0b1110100) + chr(0b100100 + 0o102) + chr(0b101101) + chr(0b111000)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x1em\xcd\xfe6\x0b8\xe3G\xbc\x8a'), chr(100) + chr(101) + chr(0b1001111 + 0o24) + '\157' + '\x64' + chr(101))(chr(913 - 796) + '\x74' + chr(0b110100 + 0o62) + chr(45) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1dr\xc3\xe6:\x0e\x0b\xcf]\xa5\x8e}\xd0'), chr(0b1010111 + 0o15) + chr(101) + '\143' + chr(111) + chr(100) + chr(6505 - 6404))(chr(117) + '\x74' + '\x66' + '\055' + '\x38'): xafqLlk3kkUe(SXOLrMavuUCe(b'\x1dr\xc3\xe6:\x0e\x0b\xcf]\xa5\x8e}\xd0'), chr(435 - 335) + '\145' + '\x63' + chr(0b1101111) + chr(0b10101 + 0o117) + chr(0b110100 + 0o61))(chr(117) + chr(7734 - 7618) + chr(0b1100110) + chr(0b101101) + '\x38')})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'<M\xeb\xc2<\x00\x0b\xf9@\xa1'), chr(0b101110 + 0o66) + '\145' + '\143' + chr(111) + '\x64' + chr(10080 - 9979))('\x75' + chr(8707 - 8591) + '\x66' + chr(1826 - 1781) + chr(2963 - 2907)), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
depthtospace
|
def depthtospace(attrs, inputs, proto_obj):
"""Rearranges data from depth into blocks of spatial data."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'blocksize':'block_size'})
return "depth_to_space", new_attrs, inputs
|
python
|
def depthtospace(attrs, inputs, proto_obj):
"""Rearranges data from depth into blocks of spatial data."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'blocksize':'block_size'})
return "depth_to_space", new_attrs, inputs
|
[
"def",
"depthtospace",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'blocksize'",
":",
"'block_size'",
"}",
")",
"return",
"\"depth_to_space\"",
",",
"new_attrs",
",",
"inputs"
] |
Rearranges data from depth into blocks of spatial data.
|
[
"Rearranges",
"data",
"from",
"depth",
"into",
"blocks",
"of",
"spatial",
"data",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L737-L741
|
train
|
Rearranges data from depth into blocks of spatial data.
|
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(1203 - 1155) + chr(111) + chr(51) + '\063' + chr(0b110010), 42093 - 42085), ehT0Px3KOsy9('\x30' + chr(0b111000 + 0o67) + '\062' + chr(0b110101) + chr(483 - 428), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + '\x36' + chr(53), 33191 - 33183), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(9981 - 9870) + chr(0b110010) + chr(49) + chr(0b101 + 0o55), 14029 - 14021), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(527 - 474) + chr(678 - 623), 8), ehT0Px3KOsy9(chr(48) + chr(4736 - 4625) + chr(0b101111 + 0o4) + '\x32' + chr(0b10101 + 0o40), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\066' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + chr(2222 - 2172) + '\065' + '\065', 36005 - 35997), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b10001 + 0o44) + chr(48), 61898 - 61890), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o42) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + chr(50) + chr(664 - 611) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000001 + 0o56) + chr(0b110001) + chr(0b110000) + chr(988 - 934), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(0b11100 + 0o26) + chr(50) + chr(0b11010 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b1010 + 0o51) + chr(0b100100 + 0o14), 21444 - 21436), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(8417 - 8306) + chr(0b110 + 0o54) + chr(49) + chr(733 - 683), 8), ehT0Px3KOsy9(chr(1037 - 989) + chr(7816 - 7705) + chr(50) + '\x32' + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3627 - 3516) + '\062' + chr(53) + chr(0b10111 + 0o36), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b110001 + 0o76) + '\063' + chr(0b110101) + '\067', 59901 - 59893), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111 + 0o0) + chr(1035 - 986) + '\066' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111 + 0o0) + chr(1302 - 1253) + chr(0b110100) + chr(2089 - 2034), 50156 - 50148), ehT0Px3KOsy9(chr(48) + chr(6976 - 6865) + '\061' + '\x37' + '\067', 34195 - 34187), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + chr(0b10110 + 0o36) + chr(1618 - 1568), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + chr(1848 - 1794), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(10881 - 10770) + '\061' + chr(0b100000 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(53) + chr(2925 - 2870), 8), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b100101 + 0o16) + chr(0b100 + 0o62) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(2260 - 2212) + chr(0b1 + 0o156) + '\x32' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1010111 + 0o30) + chr(0b101101 + 0o6) + chr(85 - 37) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(787 - 739) + chr(9194 - 9083) + chr(1555 - 1504) + chr(50) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1898 - 1850) + chr(7170 - 7059) + chr(0b110101) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(2078 - 2028) + chr(297 - 244) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4465 - 4354) + chr(0b10101 + 0o35) + chr(0b110100) + chr(53), 15588 - 15580), ehT0Px3KOsy9(chr(252 - 204) + '\x6f' + chr(0b110010) + '\062' + chr(0b11111 + 0o22), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1612 - 1561) + chr(0b0 + 0o64) + chr(0b101 + 0o60), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1010 + 0o145) + '\x33' + chr(0b110000) + '\x31', 27879 - 27871), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110 + 0o53) + chr(0b110110), 36774 - 36766), ehT0Px3KOsy9('\060' + chr(9942 - 9831) + chr(54) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10101 + 0o132) + '\x33' + chr(0b110110) + chr(48), 0b1000), ehT0Px3KOsy9(chr(903 - 855) + '\x6f' + chr(51) + chr(48) + chr(0b110111), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2176 - 2128) + chr(0b1101111) + chr(0b110101) + chr(0b101001 + 0o7), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4'), '\144' + chr(8467 - 8366) + '\143' + chr(0b1101111) + '\144' + '\145')(chr(10279 - 10162) + chr(3650 - 3534) + chr(102) + chr(0b101101) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def VE1RujmKjaCd(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xc3Z\xe9\xc4\xa6^\xd7\r'), chr(6706 - 6606) + chr(0b100110 + 0o77) + chr(0b111010 + 0o51) + chr(7017 - 6906) + '\144' + chr(0b1100101))(chr(117) + chr(0b10010 + 0o142) + chr(0b1100110) + chr(622 - 577) + chr(312 - 256)): xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xc3Z\xe9\xc4\x8aD\xc4\x12i'), chr(100) + chr(101) + chr(99) + chr(6285 - 6174) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(2867 - 2811))})
return (xafqLlk3kkUe(SXOLrMavuUCe(b"\xbe\xcaE\xfe\xc7\x8aC\xc27\x7f\xdb'\xf0="), chr(0b1010100 + 0o20) + chr(0b10000 + 0o125) + chr(99) + chr(0b11010 + 0o125) + chr(5220 - 5120) + '\x65')(chr(0b1110101) + chr(0b1111 + 0o145) + chr(0b1011111 + 0o7) + chr(45) + chr(56)), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
spacetodepth
|
def spacetodepth(attrs, inputs, proto_obj):
"""Rearranges blocks of spatial data into depth."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'blocksize':'block_size'})
return "space_to_depth", new_attrs, inputs
|
python
|
def spacetodepth(attrs, inputs, proto_obj):
"""Rearranges blocks of spatial data into depth."""
new_attrs = translation_utils._fix_attribute_names(attrs, {'blocksize':'block_size'})
return "space_to_depth", new_attrs, inputs
|
[
"def",
"spacetodepth",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'blocksize'",
":",
"'block_size'",
"}",
")",
"return",
"\"space_to_depth\"",
",",
"new_attrs",
",",
"inputs"
] |
Rearranges blocks of spatial data into depth.
|
[
"Rearranges",
"blocks",
"of",
"spatial",
"data",
"into",
"depth",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L743-L747
|
train
|
Rearranges blocks of spatial data into depth.
|
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,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vlgh9gDP,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(6817 - 6706) + chr(0b101000 + 0o13) + '\061' + '\x33', 7936 - 7928), ehT0Px3KOsy9('\060' + chr(915 - 804) + chr(0b110011) + chr(51) + chr(2332 - 2282), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1010111 + 0o30) + chr(0b110010) + chr(52) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2574 - 2523) + '\062' + chr(883 - 834), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101001 + 0o12) + chr(0b11011 + 0o31) + '\061', 32126 - 32118), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(0b100111 + 0o12) + chr(53) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + '\061' + chr(0b110011 + 0o2) + chr(0b0 + 0o64), 8), ehT0Px3KOsy9(chr(1632 - 1584) + chr(11202 - 11091) + chr(1236 - 1185) + chr(0b10100 + 0o36) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(11612 - 11501) + chr(1480 - 1428) + '\x36', 59492 - 59484), ehT0Px3KOsy9(chr(48) + chr(2941 - 2830) + '\061' + chr(0b10011 + 0o37) + chr(50), 46852 - 46844), ehT0Px3KOsy9(chr(1887 - 1839) + chr(5390 - 5279) + chr(50) + chr(0b100101 + 0o20) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + '\062' + chr(50) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + '\x32' + chr(50) + chr(0b1111 + 0o47), 24052 - 24044), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1100 + 0o53) + chr(2139 - 2090), 866 - 858), ehT0Px3KOsy9('\060' + chr(1084 - 973) + '\x33' + chr(733 - 684) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(6463 - 6352) + '\x33' + '\x36' + chr(2054 - 2001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b110111 + 0o70) + chr(0b10110 + 0o33) + chr(0b101000 + 0o15) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1962 - 1914) + chr(0b1101111) + chr(0b110001) + chr(0b101101 + 0o5) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b111001 + 0o66) + chr(797 - 748) + chr(0b110001) + chr(2189 - 2139), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(54) + chr(0b110100 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + '\x31' + '\x33' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4734 - 4623) + '\x32' + chr(0b110111) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(53) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2640 - 2529) + chr(0b1000 + 0o53) + chr(48) + '\062', 0b1000), ehT0Px3KOsy9(chr(532 - 484) + chr(111) + chr(50) + chr(54), 64112 - 64104), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\063' + chr(50) + chr(1884 - 1835), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + '\061' + '\063' + chr(51), 14987 - 14979), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x33' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\x30' + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(50) + '\062' + chr(1945 - 1895), 31607 - 31599), ehT0Px3KOsy9('\x30' + chr(111) + chr(1343 - 1293) + chr(52) + '\x31', 8), ehT0Px3KOsy9(chr(1571 - 1523) + chr(111) + chr(0b101001 + 0o11) + '\061' + chr(2031 - 1982), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1000 + 0o53) + chr(82 - 32) + chr(53), 34550 - 34542), ehT0Px3KOsy9(chr(587 - 539) + '\x6f' + '\062' + '\066' + '\x35', 52236 - 52228), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + '\062' + chr(0b110110) + '\x35', 8), ehT0Px3KOsy9('\060' + chr(0b100000 + 0o117) + chr(0b101001 + 0o10) + '\x30' + '\x36', 6051 - 6043), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1101 + 0o46) + '\061' + chr(0b100111 + 0o11), 0o10), ehT0Px3KOsy9(chr(623 - 575) + '\x6f' + chr(54 - 5) + '\060' + '\063', 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x33' + chr(0b110000) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5313 - 5202) + '\x33' + chr(1246 - 1197) + chr(659 - 605), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(1471 - 1423), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5'), chr(870 - 770) + '\145' + '\x63' + chr(0b1101111) + chr(0b11011 + 0o111) + '\x65')('\165' + chr(0b11110 + 0o126) + '\146' + chr(0b1111 + 0o36) + chr(2153 - 2097)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ZegiIlu460vJ(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xb6\xce\xb2\x8a\x1f\x05\xadC'), chr(100) + '\145' + chr(99) + chr(11707 - 11596) + chr(100) + chr(0b1100101))(chr(1421 - 1304) + chr(116) + chr(9711 - 9609) + chr(0b100001 + 0o14) + '\070'): xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xb6\xce\xb2\x8a3\x1f\xbe\\7'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b11111 + 0o107) + chr(119 - 74) + chr(0b100001 + 0o27))})
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xaa\xc0\xb2\x843\x18\xb8y6\xcc\xe1\xe2Q'), chr(0b101001 + 0o73) + '\x65' + chr(0b1010011 + 0o20) + '\157' + chr(100) + chr(9317 - 9216))('\x75' + chr(0b1110100) + '\x66' + '\055' + '\070'), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
hardmax
|
def hardmax(attrs, inputs, proto_obj):
"""Returns batched one-hot vectors."""
input_tensor_data = proto_obj.model_metadata.get('input_tensor_data')[0]
input_shape = input_tensor_data[1]
axis = int(attrs.get('axis', 1))
axis = axis if axis >= 0 else len(input_shape) + axis
if axis == len(input_shape) - 1:
amax = symbol.argmax(inputs[0], axis=-1)
one_hot = symbol.one_hot(amax, depth=input_shape[-1])
return one_hot, attrs, inputs
# since reshape doesn't take a tensor for shape,
# computing with np.prod. This needs to be changed to
# to use mx.sym.prod() when mx.sym.reshape() is fixed.
# (https://github.com/apache/incubator-mxnet/issues/10789)
new_shape = (int(np.prod(input_shape[:axis])),
int(np.prod(input_shape[axis:])))
reshape_op = symbol.reshape(inputs[0], new_shape)
amax = symbol.argmax(reshape_op, axis=-1)
one_hot = symbol.one_hot(amax, depth=new_shape[-1])
hardmax_op = symbol.reshape(one_hot, input_shape)
return hardmax_op, attrs, inputs
|
python
|
def hardmax(attrs, inputs, proto_obj):
"""Returns batched one-hot vectors."""
input_tensor_data = proto_obj.model_metadata.get('input_tensor_data')[0]
input_shape = input_tensor_data[1]
axis = int(attrs.get('axis', 1))
axis = axis if axis >= 0 else len(input_shape) + axis
if axis == len(input_shape) - 1:
amax = symbol.argmax(inputs[0], axis=-1)
one_hot = symbol.one_hot(amax, depth=input_shape[-1])
return one_hot, attrs, inputs
# since reshape doesn't take a tensor for shape,
# computing with np.prod. This needs to be changed to
# to use mx.sym.prod() when mx.sym.reshape() is fixed.
# (https://github.com/apache/incubator-mxnet/issues/10789)
new_shape = (int(np.prod(input_shape[:axis])),
int(np.prod(input_shape[axis:])))
reshape_op = symbol.reshape(inputs[0], new_shape)
amax = symbol.argmax(reshape_op, axis=-1)
one_hot = symbol.one_hot(amax, depth=new_shape[-1])
hardmax_op = symbol.reshape(one_hot, input_shape)
return hardmax_op, attrs, inputs
|
[
"def",
"hardmax",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"input_tensor_data",
"=",
"proto_obj",
".",
"model_metadata",
".",
"get",
"(",
"'input_tensor_data'",
")",
"[",
"0",
"]",
"input_shape",
"=",
"input_tensor_data",
"[",
"1",
"]",
"axis",
"=",
"int",
"(",
"attrs",
".",
"get",
"(",
"'axis'",
",",
"1",
")",
")",
"axis",
"=",
"axis",
"if",
"axis",
">=",
"0",
"else",
"len",
"(",
"input_shape",
")",
"+",
"axis",
"if",
"axis",
"==",
"len",
"(",
"input_shape",
")",
"-",
"1",
":",
"amax",
"=",
"symbol",
".",
"argmax",
"(",
"inputs",
"[",
"0",
"]",
",",
"axis",
"=",
"-",
"1",
")",
"one_hot",
"=",
"symbol",
".",
"one_hot",
"(",
"amax",
",",
"depth",
"=",
"input_shape",
"[",
"-",
"1",
"]",
")",
"return",
"one_hot",
",",
"attrs",
",",
"inputs",
"# since reshape doesn't take a tensor for shape,",
"# computing with np.prod. This needs to be changed to",
"# to use mx.sym.prod() when mx.sym.reshape() is fixed.",
"# (https://github.com/apache/incubator-mxnet/issues/10789)",
"new_shape",
"=",
"(",
"int",
"(",
"np",
".",
"prod",
"(",
"input_shape",
"[",
":",
"axis",
"]",
")",
")",
",",
"int",
"(",
"np",
".",
"prod",
"(",
"input_shape",
"[",
"axis",
":",
"]",
")",
")",
")",
"reshape_op",
"=",
"symbol",
".",
"reshape",
"(",
"inputs",
"[",
"0",
"]",
",",
"new_shape",
")",
"amax",
"=",
"symbol",
".",
"argmax",
"(",
"reshape_op",
",",
"axis",
"=",
"-",
"1",
")",
"one_hot",
"=",
"symbol",
".",
"one_hot",
"(",
"amax",
",",
"depth",
"=",
"new_shape",
"[",
"-",
"1",
"]",
")",
"hardmax_op",
"=",
"symbol",
".",
"reshape",
"(",
"one_hot",
",",
"input_shape",
")",
"return",
"hardmax_op",
",",
"attrs",
",",
"inputs"
] |
Returns batched one-hot vectors.
|
[
"Returns",
"batched",
"one",
"-",
"hot",
"vectors",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L749-L772
|
train
|
Returns batched one - hot vectors.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkc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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('\x30' + chr(0b11101 + 0o122) + '\063' + chr(0b110111) + chr(1507 - 1456), 0o10), ehT0Px3KOsy9(chr(1686 - 1638) + chr(11040 - 10929) + chr(265 - 215) + '\x37' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4799 - 4688) + '\x33' + chr(1485 - 1433) + chr(2077 - 2023), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o27) + chr(0b1111 + 0o41) + chr(0b110010), 63382 - 63374), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\062' + chr(0b110000 + 0o2), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(451 - 401) + chr(0b10101 + 0o34) + chr(49), 38885 - 38877), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + chr(0b110010) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4916 - 4805) + '\x33' + chr(345 - 296), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100100 + 0o15) + chr(0b110011) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\060' + chr(1983 - 1929), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b11000 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(913 - 865) + '\x6f' + '\062' + chr(1897 - 1849) + chr(199 - 144), 0b1000), ehT0Px3KOsy9(chr(246 - 198) + chr(374 - 263) + chr(52) + chr(1834 - 1786), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(51) + chr(0b1010 + 0o54) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011 + 0o144) + chr(393 - 342) + '\x32' + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(1388 - 1338) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + '\062' + '\067', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100000 + 0o22) + '\067' + chr(0b101001 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111 + 0o150) + chr(0b11 + 0o60) + chr(54) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(10276 - 10165) + chr(1190 - 1139) + chr(0b11101 + 0o23) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + '\x31' + chr(55) + chr(167 - 113), 0b1000), ehT0Px3KOsy9(chr(158 - 110) + chr(0b100101 + 0o112) + chr(50) + chr(50), 10123 - 10115), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + chr(0b110001) + chr(1942 - 1894) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1330 - 1280) + chr(51) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b11000 + 0o31) + chr(443 - 394), 48116 - 48108), ehT0Px3KOsy9(chr(2119 - 2071) + chr(111) + chr(0b100110 + 0o13) + '\066' + chr(1376 - 1321), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(55) + chr(1657 - 1602), 33339 - 33331), ehT0Px3KOsy9('\060' + chr(2269 - 2158) + '\063' + '\x32' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b110011) + chr(0b110100) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1101 - 1053) + chr(111) + chr(0b10 + 0o57) + chr(0b110001) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1019 - 971) + chr(0b1100001 + 0o16) + chr(0b110011) + chr(0b110010) + chr(1697 - 1642), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\x33' + chr(0b100000 + 0o21), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\x36', 0o10), ehT0Px3KOsy9(chr(1295 - 1247) + chr(111) + '\061' + chr(49) + '\061', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\064' + chr(1671 - 1618), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5883 - 5772) + chr(0b100001 + 0o20) + chr(49) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(774 - 721) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(0b10010 + 0o37) + chr(0b11100 + 0o30) + chr(2186 - 2134), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32', 60656 - 60648), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(4236 - 4125) + chr(784 - 735) + '\066' + '\x37', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10111 + 0o36) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5'), '\x64' + chr(0b1110 + 0o127) + '\x63' + '\157' + '\144' + '\145')('\x75' + chr(116) + '\146' + '\055' + chr(531 - 475)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CMh8gPk0kQk8(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
mtzGuNFc1u1f = tKGh31ynuvmM.model_metadata.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\xd2\x96\xf7&\xd6c|7\xf5q\xf5\x7f\x91\xb3\xe2v'), '\x64' + chr(0b1100101) + '\143' + chr(1879 - 1768) + chr(0b1010100 + 0o20) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(0b1000 + 0o45) + chr(0b1110 + 0o52)))[ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + chr(0b10000 + 0o40), 0b1000)]
tANyZeuTfu5y = mtzGuNFc1u1f[ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b100 + 0o153) + '\061', 13924 - 13916)]
cRTh61qyvi24 = ehT0Px3KOsy9(oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\xc4\x8f\xf1'), chr(6416 - 6316) + chr(101) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b11010 + 0o113))('\x75' + chr(0b110 + 0o156) + chr(102) + chr(45) + chr(0b111000)), ehT0Px3KOsy9('\060' + chr(9378 - 9267) + chr(1384 - 1335), 8)))
cRTh61qyvi24 = cRTh61qyvi24 if cRTh61qyvi24 >= ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(0b100111 + 0o11), 8) else c2A0yzQpDQB3(tANyZeuTfu5y) + cRTh61qyvi24
if cRTh61qyvi24 == c2A0yzQpDQB3(tANyZeuTfu5y) - ehT0Px3KOsy9(chr(1942 - 1894) + chr(0b111010 + 0o65) + chr(49), 8):
hCOh7tvLnq9Q = Usr5ykvL2UZF.argmax(vXoupepMtCXU[ehT0Px3KOsy9(chr(365 - 317) + chr(0b1101111) + '\060', 8)], axis=-ehT0Px3KOsy9(chr(48) + chr(10215 - 10104) + chr(0b100110 + 0o13), 8))
Hq3fv4Yp0EhD = Usr5ykvL2UZF.Hq3fv4Yp0EhD(hCOh7tvLnq9Q, depth=tANyZeuTfu5y[-ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 8)])
return (Hq3fv4Yp0EhD, oIhwMA96NShQ, vXoupepMtCXU)
P7dVzv6_yXeE = (ehT0Px3KOsy9(WqUC3KWvYVup.lBYk79l4Nk8h(tANyZeuTfu5y[:cRTh61qyvi24])), ehT0Px3KOsy9(WqUC3KWvYVup.lBYk79l4Nk8h(tANyZeuTfu5y[cRTh61qyvi24:])))
xFjf01Csj2aE = Usr5ykvL2UZF.reshape(vXoupepMtCXU[ehT0Px3KOsy9(chr(2251 - 2203) + chr(0b111110 + 0o61) + chr(0b1011 + 0o45), 8)], P7dVzv6_yXeE)
hCOh7tvLnq9Q = Usr5ykvL2UZF.argmax(xFjf01Csj2aE, axis=-ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(6249 - 6138) + chr(203 - 154), 8))
Hq3fv4Yp0EhD = Usr5ykvL2UZF.Hq3fv4Yp0EhD(hCOh7tvLnq9Q, depth=P7dVzv6_yXeE[-ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111 + 0o0) + '\061', 8)])
Umsv1UQ94prn = Usr5ykvL2UZF.reshape(Hq3fv4Yp0EhD, tANyZeuTfu5y)
return (Umsv1UQ94prn, oIhwMA96NShQ, vXoupepMtCXU)
|
apache/incubator-mxnet
|
python/mxnet/contrib/onnx/onnx2mx/_op_translations.py
|
lpnormalization
|
def lpnormalization(attrs, inputs, proto_obj):
"""ONNX does not have eps attribute, so cannot map it to L2normalization in MXNet
without that, it works as norm operator discussion in PR:
https://github.com/onnx/onnx/pull/1330"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'p': 'ord'})
axis = int(attrs.get("axis", -1))
new_attrs.update(axis=axis)
return 'norm', new_attrs, inputs
|
python
|
def lpnormalization(attrs, inputs, proto_obj):
"""ONNX does not have eps attribute, so cannot map it to L2normalization in MXNet
without that, it works as norm operator discussion in PR:
https://github.com/onnx/onnx/pull/1330"""
new_attrs = translation_utils._fix_attribute_names(attrs, {'p': 'ord'})
axis = int(attrs.get("axis", -1))
new_attrs.update(axis=axis)
return 'norm', new_attrs, inputs
|
[
"def",
"lpnormalization",
"(",
"attrs",
",",
"inputs",
",",
"proto_obj",
")",
":",
"new_attrs",
"=",
"translation_utils",
".",
"_fix_attribute_names",
"(",
"attrs",
",",
"{",
"'p'",
":",
"'ord'",
"}",
")",
"axis",
"=",
"int",
"(",
"attrs",
".",
"get",
"(",
"\"axis\"",
",",
"-",
"1",
")",
")",
"new_attrs",
".",
"update",
"(",
"axis",
"=",
"axis",
")",
"return",
"'norm'",
",",
"new_attrs",
",",
"inputs"
] |
ONNX does not have eps attribute, so cannot map it to L2normalization in MXNet
without that, it works as norm operator discussion in PR:
https://github.com/onnx/onnx/pull/1330
|
[
"ONNX",
"does",
"not",
"have",
"eps",
"attribute",
"so",
"cannot",
"map",
"it",
"to",
"L2normalization",
"in",
"MXNet",
"without",
"that",
"it",
"works",
"as",
"norm",
"operator",
"discussion",
"in",
"PR",
":",
"https",
":",
"//",
"github",
".",
"com",
"/",
"onnx",
"/",
"onnx",
"/",
"pull",
"/",
"1330"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/contrib/onnx/onnx2mx/_op_translations.py#L774-L781
|
train
|
L2normalization 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,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,SBRjvOU1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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(1157 - 1109) + '\157' + chr(0b0 + 0o62) + '\x30' + '\x36', 0b1000), ehT0Px3KOsy9(chr(2144 - 2096) + '\157' + '\063' + chr(0b110010) + chr(48), 0o10), ehT0Px3KOsy9(chr(1584 - 1536) + chr(111) + chr(0b110001) + '\060' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1263 - 1215) + '\157' + chr(0b1101 + 0o45) + chr(1938 - 1889) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(1856 - 1803) + chr(75 - 26), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + '\061' + chr(0b11001 + 0o27) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(410 - 358) + chr(829 - 776), 0o10), ehT0Px3KOsy9(chr(2065 - 2017) + chr(111) + '\x33' + '\067' + chr(55), 28255 - 28247), ehT0Px3KOsy9(chr(1406 - 1358) + chr(111) + chr(0b110011) + '\067' + chr(0b11110 + 0o25), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001001 + 0o46) + chr(398 - 348) + chr(48) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1265 - 1217) + chr(9227 - 9116) + chr(0b110010) + chr(0b101 + 0o57) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b110100) + chr(1765 - 1711), 8), ehT0Px3KOsy9('\060' + chr(0b110011 + 0o74) + '\062' + chr(1405 - 1355) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4698 - 4587) + '\x32' + '\067' + chr(0b101111 + 0o10), 59181 - 59173), ehT0Px3KOsy9(chr(0b110000) + chr(9004 - 8893) + '\061' + '\060' + chr(51), 50491 - 50483), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b110111 + 0o70) + '\x32' + chr(48) + chr(0b110011), 8), ehT0Px3KOsy9(chr(215 - 167) + chr(111) + chr(51) + chr(0b11000 + 0o31) + chr(91 - 38), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(50) + chr(52), 35203 - 35195), ehT0Px3KOsy9('\060' + chr(4437 - 4326) + '\x35' + chr(0b110011), 62498 - 62490), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(49) + chr(52) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100011 + 0o17) + '\x33' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\x30' + '\062', 35260 - 35252), ehT0Px3KOsy9(chr(1288 - 1240) + '\157' + chr(0b110110) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2227 - 2176) + '\x36' + chr(2230 - 2178), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(50) + chr(0b101111 + 0o6), 26496 - 26488), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100001 + 0o21) + chr(0b110101) + chr(0b1011 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(4494 - 4383) + chr(0b110 + 0o56) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + '\063' + '\061' + chr(53), 8), ehT0Px3KOsy9(chr(191 - 143) + '\x6f' + chr(0b100011 + 0o23) + chr(49), 23295 - 23287), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\060' + chr(50), 0o10), ehT0Px3KOsy9(chr(121 - 73) + '\157' + chr(742 - 687) + '\x37', 39251 - 39243), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x31' + chr(0b10110 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(2359 - 2310) + chr(0b111 + 0o55), 7937 - 7929), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(2787 - 2734) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9150 - 9039) + chr(49) + chr(735 - 684) + chr(644 - 589), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(314 - 264) + chr(48) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101110 + 0o3) + '\067' + chr(1476 - 1423), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(426 - 377) + chr(53) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\x35' + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x37' + chr(0b11110 + 0o24), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b101100 + 0o103) + chr(0b110101) + chr(0b110000), 7481 - 7473)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8'), chr(0b1100100) + chr(101) + '\x63' + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(0b111011 + 0o71) + chr(0b1000 + 0o136) + chr(0b11100 + 0o21) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def MZzzDCSzNBJn(oIhwMA96NShQ, vXoupepMtCXU, tKGh31ynuvmM):
Oynw8flqk0TY = e_2m_ddtWLQF._fix_attribute_names(oIhwMA96NShQ, {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6'), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1001111 + 0o46) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070'): xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\xa2$'), '\144' + chr(0b1001110 + 0o27) + chr(99) + chr(111) + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b110111 + 0o57) + chr(0b101101) + '\x38')})
cRTh61qyvi24 = ehT0Px3KOsy9(oIhwMA96NShQ.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xa8)\xfd'), chr(0b101000 + 0o74) + chr(101) + chr(0b1001010 + 0o31) + '\157' + chr(100) + '\145')(chr(117) + '\164' + chr(0b1011100 + 0o12) + chr(45) + chr(0b101010 + 0o16)), -ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o30), 29509 - 29501)))
xafqLlk3kkUe(Oynw8flqk0TY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdc\xa4\x01\xcb\x80\x0b\xef\x91\x82\xb7\xc3\x96'), chr(0b1100100) + '\x65' + '\143' + chr(3186 - 3075) + chr(0b11 + 0o141) + '\145')(chr(117) + '\x74' + '\146' + chr(45) + chr(1374 - 1318)))(axis=cRTh61qyvi24)
return (xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xbf2\xe3'), '\144' + chr(101) + chr(0b101001 + 0o72) + chr(111) + '\x64' + chr(0b1000111 + 0o36))(chr(12226 - 12109) + chr(0b101011 + 0o111) + chr(102) + chr(1521 - 1476) + '\x38'), Oynw8flqk0TY, vXoupepMtCXU)
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/download_data.py
|
download_mp4
|
def download_mp4(from_idx, to_idx, _params):
"""
download mp4s
"""
succ = set()
fail = set()
for idx in range(from_idx, to_idx):
name = 's' + str(idx)
save_folder = '{src_path}/{nm}'.format(src_path=_params['src_path'], nm=name)
if idx == 0 or os.path.isdir(save_folder):
continue
script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/video/{nm}.mpg_vcd.zip".format( \
nm=name)
down_sc = 'cd {src_path} && curl {script} --output {nm}.mpg_vcd.zip && \
unzip {nm}.mpg_vcd.zip'.format(script=script,
nm=name,
src_path=_params['src_path'])
try:
print(down_sc)
os.system(down_sc)
succ.add(idx)
except OSError as error:
print(error)
fail.add(idx)
return (succ, fail)
|
python
|
def download_mp4(from_idx, to_idx, _params):
"""
download mp4s
"""
succ = set()
fail = set()
for idx in range(from_idx, to_idx):
name = 's' + str(idx)
save_folder = '{src_path}/{nm}'.format(src_path=_params['src_path'], nm=name)
if idx == 0 or os.path.isdir(save_folder):
continue
script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/video/{nm}.mpg_vcd.zip".format( \
nm=name)
down_sc = 'cd {src_path} && curl {script} --output {nm}.mpg_vcd.zip && \
unzip {nm}.mpg_vcd.zip'.format(script=script,
nm=name,
src_path=_params['src_path'])
try:
print(down_sc)
os.system(down_sc)
succ.add(idx)
except OSError as error:
print(error)
fail.add(idx)
return (succ, fail)
|
[
"def",
"download_mp4",
"(",
"from_idx",
",",
"to_idx",
",",
"_params",
")",
":",
"succ",
"=",
"set",
"(",
")",
"fail",
"=",
"set",
"(",
")",
"for",
"idx",
"in",
"range",
"(",
"from_idx",
",",
"to_idx",
")",
":",
"name",
"=",
"'s'",
"+",
"str",
"(",
"idx",
")",
"save_folder",
"=",
"'{src_path}/{nm}'",
".",
"format",
"(",
"src_path",
"=",
"_params",
"[",
"'src_path'",
"]",
",",
"nm",
"=",
"name",
")",
"if",
"idx",
"==",
"0",
"or",
"os",
".",
"path",
".",
"isdir",
"(",
"save_folder",
")",
":",
"continue",
"script",
"=",
"\"http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/video/{nm}.mpg_vcd.zip\"",
".",
"format",
"(",
"nm",
"=",
"name",
")",
"down_sc",
"=",
"'cd {src_path} && curl {script} --output {nm}.mpg_vcd.zip && \\\n unzip {nm}.mpg_vcd.zip'",
".",
"format",
"(",
"script",
"=",
"script",
",",
"nm",
"=",
"name",
",",
"src_path",
"=",
"_params",
"[",
"'src_path'",
"]",
")",
"try",
":",
"print",
"(",
"down_sc",
")",
"os",
".",
"system",
"(",
"down_sc",
")",
"succ",
".",
"add",
"(",
"idx",
")",
"except",
"OSError",
"as",
"error",
":",
"print",
"(",
"error",
")",
"fail",
".",
"add",
"(",
"idx",
")",
"return",
"(",
"succ",
",",
"fail",
")"
] |
download mp4s
|
[
"download",
"mp4s"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/utils/download_data.py#L28-L52
|
train
|
download mp4s
|
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,pz9FlfzsW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Z,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(1627 - 1579) + chr(0b1101111) + chr(49) + chr(0b100110 + 0o21) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(51) + chr(0b110001 + 0o5) + chr(0b10111 + 0o34), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1173 - 1124) + chr(87 - 36) + chr(0b101111 + 0o6), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(49) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(0b10110 + 0o32) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10 + 0o60) + '\x37' + chr(51), 54713 - 54705), ehT0Px3KOsy9('\060' + chr(0b1101110 + 0o1) + chr(1432 - 1382) + chr(0b110100) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2054 - 1999) + '\x36', 0b1000), ehT0Px3KOsy9(chr(444 - 396) + chr(111) + '\063' + chr(977 - 922) + '\x32', 9855 - 9847), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(53) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010), 4084 - 4076), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(1521 - 1472) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + chr(713 - 662) + '\061' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(11409 - 11298) + chr(51) + '\x32' + chr(0b1001 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + chr(0b110010) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100100 + 0o16) + '\063' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7664 - 7553) + chr(0b110010) + chr(0b110111) + chr(431 - 383), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10528 - 10417) + '\061' + chr(49) + chr(801 - 752), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b10001 + 0o42) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1302 - 1253) + '\x36' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9320 - 9209) + chr(1595 - 1544) + '\060' + chr(0b1000 + 0o51), 49318 - 49310), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + chr(0b110 + 0o52), 25097 - 25089), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b10101 + 0o132) + chr(2062 - 2011) + '\065' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9308 - 9197) + chr(901 - 852) + '\060' + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + chr(0b110101) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1471 - 1423) + chr(111) + '\x31' + '\x31' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1101 + 0o46) + '\067' + chr(0b11 + 0o55), 55009 - 55001), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(49) + chr(0b110100 + 0o2), 8), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + '\x31' + chr(466 - 412) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(0b110010), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b101100 + 0o5), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\064' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + '\x33' + chr(50), 0o10), ehT0Px3KOsy9(chr(1710 - 1662) + chr(0b1000 + 0o147) + '\062' + chr(2077 - 2029) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + chr(0b100001 + 0o25) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\x37' + '\060', 8), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + chr(0b101111 + 0o6), 28825 - 28817), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + chr(0b110011) + '\060' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\064' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(754 - 705) + chr(0b111 + 0o52), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(9085 - 8974) + '\x35' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'R'), chr(100) + chr(4861 - 4760) + '\143' + chr(111) + chr(100) + '\145')('\x75' + '\x74' + '\x66' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def YEIT4D2HocNo(ud0fHSo88Vlf, Vwbg1TKDEj5b, pHroJelArxJz):
Cn5tcaTsqNNK = MVEN8G6CxlvR()
lNCjN5Pj9ar2 = MVEN8G6CxlvR()
for YlqusYB6InkM in vQr8gNKaIaWE(ud0fHSo88Vlf, Vwbg1TKDEj5b):
AIvJRzLdDfgF = xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f'), '\144' + chr(101) + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(7217 - 7115) + chr(0b10111 + 0o26) + chr(0b111000)) + M8_cKLkHVB2V(YlqusYB6InkM)
bmuzd61pVLkv = xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\x80/\xa8\xde\xcb\xc1J\x92\xd2-\xb7\xa6\xbem'), '\144' + chr(8504 - 8403) + chr(99) + '\157' + chr(0b100101 + 0o77) + chr(6190 - 6089))('\x75' + chr(0b11100 + 0o130) + chr(0b1100110) + chr(1114 - 1069) + '\x38').V4roHaS3Ppej(src_path=pHroJelArxJz[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\x81>\x94\xf1\xda\xd4V'), chr(100) + chr(0b11010 + 0o113) + chr(99) + '\157' + '\x64' + chr(101))(chr(13053 - 12936) + chr(0b1110100) + chr(0b10001 + 0o125) + '\x2d' + chr(56))], nm=AIvJRzLdDfgF)
if YlqusYB6InkM == ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(0b10000 + 0o40), 0b1000) or xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\x809\xa2\xf3'), chr(100) + chr(1524 - 1423) + chr(0b1011100 + 0o7) + chr(0b1101111) + chr(0b1100100) + chr(3388 - 3287))(chr(117) + '\164' + '\146' + '\055' + chr(0b111000)))(bmuzd61pVLkv):
continue
ZoLQNQnWvvj6 = xafqLlk3kkUe(SXOLrMavuUCe(b"\x14\x87)\xbb\xbb\x94\x8fM\x8a\xcel\xa8\xa0\xfdt\xf8\xcbg\xab\x1e\xa4^\xc0$H`\x8d%^ek\t~\xe6Y\xcau\xb3\x14\xe6\x07\x9d0\xb6\xae\xcd\xc9Z\x9f\xc0-\xb7\xa6\xbem\xb5\xd59\xbf)\xb7[\x8akQ'\x88"), chr(8333 - 8233) + '\145' + chr(0b1011111 + 0o4) + chr(0b1101111) + '\144' + '\x65')(chr(3508 - 3391) + chr(7117 - 7001) + '\x66' + chr(0b101101) + chr(56)).V4roHaS3Ppej(nm=AIvJRzLdDfgF)
Dcz0r36TtFbq = xafqLlk3kkUe(SXOLrMavuUCe(b'\x1f\x97}\xb0\xf2\xc9\xc3a\x8a\xcev\xa4\xb5\xf36\xbd\x98*\xad\x04\xad\x18\x956H<\x91>\x05\x7f9M7\xeaC\xccu\xb3\x13\xe9\x07\x9d0\xb6\xaf\xd6\xd0Y\xa5\xd9a\xa8\xe6\xa9y\xeb\x98o\xfeV\xe1\x18\xcee\x0bn\xd8nQ"9@:\xa5\x16\x98%\xe6G\xe9\t\x9d\'\xa2\xf1\x9b\xdbP\x97\xd2,\xa1\xb8\xb4O\xed\xdb-\xf6\x0c\xa8H'), chr(0b1010101 + 0o17) + chr(0b1000001 + 0o44) + '\143' + chr(111) + '\144' + chr(0b1010101 + 0o20))(chr(1264 - 1147) + '\x74' + chr(102) + chr(0b100100 + 0o11) + chr(0b1000 + 0o60)).V4roHaS3Ppej(script=ZoLQNQnWvvj6, nm=AIvJRzLdDfgF, src_path=pHroJelArxJz[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\x81>\x94\xf1\xda\xd4V'), '\144' + chr(101) + '\x63' + '\157' + chr(9095 - 8995) + '\145')(chr(0b1110101) + '\x74' + chr(974 - 872) + chr(45) + chr(56))])
try:
zLUzGokYBM2Z(Dcz0r36TtFbq)
xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\x8a.\xbf\xe4\xd6'), '\144' + chr(6507 - 6406) + '\x63' + chr(111) + '\144' + chr(0b1000010 + 0o43))('\165' + chr(0b1110100) + chr(102) + chr(0b11001 + 0o24) + chr(0b111000)))(Dcz0r36TtFbq)
xafqLlk3kkUe(Cn5tcaTsqNNK, xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xb9m\xba\xb8\xd8\xe7\x0b\xa0\xe0P\xff'), '\144' + chr(0b101010 + 0o73) + '\x63' + chr(4308 - 4197) + '\144' + '\x65')(chr(0b11001 + 0o134) + chr(7626 - 7510) + chr(102) + chr(1616 - 1571) + chr(56)))(YlqusYB6InkM)
except KlPSljPzIJ_u as EUdPatOS1wx0:
zLUzGokYBM2Z(EUdPatOS1wx0)
xafqLlk3kkUe(lNCjN5Pj9ar2, xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xb9m\xba\xb8\xd8\xe7\x0b\xa0\xe0P\xff'), '\144' + '\x65' + '\143' + chr(111) + '\144' + chr(101))('\165' + chr(0b100010 + 0o122) + chr(102) + chr(918 - 873) + '\070'))(YlqusYB6InkM)
return (Cn5tcaTsqNNK, lNCjN5Pj9ar2)
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/download_data.py
|
download_align
|
def download_align(from_idx, to_idx, _params):
"""
download aligns
"""
succ = set()
fail = set()
for idx in range(from_idx, to_idx):
name = 's' + str(idx)
if idx == 0:
continue
script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/align/{nm}.tar".format(nm=name)
down_sc = 'cd {align_path} && wget {script} && \
tar -xvf {nm}.tar'.format(script=script,
nm=name,
align_path=_params['align_path'])
try:
print(down_sc)
os.system(down_sc)
succ.add(idx)
except OSError as error:
print(error)
fail.add(idx)
return (succ, fail)
|
python
|
def download_align(from_idx, to_idx, _params):
"""
download aligns
"""
succ = set()
fail = set()
for idx in range(from_idx, to_idx):
name = 's' + str(idx)
if idx == 0:
continue
script = "http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/align/{nm}.tar".format(nm=name)
down_sc = 'cd {align_path} && wget {script} && \
tar -xvf {nm}.tar'.format(script=script,
nm=name,
align_path=_params['align_path'])
try:
print(down_sc)
os.system(down_sc)
succ.add(idx)
except OSError as error:
print(error)
fail.add(idx)
return (succ, fail)
|
[
"def",
"download_align",
"(",
"from_idx",
",",
"to_idx",
",",
"_params",
")",
":",
"succ",
"=",
"set",
"(",
")",
"fail",
"=",
"set",
"(",
")",
"for",
"idx",
"in",
"range",
"(",
"from_idx",
",",
"to_idx",
")",
":",
"name",
"=",
"'s'",
"+",
"str",
"(",
"idx",
")",
"if",
"idx",
"==",
"0",
":",
"continue",
"script",
"=",
"\"http://spandh.dcs.shef.ac.uk/gridcorpus/{nm}/align/{nm}.tar\"",
".",
"format",
"(",
"nm",
"=",
"name",
")",
"down_sc",
"=",
"'cd {align_path} && wget {script} && \\\n tar -xvf {nm}.tar'",
".",
"format",
"(",
"script",
"=",
"script",
",",
"nm",
"=",
"name",
",",
"align_path",
"=",
"_params",
"[",
"'align_path'",
"]",
")",
"try",
":",
"print",
"(",
"down_sc",
")",
"os",
".",
"system",
"(",
"down_sc",
")",
"succ",
".",
"add",
"(",
"idx",
")",
"except",
"OSError",
"as",
"error",
":",
"print",
"(",
"error",
")",
"fail",
".",
"add",
"(",
"idx",
")",
"return",
"(",
"succ",
",",
"fail",
")"
] |
download aligns
|
[
"download",
"aligns"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/utils/download_data.py#L55-L77
|
train
|
downloads the aligns from from_idx to to_idx
|
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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cyiPkCViZiX,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(0b11111 + 0o21) + '\x6f' + chr(2023 - 1972) + '\062' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7502 - 7391) + '\x36' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(54) + chr(51), 26603 - 26595), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(48) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111111 + 0o60) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + chr(1957 - 1908) + chr(1584 - 1535) + chr(2714 - 2661), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o2) + '\x32' + chr(0b101 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(2068 - 2020) + chr(0b100101 + 0o112) + chr(0b11 + 0o57) + chr(724 - 673) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + '\x31' + '\062' + chr(1059 - 1010), 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(6621 - 6510) + chr(54) + chr(1559 - 1510), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50 - 0) + chr(0b10011 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(0b111 + 0o54) + chr(0b101100 + 0o6), 0o10), ehT0Px3KOsy9(chr(48) + chr(6310 - 6199) + '\063' + chr(0b110000) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\064' + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(51) + '\x31' + '\067', 19984 - 19976), ehT0Px3KOsy9(chr(2166 - 2118) + chr(111) + '\063' + chr(752 - 697), 0b1000), ehT0Px3KOsy9(chr(48) + chr(7456 - 7345) + '\062' + '\x32' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + chr(0b101100 + 0o12) + '\062', 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(9540 - 9429) + chr(2001 - 1952) + chr(0b110100) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(1437 - 1326) + chr(51) + chr(0b10111 + 0o37) + chr(0b100 + 0o63), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1011 + 0o46) + chr(348 - 299) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(51) + '\x33' + '\067', 0o10), ehT0Px3KOsy9(chr(619 - 571) + '\x6f' + chr(0b100100 + 0o17) + chr(0b10000 + 0o45) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110100) + '\x37', 52173 - 52165), ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + chr(1110 - 1059) + '\x34' + '\061', 64959 - 64951), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o61) + '\x32' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b110010 + 0o0) + chr(0b110000) + '\061', 65456 - 65448), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\x32' + '\064', 27170 - 27162), ehT0Px3KOsy9(chr(48) + chr(2187 - 2076) + '\x32' + chr(0b110111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110101) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + '\x34' + chr(0b110001 + 0o0), 0o10), ehT0Px3KOsy9(chr(48) + chr(235 - 124) + chr(0b11001 + 0o31) + '\x34' + chr(0b110000), 52053 - 52045), ehT0Px3KOsy9('\060' + chr(1895 - 1784) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\065' + chr(0b100011 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(2283 - 2233) + '\060' + chr(0b110000 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2113 - 2063) + '\x35' + '\065', 25042 - 25034), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(175 - 124) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10000 + 0o43) + chr(0b1101 + 0o50) + chr(1120 - 1068), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(292 - 242) + chr(0b101100 + 0o6) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1655 - 1607) + '\x6f' + '\x32' + '\x33' + chr(50), 60031 - 60023)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9'), chr(100) + '\x65' + '\143' + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b10000 + 0o50)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ktJe0qZVzi74(ud0fHSo88Vlf, Vwbg1TKDEj5b, pHroJelArxJz):
Cn5tcaTsqNNK = MVEN8G6CxlvR()
lNCjN5Pj9ar2 = MVEN8G6CxlvR()
for YlqusYB6InkM in vQr8gNKaIaWE(ud0fHSo88Vlf, Vwbg1TKDEj5b):
AIvJRzLdDfgF = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(6008 - 5897) + '\144' + chr(0b110110 + 0o57))('\165' + chr(0b1100110 + 0o16) + chr(0b1001011 + 0o33) + chr(195 - 150) + chr(56)) + M8_cKLkHVB2V(YlqusYB6InkM)
if YlqusYB6InkM == ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(48), 0b1000):
continue
ZoLQNQnWvvj6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf@G\xf2<b~\xe8!P}~\xaa\x8c\xab|\xe5\x1c\x17\x9f)\xb9\xc2F\x82{\xf4\xbf\x97LS\xc9a\xca\xeb\xdfn\x99\xe4\xb5\xacZ^\xff),=\xf26_<a\xac\xcf\xb21\xe2S\x16'), chr(5007 - 4907) + chr(945 - 844) + chr(6310 - 6211) + '\157' + chr(100) + '\145')(chr(229 - 112) + chr(0b10000 + 0o144) + '\x66' + '\x2d' + chr(0b1000 + 0o60)).V4roHaS3Ppej(nm=AIvJRzLdDfgF)
Dcz0r36TtFbq = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4P\x13\xf9g!8\xfc?nc{\xb6\xca\xb2?\xb0\x14D\x80+\xba\x98\x07\x9a&\xe2\xa6\xd1[U\xdd%\x8f\xa2\x8d>\xcc\xb7\xba\xf7\x14\x13\xa2&mq\xbbq\x113:\xe2\x82\xef?\xe2S\x16\xd7a\xa7\x9aA\xc1.\xef\xb9\xc5\x05U\xc1w'), chr(0b1000 + 0o134) + chr(5975 - 5874) + chr(0b1100011) + chr(0b10010 + 0o135) + chr(0b1100100) + chr(5817 - 5716))('\x75' + chr(2657 - 2541) + chr(102) + chr(0b101101) + chr(0b1 + 0o67)).V4roHaS3Ppej(script=ZoLQNQnWvvj6, nm=AIvJRzLdDfgF, align_path=pHroJelArxJz[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6XZ\xe5h\x12!\xfa%Y'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1001110 + 0o41) + chr(7850 - 7750) + chr(0b1001100 + 0o31))(chr(0b1101100 + 0o11) + chr(264 - 148) + '\146' + '\x2d' + chr(56))])
try:
zLUzGokYBM2Z(Dcz0r36TtFbq)
xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4M@\xf6c '), '\144' + chr(0b1001 + 0o134) + chr(2278 - 2179) + chr(0b1100000 + 0o17) + '\x64' + chr(8333 - 8232))('\x75' + chr(677 - 561) + '\x66' + '\055' + '\070'))(Dcz0r36TtFbq)
xafqLlk3kkUe(Cn5tcaTsqNNK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2~\x03\xf3?.\x16\xae\x0b~A)'), '\x64' + '\145' + '\x63' + chr(2644 - 2533) + chr(100) + chr(0b1011110 + 0o7))('\x75' + chr(5632 - 5516) + '\x66' + chr(0b101101) + chr(0b111000)))(YlqusYB6InkM)
except KlPSljPzIJ_u as EUdPatOS1wx0:
zLUzGokYBM2Z(EUdPatOS1wx0)
xafqLlk3kkUe(lNCjN5Pj9ar2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2~\x03\xf3?.\x16\xae\x0b~A)'), chr(7788 - 7688) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(8949 - 8832) + chr(10963 - 10847) + chr(3009 - 2907) + chr(45) + chr(0b110111 + 0o1)))(YlqusYB6InkM)
return (Cn5tcaTsqNNK, lNCjN5Pj9ar2)
|
apache/incubator-mxnet
|
ci/docker/qemu/runtime_functions.py
|
run_ut_py3_qemu
|
def run_ut_py3_qemu():
"""Run unit tests in the emulator and copy the results back to the host through the mounted
volume in /mxnet"""
from vmcontrol import VM
with VM() as vm:
qemu_provision(vm.ssh_port)
logging.info("execute tests")
qemu_ssh(vm.ssh_port, "./runtime_functions.py", "run_ut_python3_qemu_internal")
qemu_rsync_to_host(vm.ssh_port, "*.xml", "mxnet")
logging.info("copied to host")
logging.info("tests finished, vm shutdown.")
vm.shutdown()
|
python
|
def run_ut_py3_qemu():
"""Run unit tests in the emulator and copy the results back to the host through the mounted
volume in /mxnet"""
from vmcontrol import VM
with VM() as vm:
qemu_provision(vm.ssh_port)
logging.info("execute tests")
qemu_ssh(vm.ssh_port, "./runtime_functions.py", "run_ut_python3_qemu_internal")
qemu_rsync_to_host(vm.ssh_port, "*.xml", "mxnet")
logging.info("copied to host")
logging.info("tests finished, vm shutdown.")
vm.shutdown()
|
[
"def",
"run_ut_py3_qemu",
"(",
")",
":",
"from",
"vmcontrol",
"import",
"VM",
"with",
"VM",
"(",
")",
"as",
"vm",
":",
"qemu_provision",
"(",
"vm",
".",
"ssh_port",
")",
"logging",
".",
"info",
"(",
"\"execute tests\"",
")",
"qemu_ssh",
"(",
"vm",
".",
"ssh_port",
",",
"\"./runtime_functions.py\"",
",",
"\"run_ut_python3_qemu_internal\"",
")",
"qemu_rsync_to_host",
"(",
"vm",
".",
"ssh_port",
",",
"\"*.xml\"",
",",
"\"mxnet\"",
")",
"logging",
".",
"info",
"(",
"\"copied to host\"",
")",
"logging",
".",
"info",
"(",
"\"tests finished, vm shutdown.\"",
")",
"vm",
".",
"shutdown",
"(",
")"
] |
Run unit tests in the emulator and copy the results back to the host through the mounted
volume in /mxnet
|
[
"Run",
"unit",
"tests",
"in",
"the",
"emulator",
"and",
"copy",
"the",
"results",
"back",
"to",
"the",
"host",
"through",
"the",
"mounted",
"volume",
"in",
"/",
"mxnet"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/ci/docker/qemu/runtime_functions.py#L61-L72
|
train
|
Run unit tests in the emulator and copy the results back to the host through the vmcontrol 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,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,Zs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CZH9Ie6,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(917 - 806) + chr(49) + chr(54) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(55) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(0b110001) + chr(49) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(1170 - 1122) + '\157' + chr(114 - 63) + chr(0b100011 + 0o21) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9050 - 8939) + chr(603 - 551) + '\x32', 0b1000), ehT0Px3KOsy9(chr(799 - 751) + chr(0b1101111) + chr(2433 - 2382) + '\x36' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(51) + '\065' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1001101 + 0o42) + chr(50) + '\x36' + chr(49), 3582 - 3574), ehT0Px3KOsy9('\060' + chr(10960 - 10849) + '\063' + '\x35' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b10110 + 0o131) + '\x32' + '\x31' + '\064', 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + chr(0b110010) + chr(55) + chr(538 - 489), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\x37' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x34' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(7559 - 7448) + chr(0b110010) + '\x31' + chr(2463 - 2409), 61893 - 61885), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2147 - 2096) + chr(52) + chr(0b10011 + 0o36), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + chr(50) + chr(1092 - 1043) + '\063', 0b1000), ehT0Px3KOsy9(chr(1205 - 1157) + chr(0b1000001 + 0o56) + chr(0b110010) + '\064' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(98 - 50) + '\x6f' + chr(0b110011) + chr(0b110010) + chr(0b110 + 0o56), 2082 - 2074), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(8774 - 8663) + '\061' + chr(1305 - 1251) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(53) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + '\x32' + '\x31' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\065' + chr(211 - 157), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(888 - 838) + chr(0b110101 + 0o1) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(756 - 706) + chr(214 - 166) + chr(0b100011 + 0o23), 0o10), ehT0Px3KOsy9(chr(2290 - 2242) + '\157' + chr(0b110010) + '\067' + chr(80 - 30), 0o10), ehT0Px3KOsy9(chr(370 - 322) + '\157' + chr(51) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2497 - 2447) + chr(691 - 641), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111101 + 0o62) + '\065' + '\x34', 13565 - 13557), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(52) + chr(0b110011 + 0o0), 14771 - 14763), ehT0Px3KOsy9('\x30' + '\x6f' + chr(381 - 328) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10010 + 0o42) + '\060', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b110001) + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(0b0 + 0o64), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + '\062' + chr(752 - 702) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1114 - 1066) + chr(0b1011001 + 0o26) + chr(0b110011) + '\065', 0o10), ehT0Px3KOsy9(chr(452 - 404) + chr(0b1101111) + chr(912 - 860), 0b1000), ehT0Px3KOsy9(chr(1958 - 1910) + '\x6f' + '\063' + chr(49), 28990 - 28982), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(789 - 738) + '\x32' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b110001 + 0o76) + chr(51) + chr(53) + chr(1891 - 1843), ord("\x08")), ehT0Px3KOsy9(chr(1975 - 1927) + '\x6f' + chr(49) + '\x35', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(53) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b']'), '\144' + '\145' + chr(5471 - 5372) + chr(111) + '\x64' + '\x65')('\165' + chr(6763 - 6647) + chr(0b1100110) + '\x2d' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def txrhkaewT_Ad():
(XCv7JaL6_r16,) = (xafqLlk3kkUe(NPPHb59961Bv(xafqLlk3kkUe(SXOLrMavuUCe(b'\x05U-\x89L\x81\x98\xde\x85'), chr(100) + chr(0b1100101) + chr(9377 - 9278) + chr(0b111101 + 0o62) + '\144' + chr(6755 - 6654))(chr(0b1110101) + '\164' + '\146' + chr(45) + chr(0b10110 + 0o42)), xafqLlk3kkUe(SXOLrMavuUCe(b'%u'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(8539 - 8428) + chr(100) + '\145')(chr(6220 - 6103) + '\164' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(1992 - 1936))), xafqLlk3kkUe(SXOLrMavuUCe(b'%u'), chr(0b1011001 + 0o13) + '\x65' + chr(7859 - 7760) + '\x6f' + chr(0b1100100) + chr(5989 - 5888))('\x75' + '\x74' + '\x66' + chr(0b1110 + 0o37) + chr(56))),)
with XCv7JaL6_r16() as YaywCP0zhRCM:
X3pgHRTBjFCY(xafqLlk3kkUe(YaywCP0zhRCM, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00K&\xb9R\x9a\x98\xc5'), chr(0b1001110 + 0o26) + chr(0b1100101) + chr(0b10010 + 0o121) + chr(9961 - 9850) + chr(5901 - 5801) + chr(0b1100101))(chr(0b1110100 + 0o1) + '\164' + chr(102) + chr(45) + '\x38')))
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b' \x0f\x06\x9eW\x96\x8d\x86\x83\xe0\xe3\xd4'), chr(9570 - 9470) + chr(2209 - 2108) + chr(99) + chr(0b100100 + 0o113) + '\144' + chr(2081 - 1980))(chr(8084 - 7967) + '\164' + chr(102) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x16@+\x85W\x81\x8f\x91\x9d\xe9\xca\xcbT'), chr(0b110000 + 0o64) + '\145' + chr(0b11110 + 0o105) + chr(111) + chr(9878 - 9778) + chr(0b1001001 + 0o34))(chr(12550 - 12433) + '\164' + '\x66' + chr(1217 - 1172) + chr(56)))
BzckHGbxE2dD(xafqLlk3kkUe(YaywCP0zhRCM, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00K&\xb9R\x9a\x98\xc5'), chr(0b101 + 0o137) + chr(101) + chr(5703 - 5604) + '\157' + chr(100) + chr(0b110 + 0o137))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b']\x17<\x93L\x81\x83\xdc\x8c\xd3\xdf\xcaI\xed\x95\xe2\xc8\xba\x05\x81\xff\x17'), '\144' + chr(0b100110 + 0o77) + chr(4708 - 4609) + chr(7323 - 7212) + chr(100) + '\145')(chr(8709 - 8592) + chr(0b1110100) + chr(0b1010000 + 0o26) + '\055' + chr(3012 - 2956)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x01M \xb9W\x81\xb5\xc1\x90\xf8\xd1\xd0I\xbd\xbe\xfa\xc2\xb9\x03\xf0\xe6\x00\xc3\xe3\xc8vs@'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b110101 + 0o57) + chr(6294 - 6193))(chr(0b111101 + 0o70) + '\164' + chr(2439 - 2337) + '\055' + '\070'))
aSpZ_55dEzdu(xafqLlk3kkUe(YaywCP0zhRCM, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00K&\xb9R\x9a\x98\xc5'), chr(0b101100 + 0o70) + chr(0b1100101) + chr(0b1100011) + chr(0b101000 + 0o107) + chr(0b1000001 + 0o43) + '\145')('\x75' + chr(0b110 + 0o156) + '\x66' + chr(550 - 505) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\x166\x8bN'), '\x64' + chr(0b1100101) + chr(0b11100 + 0o107) + '\x6f' + '\x64' + '\x65')(chr(0b101000 + 0o115) + '\x74' + '\x66' + '\055' + chr(738 - 682)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e@ \x83V'), '\144' + '\145' + chr(0b1001010 + 0o31) + '\157' + chr(0b111110 + 0o46) + chr(101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + '\070'))
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b' \x0f\x06\x9eW\x96\x8d\x86\x83\xe0\xe3\xd4'), '\x64' + '\145' + chr(99) + chr(0b1101111) + chr(100) + chr(3538 - 3437))(chr(0b11111 + 0o126) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b110001 + 0o7)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x10W>\x8fG\x91\xca\xc5\x86\xac\xd1\xd0T\xfa'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(0b10111 + 0o115) + chr(101))(chr(117) + chr(116) + '\x66' + '\055' + '\x38'))
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b' \x0f\x06\x9eW\x96\x8d\x86\x83\xe0\xe3\xd4'), chr(100) + chr(0b1100101) + '\143' + chr(6415 - 6304) + chr(100) + chr(0b1010011 + 0o22))(chr(0b1110101) + chr(2799 - 2683) + '\146' + '\055' + chr(1371 - 1315)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x07]=\x92Q\xd5\x8c\xd8\x87\xe5\xca\xd7B\xea\xcd\xab\xd1\xb9V\xdc\xe7\x1b\xc3\xe2\xd5o|\x02'), '\x64' + '\145' + chr(7483 - 7384) + chr(0b100001 + 0o116) + chr(2404 - 2304) + chr(101))(chr(10319 - 10202) + chr(116) + chr(102) + chr(0b101101) + '\070'))
xafqLlk3kkUe(YaywCP0zhRCM, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00P;\x92F\x9a\x9d\xdf'), chr(0b1100100) + chr(0b110010 + 0o63) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + '\146' + '\055' + '\x38'))()
|
apache/incubator-mxnet
|
ci/docker/qemu/runtime_functions.py
|
run_ut_python3_qemu_internal
|
def run_ut_python3_qemu_internal():
"""this runs inside the vm"""
pkg = glob.glob('mxnet_dist/*.whl')[0]
logging.info("=== NOW Running inside QEMU ===")
logging.info("PIP Installing %s", pkg)
check_call(['sudo', 'pip3', 'install', pkg])
logging.info("PIP Installing mxnet/test_requirements.txt")
check_call(['sudo', 'pip3', 'install', '-r', 'mxnet/test_requirements.txt'])
logging.info("Running tests in mxnet/tests/python/unittest/")
check_call(['nosetests', '--with-timer', '--with-xunit', '--xunit-file', 'nosetests_unittest.xml', '--verbose', 'mxnet/tests/python/unittest/test_engine.py'])
|
python
|
def run_ut_python3_qemu_internal():
"""this runs inside the vm"""
pkg = glob.glob('mxnet_dist/*.whl')[0]
logging.info("=== NOW Running inside QEMU ===")
logging.info("PIP Installing %s", pkg)
check_call(['sudo', 'pip3', 'install', pkg])
logging.info("PIP Installing mxnet/test_requirements.txt")
check_call(['sudo', 'pip3', 'install', '-r', 'mxnet/test_requirements.txt'])
logging.info("Running tests in mxnet/tests/python/unittest/")
check_call(['nosetests', '--with-timer', '--with-xunit', '--xunit-file', 'nosetests_unittest.xml', '--verbose', 'mxnet/tests/python/unittest/test_engine.py'])
|
[
"def",
"run_ut_python3_qemu_internal",
"(",
")",
":",
"pkg",
"=",
"glob",
".",
"glob",
"(",
"'mxnet_dist/*.whl'",
")",
"[",
"0",
"]",
"logging",
".",
"info",
"(",
"\"=== NOW Running inside QEMU ===\"",
")",
"logging",
".",
"info",
"(",
"\"PIP Installing %s\"",
",",
"pkg",
")",
"check_call",
"(",
"[",
"'sudo'",
",",
"'pip3'",
",",
"'install'",
",",
"pkg",
"]",
")",
"logging",
".",
"info",
"(",
"\"PIP Installing mxnet/test_requirements.txt\"",
")",
"check_call",
"(",
"[",
"'sudo'",
",",
"'pip3'",
",",
"'install'",
",",
"'-r'",
",",
"'mxnet/test_requirements.txt'",
"]",
")",
"logging",
".",
"info",
"(",
"\"Running tests in mxnet/tests/python/unittest/\"",
")",
"check_call",
"(",
"[",
"'nosetests'",
",",
"'--with-timer'",
",",
"'--with-xunit'",
",",
"'--xunit-file'",
",",
"'nosetests_unittest.xml'",
",",
"'--verbose'",
",",
"'mxnet/tests/python/unittest/test_engine.py'",
"]",
")"
] |
this runs inside the vm
|
[
"this",
"runs",
"inside",
"the",
"vm"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/ci/docker/qemu/runtime_functions.py#L74-L83
|
train
|
this runs inside QEMU
|
Pu7Z6IJCgH3a,vcEH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kAMbUz4aLg,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(0b110100) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(916 - 868) + chr(1852 - 1741) + chr(50) + chr(55) + '\x37', 0b1000), ehT0Px3KOsy9(chr(2291 - 2243) + '\x6f' + '\062' + '\061' + '\x33', 37095 - 37087), ehT0Px3KOsy9(chr(48) + chr(3310 - 3199) + chr(50) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1737 - 1689) + chr(0b1101111) + chr(50) + '\x35' + chr(0b1011 + 0o45), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100010 + 0o25) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(4913 - 4802) + '\x33' + '\x37' + chr(0b110000), 10659 - 10651), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101011 + 0o7), 24721 - 24713), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b101 + 0o62) + chr(57 - 2), 8), ehT0Px3KOsy9(chr(1437 - 1389) + chr(111) + chr(2232 - 2182) + chr(373 - 318) + '\x35', 35923 - 35915), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x34' + '\x34', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110101) + '\064', 59906 - 59898), ehT0Px3KOsy9('\x30' + chr(136 - 25) + chr(51) + chr(0b110110) + chr(520 - 465), 33961 - 33953), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(891 - 839) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b110001 + 0o76) + chr(50) + '\x37' + chr(0b110001 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(1469 - 1418), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(0b1000 + 0o56) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\067' + chr(0b10000 + 0o47), 16721 - 16713), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x37' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + '\x33' + chr(0b10101 + 0o36) + chr(0b10000 + 0o42), 25279 - 25271), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010 + 0o5) + chr(0b100 + 0o57), 0o10), ehT0Px3KOsy9(chr(166 - 118) + chr(4060 - 3949) + chr(51) + chr(1859 - 1810) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111 + 0o150) + chr(51) + '\067' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1098 - 1047) + '\061' + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10 + 0o61) + '\066' + chr(0b110101), 40613 - 40605), ehT0Px3KOsy9(chr(61 - 13) + chr(0b1101111) + '\063' + chr(49) + chr(0b101100 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110101) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x31' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(55) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + chr(55), 32233 - 32225), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + '\x36' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(969 - 919) + chr(0b110111) + chr(0b11110 + 0o30), 8), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + '\x33' + chr(50) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(0b1110 + 0o46), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + chr(49) + '\064' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011011 + 0o24) + chr(0b101100 + 0o7) + chr(0b110010) + '\060', 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b10000 + 0o43) + chr(0b100011 + 0o17) + chr(761 - 709), 34002 - 33994), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\063' + chr(544 - 492), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + '\x35' + chr(393 - 345), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\n'), chr(5311 - 5211) + '\x65' + '\143' + '\x6f' + chr(100) + chr(101))(chr(5106 - 4989) + '\164' + chr(0b1100100 + 0o2) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CeHEP1MK0mRC():
i3uAp9PIKq_d = jt2o3b6QEdP_.glob(xafqLlk3kkUe(SXOLrMavuUCe(b'I\xc7\xe5t\xdcb\x9ck\xcc\xc9\x0bF\xd9E\x8f\xd0'), '\x64' + chr(0b111110 + 0o47) + chr(0b1100011) + '\157' + chr(100) + chr(7788 - 7687))(chr(0b110001 + 0o104) + chr(116) + chr(0b1100110) + chr(0b101101) + '\x38'))[ehT0Px3KOsy9(chr(0b110000) + chr(2954 - 2843) + '\060', ord("\x08"))]
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x88\xc3i\xdd^\x9f5\xd5\xd1~\x07'), chr(0b1100100) + chr(9979 - 9878) + '\143' + chr(111) + '\144' + chr(101))(chr(2975 - 2858) + chr(0b11000 + 0o134) + chr(0b1100110) + chr(45) + chr(0b10100 + 0o44)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\x82\xb61\xe6r\xaf"\xed\xc8J\x02\x9e\\\x80\x9cB[_\x96\x1a\xbf\x1b\x9c\xb8\x85\xa0\xeb\x12\xb3\x83'), '\x64' + chr(6525 - 6424) + chr(9493 - 9394) + chr(0b101010 + 0o105) + chr(100) + '\145')(chr(5624 - 5507) + chr(900 - 784) + chr(6613 - 6511) + '\055' + chr(0b11101 + 0o33)))
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x88\xc3i\xdd^\x9f5\xd5\xd1~\x07'), '\x64' + chr(0b1100101) + chr(0b1011101 + 0o6) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b111000 + 0o75) + chr(11836 - 11720) + chr(0b1110 + 0o130) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b't\xf6\xdb1\xe1S\x8bv\xde\xd1H\x05\x99U\xc7\x99X'), '\144' + '\x65' + chr(0b1000 + 0o133) + chr(111) + '\144' + chr(0b1001011 + 0o32))(chr(0b110101 + 0o100) + '\164' + '\x66' + chr(45) + chr(0b10101 + 0o43)), i3uAp9PIKq_d)
VQ8g4dauNDMW([xafqLlk3kkUe(SXOLrMavuUCe(b'W\xca\xef~'), '\144' + chr(101) + chr(6610 - 6511) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(3645 - 3528) + chr(0b1110100) + chr(0b101010 + 0o74) + chr(1143 - 1098) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'T\xd6\xfb"'), chr(5526 - 5426) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b101 + 0o137) + chr(0b1100101))('\x75' + chr(0b10000 + 0o144) + chr(0b1010111 + 0o17) + chr(500 - 455) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'M\xd1\xf8e\xc9Q\x94'), chr(1612 - 1512) + '\x65' + '\143' + '\x6f' + chr(5468 - 5368) + '\145')('\165' + chr(0b1110100) + '\146' + chr(0b11101 + 0o20) + chr(56)), i3uAp9PIKq_d])
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x88\xc3i\xdd^\x9f5\xd5\xd1~\x07'), '\x64' + chr(101) + '\143' + chr(1594 - 1483) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b't\xf6\xdb1\xe1S\x8bv\xde\xd1H\x05\x99U\xc7\xd1S[I\x8bQ\xae^\xbe\x89\x97\x87\xae^\xfb\xd7UQ\xd3\xb2Z\x11\xa3\xfa\xe8\\\xcb'), chr(0b1100100) + '\145' + chr(0b111011 + 0o50) + chr(10365 - 10254) + '\144' + chr(0b1100101))(chr(12604 - 12487) + chr(0b1110100) + chr(0b101001 + 0o75) + chr(1262 - 1217) + chr(0b111000)))
VQ8g4dauNDMW([xafqLlk3kkUe(SXOLrMavuUCe(b'W\xca\xef~'), chr(4086 - 3986) + chr(101) + chr(0b1001100 + 0o27) + chr(111) + chr(712 - 612) + '\145')(chr(0b1000011 + 0o62) + chr(116) + chr(0b1100110) + chr(555 - 510) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'T\xd6\xfb"'), chr(0b1001100 + 0o30) + '\145' + chr(99) + '\x6f' + chr(0b111101 + 0o47) + '\145')(chr(2912 - 2795) + chr(2145 - 2029) + chr(0b111100 + 0o52) + chr(1585 - 1540) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'M\xd1\xf8e\xc9Q\x94'), '\x64' + '\145' + '\143' + chr(111) + chr(2949 - 2849) + chr(0b11001 + 0o114))('\165' + chr(12490 - 12374) + chr(0b10100 + 0o122) + '\x2d' + chr(3121 - 3065)), xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xcd'), chr(0b1000011 + 0o41) + chr(101) + chr(0b1000 + 0o133) + '\157' + '\x64' + '\145')('\165' + '\x74' + chr(1371 - 1269) + '\055' + chr(1737 - 1681)), xafqLlk3kkUe(SXOLrMavuUCe(b'I\xc7\xe5t\xdc\x12\x8cg\xcc\xc9{\x1e\x92C\x92\xd5YPA\x9a\x10\xaeH\xe3\x89\xb0\x81'), '\x64' + chr(0b11101 + 0o110) + '\x63' + chr(0b101001 + 0o106) + chr(100) + chr(0b1100101))('\165' + chr(6729 - 6613) + chr(102) + '\055' + '\x38')])
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'w\x88\xc3i\xdd^\x9f5\xd5\xd1~\x07'), chr(100) + chr(0b11000 + 0o115) + chr(99) + chr(0b0 + 0o157) + chr(4683 - 4583) + chr(0b1100101))(chr(0b1110101) + chr(9203 - 9087) + '\146' + chr(1461 - 1416) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'v\xca\xe5\x7f\xc1S\x9f"\xcb\xd8W\x18\x84\x12\x8e\xd2\x0bXT\x91\x1b\xae\x14\xb9\x98\xbb\x81\xb8\x00\xfe\xc7S\\\xd1\xb9\x1b\x10\xbe\xbd\xe8P\xda\xf8e\x87'), chr(0b11100 + 0o110) + chr(0b1100101) + chr(785 - 686) + chr(1464 - 1353) + '\x64' + chr(101))('\165' + chr(0b1100000 + 0o24) + '\x66' + chr(0b101101) + chr(862 - 806)))
VQ8g4dauNDMW([xafqLlk3kkUe(SXOLrMavuUCe(b'J\xd0\xf8t\xdcX\x8bv\xcc'), chr(100) + chr(0b1100101) + chr(99) + chr(0b110111 + 0o70) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(10830 - 10714) + '\146' + '\x2d' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\t\x92\xfcx\xdcU\xd5v\xd6\xd0A\x1e'), chr(6154 - 6054) + chr(3927 - 3826) + '\143' + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\t\x92\xfcx\xdcU\xd5z\xca\xd3M\x18'), chr(7566 - 7466) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(0b110011 + 0o62))('\x75' + '\164' + chr(1969 - 1867) + '\x2d' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\t\x92\xf3d\xc6T\x8c/\xd9\xd4H\t'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\x64' + chr(101))(chr(0b111101 + 0o70) + chr(0b1001000 + 0o54) + '\x66' + chr(1042 - 997) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'J\xd0\xf8t\xdcX\x8bv\xcc\xe2Q\x02\x9eF\x93\xd9XA\x02\x87\x13\xb6'), chr(100) + chr(0b1100101) + chr(886 - 787) + '\x6f' + '\144' + chr(10137 - 10036))(chr(7835 - 7718) + '\164' + '\146' + '\055' + chr(0b11110 + 0o32)), xafqLlk3kkUe(SXOLrMavuUCe(b'\t\x92\xfdt\xda_\x97q\xda'), chr(0b1001111 + 0o25) + '\145' + '\143' + chr(111) + chr(608 - 508) + chr(101))('\165' + chr(116) + '\146' + chr(0b1011 + 0o42) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'I\xc7\xe5t\xdc\x12\x8cg\xcc\xc9WC\x87K\x93\xd4D[\x03\x8a\x10\xb3O\xb9\x98\xbb\x81\xe4[\xeb\xcdSk\xdb\xb9S\x0c\xbe\xb1\xb2T\xc6'), chr(0b110010 + 0o62) + chr(1036 - 935) + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(0b1101001 + 0o14) + '\164' + chr(5878 - 5776) + '\x2d' + '\070')])
|
apache/incubator-mxnet
|
example/nce-loss/text8_data.py
|
_get_subword_units
|
def _get_subword_units(token, gram):
"""Return subword-units presentation, given a word/token.
"""
if token == '</s>': # special token for padding purpose.
return [token]
t = '#' + token + '#'
return [t[i:i + gram] for i in range(0, len(t) - gram + 1)]
|
python
|
def _get_subword_units(token, gram):
"""Return subword-units presentation, given a word/token.
"""
if token == '</s>': # special token for padding purpose.
return [token]
t = '#' + token + '#'
return [t[i:i + gram] for i in range(0, len(t) - gram + 1)]
|
[
"def",
"_get_subword_units",
"(",
"token",
",",
"gram",
")",
":",
"if",
"token",
"==",
"'</s>'",
":",
"# special token for padding purpose.",
"return",
"[",
"token",
"]",
"t",
"=",
"'#'",
"+",
"token",
"+",
"'#'",
"return",
"[",
"t",
"[",
"i",
":",
"i",
"+",
"gram",
"]",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"t",
")",
"-",
"gram",
"+",
"1",
")",
"]"
] |
Return subword-units presentation, given a word/token.
|
[
"Return",
"subword",
"-",
"units",
"presentation",
"given",
"a",
"word",
"/",
"token",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/nce-loss/text8_data.py#L68-L74
|
train
|
Return a list of subword - units presentation given a word and gram.
|
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(chr(0b1000 + 0o50) + chr(0b101010 + 0o105) + chr(135 - 85) + '\063' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(4519 - 4408) + chr(0b110011) + chr(0b110101) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2117 - 2066) + chr(0b1010 + 0o50) + '\063', 23683 - 23675), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(1185 - 1136) + chr(50) + chr(0b110101), 15999 - 15991), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100110 + 0o15) + '\060' + chr(1468 - 1416), 43504 - 43496), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1010 + 0o47) + chr(48) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(363 - 314) + '\x35' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(48) + chr(0b101110 + 0o3), 0o10), ehT0Px3KOsy9(chr(48) + chr(11582 - 11471) + chr(49) + '\066' + chr(0b1010 + 0o52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(752 - 703) + chr(0b11100 + 0o31) + chr(0b110000), 8), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + '\065' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\060' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011000 + 0o27) + chr(2352 - 2301) + chr(1433 - 1379), 41205 - 41197), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + '\061' + '\066' + '\x34', 8), ehT0Px3KOsy9('\060' + chr(0b1000101 + 0o52) + chr(0b110111) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(51) + chr(54), 8), ehT0Px3KOsy9(chr(280 - 232) + '\157' + '\063' + chr(0b110011 + 0o3) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110100) + chr(584 - 536), 37609 - 37601), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2059 - 2008) + chr(648 - 598) + chr(0b11100 + 0o26), 17453 - 17445), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b1110 + 0o46) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b10111 + 0o31) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\063' + '\x34', 0o10), ehT0Px3KOsy9(chr(1346 - 1298) + chr(111) + chr(50) + '\x36' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(141 - 90) + chr(0b110101) + chr(0b100101 + 0o13), 0b1000), ehT0Px3KOsy9(chr(1695 - 1647) + chr(0b1101111) + '\x33' + chr(50) + chr(53), 53355 - 53347), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(613 - 564) + '\061', 5564 - 5556), ehT0Px3KOsy9(chr(0b110000) + chr(1440 - 1329) + chr(50) + chr(0b110011) + chr(1944 - 1892), 62954 - 62946), ehT0Px3KOsy9(chr(825 - 777) + chr(111) + chr(0b1101 + 0o44) + chr(0b110000) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100101 + 0o12) + chr(0b111 + 0o56) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b1100 + 0o45) + chr(0b110110) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x35' + '\065', 13454 - 13446), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(1714 - 1660) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10100 + 0o36) + chr(0b100011 + 0o20), 0o10), ehT0Px3KOsy9(chr(340 - 292) + '\157' + chr(734 - 685) + '\062' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(734 - 683), 19021 - 19013), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110101) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + '\x33' + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(5647 - 5536) + chr(2117 - 2068) + chr(977 - 926) + '\064', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(558 - 510) + chr(111) + chr(2721 - 2668) + '\060', 42850 - 42842)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), chr(5317 - 5217) + chr(101) + chr(0b11100 + 0o107) + chr(0b101101 + 0o102) + '\x64' + chr(101))(chr(0b100111 + 0o116) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b110100 + 0o4)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def vhuTogRkjw8k(mTy3fac_AqJ5, n83viqo8Olur):
if mTy3fac_AqJ5 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xc5\xa0k'), chr(100) + chr(0b1100101) + chr(0b10111 + 0o114) + chr(0b110001 + 0o76) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(1592 - 1547) + '\x38'):
return [mTy3fac_AqJ5]
YeT3l7JgTbWR = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8'), '\144' + '\x65' + '\x63' + chr(4785 - 4674) + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070') + mTy3fac_AqJ5 + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))('\165' + '\x74' + '\x66' + chr(1617 - 1572) + chr(56))
return [YeT3l7JgTbWR[WVxHKyX45z_L:WVxHKyX45z_L + n83viqo8Olur] for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9('\060' + chr(111) + chr(1565 - 1517), ord("\x08")), c2A0yzQpDQB3(YeT3l7JgTbWR) - n83viqo8Olur + ehT0Px3KOsy9('\x30' + '\x6f' + chr(124 - 75), 16319 - 16311))]
|
apache/incubator-mxnet
|
example/caffe/train_model.py
|
fit
|
def fit(args, network, data_loader, eval_metrics=None, batch_end_callback=None):
"""Train the model using Caffe operator in MXNet"""
# kvstore
kv = mx.kvstore.create(args.kv_store)
# logging
head = '%(asctime)-15s Node[' + str(kv.rank) + '] %(message)s'
if 'log_file' in args and args.log_file is not None:
log_file = args.log_file
log_dir = args.log_dir
log_file_full_name = os.path.join(log_dir, log_file)
if not os.path.exists(log_dir):
os.mkdir(log_dir)
logger = logging.getLogger()
handler = logging.FileHandler(log_file_full_name)
formatter = logging.Formatter(head)
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.info('start with arguments %s', args)
else:
logging.basicConfig(level=logging.DEBUG, format=head)
logging.info('start with arguments %s', args)
# load model
model_prefix = args.model_prefix
if model_prefix is not None:
model_prefix += "-%d" % (kv.rank)
model_args = {}
if args.load_epoch is not None:
assert model_prefix is not None
tmp = mx.model.FeedForward.load(model_prefix, args.load_epoch)
model_args = {'arg_params' : tmp.arg_params,
'aux_params' : tmp.aux_params,
'begin_epoch' : args.load_epoch}
# save model
save_model_prefix = args.save_model_prefix
if save_model_prefix is None:
save_model_prefix = model_prefix
checkpoint = None if save_model_prefix is None else mx.callback.do_checkpoint(save_model_prefix)
# data
(train, val) = data_loader(args, kv)
# train
devs = mx.cpu() if args.gpus is None else [
mx.gpu(int(i)) for i in args.gpus.split(',')]
epoch_size = args.num_examples / args.batch_size
if args.kv_store == 'dist_sync':
epoch_size /= kv.num_workers
model_args['epoch_size'] = epoch_size
if 'lr_factor' in args and args.lr_factor < 1:
model_args['lr_scheduler'] = mx.lr_scheduler.FactorScheduler(
step=max(int(epoch_size * args.lr_factor_epoch), 1),
factor=args.lr_factor)
if 'clip_gradient' in args and args.clip_gradient is not None:
model_args['clip_gradient'] = args.clip_gradient
# disable kvstore for single device
if 'local' in kv.type and (
args.gpus is None or len(args.gpus.split(',')) is 1):
kv = None
mod = mx.mod.Module(network, context=devs)
if eval_metrics is None:
eval_metrics = ['accuracy']
# TopKAccuracy only allows top_k > 1
for top_k in [5, 10, 20]:
eval_metrics.append(mx.metric.create('top_k_accuracy', top_k=top_k))
if batch_end_callback is not None:
if not isinstance(batch_end_callback, list):
batch_end_callback = [batch_end_callback]
else:
batch_end_callback = []
batch_end_callback.append(mx.callback.Speedometer(args.batch_size, 50))
mod.fit(train_data=train, eval_metric=eval_metrics, eval_data=val, optimizer='sgd',
optimizer_params={'learning_rate':args.lr, 'momentum': 0.9, 'wd': 0.00001},
num_epoch=args.num_epochs, batch_end_callback=batch_end_callback,
initializer=mx.init.Xavier(factor_type="in", magnitude=2.34),
kvstore=kv, epoch_end_callback=checkpoint, **model_args)
|
python
|
def fit(args, network, data_loader, eval_metrics=None, batch_end_callback=None):
"""Train the model using Caffe operator in MXNet"""
# kvstore
kv = mx.kvstore.create(args.kv_store)
# logging
head = '%(asctime)-15s Node[' + str(kv.rank) + '] %(message)s'
if 'log_file' in args and args.log_file is not None:
log_file = args.log_file
log_dir = args.log_dir
log_file_full_name = os.path.join(log_dir, log_file)
if not os.path.exists(log_dir):
os.mkdir(log_dir)
logger = logging.getLogger()
handler = logging.FileHandler(log_file_full_name)
formatter = logging.Formatter(head)
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
logger.info('start with arguments %s', args)
else:
logging.basicConfig(level=logging.DEBUG, format=head)
logging.info('start with arguments %s', args)
# load model
model_prefix = args.model_prefix
if model_prefix is not None:
model_prefix += "-%d" % (kv.rank)
model_args = {}
if args.load_epoch is not None:
assert model_prefix is not None
tmp = mx.model.FeedForward.load(model_prefix, args.load_epoch)
model_args = {'arg_params' : tmp.arg_params,
'aux_params' : tmp.aux_params,
'begin_epoch' : args.load_epoch}
# save model
save_model_prefix = args.save_model_prefix
if save_model_prefix is None:
save_model_prefix = model_prefix
checkpoint = None if save_model_prefix is None else mx.callback.do_checkpoint(save_model_prefix)
# data
(train, val) = data_loader(args, kv)
# train
devs = mx.cpu() if args.gpus is None else [
mx.gpu(int(i)) for i in args.gpus.split(',')]
epoch_size = args.num_examples / args.batch_size
if args.kv_store == 'dist_sync':
epoch_size /= kv.num_workers
model_args['epoch_size'] = epoch_size
if 'lr_factor' in args and args.lr_factor < 1:
model_args['lr_scheduler'] = mx.lr_scheduler.FactorScheduler(
step=max(int(epoch_size * args.lr_factor_epoch), 1),
factor=args.lr_factor)
if 'clip_gradient' in args and args.clip_gradient is not None:
model_args['clip_gradient'] = args.clip_gradient
# disable kvstore for single device
if 'local' in kv.type and (
args.gpus is None or len(args.gpus.split(',')) is 1):
kv = None
mod = mx.mod.Module(network, context=devs)
if eval_metrics is None:
eval_metrics = ['accuracy']
# TopKAccuracy only allows top_k > 1
for top_k in [5, 10, 20]:
eval_metrics.append(mx.metric.create('top_k_accuracy', top_k=top_k))
if batch_end_callback is not None:
if not isinstance(batch_end_callback, list):
batch_end_callback = [batch_end_callback]
else:
batch_end_callback = []
batch_end_callback.append(mx.callback.Speedometer(args.batch_size, 50))
mod.fit(train_data=train, eval_metric=eval_metrics, eval_data=val, optimizer='sgd',
optimizer_params={'learning_rate':args.lr, 'momentum': 0.9, 'wd': 0.00001},
num_epoch=args.num_epochs, batch_end_callback=batch_end_callback,
initializer=mx.init.Xavier(factor_type="in", magnitude=2.34),
kvstore=kv, epoch_end_callback=checkpoint, **model_args)
|
[
"def",
"fit",
"(",
"args",
",",
"network",
",",
"data_loader",
",",
"eval_metrics",
"=",
"None",
",",
"batch_end_callback",
"=",
"None",
")",
":",
"# kvstore",
"kv",
"=",
"mx",
".",
"kvstore",
".",
"create",
"(",
"args",
".",
"kv_store",
")",
"# logging",
"head",
"=",
"'%(asctime)-15s Node['",
"+",
"str",
"(",
"kv",
".",
"rank",
")",
"+",
"'] %(message)s'",
"if",
"'log_file'",
"in",
"args",
"and",
"args",
".",
"log_file",
"is",
"not",
"None",
":",
"log_file",
"=",
"args",
".",
"log_file",
"log_dir",
"=",
"args",
".",
"log_dir",
"log_file_full_name",
"=",
"os",
".",
"path",
".",
"join",
"(",
"log_dir",
",",
"log_file",
")",
"if",
"not",
"os",
".",
"path",
".",
"exists",
"(",
"log_dir",
")",
":",
"os",
".",
"mkdir",
"(",
"log_dir",
")",
"logger",
"=",
"logging",
".",
"getLogger",
"(",
")",
"handler",
"=",
"logging",
".",
"FileHandler",
"(",
"log_file_full_name",
")",
"formatter",
"=",
"logging",
".",
"Formatter",
"(",
"head",
")",
"handler",
".",
"setFormatter",
"(",
"formatter",
")",
"logger",
".",
"addHandler",
"(",
"handler",
")",
"logger",
".",
"setLevel",
"(",
"logging",
".",
"DEBUG",
")",
"logger",
".",
"info",
"(",
"'start with arguments %s'",
",",
"args",
")",
"else",
":",
"logging",
".",
"basicConfig",
"(",
"level",
"=",
"logging",
".",
"DEBUG",
",",
"format",
"=",
"head",
")",
"logging",
".",
"info",
"(",
"'start with arguments %s'",
",",
"args",
")",
"# load model",
"model_prefix",
"=",
"args",
".",
"model_prefix",
"if",
"model_prefix",
"is",
"not",
"None",
":",
"model_prefix",
"+=",
"\"-%d\"",
"%",
"(",
"kv",
".",
"rank",
")",
"model_args",
"=",
"{",
"}",
"if",
"args",
".",
"load_epoch",
"is",
"not",
"None",
":",
"assert",
"model_prefix",
"is",
"not",
"None",
"tmp",
"=",
"mx",
".",
"model",
".",
"FeedForward",
".",
"load",
"(",
"model_prefix",
",",
"args",
".",
"load_epoch",
")",
"model_args",
"=",
"{",
"'arg_params'",
":",
"tmp",
".",
"arg_params",
",",
"'aux_params'",
":",
"tmp",
".",
"aux_params",
",",
"'begin_epoch'",
":",
"args",
".",
"load_epoch",
"}",
"# save model",
"save_model_prefix",
"=",
"args",
".",
"save_model_prefix",
"if",
"save_model_prefix",
"is",
"None",
":",
"save_model_prefix",
"=",
"model_prefix",
"checkpoint",
"=",
"None",
"if",
"save_model_prefix",
"is",
"None",
"else",
"mx",
".",
"callback",
".",
"do_checkpoint",
"(",
"save_model_prefix",
")",
"# data",
"(",
"train",
",",
"val",
")",
"=",
"data_loader",
"(",
"args",
",",
"kv",
")",
"# train",
"devs",
"=",
"mx",
".",
"cpu",
"(",
")",
"if",
"args",
".",
"gpus",
"is",
"None",
"else",
"[",
"mx",
".",
"gpu",
"(",
"int",
"(",
"i",
")",
")",
"for",
"i",
"in",
"args",
".",
"gpus",
".",
"split",
"(",
"','",
")",
"]",
"epoch_size",
"=",
"args",
".",
"num_examples",
"/",
"args",
".",
"batch_size",
"if",
"args",
".",
"kv_store",
"==",
"'dist_sync'",
":",
"epoch_size",
"/=",
"kv",
".",
"num_workers",
"model_args",
"[",
"'epoch_size'",
"]",
"=",
"epoch_size",
"if",
"'lr_factor'",
"in",
"args",
"and",
"args",
".",
"lr_factor",
"<",
"1",
":",
"model_args",
"[",
"'lr_scheduler'",
"]",
"=",
"mx",
".",
"lr_scheduler",
".",
"FactorScheduler",
"(",
"step",
"=",
"max",
"(",
"int",
"(",
"epoch_size",
"*",
"args",
".",
"lr_factor_epoch",
")",
",",
"1",
")",
",",
"factor",
"=",
"args",
".",
"lr_factor",
")",
"if",
"'clip_gradient'",
"in",
"args",
"and",
"args",
".",
"clip_gradient",
"is",
"not",
"None",
":",
"model_args",
"[",
"'clip_gradient'",
"]",
"=",
"args",
".",
"clip_gradient",
"# disable kvstore for single device",
"if",
"'local'",
"in",
"kv",
".",
"type",
"and",
"(",
"args",
".",
"gpus",
"is",
"None",
"or",
"len",
"(",
"args",
".",
"gpus",
".",
"split",
"(",
"','",
")",
")",
"is",
"1",
")",
":",
"kv",
"=",
"None",
"mod",
"=",
"mx",
".",
"mod",
".",
"Module",
"(",
"network",
",",
"context",
"=",
"devs",
")",
"if",
"eval_metrics",
"is",
"None",
":",
"eval_metrics",
"=",
"[",
"'accuracy'",
"]",
"# TopKAccuracy only allows top_k > 1",
"for",
"top_k",
"in",
"[",
"5",
",",
"10",
",",
"20",
"]",
":",
"eval_metrics",
".",
"append",
"(",
"mx",
".",
"metric",
".",
"create",
"(",
"'top_k_accuracy'",
",",
"top_k",
"=",
"top_k",
")",
")",
"if",
"batch_end_callback",
"is",
"not",
"None",
":",
"if",
"not",
"isinstance",
"(",
"batch_end_callback",
",",
"list",
")",
":",
"batch_end_callback",
"=",
"[",
"batch_end_callback",
"]",
"else",
":",
"batch_end_callback",
"=",
"[",
"]",
"batch_end_callback",
".",
"append",
"(",
"mx",
".",
"callback",
".",
"Speedometer",
"(",
"args",
".",
"batch_size",
",",
"50",
")",
")",
"mod",
".",
"fit",
"(",
"train_data",
"=",
"train",
",",
"eval_metric",
"=",
"eval_metrics",
",",
"eval_data",
"=",
"val",
",",
"optimizer",
"=",
"'sgd'",
",",
"optimizer_params",
"=",
"{",
"'learning_rate'",
":",
"args",
".",
"lr",
",",
"'momentum'",
":",
"0.9",
",",
"'wd'",
":",
"0.00001",
"}",
",",
"num_epoch",
"=",
"args",
".",
"num_epochs",
",",
"batch_end_callback",
"=",
"batch_end_callback",
",",
"initializer",
"=",
"mx",
".",
"init",
".",
"Xavier",
"(",
"factor_type",
"=",
"\"in\"",
",",
"magnitude",
"=",
"2.34",
")",
",",
"kvstore",
"=",
"kv",
",",
"epoch_end_callback",
"=",
"checkpoint",
",",
"*",
"*",
"model_args",
")"
] |
Train the model using Caffe operator in MXNet
|
[
"Train",
"the",
"model",
"using",
"Caffe",
"operator",
"in",
"MXNet"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/caffe/train_model.py#L23-L109
|
train
|
Train the model using Caffe operator in MXNet
|
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_m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sdjvlgh9gDP,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(0b0 + 0o60) + chr(0b1011100 + 0o23) + chr(50) + '\x34' + chr(0b10001 + 0o42), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10110 + 0o35) + chr(0b110011) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10010 + 0o41) + '\060' + chr(486 - 436), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(2361 - 2309) + chr(762 - 707), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10010 + 0o37) + '\063' + chr(0b10011 + 0o36), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1367 - 1256) + chr(0b110001) + chr(0b110110 + 0o1) + chr(0b100110 + 0o15), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101000 + 0o13) + chr(0b1110 + 0o51) + chr(2537 - 2485), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x32' + '\x33' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\062' + chr(0b110110 + 0o1) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + '\x31' + chr(48) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(2179 - 2131) + chr(111) + chr(1628 - 1578), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110110) + chr(321 - 272), ord("\x08")), ehT0Px3KOsy9(chr(557 - 509) + '\x6f' + chr(0b1100 + 0o46) + chr(1072 - 1021) + chr(0b1001 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(1128 - 1080) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(55) + chr(0b110110), 23553 - 23545), ehT0Px3KOsy9(chr(785 - 737) + chr(0b1101111) + chr(0b10001 + 0o42) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100010 + 0o15) + chr(49) + '\063' + chr(0b110010), 63322 - 63314), ehT0Px3KOsy9('\x30' + chr(8406 - 8295) + '\065' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x34' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\061' + chr(0b1101 + 0o46), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9504 - 9393) + chr(2262 - 2212) + '\065' + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\x32' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(922 - 872) + '\x34' + chr(863 - 815), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110001), 62097 - 62089), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(1167 - 1112) + '\x33', 52770 - 52762), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\060' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(756 - 708) + chr(0b1101111) + '\x32' + '\062' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\x33' + chr(0b110010) + chr(0b110111), 7884 - 7876), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\x33' + '\x35', 18594 - 18586), ehT0Px3KOsy9('\060' + chr(8540 - 8429) + '\x32' + chr(54) + chr(93 - 38), 27377 - 27369), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(1701 - 1653), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110000 + 0o1) + '\063' + chr(0b10000 + 0o41), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b10011 + 0o43) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(54) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(0b110011) + chr(2191 - 2138) + chr(0b1001 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x36' + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1100 + 0o47) + '\x32' + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011011 + 0o24) + '\x31' + chr(0b111 + 0o56) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063', 42457 - 42449)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1011111 + 0o20) + chr(2700 - 2647) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d'), chr(100) + chr(101) + chr(0b1011 + 0o130) + chr(10432 - 10321) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + '\x66' + chr(1263 - 1218) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def gggbGMeQaMBR(kJDRfRhcZHjS, dg_IyTYgIdux, IPJ3s4Z8ZVIA, gEY30c7K0x8W=None, W8VoATJOxM2T=None):
oG9AO0uxBJ0V = CIVheOt0RKQX.kvstore.zXm8hKpI6bmL(kJDRfRhcZHjS.kv_store)
jTNf3myQ667Q = xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xf2\xa3\x94:\x0f\x95\xf6\xd9k/\xc0\xab6\xdeU5JA\x90'), chr(0b1100100) + chr(101) + '\x63' + chr(1299 - 1188) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(497 - 395) + '\055' + '\070') + M8_cKLkHVB2V(oG9AO0uxBJ0V.rank) + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xfa\xe7\xcf4\x1e\x8f\xe8\xdd%g\xd8\xed'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(100) + '\x65')(chr(117) + chr(0b1010111 + 0o35) + chr(10171 - 10069) + '\x2d' + chr(0b111000))
if xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xb5\xa5\xb8?\x12\x90\xfe'), chr(0b1100100) + '\x65' + chr(0b100100 + 0o77) + chr(111) + chr(0b1100100) + chr(3374 - 3273))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(2547 - 2491)) in kJDRfRhcZHjS and xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xb5\xa5\xb8?\x12\x90\xfe'), '\x64' + chr(0b111001 + 0o54) + chr(0b1100011) + '\x6f' + chr(3199 - 3099) + chr(101))(chr(3670 - 3553) + '\164' + chr(0b1100011 + 0o3) + chr(45) + chr(2264 - 2208))) is not None:
NoewrypK4fFD = kJDRfRhcZHjS.log_file
wbaa2HUoECD_ = kJDRfRhcZHjS.log_dir
xkOwl68buHl8 = oqhJDdMJfuwx.path._oWXztVNnqHF(wbaa2HUoECD_, NoewrypK4fFD)
if not xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6\xa2\xab\x94-\x08'), chr(100) + '\145' + chr(99) + chr(111) + chr(0b100010 + 0o102) + '\145')('\165' + '\x74' + '\x66' + '\055' + '\070'))(wbaa2HUoECD_):
xafqLlk3kkUe(oqhJDdMJfuwx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce\xb1\xa6\x8e+'), chr(1157 - 1057) + chr(101) + '\x63' + chr(3065 - 2954) + chr(8008 - 7908) + chr(101))('\165' + chr(0b111101 + 0o67) + '\x66' + chr(0b1001 + 0o44) + '\070'))(wbaa2HUoECD_)
hdK8qOUhR6Or = UeotCCWOPSQS.getLogger()
I_GTmuOABRzI = UeotCCWOPSQS.FileHandler(xkOwl68buHl8)
aJww5LUxvlKf = UeotCCWOPSQS.Formatter(jTNf3myQ667Q)
xafqLlk3kkUe(I_GTmuOABRzI, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xbf\xb6\xa16\t\x91\xfa\xc86g\x83'), '\144' + chr(0b1100101) + chr(0b111001 + 0o52) + '\157' + '\x64' + chr(3755 - 3654))(chr(0b1110101) + chr(12122 - 12006) + '\x66' + chr(45) + '\070'))(aJww5LUxvlKf)
xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xbe\xa6\xaf8\x15\x98\xf7\xd90'), chr(100) + chr(0b1100101) + chr(8060 - 7961) + '\157' + chr(100) + chr(101))('\x75' + chr(279 - 163) + '\x66' + chr(0b10010 + 0o33) + chr(0b11110 + 0o32)))(I_GTmuOABRzI)
xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xbf\xb6\xab<\r\x99\xf7'), '\x64' + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + '\x65')('\x75' + '\x74' + chr(3936 - 3834) + chr(45) + chr(56)))(xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\x9f\x80\xb2\x1e'), chr(0b1100100) + chr(0b1100101) + chr(0b1010101 + 0o16) + chr(0b1101111) + '\144' + chr(0b100001 + 0o104))(chr(7283 - 7166) + chr(116) + chr(102) + chr(45) + '\x38')))
xafqLlk3kkUe(hdK8qOUhR6Or, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xed\x8a\x9f,\x18\x9b\xac\xd6.X\x9a'), chr(0b1100100) + '\145' + chr(3378 - 3279) + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(5616 - 5500) + chr(0b101111 + 0o67) + '\x2d' + chr(0b110111 + 0o1)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xae\xa3\x95-[\x8b\xf2\xc8*"\x90\xec"\x8bv?@P\xb8\x8d\xb4\xd3'), '\144' + chr(101) + '\143' + '\157' + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b11110 + 0o32)), kJDRfRhcZHjS)
else:
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xbb\xb1\x8e:8\x93\xf5\xda+e'), chr(6774 - 6674) + '\x65' + '\x63' + chr(111) + chr(100) + chr(9761 - 9660))(chr(0b1110101) + '\164' + '\146' + '\x2d' + chr(0b111000)))(level=xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\x9f\x80\xb2\x1e'), '\144' + '\145' + chr(8276 - 8177) + chr(111) + chr(8129 - 8029) + chr(101))(chr(12167 - 12050) + chr(0b1110100) + '\146' + chr(0b100101 + 0o10) + chr(56))), format=jTNf3myQ667Q)
xafqLlk3kkUe(UeotCCWOPSQS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xed\x8a\x9f,\x18\x9b\xac\xd6.X\x9a'), chr(3900 - 3800) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1111 + 0o146) + '\x74' + '\146' + chr(45) + chr(0b110 + 0o62)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xae\xa3\x95-[\x8b\xf2\xc8*"\x90\xec"\x8bv?@P\xb8\x8d\xb4\xd3'), chr(0b1100100) + chr(0b1100101) + chr(0b110110 + 0o55) + '\x6f' + chr(100) + chr(0b111 + 0o136))(chr(117) + '\x74' + chr(241 - 139) + '\055' + chr(56)), kJDRfRhcZHjS)
j1_eR7aRhKil = kJDRfRhcZHjS.model_prefix
if j1_eR7aRhKil is not None:
j1_eR7aRhKil += xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e\xff\xa6'), '\x64' + '\x65' + chr(99) + '\157' + chr(100) + chr(9571 - 9470))('\x75' + chr(0b1101001 + 0o13) + chr(6655 - 6553) + chr(236 - 191) + chr(56)) % oG9AO0uxBJ0V.rank
QU8xb3sWBtW9 = {}
if xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xb5\xa3\x83\x06\x1e\x8c\xf4\xdf*'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(11745 - 11628) + '\x74' + chr(0b1010101 + 0o21) + '\055' + chr(2634 - 2578))) is not None:
assert j1_eR7aRhKil is not None
J8N_NsgU9OIv = CIVheOt0RKQX.model.FeedForward.mxtdQMeiwJZJ(j1_eR7aRhKil, kJDRfRhcZHjS.load_epoch)
QU8xb3sWBtW9 = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xa8\xa5\xb8)\x1a\x8e\xfa\xd11'), chr(0b1100100) + chr(5909 - 5808) + chr(9349 - 9250) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(4439 - 4337) + chr(0b101101) + '\x38'): J8N_NsgU9OIv.arg_params, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xaf\xba\xb8)\x1a\x8e\xfa\xd11'), '\144' + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(1959 - 1858))(chr(0b1011010 + 0o33) + chr(116) + '\146' + chr(45) + chr(56)): J8N_NsgU9OIv.aux_params, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\xbf\xa5\x8e7$\x99\xeb\xd3!j'), chr(804 - 704) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1010000 + 0o24) + chr(8785 - 8684))('\x75' + chr(116) + chr(937 - 835) + chr(0b100101 + 0o10) + chr(56)): kJDRfRhcZHjS.load_epoch}
cXOAjI_U94RC = kJDRfRhcZHjS.save_model_prefix
if cXOAjI_U94RC is None:
cXOAjI_U94RC = j1_eR7aRhKil
DNoMzyusA3wb = None if cXOAjI_U94RC is None else CIVheOt0RKQX.callback.do_checkpoint(cXOAjI_U94RC)
(e80gRioCjdat, pQxH2D_k9sXQ) = IPJ3s4Z8ZVIA(kJDRfRhcZHjS, oG9AO0uxBJ0V)
Iwiep6s4c3AF = CIVheOt0RKQX.cpu() if kJDRfRhcZHjS.gpus is None else [CIVheOt0RKQX.gpu(ehT0Px3KOsy9(WVxHKyX45z_L)) for WVxHKyX45z_L in kJDRfRhcZHjS.gpus.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f'), chr(0b101011 + 0o71) + chr(101) + '\143' + '\157' + '\144' + chr(0b1100101))('\x75' + chr(0b101110 + 0o106) + chr(8590 - 8488) + chr(45) + '\070'))]
HvqNT9KgojM6 = kJDRfRhcZHjS.num_examples / kJDRfRhcZHjS.ix9dZyeAmUxY
if xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8\xac\x9d\x94-\x14\x8e\xfe'), chr(100) + chr(4496 - 4395) + chr(0b1100011) + '\x6f' + chr(0b111100 + 0o50) + '\145')(chr(117) + chr(0b101001 + 0o113) + chr(7578 - 7476) + chr(1797 - 1752) + '\x38')) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\xb3\xb1\x93\x06\x08\x85\xf5\xdf'), '\x64' + '\145' + chr(0b11111 + 0o104) + '\x6f' + '\x64' + chr(1001 - 900))(chr(12048 - 11931) + chr(0b1110100) + chr(0b10001 + 0o125) + chr(0b110 + 0o47) + chr(56)):
HvqNT9KgojM6 /= oG9AO0uxBJ0V.c1aWEsj_NmYg
QU8xb3sWBtW9[xafqLlk3kkUe(SXOLrMavuUCe(b"\xc6\xaa\xad\x841$\x8f\xf2\xc6'"), chr(0b110010 + 0o62) + chr(0b101 + 0o140) + chr(99) + chr(6413 - 6302) + chr(100) + chr(101))(chr(0b111001 + 0o74) + chr(116) + chr(9280 - 9178) + chr(0b101101) + '\x38')] = HvqNT9KgojM6
if xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xa8\x9d\x818\x18\x88\xf4\xce'), chr(8656 - 8556) + chr(101) + '\x63' + '\x6f' + chr(100) + chr(101))(chr(0b1100110 + 0o17) + '\164' + chr(8072 - 7970) + chr(45) + '\070') in kJDRfRhcZHjS and xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xa8\x9d\x818\x18\x88\xf4\xce'), chr(0b110001 + 0o63) + chr(0b1011101 + 0o10) + chr(99) + chr(3556 - 3445) + chr(0b1100010 + 0o2) + '\x65')(chr(416 - 299) + chr(0b10 + 0o162) + chr(0b1011000 + 0o16) + chr(0b101101) + chr(1276 - 1220))) < ehT0Px3KOsy9(chr(0b110000) + chr(11041 - 10930) + '\061', 0b1000):
QU8xb3sWBtW9[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xa8\x9d\x94:\x13\x99\xff\xc9.g\x83'), chr(100) + '\145' + chr(3666 - 3567) + chr(111) + chr(100) + chr(0b11101 + 0o110))('\x75' + '\164' + chr(3282 - 3180) + chr(45) + chr(2018 - 1962))] = CIVheOt0RKQX.lr_scheduler.FactorScheduler(step=tsdjvlgh9gDP(ehT0Px3KOsy9(HvqNT9KgojM6 * kJDRfRhcZHjS.lr_factor_epoch), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + '\x31', 8)), factor=kJDRfRhcZHjS.lr_factor)
if xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xb6\xab\x97\x06\x1c\x8e\xfa\xd8+g\x9f\xea'), chr(0b1100100) + chr(8504 - 8403) + chr(0b1100011) + chr(0b1101110 + 0o1) + '\144' + '\x65')(chr(117) + '\x74' + '\146' + chr(45) + chr(56)) in kJDRfRhcZHjS and xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xb6\xab\x97\x06\x1c\x8e\xfa\xd8+g\x9f\xea'), chr(0b101111 + 0o65) + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(6644 - 6543))(chr(10676 - 10559) + '\x74' + '\x66' + chr(45) + '\x38')) is not None:
QU8xb3sWBtW9[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\xb6\xab\x97\x06\x1c\x8e\xfa\xd8+g\x9f\xea'), chr(0b1100100) + chr(0b1100101) + chr(196 - 97) + '\157' + chr(0b1100100) + chr(8496 - 8395))('\x75' + chr(116) + chr(0b110101 + 0o61) + '\x2d' + '\070')] = kJDRfRhcZHjS.clip_gradient
if xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xb5\xa1\x865'), chr(0b101110 + 0o66) + chr(0b100101 + 0o100) + chr(99) + '\x6f' + '\144' + chr(0b110010 + 0o63))('\x75' + chr(116) + chr(0b1100110) + chr(211 - 166) + chr(0b10010 + 0o46)) in xafqLlk3kkUe(oG9AO0uxBJ0V, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xb7\x93\x8a \x1e\xab\xd9\xd1\x17r\x87'), '\x64' + chr(0b1001110 + 0o27) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')('\x75' + chr(0b1010101 + 0o37) + chr(5916 - 5814) + chr(0b101101) + chr(0b111000))) and (xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc4\xaa\xb7\x94'), chr(100) + chr(614 - 513) + chr(99) + chr(0b101001 + 0o106) + chr(0b110101 + 0o57) + chr(3365 - 3264))(chr(117) + chr(0b1110100) + '\146' + '\055' + '\070')) is None or c2A0yzQpDQB3(xafqLlk3kkUe(kJDRfRhcZHjS.gpus, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xaa\xae\x8e-'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(0b100 + 0o161) + chr(0b1110100) + '\146' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f'), chr(0b1100100) + chr(0b111110 + 0o47) + chr(0b110111 + 0o54) + '\x6f' + chr(0b1100100) + chr(7659 - 7558))('\x75' + chr(116) + chr(102) + chr(0b101101) + '\x38'))) is ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + '\061', 8)):
oG9AO0uxBJ0V = None
JHJR37KvkQhF = CIVheOt0RKQX.mod.Module(dg_IyTYgIdux, context=Iwiep6s4c3AF)
if gEY30c7K0x8W is None:
gEY30c7K0x8W = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xb9\xa1\x92+\x1a\x9f\xe2'), '\x64' + chr(0b1100101) + chr(587 - 488) + chr(0b1001101 + 0o42) + chr(648 - 548) + chr(2457 - 2356))(chr(117) + chr(0b11111 + 0o125) + chr(0b1000000 + 0o46) + chr(45) + chr(56))]
for LQLM6CJZRTKz in [ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b111100 + 0o63) + '\x31' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(281 - 229), ord("\x08"))]:
xafqLlk3kkUe(gEY30c7K0x8W, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xaa\xb2\x827\x1f'), chr(0b1100100) + '\x65' + chr(0b1001110 + 0o25) + chr(4348 - 4237) + '\x64' + '\145')(chr(12948 - 12831) + chr(0b1110100) + chr(5557 - 5455) + '\055' + '\070'))(xafqLlk3kkUe(CIVheOt0RKQX.metric, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9\x82\xaf\xdf10\x8c\xd2\x8a o\xbd'), chr(0b1100100) + chr(2711 - 2610) + '\x63' + '\157' + chr(0b1100100) + chr(101))(chr(0b1100010 + 0o23) + chr(0b1110100) + chr(7630 - 7528) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xb5\xb2\xb82$\x9d\xf8\xdf7p\x90\xfd<'), '\x64' + '\145' + '\143' + '\x6f' + chr(3022 - 2922) + '\x65')(chr(0b1000000 + 0o65) + '\164' + chr(0b101000 + 0o76) + chr(0b10100 + 0o31) + chr(0b10011 + 0o45)), top_k=LQLM6CJZRTKz))
if W8VoATJOxM2T is not None:
if not PlSM16l2KDPD(W8VoATJOxM2T, YyaZ4tpXu4lf):
W8VoATJOxM2T = [W8VoATJOxM2T]
else:
W8VoATJOxM2T = []
xafqLlk3kkUe(W8VoATJOxM2T, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xaa\xb2\x827\x1f'), chr(100) + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(0b1011110 + 0o7))('\x75' + chr(0b1101100 + 0o10) + chr(102) + chr(45) + '\x38'))(xafqLlk3kkUe(CIVheOt0RKQX.callback, xafqLlk3kkUe(SXOLrMavuUCe(b"\xf0\xaa\xa7\x82=\x14\x91\xfe\xc8'p"), chr(5188 - 5088) + '\x65' + '\143' + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b101001 + 0o75) + chr(0b101101) + chr(0b100011 + 0o25)))(xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xa2\xfb\x83\x03\x02\x99\xda\xd1\x17z\xa8'), '\144' + chr(2250 - 2149) + chr(2535 - 2436) + chr(6632 - 6521) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b110 + 0o156) + chr(0b1100110) + chr(45) + chr(56))), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\066' + chr(0b110010), 0b1000)))
xafqLlk3kkUe(JHJR37KvkQhF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xb3\xb6'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(8052 - 7941) + '\x64' + chr(101))(chr(0b1000101 + 0o60) + chr(0b100000 + 0o124) + chr(817 - 715) + chr(0b101101) + '\070'))(train_data=e80gRioCjdat, eval_metric=gEY30c7K0x8W, eval_data=pQxH2D_k9sXQ, optimizer=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\xbd\xa6'), chr(5573 - 5473) + chr(0b1100101) + chr(0b11010 + 0o111) + chr(0b1000100 + 0o53) + chr(0b101110 + 0o66) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)), optimizer_params={xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xbf\xa3\x957\x12\x92\xfc\xe30c\x85\xfb'), '\144' + chr(0b1100101) + chr(0b1101 + 0o126) + '\157' + chr(4940 - 4840) + chr(7942 - 7841))(chr(12146 - 12029) + '\164' + '\146' + chr(683 - 638) + chr(2032 - 1976)): xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xa0\xb1\xd2l0\xb3\xc4\xf4\td\x81'), '\x64' + '\145' + chr(0b10110 + 0o115) + '\157' + chr(0b1001000 + 0o34) + '\145')(chr(117) + chr(0b1110100) + chr(0b1010100 + 0o22) + chr(0b101101) + chr(0b111000))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xce\xb5\xaf\x827\x0f\x89\xf6'), chr(7971 - 7871) + chr(0b1011000 + 0o15) + chr(0b1100011) + chr(0b1100100 + 0o13) + chr(0b11001 + 0o113) + '\145')('\x75' + '\164' + chr(0b110000 + 0o66) + chr(0b100 + 0o51) + chr(0b111000)): 0.9, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xbe'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(1193 - 1092))(chr(9003 - 8886) + chr(5427 - 5311) + '\x66' + chr(118 - 73) + chr(0b111000)): 1e-05}, num_epoch=xafqLlk3kkUe(kJDRfRhcZHjS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xaf\xaf\xb8<\x0b\x93\xf8\xd41'), chr(0b101001 + 0o73) + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b1100101))('\165' + '\164' + '\x66' + chr(618 - 573) + chr(56))), batch_end_callback=W8VoATJOxM2T, initializer=xafqLlk3kkUe(CIVheOt0RKQX.init, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xbb\xb4\x8e<\t'), chr(0b1011101 + 0o7) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(117) + '\x74' + chr(9213 - 9111) + '\055' + '\x38'))(factor_type=xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xb4'), chr(3731 - 3631) + chr(2371 - 2270) + chr(2980 - 2881) + chr(0b1101 + 0o142) + chr(0b1100100) + chr(101))(chr(0b1011100 + 0o31) + '\164' + '\x66' + chr(0b1 + 0o54) + chr(0b111000)), magnitude=2.34), kvstore=oG9AO0uxBJ0V, epoch_end_callback=DNoMzyusA3wb, **QU8xb3sWBtW9)
|
apache/incubator-mxnet
|
example/reinforcement-learning/parallel_actor_critic/envs.py
|
Atari8080Preprocessor.preprocess
|
def preprocess(self, img):
"""
Preprocess a 210x160x3 uint8 frame into a 6400 (80x80) (1 x input_size)
float vector.
"""
# Crop, down-sample, erase background and set foreground to 1.
# See https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5
img = img[35:195]
img = img[::2, ::2, 0]
img[img == 144] = 0
img[img == 109] = 0
img[img != 0] = 1
curr = np.expand_dims(img.astype(np.float).ravel(), axis=0)
# Subtract the last preprocessed image.
diff = (curr - self.prev if self.prev is not None
else np.zeros((1, curr.shape[1])))
self.prev = curr
return diff
|
python
|
def preprocess(self, img):
"""
Preprocess a 210x160x3 uint8 frame into a 6400 (80x80) (1 x input_size)
float vector.
"""
# Crop, down-sample, erase background and set foreground to 1.
# See https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5
img = img[35:195]
img = img[::2, ::2, 0]
img[img == 144] = 0
img[img == 109] = 0
img[img != 0] = 1
curr = np.expand_dims(img.astype(np.float).ravel(), axis=0)
# Subtract the last preprocessed image.
diff = (curr - self.prev if self.prev is not None
else np.zeros((1, curr.shape[1])))
self.prev = curr
return diff
|
[
"def",
"preprocess",
"(",
"self",
",",
"img",
")",
":",
"# Crop, down-sample, erase background and set foreground to 1.",
"# See https://gist.github.com/karpathy/a4166c7fe253700972fcbc77e4ea32c5",
"img",
"=",
"img",
"[",
"35",
":",
"195",
"]",
"img",
"=",
"img",
"[",
":",
":",
"2",
",",
":",
":",
"2",
",",
"0",
"]",
"img",
"[",
"img",
"==",
"144",
"]",
"=",
"0",
"img",
"[",
"img",
"==",
"109",
"]",
"=",
"0",
"img",
"[",
"img",
"!=",
"0",
"]",
"=",
"1",
"curr",
"=",
"np",
".",
"expand_dims",
"(",
"img",
".",
"astype",
"(",
"np",
".",
"float",
")",
".",
"ravel",
"(",
")",
",",
"axis",
"=",
"0",
")",
"# Subtract the last preprocessed image.",
"diff",
"=",
"(",
"curr",
"-",
"self",
".",
"prev",
"if",
"self",
".",
"prev",
"is",
"not",
"None",
"else",
"np",
".",
"zeros",
"(",
"(",
"1",
",",
"curr",
".",
"shape",
"[",
"1",
"]",
")",
")",
")",
"self",
".",
"prev",
"=",
"curr",
"return",
"diff"
] |
Preprocess a 210x160x3 uint8 frame into a 6400 (80x80) (1 x input_size)
float vector.
|
[
"Preprocess",
"a",
"210x160x3",
"uint8",
"frame",
"into",
"a",
"6400",
"(",
"80x80",
")",
"(",
"1",
"x",
"input_size",
")",
"float",
"vector",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60e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pv,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' + chr(654 - 604) + chr(0b100110 + 0o20) + chr(0b10110 + 0o36), 18202 - 18194), ehT0Px3KOsy9(chr(1334 - 1286) + chr(4879 - 4768) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + '\061' + chr(2204 - 2150) + chr(0b10001 + 0o37), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + chr(958 - 908) + '\x37' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b10011 + 0o134) + chr(0b10110 + 0o35) + chr(0b110 + 0o54) + chr(48), 65489 - 65481), ehT0Px3KOsy9('\x30' + '\x6f' + chr(322 - 272) + chr(1762 - 1707) + '\067', 0o10), ehT0Px3KOsy9(chr(467 - 419) + chr(111) + '\x33' + chr(0b1101 + 0o47) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11111 + 0o22) + chr(824 - 775) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(711 - 663) + '\157' + chr(0b101011 + 0o6) + '\x35' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x35' + chr(0b110111), 52650 - 52642), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b10101 + 0o35) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1287 - 1239) + '\x6f' + '\061' + chr(53) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11110 + 0o25) + '\063' + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(1012 - 901) + chr(0b101000 + 0o11) + chr(50) + chr(116 - 66), 0o10), ehT0Px3KOsy9('\x30' + chr(2880 - 2769) + chr(49) + chr(2186 - 2135) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(694 - 583) + chr(49) + '\063' + '\062', 41352 - 41344), ehT0Px3KOsy9(chr(1270 - 1222) + chr(0b1101111) + chr(0b110110) + chr(0b110001), 60053 - 60045), ehT0Px3KOsy9(chr(1934 - 1886) + chr(0b1100000 + 0o17) + chr(0b110010) + chr(0b110100) + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\062' + '\065', 17750 - 17742), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b11101 + 0o32), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101011 + 0o4) + '\061' + chr(0b101000 + 0o10) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6982 - 6871) + chr(0b100010 + 0o25) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(533 - 485) + chr(0b1101111) + chr(316 - 265) + '\x30' + '\063', 0b1000), ehT0Px3KOsy9(chr(56 - 8) + '\157' + chr(0b110011) + chr(0b110000 + 0o6) + chr(872 - 823), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(1530 - 1480) + chr(53) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1903 - 1855) + chr(111) + '\x35' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1677 - 1629) + chr(0b1001001 + 0o46) + chr(50) + chr(1525 - 1475) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(195 - 147) + chr(111) + chr(0b101000 + 0o12) + '\061' + '\063', 0b1000), ehT0Px3KOsy9(chr(1098 - 1050) + chr(111) + chr(50) + chr(0b10111 + 0o36) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1039 - 991) + chr(1514 - 1403) + chr(279 - 230) + '\x37' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1622 - 1511) + chr(0b10111 + 0o32) + '\x35' + '\x35', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100010 + 0o20) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110111) + chr(401 - 349), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b111 + 0o52) + chr(48), 50053 - 50045), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b101001 + 0o15) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(2306 - 2253) + chr(50), 5572 - 5564), ehT0Px3KOsy9(chr(48) + chr(0b100001 + 0o116) + '\x32' + chr(0b10000 + 0o47) + chr(0b110010 + 0o0), 31848 - 31840), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1000 + 0o53) + chr(631 - 581) + '\x35', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(1635 - 1587), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a'), chr(0b1100100) + chr(0b1100 + 0o131) + chr(0b1100001 + 0o2) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(8106 - 7990) + chr(0b110001 + 0o65) + chr(1972 - 1927) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def n8IJXbSueTJV(oVre8I6UXc3b, s63jeLEbd8fs):
s63jeLEbd8fs = s63jeLEbd8fs[ehT0Px3KOsy9('\x30' + '\157' + chr(1092 - 1040) + '\063', 0b1000):ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(8822 - 8711) + '\063' + chr(48) + chr(0b110011), 8)]
s63jeLEbd8fs = s63jeLEbd8fs[::ehT0Px3KOsy9(chr(102 - 54) + chr(0b1101111) + '\x32', 61074 - 61066), ::ehT0Px3KOsy9('\x30' + '\x6f' + chr(50), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1011 + 0o45), 0o10)]
s63jeLEbd8fs[s63jeLEbd8fs == ehT0Px3KOsy9(chr(1506 - 1458) + '\x6f' + chr(50) + chr(50) + chr(0b110000), 45566 - 45558)] = ehT0Px3KOsy9('\060' + chr(0b110111 + 0o70) + chr(0b100110 + 0o12), 8)
s63jeLEbd8fs[s63jeLEbd8fs == ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\065' + '\x35', 8)] = ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(0b110000), 8)
s63jeLEbd8fs[s63jeLEbd8fs != ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b10110 + 0o131) + '\060', 8)] = ehT0Px3KOsy9('\060' + chr(497 - 386) + chr(948 - 899), 0b1000)
wzMxSx3DfFia = WqUC3KWvYVup.expand_dims(s63jeLEbd8fs.astype(WqUC3KWvYVup.float)._z3oWn7GMFaN(), axis=ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 8))
A3JtwFGKVTf0 = wzMxSx3DfFia - oVre8I6UXc3b.prev if oVre8I6UXc3b.prev is not None else WqUC3KWvYVup.zeros((ehT0Px3KOsy9(chr(0b110000) + chr(2264 - 2153) + chr(2208 - 2159), 8), wzMxSx3DfFia.nauYfLglTpcb[ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 8)]))
oVre8I6UXc3b.RIir6MzmTiCT = wzMxSx3DfFia
return A3JtwFGKVTf0
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_new_empty_handle
|
def _new_empty_handle():
"""Returns a new empty handle.
Empty handle can be used to hold a result.
Returns
-------
handle
A new empty `NDArray` handle.
"""
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayCreateNone(ctypes.byref(hdl)))
return hdl
|
python
|
def _new_empty_handle():
"""Returns a new empty handle.
Empty handle can be used to hold a result.
Returns
-------
handle
A new empty `NDArray` handle.
"""
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayCreateNone(ctypes.byref(hdl)))
return hdl
|
[
"def",
"_new_empty_handle",
"(",
")",
":",
"hdl",
"=",
"NDArrayHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayCreateNone",
"(",
"ctypes",
".",
"byref",
"(",
"hdl",
")",
")",
")",
"return",
"hdl"
] |
Returns a new empty handle.
Empty handle can be used to hold a result.
Returns
-------
handle
A new empty `NDArray` handle.
|
[
"Returns",
"a",
"new",
"empty",
"handle",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L107-L119
|
train
|
Returns a new empty handle.
|
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,G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mS9durw_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(0b1010 + 0o145) + chr(0b110010) + chr(0b1110 + 0o46), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + chr(0b110011) + chr(1163 - 1111) + chr(0b11100 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1111 + 0o140) + '\062' + chr(0b110000) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(0b110011) + '\x36' + chr(51), 49679 - 49671), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + '\x31' + '\x31' + chr(50), 8688 - 8680), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\063' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b101011 + 0o11) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + '\x34' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b11100 + 0o123) + '\x32' + '\x35' + chr(0b110001), 58268 - 58260), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(50) + '\063', 62177 - 62169), ehT0Px3KOsy9(chr(352 - 304) + '\157' + chr(0b1111 + 0o43) + '\x32' + chr(1899 - 1846), 40253 - 40245), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(0b11100 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(1193 - 1145) + chr(0b1001111 + 0o40) + '\063' + chr(0b110111) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(519 - 471) + '\157' + chr(0b110010) + '\064' + '\065', 63654 - 63646), ehT0Px3KOsy9(chr(1761 - 1713) + chr(111) + chr(0b110010 + 0o1) + chr(642 - 589) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2101 - 1990) + chr(965 - 912) + chr(1475 - 1425), 43170 - 43162), ehT0Px3KOsy9(chr(48) + chr(5182 - 5071) + chr(50) + chr(51) + chr(49), 19719 - 19711), ehT0Px3KOsy9(chr(153 - 105) + '\x6f' + '\061' + chr(52) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(269 - 158) + chr(0b110111) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110010) + chr(0b100111 + 0o16) + chr(0b110100), 36815 - 36807), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(619 - 569), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(488 - 437) + chr(0b10 + 0o60) + chr(1013 - 963), 44175 - 44167), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + '\x33' + chr(0b101011 + 0o12) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(1131 - 1080) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b110011) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(696 - 645) + chr(2125 - 2076) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x31' + '\066' + chr(317 - 267), 0b1000), ehT0Px3KOsy9('\x30' + chr(7703 - 7592) + chr(0b11101 + 0o25) + chr(0b110110) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b0 + 0o60) + chr(0b110100), 57976 - 57968), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b110110) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2421 - 2370) + chr(1517 - 1466) + chr(838 - 784), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + '\x31' + chr(1688 - 1634) + chr(0b1010 + 0o50), 8), ehT0Px3KOsy9(chr(1182 - 1134) + chr(111) + chr(0b100000 + 0o23) + '\x32' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1048 - 1000) + chr(0b1101111) + '\061' + chr(53) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(516 - 464) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1103 - 1054) + '\063' + '\063', 35168 - 35160), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1100101 + 0o12) + chr(0b110001) + chr(0b0 + 0o63) + chr(0b110001), 8), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + chr(0b110010) + chr(0b110000) + chr(2923 - 2868), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(1232 - 1183) + chr(2032 - 1983), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(55) + '\064', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101) + '\060', 11209 - 11201)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b':'), '\144' + chr(0b1100101) + chr(99) + chr(8957 - 8846) + '\x64' + chr(9942 - 9841))(chr(0b1000110 + 0o57) + chr(0b1110100) + chr(9104 - 9002) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def MlIogZPOb_GR():
WYHuLDJkKIZM = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb9\xcb\xb7\x0b\xac\xd6C\xd0\x90\xe7P\x98\xd1\x89d\xf6\nZ'), '\x64' + chr(1564 - 1463) + chr(99) + chr(0b1010011 + 0o34) + '\144' + chr(1625 - 1524))(chr(0b1110101) + chr(11129 - 11013) + chr(0b1010001 + 0o25) + chr(45) + '\x38'))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'v\x98\xf7\x96,'), chr(100) + chr(0b1100101) + chr(4155 - 4056) + '\157' + '\144' + chr(0b111111 + 0o46))(chr(0b1110101) + chr(116) + chr(102) + chr(0b1101 + 0o40) + chr(942 - 886)))(WYHuLDJkKIZM)))
return WYHuLDJkKIZM
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_new_alloc_handle
|
def _new_alloc_handle(shape, ctx, delay_alloc, dtype=mx_real_t):
"""Return a new handle with specified shape and context.
Empty handle is only used to hold results.
Returns
-------
handle
A new empty `NDArray` handle.
"""
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayCreateEx(
c_array_buf(mx_uint, native_array('I', shape)),
mx_uint(len(shape)),
ctypes.c_int(ctx.device_typeid),
ctypes.c_int(ctx.device_id),
ctypes.c_int(int(delay_alloc)),
ctypes.c_int(int(_DTYPE_NP_TO_MX[np.dtype(dtype).type])),
ctypes.byref(hdl)))
return hdl
|
python
|
def _new_alloc_handle(shape, ctx, delay_alloc, dtype=mx_real_t):
"""Return a new handle with specified shape and context.
Empty handle is only used to hold results.
Returns
-------
handle
A new empty `NDArray` handle.
"""
hdl = NDArrayHandle()
check_call(_LIB.MXNDArrayCreateEx(
c_array_buf(mx_uint, native_array('I', shape)),
mx_uint(len(shape)),
ctypes.c_int(ctx.device_typeid),
ctypes.c_int(ctx.device_id),
ctypes.c_int(int(delay_alloc)),
ctypes.c_int(int(_DTYPE_NP_TO_MX[np.dtype(dtype).type])),
ctypes.byref(hdl)))
return hdl
|
[
"def",
"_new_alloc_handle",
"(",
"shape",
",",
"ctx",
",",
"delay_alloc",
",",
"dtype",
"=",
"mx_real_t",
")",
":",
"hdl",
"=",
"NDArrayHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayCreateEx",
"(",
"c_array_buf",
"(",
"mx_uint",
",",
"native_array",
"(",
"'I'",
",",
"shape",
")",
")",
",",
"mx_uint",
"(",
"len",
"(",
"shape",
")",
")",
",",
"ctypes",
".",
"c_int",
"(",
"ctx",
".",
"device_typeid",
")",
",",
"ctypes",
".",
"c_int",
"(",
"ctx",
".",
"device_id",
")",
",",
"ctypes",
".",
"c_int",
"(",
"int",
"(",
"delay_alloc",
")",
")",
",",
"ctypes",
".",
"c_int",
"(",
"int",
"(",
"_DTYPE_NP_TO_MX",
"[",
"np",
".",
"dtype",
"(",
"dtype",
")",
".",
"type",
"]",
")",
")",
",",
"ctypes",
".",
"byref",
"(",
"hdl",
")",
")",
")",
"return",
"hdl"
] |
Return a new handle with specified shape and context.
Empty handle is only used to hold results.
Returns
-------
handle
A new empty `NDArray` handle.
|
[
"Return",
"a",
"new",
"handle",
"with",
"specified",
"shape",
"and",
"context",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L122-L141
|
train
|
Return a new handle with specified shape and context.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,Om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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' + chr(2249 - 2198) + chr(0b101001 + 0o10) + chr(278 - 225), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b11101 + 0o23) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b11110 + 0o23) + '\062', 2305 - 2297), ehT0Px3KOsy9('\x30' + chr(3832 - 3721) + chr(0b100000 + 0o23) + '\066' + chr(54), 0b1000), ehT0Px3KOsy9(chr(2187 - 2139) + chr(0b1101111) + '\x32' + chr(0b110111) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100101 + 0o16) + chr(0b11010 + 0o26) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(421 - 310) + '\063' + '\x34' + chr(0b110011 + 0o1), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + chr(1936 - 1885) + chr(54) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(972 - 922) + chr(1784 - 1733) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b11100 + 0o123) + '\x32' + '\x33' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b110000) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1000010 + 0o55) + chr(50) + chr(0b110011) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(48) + chr(0b110 + 0o61), 22113 - 22105), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(55) + chr(458 - 403), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b10010 + 0o40) + chr(1910 - 1862) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3747 - 3636) + chr(0b110011) + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + chr(0b110010 + 0o1) + chr(0b1000 + 0o52) + chr(0b110001), 26224 - 26216), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100101 + 0o22) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b11011 + 0o30), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + '\x33' + '\x30' + '\x32', 8), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\x31' + chr(0b110010 + 0o0) + '\x34', 31910 - 31902), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101001 + 0o12) + chr(49) + chr(0b0 + 0o62), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(330 - 280) + chr(0b100000 + 0o27), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111100 + 0o63) + chr(51) + chr(0b101101 + 0o5) + chr(52), 303 - 295), ehT0Px3KOsy9('\x30' + chr(10132 - 10021) + chr(1339 - 1290) + '\x37' + '\062', 53495 - 53487), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(50) + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1882 - 1771) + '\067' + '\x34', 65357 - 65349), ehT0Px3KOsy9(chr(0b110000) + chr(4195 - 4084) + '\x31' + chr(0b110011) + chr(2791 - 2738), 2268 - 2260), ehT0Px3KOsy9('\060' + chr(690 - 579) + '\062' + chr(0b10101 + 0o36) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110000) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b100011 + 0o23) + chr(0b110011), 7099 - 7091), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(1434 - 1385) + chr(52) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + chr(50) + chr(0b100000 + 0o25) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100011 + 0o114) + '\063' + '\060' + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110111) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(681 - 631) + chr(49) + chr(0b100111 + 0o15), 62533 - 62525), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(10879 - 10768) + chr(49) + chr(264 - 209) + chr(50), 8), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110111) + chr(0b11000 + 0o32), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b101 + 0o56) + '\x35', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3'), chr(3174 - 3074) + '\145' + chr(0b101011 + 0o70) + chr(0b1101011 + 0o4) + chr(0b1100100) + chr(0b101 + 0o140))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def dH4mZSHhFjwi(nauYfLglTpcb, oM3jLo753XfX, WpBcPNh7jYMU, jSV9IKnemH7K=JsaW5JBGnibT):
WYHuLDJkKIZM = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\x98\x84\xb2\xfc\xb0\x96\x91\xe2\xdc\xf1\xf8\xa6K\xe0\xb8\xa9'), '\144' + chr(8862 - 8761) + '\143' + chr(0b1101011 + 0o4) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(102) + chr(0b10 + 0o53) + chr(0b111000)))(IWgIBOZX5BKJ(RSEUJ_H3k51M, S6rE7xUBQu5J(xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), '\144' + chr(101) + chr(0b1100011) + chr(0b11011 + 0o124) + chr(2051 - 1951) + chr(101))(chr(0b1100011 + 0o22) + chr(116) + chr(0b110010 + 0o64) + chr(0b101101) + chr(0b111000)), nauYfLglTpcb)), RSEUJ_H3k51M(c2A0yzQpDQB3(nauYfLglTpcb)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\x9f\xa3\x98\xc9'), chr(0b1100001 + 0o3) + '\x65' + chr(9118 - 9019) + '\x6f' + '\x64' + chr(0b1100000 + 0o5))(chr(0b1011011 + 0o32) + '\x74' + chr(0b1000011 + 0o43) + chr(45) + chr(56)))(xafqLlk3kkUe(oM3jLo753XfX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xa5\xbc\x9f\xde\xa7\xbb\x84\xe2\xef\xe6\xf4\xa3'), chr(0b1011011 + 0o11) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(6584 - 6483))(chr(0b10001 + 0o144) + chr(10984 - 10868) + '\x66' + chr(299 - 254) + '\070'))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\x9f\xa3\x98\xc9'), '\x64' + '\145' + chr(6503 - 6404) + '\x6f' + '\144' + chr(5638 - 5537))(chr(117) + chr(116) + chr(0b1010011 + 0o23) + chr(0b101101) + chr(939 - 883)))(xafqLlk3kkUe(oM3jLo753XfX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xa5\xbc\x9f\xde\xa7\xbb\x99\xff'), chr(0b100011 + 0o101) + chr(9215 - 9114) + '\x63' + chr(299 - 188) + chr(0b1100100) + chr(530 - 429))('\x75' + chr(116) + '\x66' + chr(1547 - 1502) + chr(56)))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\x9f\xa3\x98\xc9'), '\x64' + '\145' + chr(99) + '\157' + chr(100) + chr(7226 - 7125))(chr(0b1110101) + chr(0b1100100 + 0o20) + chr(0b101011 + 0o73) + chr(0b101101) + chr(0b111000)))(ehT0Px3KOsy9(WpBcPNh7jYMU)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\x9f\xa3\x98\xc9'), chr(8624 - 8524) + chr(2132 - 2031) + chr(7915 - 7816) + chr(0b1101111) + chr(0b1010000 + 0o24) + chr(101))('\x75' + '\164' + chr(1918 - 1816) + chr(0b101101) + chr(0b111000)))(ehT0Px3KOsy9(DX1GNb5Mermf[xafqLlk3kkUe(WqUC3KWvYVup.dtype(jSV9IKnemH7K), xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xad\x9b\x9b\xc4\xa7\xb3\xb2\xf6\xca\xf3\xeb'), '\x64' + chr(0b10010 + 0o123) + chr(0b100 + 0o137) + '\x6f' + '\144' + chr(0b100100 + 0o101))('\165' + '\x74' + chr(102) + chr(0b11111 + 0o16) + chr(0b111000)))])), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf\xb9\xb8\x93\xdb'), '\144' + '\145' + chr(2402 - 2303) + '\x6f' + chr(100) + '\x65')(chr(286 - 169) + chr(10373 - 10257) + chr(7790 - 7688) + chr(0b11001 + 0o24) + chr(0b111000)))(WYHuLDJkKIZM)))
return WYHuLDJkKIZM
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_get_indexing_dispatch_code
|
def _get_indexing_dispatch_code(key):
"""Returns a dispatch code for calling basic or advanced indexing functions."""
if isinstance(key, (NDArray, np.ndarray)):
return _NDARRAY_ADVANCED_INDEXING
elif isinstance(key, list):
# TODO(junwu): Add support for nested lists besides integer list
for i in key:
if not isinstance(i, integer_types):
raise TypeError('Indexing NDArray only supports a list of integers as index'
' when key is of list type, received element=%s of type=%s'
% (str(i), str(type(i))))
return _NDARRAY_ADVANCED_INDEXING
elif isinstance(key, (integer_types, py_slice)):
return _NDARRAY_BASIC_INDEXING
elif isinstance(key, tuple):
for idx in key:
if isinstance(idx, (NDArray, np.ndarray, list, tuple)):
return _NDARRAY_ADVANCED_INDEXING
elif not isinstance(idx, (py_slice, integer_types)):
raise ValueError("NDArray does not support slicing with key %s of type %s."
% (str(idx), str(type(idx))))
return _NDARRAY_BASIC_INDEXING
else:
return _NDARRAY_UNSUPPORTED_INDEXING
|
python
|
def _get_indexing_dispatch_code(key):
"""Returns a dispatch code for calling basic or advanced indexing functions."""
if isinstance(key, (NDArray, np.ndarray)):
return _NDARRAY_ADVANCED_INDEXING
elif isinstance(key, list):
# TODO(junwu): Add support for nested lists besides integer list
for i in key:
if not isinstance(i, integer_types):
raise TypeError('Indexing NDArray only supports a list of integers as index'
' when key is of list type, received element=%s of type=%s'
% (str(i), str(type(i))))
return _NDARRAY_ADVANCED_INDEXING
elif isinstance(key, (integer_types, py_slice)):
return _NDARRAY_BASIC_INDEXING
elif isinstance(key, tuple):
for idx in key:
if isinstance(idx, (NDArray, np.ndarray, list, tuple)):
return _NDARRAY_ADVANCED_INDEXING
elif not isinstance(idx, (py_slice, integer_types)):
raise ValueError("NDArray does not support slicing with key %s of type %s."
% (str(idx), str(type(idx))))
return _NDARRAY_BASIC_INDEXING
else:
return _NDARRAY_UNSUPPORTED_INDEXING
|
[
"def",
"_get_indexing_dispatch_code",
"(",
"key",
")",
":",
"if",
"isinstance",
"(",
"key",
",",
"(",
"NDArray",
",",
"np",
".",
"ndarray",
")",
")",
":",
"return",
"_NDARRAY_ADVANCED_INDEXING",
"elif",
"isinstance",
"(",
"key",
",",
"list",
")",
":",
"# TODO(junwu): Add support for nested lists besides integer list",
"for",
"i",
"in",
"key",
":",
"if",
"not",
"isinstance",
"(",
"i",
",",
"integer_types",
")",
":",
"raise",
"TypeError",
"(",
"'Indexing NDArray only supports a list of integers as index'",
"' when key is of list type, received element=%s of type=%s'",
"%",
"(",
"str",
"(",
"i",
")",
",",
"str",
"(",
"type",
"(",
"i",
")",
")",
")",
")",
"return",
"_NDARRAY_ADVANCED_INDEXING",
"elif",
"isinstance",
"(",
"key",
",",
"(",
"integer_types",
",",
"py_slice",
")",
")",
":",
"return",
"_NDARRAY_BASIC_INDEXING",
"elif",
"isinstance",
"(",
"key",
",",
"tuple",
")",
":",
"for",
"idx",
"in",
"key",
":",
"if",
"isinstance",
"(",
"idx",
",",
"(",
"NDArray",
",",
"np",
".",
"ndarray",
",",
"list",
",",
"tuple",
")",
")",
":",
"return",
"_NDARRAY_ADVANCED_INDEXING",
"elif",
"not",
"isinstance",
"(",
"idx",
",",
"(",
"py_slice",
",",
"integer_types",
")",
")",
":",
"raise",
"ValueError",
"(",
"\"NDArray does not support slicing with key %s of type %s.\"",
"%",
"(",
"str",
"(",
"idx",
")",
",",
"str",
"(",
"type",
"(",
"idx",
")",
")",
")",
")",
"return",
"_NDARRAY_BASIC_INDEXING",
"else",
":",
"return",
"_NDARRAY_UNSUPPORTED_INDEXING"
] |
Returns a dispatch code for calling basic or advanced indexing functions.
|
[
"Returns",
"a",
"dispatch",
"code",
"for",
"calling",
"basic",
"or",
"advanced",
"indexing",
"functions",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2278-L2301
|
train
|
Returns a dispatch code for calling basic or advanced indexing functions.
|
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,DXjfarvgF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Ue,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(0b110010) + chr(50) + chr(101 - 48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + '\061' + chr(0b101 + 0o62), 51293 - 51285), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(2363 - 2311) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b1101 + 0o51) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1100010 + 0o15) + chr(0b110011) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1992 - 1944) + '\x6f' + chr(0b110011) + '\066' + chr(151 - 100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(773 - 722) + chr(0b10110 + 0o32) + chr(0b110110), 46859 - 46851), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(551 - 502) + chr(49), 0o10), ehT0Px3KOsy9(chr(564 - 516) + '\157' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(48) + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1795 - 1746) + '\062' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + '\060' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + '\061' + chr(0b1101 + 0o50) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x37' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b1 + 0o60), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(758 - 708) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\x32' + chr(0b110111) + chr(0b110110), 51691 - 51683), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + '\x33' + chr(1392 - 1339) + chr(2750 - 2697), ord("\x08")), ehT0Px3KOsy9(chr(251 - 203) + '\157' + chr(871 - 818) + chr(1731 - 1678), 0b1000), ehT0Px3KOsy9('\060' + chr(7549 - 7438) + chr(54) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1356 - 1306) + chr(680 - 630) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1228 - 1180) + chr(8514 - 8403) + '\062' + '\x33' + chr(1434 - 1379), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(51) + chr(48) + chr(0b11101 + 0o27), 0o10), ehT0Px3KOsy9(chr(1062 - 1014) + chr(10909 - 10798) + chr(0b101100 + 0o5) + chr(50), 15711 - 15703), ehT0Px3KOsy9(chr(0b110000) + chr(0b10110 + 0o131) + chr(0b110010) + '\x33' + '\062', 23192 - 23184), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1632 - 1584) + chr(6933 - 6822) + '\062' + '\061' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b1010 + 0o50) + chr(51) + '\065', 58301 - 58293), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1867 - 1816) + chr(0b110110) + chr(51), 8), ehT0Px3KOsy9(chr(48) + chr(3265 - 3154) + chr(50) + chr(826 - 773) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + chr(0b110 + 0o54) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b110000 + 0o77) + chr(51) + chr(0b110101) + chr(51), 0o10), ehT0Px3KOsy9(chr(1728 - 1680) + chr(0b11110 + 0o121) + chr(1716 - 1667) + '\064' + chr(2587 - 2535), 37091 - 37083), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + '\061' + chr(0b110101) + chr(51), 10271 - 10263), ehT0Px3KOsy9('\060' + chr(1953 - 1842) + '\062' + '\065' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(238 - 190) + chr(0b1101111) + chr(52) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1008 - 958) + chr(2075 - 2022) + chr(2370 - 2316), 0b1000), ehT0Px3KOsy9(chr(246 - 198) + chr(0b1001 + 0o146) + chr(2442 - 2391) + '\060' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(2015 - 1967) + chr(111) + chr(1766 - 1717) + chr(0b100100 + 0o22) + '\067', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + chr(0b110 + 0o57) + chr(48), 1352 - 1344)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb'), chr(0b101111 + 0o65) + '\145' + '\143' + '\x6f' + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(6310 - 6208) + '\x2d' + chr(2119 - 2063)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def K0UMR9L6Y3pa(K3J4ZwSlE0sT):
if PlSM16l2KDPD(K3J4ZwSlE0sT, (GdqFjMbtKL7s, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbk\xc1\xc5k\x92\xbf'), chr(4560 - 4460) + chr(0b1000100 + 0o41) + chr(0b1100011) + chr(6285 - 6174) + '\144' + '\x65')('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(1662 - 1606))))):
return yr8Fi4_sNJXa
elif PlSM16l2KDPD(K3J4ZwSlE0sT, YyaZ4tpXu4lf):
for WVxHKyX45z_L in K3J4ZwSlE0sT:
if not PlSM16l2KDPD(WVxHKyX45z_L, GakrcjanQCW1):
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdca\xc4\xd2a\x9a\xa8n"\xcf\x14\x82\x1bJxo\x9e\x82CZ\xe8\xbf\xb7\x7f\xeav\xe0\xef\x87\xdb1H\xcb\x08\x02\xdaS\x8e\xa8\x11\xb5f\xce\xc3|\x94\xa3{q\xa11\xb0IQwr\xdb\x95\rA\xf9\xfa\xaa*\xf1c\xf6\xbd\x9a\xdb1F\x8dD\x07\xc0T\xda\xe7\x03\xec\x7f\xc5\x9b9\x81\xa3jg\xe8&\xa6\r\x18|z\xdb\x80HX\xe5\xa2\xe1y\xbai\xe9\xbd\x87\xd1aL\xd6A\x18'), chr(100) + '\145' + chr(99) + chr(111) + chr(100) + '\x65')(chr(8663 - 8546) + '\x74' + chr(5545 - 5443) + chr(0b101101) + chr(0b110101 + 0o3)) % (M8_cKLkHVB2V(WVxHKyX45z_L), M8_cKLkHVB2V(wmQmyeWBmUpv(WVxHKyX45z_L))))
return yr8Fi4_sNJXa
elif PlSM16l2KDPD(K3J4ZwSlE0sT, (GakrcjanQCW1, k9CegK7r1Mog)):
return UmKd2_GaCIaa
elif PlSM16l2KDPD(K3J4ZwSlE0sT, KNyTy8rYcwji):
for YlqusYB6InkM in K3J4ZwSlE0sT:
if PlSM16l2KDPD(YlqusYB6InkM, (GdqFjMbtKL7s, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbk\xc1\xc5k\x92\xbf'), chr(8706 - 8606) + chr(2711 - 2610) + chr(0b1100011) + chr(2219 - 2108) + chr(0b1100100) + chr(0b1100101))(chr(0b11100 + 0o131) + chr(7023 - 6907) + '\146' + chr(0b101101) + chr(56))), YyaZ4tpXu4lf, KNyTy8rYcwji)):
return yr8Fi4_sNJXa
elif not PlSM16l2KDPD(YlqusYB6InkM, (k9CegK7r1Mog, GakrcjanQCW1)):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdbK\xe1\xc5k\x92\xbf)f\xee5\xb0IVvb\x9e\x9eXF\xe1\xf0\xb6~\xbau\xe3\xf4\x90\xc1\x7fN\xcb\x13\x02\xddO\x8e\xac\x12\xec/\x85\xc49\x9c\xa0)v\xf8 \xa6I\x1dj8'), chr(0b1100100) + '\145' + chr(99) + chr(1197 - 1086) + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(1595 - 1550) + chr(0b100 + 0o64)) % (M8_cKLkHVB2V(YlqusYB6InkM), M8_cKLkHVB2V(wmQmyeWBmUpv(YlqusYB6InkM))))
return UmKd2_GaCIaa
else:
return vIJGEgHqlLrS
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_get_index_range
|
def _get_index_range(start, stop, length, step=1):
"""Given start, stop, step and array length, return
absolute values of start, stop, and step for generating index range.
The returned values have been compensated by adding length if they
are less than zero for all the cases but slice(None, None, -1).
Note that the returned value of stop is not necessarily >= 0, since
absolute stop is -1 in the case of slice(None, None, -1)."""
if step == 0:
raise ValueError('step size cannot be zero')
if length < 0:
raise ValueError('array length cannot be less than zero')
if step is None:
step = 1
if start is None:
if step > 0:
start = 0
else:
start = length - 1
elif start < 0:
start += length
if start < 0:
raise IndexError('Slicing start %d exceeds limit of %d' % (start-length, length))
elif start >= length:
raise IndexError('Slicing start %d exceeds limit of %d' % (start, length))
if stop is None:
if step > 0:
stop = length
else:
# this supports case such as ::-1
# stop = -1 here refers to the element before index 0,
# instead of the last element in the array
stop = -1
elif stop < 0:
stop += length
if stop < 0:
raise IndexError('Slicing stop %d exceeds limit of %d' % (stop-length, length))
elif stop > length:
raise IndexError('Slicing stop %d exceeds limit of %d' % (stop, length))
return start, stop, step
|
python
|
def _get_index_range(start, stop, length, step=1):
"""Given start, stop, step and array length, return
absolute values of start, stop, and step for generating index range.
The returned values have been compensated by adding length if they
are less than zero for all the cases but slice(None, None, -1).
Note that the returned value of stop is not necessarily >= 0, since
absolute stop is -1 in the case of slice(None, None, -1)."""
if step == 0:
raise ValueError('step size cannot be zero')
if length < 0:
raise ValueError('array length cannot be less than zero')
if step is None:
step = 1
if start is None:
if step > 0:
start = 0
else:
start = length - 1
elif start < 0:
start += length
if start < 0:
raise IndexError('Slicing start %d exceeds limit of %d' % (start-length, length))
elif start >= length:
raise IndexError('Slicing start %d exceeds limit of %d' % (start, length))
if stop is None:
if step > 0:
stop = length
else:
# this supports case such as ::-1
# stop = -1 here refers to the element before index 0,
# instead of the last element in the array
stop = -1
elif stop < 0:
stop += length
if stop < 0:
raise IndexError('Slicing stop %d exceeds limit of %d' % (stop-length, length))
elif stop > length:
raise IndexError('Slicing stop %d exceeds limit of %d' % (stop, length))
return start, stop, step
|
[
"def",
"_get_index_range",
"(",
"start",
",",
"stop",
",",
"length",
",",
"step",
"=",
"1",
")",
":",
"if",
"step",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"'step size cannot be zero'",
")",
"if",
"length",
"<",
"0",
":",
"raise",
"ValueError",
"(",
"'array length cannot be less than zero'",
")",
"if",
"step",
"is",
"None",
":",
"step",
"=",
"1",
"if",
"start",
"is",
"None",
":",
"if",
"step",
">",
"0",
":",
"start",
"=",
"0",
"else",
":",
"start",
"=",
"length",
"-",
"1",
"elif",
"start",
"<",
"0",
":",
"start",
"+=",
"length",
"if",
"start",
"<",
"0",
":",
"raise",
"IndexError",
"(",
"'Slicing start %d exceeds limit of %d'",
"%",
"(",
"start",
"-",
"length",
",",
"length",
")",
")",
"elif",
"start",
">=",
"length",
":",
"raise",
"IndexError",
"(",
"'Slicing start %d exceeds limit of %d'",
"%",
"(",
"start",
",",
"length",
")",
")",
"if",
"stop",
"is",
"None",
":",
"if",
"step",
">",
"0",
":",
"stop",
"=",
"length",
"else",
":",
"# this supports case such as ::-1",
"# stop = -1 here refers to the element before index 0,",
"# instead of the last element in the array",
"stop",
"=",
"-",
"1",
"elif",
"stop",
"<",
"0",
":",
"stop",
"+=",
"length",
"if",
"stop",
"<",
"0",
":",
"raise",
"IndexError",
"(",
"'Slicing stop %d exceeds limit of %d'",
"%",
"(",
"stop",
"-",
"length",
",",
"length",
")",
")",
"elif",
"stop",
">",
"length",
":",
"raise",
"IndexError",
"(",
"'Slicing stop %d exceeds limit of %d'",
"%",
"(",
"stop",
",",
"length",
")",
")",
"return",
"start",
",",
"stop",
",",
"step"
] |
Given start, stop, step and array length, return
absolute values of start, stop, and step for generating index range.
The returned values have been compensated by adding length if they
are less than zero for all the cases but slice(None, None, -1).
Note that the returned value of stop is not necessarily >= 0, since
absolute stop is -1 in the case of slice(None, None, -1).
|
[
"Given",
"start",
"stop",
"step",
"and",
"array",
"length",
"return",
"absolute",
"values",
"of",
"start",
"stop",
"and",
"step",
"for",
"generating",
"index",
"range",
".",
"The",
"returned",
"values",
"have",
"been",
"compensated",
"by",
"adding",
"length",
"if",
"they",
"are",
"less",
"than",
"zero",
"for",
"all",
"the",
"cases",
"but",
"slice",
"(",
"None",
"None",
"-",
"1",
")",
".",
"Note",
"that",
"the",
"returned",
"value",
"of",
"stop",
"is",
"not",
"necessarily",
">",
"=",
"0",
"since",
"absolute",
"stop",
"is",
"-",
"1",
"in",
"the",
"case",
"of",
"slice",
"(",
"None",
"None",
"-",
"1",
")",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2304-L2344
|
train
|
Given start stop and step and array length return absolute values of start stop and step for generating index range.
|
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,BXIwDASQ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R9h,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(0b1101 + 0o46) + chr(0b110101) + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(50) + chr(0b10000 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(1044 - 996) + chr(0b1101111) + chr(0b110010) + chr(0b110001) + chr(1881 - 1832), 50196 - 50188), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(50) + chr(748 - 699), ord("\x08")), ehT0Px3KOsy9(chr(1736 - 1688) + chr(7943 - 7832) + '\063' + chr(0b1110 + 0o44) + chr(474 - 426), 0b1000), ehT0Px3KOsy9(chr(1566 - 1518) + chr(0b1101111) + chr(0b110011) + chr(372 - 324) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b1110 + 0o47), 32601 - 32593), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1011 + 0o50) + chr(1761 - 1706) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b11100 + 0o31) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\x32' + '\062', 40196 - 40188), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011000 + 0o27) + '\x31' + chr(2486 - 2436) + chr(279 - 231), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(3971 - 3860) + chr(0b110011) + '\065' + chr(50), 55338 - 55330), ehT0Px3KOsy9(chr(48) + chr(7717 - 7606) + chr(0b110010) + chr(53) + chr(0b110100 + 0o3), 56492 - 56484), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11101 + 0o26) + '\062' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(502 - 454) + '\x6f' + '\x33' + chr(2337 - 2285) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9074 - 8963) + chr(0b110011) + chr(0b110010) + chr(0b110010), 43779 - 43771), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\x35' + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b10 + 0o57) + '\x30', 13412 - 13404), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x36' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(7529 - 7418) + chr(54), 10806 - 10798), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + chr(0b11001 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11100 + 0o123) + '\x32' + '\x31' + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(461 - 410) + '\x31' + chr(878 - 828), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + '\063', 13065 - 13057), ehT0Px3KOsy9(chr(1836 - 1788) + chr(4946 - 4835) + chr(51) + chr(0b110010) + chr(1452 - 1404), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x30' + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(1689 - 1641) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(0b110001) + chr(0b10110 + 0o40), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100010 + 0o21) + chr(0b11111 + 0o21) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(49) + chr(2239 - 2187) + chr(0b11111 + 0o23), 0o10), ehT0Px3KOsy9(chr(468 - 420) + chr(0b1000 + 0o147) + '\063' + '\064' + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(2963 - 2908) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11111 + 0o22) + '\x33' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b11101 + 0o27) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110010) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + '\067', 11634 - 11626), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x37' + chr(2480 - 2427), 13976 - 13968)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(288 - 240) + chr(111) + chr(0b110101) + chr(828 - 780), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5'), '\x64' + '\x65' + chr(99) + chr(0b111001 + 0o66) + chr(100) + chr(0b1100101))('\x75' + '\x74' + chr(1369 - 1267) + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def tB08RW78ckHp(avRbFsnfJxQj, i64wROPYXl1w, CHAOgk5VCHH_, kDuFsAhEatcU=ehT0Px3KOsy9(chr(1013 - 965) + chr(111) + '\x31', 0b1000)):
if kDuFsAhEatcU == ehT0Px3KOsy9(chr(497 - 449) + '\x6f' + '\060', 43003 - 42995):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x98\xe0\xec\xe1\xf0\xb4t\x83H\xb23\x8b\xc1\xb9\x89\xa6\xcf*m\x16|F\xffh'), '\144' + chr(101) + '\143' + chr(1575 - 1464) + chr(0b111000 + 0o54) + chr(0b1100101))(chr(0b1010001 + 0o44) + chr(0b111110 + 0o66) + chr(102) + '\x2d' + '\070'))
if CHAOgk5VCHH_ < ehT0Px3KOsy9(chr(1079 - 1031) + chr(5630 - 5519) + chr(0b110000), 8):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b"\x8a\xe6\xfb\xf0\xa9\xe7q\x9cC\xf5$\x82\x8f\xb4\x87\xbc\x81'|\x16dF\xadk\xafX\xa3\xa5\xf1f\xa6\x0c\xc5\x82>\x16:"), chr(0b1001000 + 0o34) + '\x65' + chr(0b1001100 + 0o27) + '\x6f' + '\x64' + '\145')(chr(5762 - 5645) + chr(116) + chr(7678 - 7576) + chr(45) + chr(1982 - 1926)))
if kDuFsAhEatcU is None:
kDuFsAhEatcU = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b111 + 0o52), 8)
if avRbFsnfJxQj is None:
if kDuFsAhEatcU > ehT0Px3KOsy9('\060' + '\x6f' + chr(1216 - 1168), 8):
avRbFsnfJxQj = ehT0Px3KOsy9(chr(256 - 208) + chr(111) + chr(0b110000), 8)
else:
avRbFsnfJxQj = CHAOgk5VCHH_ - ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1780 - 1731), 8)
elif avRbFsnfJxQj < ehT0Px3KOsy9(chr(1518 - 1470) + chr(0b1101111) + chr(0b110000), 8):
avRbFsnfJxQj += CHAOgk5VCHH_
if avRbFsnfJxQj < ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + '\060', 8):
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xf8\xe0\xf2\xb9\xa9z\xd9^\xe61\x98\xdb\xf7\xc3\xb6\xcf-pUcF\xe9t\xeaG\xb9\xe8\xecz\xe7\r\x83\xd8~\x00'), '\144' + '\x65' + chr(8422 - 8323) + chr(8478 - 8367) + chr(0b1100100) + '\145')('\x75' + chr(10040 - 9924) + '\146' + chr(45) + chr(0b1100 + 0o54)) % (avRbFsnfJxQj - CHAOgk5VCHH_, CHAOgk5VCHH_))
elif avRbFsnfJxQj >= CHAOgk5VCHH_:
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xf8\xe0\xf2\xb9\xa9z\xd9^\xe61\x98\xdb\xf7\xc3\xb6\xcf-pUcF\xe9t\xeaG\xb9\xe8\xecz\xe7\r\x83\xd8~\x00'), chr(2485 - 2385) + '\x65' + chr(8657 - 8558) + '\x6f' + chr(0b110001 + 0o63) + chr(0b1100101))(chr(117) + chr(116) + '\x66' + '\055' + chr(56)) % (avRbFsnfJxQj, CHAOgk5VCHH_))
if i64wROPYXl1w is None:
if kDuFsAhEatcU > ehT0Px3KOsy9(chr(500 - 452) + chr(0b100011 + 0o114) + chr(48), 8):
i64wROPYXl1w = CHAOgk5VCHH_
else:
i64wROPYXl1w = -ehT0Px3KOsy9(chr(48) + '\157' + chr(911 - 862), 8)
elif i64wROPYXl1w < ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(2016 - 1905) + chr(48), 8):
i64wROPYXl1w += CHAOgk5VCHH_
if i64wROPYXl1w < ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000), 8):
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b"\xb8\xf8\xe0\xf2\xb9\xa9z\xd9^\xe6?\x9a\x8f\xf2\x82\xf2\x8a0kScG\xfe'\xa6B\xbd\xec\xf1.\xa8\x04\xc5\xdd?"), chr(0b1100100) + chr(101) + chr(0b101111 + 0o64) + '\x6f' + '\x64' + '\x65')('\165' + chr(9127 - 9011) + '\x66' + chr(0b101101) + chr(56)) % (i64wROPYXl1w - CHAOgk5VCHH_, CHAOgk5VCHH_))
elif i64wROPYXl1w > CHAOgk5VCHH_:
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b"\xb8\xf8\xe0\xf2\xb9\xa9z\xd9^\xe6?\x9a\x8f\xf2\x82\xf2\x8a0kScG\xfe'\xa6B\xbd\xec\xf1.\xa8\x04\xc5\xdd?"), chr(7253 - 7153) + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(8374 - 8257) + chr(116) + chr(0b100101 + 0o101) + chr(45) + '\070') % (i64wROPYXl1w, CHAOgk5VCHH_))
return (avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_get_oshape_of_gather_nd_op
|
def _get_oshape_of_gather_nd_op(dshape, ishape):
"""Given data and index shapes, get the output `NDArray` shape.
This basically implements the infer shape logic of op gather_nd."""
assert len(dshape) > 0 and len(ishape) > 0
oshape = list(ishape[1:])
if ishape[0] < len(dshape):
oshape.extend(dshape[ishape[0]:])
return tuple(oshape)
|
python
|
def _get_oshape_of_gather_nd_op(dshape, ishape):
"""Given data and index shapes, get the output `NDArray` shape.
This basically implements the infer shape logic of op gather_nd."""
assert len(dshape) > 0 and len(ishape) > 0
oshape = list(ishape[1:])
if ishape[0] < len(dshape):
oshape.extend(dshape[ishape[0]:])
return tuple(oshape)
|
[
"def",
"_get_oshape_of_gather_nd_op",
"(",
"dshape",
",",
"ishape",
")",
":",
"assert",
"len",
"(",
"dshape",
")",
">",
"0",
"and",
"len",
"(",
"ishape",
")",
">",
"0",
"oshape",
"=",
"list",
"(",
"ishape",
"[",
"1",
":",
"]",
")",
"if",
"ishape",
"[",
"0",
"]",
"<",
"len",
"(",
"dshape",
")",
":",
"oshape",
".",
"extend",
"(",
"dshape",
"[",
"ishape",
"[",
"0",
"]",
":",
"]",
")",
"return",
"tuple",
"(",
"oshape",
")"
] |
Given data and index shapes, get the output `NDArray` shape.
This basically implements the infer shape logic of op gather_nd.
|
[
"Given",
"data",
"and",
"index",
"shapes",
"get",
"the",
"output",
"NDArray",
"shape",
".",
"This",
"basically",
"implements",
"the",
"infer",
"shape",
"logic",
"of",
"op",
"gather_nd",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2347-L2354
|
train
|
Given data and index shapes get the output NDArray shape.
|
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('\060' + '\x6f' + '\x37' + '\x37', 0b1000), ehT0Px3KOsy9(chr(677 - 629) + chr(0b1101111) + chr(0b110001) + '\065' + chr(792 - 741), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(52) + chr(203 - 155), ord("\x08")), ehT0Px3KOsy9(chr(1936 - 1888) + chr(111) + chr(0b101001 + 0o12) + chr(1494 - 1444) + '\061', 35257 - 35249), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\x37', 11534 - 11526), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(55) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x35' + chr(0b101010 + 0o10), 0b1000), ehT0Px3KOsy9(chr(2062 - 2014) + '\157' + chr(2389 - 2339) + chr(2690 - 2638) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100110 + 0o15) + chr(0b110011) + chr(170 - 122), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + chr(51) + chr(1483 - 1434) + chr(563 - 515), 0b1000), ehT0Px3KOsy9(chr(1491 - 1443) + '\x6f' + '\063' + chr(0b100100 + 0o20) + chr(1569 - 1516), 63516 - 63508), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\062' + chr(2231 - 2181) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(9606 - 9495) + '\063' + chr(54) + '\067', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(0b110011) + chr(1820 - 1770) + chr(52), 0b1000), ehT0Px3KOsy9(chr(2024 - 1976) + chr(0b1000110 + 0o51) + '\x31' + chr(0b11010 + 0o34) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(51) + chr(0b11110 + 0o26), 0o10), ehT0Px3KOsy9(chr(48) + chr(4421 - 4310) + chr(55) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(52) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1001 + 0o52) + chr(0b110000) + chr(51), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(1229 - 1181) + '\066', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\065' + chr(0b110110), 41636 - 41628), ehT0Px3KOsy9('\060' + '\157' + chr(0b100 + 0o55) + '\064' + chr(48), 30737 - 30729), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + '\x32', 18915 - 18907), ehT0Px3KOsy9(chr(1744 - 1696) + chr(111) + '\x33' + chr(2535 - 2484) + chr(51), 59653 - 59645), ehT0Px3KOsy9(chr(48) + '\157' + chr(2520 - 2469) + chr(0b110001 + 0o1) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(12158 - 12047) + chr(50) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b11111 + 0o120) + chr(0b100001 + 0o20) + '\062' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(1020 - 972) + chr(0b1101111) + chr(0b110010) + chr(2971 - 2916) + chr(2706 - 2651), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(250 - 202) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(48) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + '\x32' + chr(2356 - 2304) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110111) + chr(0b10110 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b111110 + 0o61) + chr(1468 - 1419) + chr(0b101010 + 0o6) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10011 + 0o134) + chr(50) + chr(1855 - 1807) + '\060', 0b1000), ehT0Px3KOsy9(chr(397 - 349) + chr(0b1101111) + '\062' + chr(0b110010 + 0o2) + chr(2439 - 2385), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(1483 - 1432) + chr(707 - 656) + '\x32', 0b1000), ehT0Px3KOsy9(chr(386 - 338) + '\x6f' + chr(0b110011) + '\064' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\x35' + '\063', 16540 - 16532)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1269 - 1221) + '\x6f' + chr(2504 - 2451) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x11'), chr(0b1100100) + chr(2894 - 2793) + chr(99) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b101000 + 0o115) + chr(0b101101 + 0o107) + chr(0b110100 + 0o62) + '\055' + chr(338 - 282)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _JcPiKbKjb1D(R_rfTCFKVzrV, uYjRY6cNIAyi):
assert c2A0yzQpDQB3(R_rfTCFKVzrV) > ehT0Px3KOsy9(chr(1254 - 1206) + chr(0b1101111) + chr(0b1011 + 0o45), 36012 - 36004) and c2A0yzQpDQB3(uYjRY6cNIAyi) > ehT0Px3KOsy9('\x30' + chr(11131 - 11020) + '\x30', 8)
_m4UjCHQFpqB = YyaZ4tpXu4lf(uYjRY6cNIAyi[ehT0Px3KOsy9(chr(48) + '\157' + '\061', 0b1000):])
if uYjRY6cNIAyi[ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 8)] < c2A0yzQpDQB3(R_rfTCFKVzrV):
xafqLlk3kkUe(_m4UjCHQFpqB, xafqLlk3kkUe(SXOLrMavuUCe(b'Z\x13T\xb4q\x99'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + '\x64' + chr(0b101100 + 0o71))(chr(117) + '\164' + chr(10227 - 10125) + chr(0b101101) + chr(56)))(R_rfTCFKVzrV[uYjRY6cNIAyi[ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(7136 - 7025) + chr(48), 8)]:])
return KNyTy8rYcwji(_m4UjCHQFpqB)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_get_dim_size
|
def _get_dim_size(start, stop, step):
"""Given start, stop, and stop, calculate the number of elements
of this slice."""
assert step != 0
if step > 0:
assert start < stop
dim_size = (stop - start - 1) // step + 1
else:
assert stop < start
dim_size = (start - stop - 1) // (-step) + 1
return dim_size
|
python
|
def _get_dim_size(start, stop, step):
"""Given start, stop, and stop, calculate the number of elements
of this slice."""
assert step != 0
if step > 0:
assert start < stop
dim_size = (stop - start - 1) // step + 1
else:
assert stop < start
dim_size = (start - stop - 1) // (-step) + 1
return dim_size
|
[
"def",
"_get_dim_size",
"(",
"start",
",",
"stop",
",",
"step",
")",
":",
"assert",
"step",
"!=",
"0",
"if",
"step",
">",
"0",
":",
"assert",
"start",
"<",
"stop",
"dim_size",
"=",
"(",
"stop",
"-",
"start",
"-",
"1",
")",
"//",
"step",
"+",
"1",
"else",
":",
"assert",
"stop",
"<",
"start",
"dim_size",
"=",
"(",
"start",
"-",
"stop",
"-",
"1",
")",
"//",
"(",
"-",
"step",
")",
"+",
"1",
"return",
"dim_size"
] |
Given start, stop, and stop, calculate the number of elements
of this slice.
|
[
"Given",
"start",
"stop",
"and",
"stop",
"calculate",
"the",
"number",
"of",
"elements",
"of",
"this",
"slice",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2357-L2367
|
train
|
Given start stop and step calculate the number of elements
of this slice.
|
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,TL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49x2An,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' + '\x31' + '\065' + chr(51), 31751 - 31743), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(5942 - 5831) + chr(0b110001) + chr(480 - 430) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1406 - 1358) + chr(0b1010 + 0o145) + chr(0b111 + 0o52) + chr(0b110111) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(1409 - 1360) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + '\062' + chr(48) + chr(0b11000 + 0o30), 46970 - 46962), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\065' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(882 - 771) + '\x33' + chr(0b11011 + 0o30) + chr(1136 - 1084), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1735 - 1686) + chr(48) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(179 - 131) + chr(0b1101111) + chr(0b110001) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1003 - 955) + chr(0b1101111) + chr(0b11000 + 0o32) + chr(0b110010) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(0b100010 + 0o17) + chr(50) + chr(1232 - 1184), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(0b11010 + 0o27) + chr(54) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + '\x31', 0b1000), ehT0Px3KOsy9(chr(2286 - 2238) + chr(0b1000001 + 0o56) + chr(0b1101 + 0o51) + '\x35', 51628 - 51620), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b11101 + 0o26) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + '\062' + chr(0b110000) + chr(0b110011), 37693 - 37685), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(0b100000 + 0o22) + chr(1670 - 1620) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + '\x32' + chr(0b110010) + chr(0b110111), 37772 - 37764), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + chr(1316 - 1265) + '\x33' + chr(0b11111 + 0o30), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(54) + chr(0b110111), 39397 - 39389), ehT0Px3KOsy9(chr(2175 - 2127) + chr(0b110011 + 0o74) + chr(0b110011) + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(1023 - 974) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(2086 - 2033) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(264 - 216) + chr(111) + chr(0b101010 + 0o10) + chr(51) + '\x37', 20076 - 20068), ehT0Px3KOsy9(chr(1009 - 961) + chr(3699 - 3588) + '\x32' + chr(0b110010) + chr(51), 57683 - 57675), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\061' + chr(0b11110 + 0o23), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x32' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\061' + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110000 + 0o77) + '\x33' + '\063' + chr(0b100011 + 0o24), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101 + 0o55) + chr(2127 - 2074) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + chr(50) + '\x34' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110110) + chr(50), 0o10), ehT0Px3KOsy9(chr(1256 - 1208) + chr(111) + chr(454 - 403) + chr(2354 - 2303) + '\062', 0b1000), ehT0Px3KOsy9(chr(1463 - 1415) + '\x6f' + chr(51) + chr(0b101010 + 0o7) + chr(0b11000 + 0o35), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110001) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1011100 + 0o23) + '\x32' + chr(52) + '\060', 8), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\067' + chr(365 - 310), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11870 - 11759) + chr(947 - 896) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + '\061' + chr(49), 8), ehT0Px3KOsy9(chr(705 - 657) + '\x6f' + chr(180 - 130) + '\061' + chr(1552 - 1499), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(0b101000 + 0o15) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'E'), chr(0b1100100) + '\x65' + chr(99) + '\x6f' + chr(3933 - 3833) + chr(0b110 + 0o137))(chr(2362 - 2245) + chr(8103 - 7987) + '\146' + '\x2d' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def KBBGBFZLgTXA(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU):
assert kDuFsAhEatcU != ehT0Px3KOsy9(chr(1764 - 1716) + chr(0b1101111) + chr(0b101 + 0o53), 62319 - 62311)
if kDuFsAhEatcU > ehT0Px3KOsy9('\x30' + '\x6f' + chr(154 - 106), 8):
assert avRbFsnfJxQj < i64wROPYXl1w
xhpEmD8ce_NZ = (i64wROPYXl1w - avRbFsnfJxQj - ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b10101 + 0o34), 16925 - 16917)) // kDuFsAhEatcU + ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1001001 + 0o46) + chr(1360 - 1311), 8)
else:
assert i64wROPYXl1w < avRbFsnfJxQj
xhpEmD8ce_NZ = (avRbFsnfJxQj - i64wROPYXl1w - ehT0Px3KOsy9(chr(165 - 117) + chr(111) + chr(49), 8)) // -kDuFsAhEatcU + ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1077 - 1028), 8)
return xhpEmD8ce_NZ
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_get_broadcast_shape
|
def _get_broadcast_shape(shape1, shape2):
"""Given two shapes that are not identical, find the shape
that both input shapes can broadcast to."""
if shape1 == shape2:
return shape1
length1 = len(shape1)
length2 = len(shape2)
if length1 > length2:
shape = list(shape1)
else:
shape = list(shape2)
i = max(length1, length2) - 1
for a, b in zip(shape1[::-1], shape2[::-1]):
if a != 1 and b != 1 and a != b:
raise ValueError('shape1=%s is not broadcastable to shape2=%s' % (shape1, shape2))
shape[i] = max(a, b)
i -= 1
return tuple(shape)
|
python
|
def _get_broadcast_shape(shape1, shape2):
"""Given two shapes that are not identical, find the shape
that both input shapes can broadcast to."""
if shape1 == shape2:
return shape1
length1 = len(shape1)
length2 = len(shape2)
if length1 > length2:
shape = list(shape1)
else:
shape = list(shape2)
i = max(length1, length2) - 1
for a, b in zip(shape1[::-1], shape2[::-1]):
if a != 1 and b != 1 and a != b:
raise ValueError('shape1=%s is not broadcastable to shape2=%s' % (shape1, shape2))
shape[i] = max(a, b)
i -= 1
return tuple(shape)
|
[
"def",
"_get_broadcast_shape",
"(",
"shape1",
",",
"shape2",
")",
":",
"if",
"shape1",
"==",
"shape2",
":",
"return",
"shape1",
"length1",
"=",
"len",
"(",
"shape1",
")",
"length2",
"=",
"len",
"(",
"shape2",
")",
"if",
"length1",
">",
"length2",
":",
"shape",
"=",
"list",
"(",
"shape1",
")",
"else",
":",
"shape",
"=",
"list",
"(",
"shape2",
")",
"i",
"=",
"max",
"(",
"length1",
",",
"length2",
")",
"-",
"1",
"for",
"a",
",",
"b",
"in",
"zip",
"(",
"shape1",
"[",
":",
":",
"-",
"1",
"]",
",",
"shape2",
"[",
":",
":",
"-",
"1",
"]",
")",
":",
"if",
"a",
"!=",
"1",
"and",
"b",
"!=",
"1",
"and",
"a",
"!=",
"b",
":",
"raise",
"ValueError",
"(",
"'shape1=%s is not broadcastable to shape2=%s'",
"%",
"(",
"shape1",
",",
"shape2",
")",
")",
"shape",
"[",
"i",
"]",
"=",
"max",
"(",
"a",
",",
"b",
")",
"i",
"-=",
"1",
"return",
"tuple",
"(",
"shape",
")"
] |
Given two shapes that are not identical, find the shape
that both input shapes can broadcast to.
|
[
"Given",
"two",
"shapes",
"that",
"are",
"not",
"identical",
"find",
"the",
"shape",
"that",
"both",
"input",
"shapes",
"can",
"broadcast",
"to",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2370-L2388
|
train
|
Given two shapes that are not identical find the shape that both input shapes can broadcast to.
|
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,_fsda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3Ppej,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(111) + chr(0b110100) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1101 + 0o44) + '\060' + chr(0b101001 + 0o10), 54929 - 54921), ehT0Px3KOsy9(chr(1628 - 1580) + '\157' + chr(0b110001) + '\065' + chr(0b11111 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + '\x31' + chr(0b110010) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6990 - 6879) + chr(0b1011 + 0o50) + '\x36' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\x33' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1857 - 1809) + '\157' + chr(0b110001) + chr(0b11001 + 0o34) + chr(270 - 220), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(727 - 673) + chr(1815 - 1764), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1097 - 1048) + '\x36' + chr(0b10001 + 0o46), 12993 - 12985), ehT0Px3KOsy9(chr(1325 - 1277) + '\157' + chr(1541 - 1487), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(163 - 113) + chr(0b110011) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(5652 - 5541) + chr(2177 - 2126) + chr(0b110000) + chr(1616 - 1564), 2315 - 2307), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1912 - 1862) + chr(55) + chr(798 - 747), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(246 - 197) + chr(992 - 943) + chr(142 - 88), 47679 - 47671), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(7689 - 7578) + chr(1219 - 1169) + chr(0b110110) + chr(0b1010 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(50) + chr(1817 - 1765) + chr(0b1000 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b10110 + 0o40) + chr(0b11000 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(1618 - 1563) + chr(1779 - 1729), 46871 - 46863), ehT0Px3KOsy9('\x30' + chr(0b0 + 0o157) + chr(0b110011) + '\x34' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + chr(0b110010) + chr(0b110010) + chr(54), 32156 - 32148), ehT0Px3KOsy9(chr(1929 - 1881) + '\157' + chr(0b0 + 0o63) + chr(380 - 328) + chr(0b11000 + 0o36), 8), ehT0Px3KOsy9(chr(48) + chr(6740 - 6629) + chr(0b110001) + chr(0b110010) + '\062', 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b110010 + 0o75) + '\063' + '\x37' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b110001) + chr(54) + chr(1079 - 1024), 8), ehT0Px3KOsy9(chr(48) + chr(8072 - 7961) + '\064' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(2002 - 1947) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(2252 - 2201) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(2270 - 2222) + chr(111) + chr(49) + chr(0b10010 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(1170 - 1121) + chr(0b100111 + 0o12), 59957 - 59949), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\067' + chr(0b11111 + 0o30), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b110101) + chr(48), 23827 - 23819), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11010 + 0o31) + '\061' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10110 + 0o34), 8), ehT0Px3KOsy9('\060' + chr(8187 - 8076) + '\x31' + chr(0b100100 + 0o16) + chr(0b101010 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100000 + 0o23) + '\066', 8), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110010) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8972 - 8861) + chr(50) + chr(0b110111) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(508 - 397) + '\x32' + chr(378 - 328) + chr(2085 - 2035), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(935 - 824) + '\x35' + chr(0b110011), 2843 - 2835)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110 + 0o57) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(0b11000 + 0o114) + chr(0b1001111 + 0o26) + '\143' + chr(0b10 + 0o155) + '\x64' + '\x65')(chr(0b111011 + 0o72) + chr(0b1110100) + chr(8382 - 8280) + chr(45) + chr(779 - 723)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def IxOyKBkqovAi(Gbbc2qZtjy2C, nsArGjtAdyv5):
if Gbbc2qZtjy2C == nsArGjtAdyv5:
return Gbbc2qZtjy2C
A9PNsCOCE7Q6 = c2A0yzQpDQB3(Gbbc2qZtjy2C)
_Nnoj34sYEAF = c2A0yzQpDQB3(nsArGjtAdyv5)
if A9PNsCOCE7Q6 > _Nnoj34sYEAF:
nauYfLglTpcb = YyaZ4tpXu4lf(Gbbc2qZtjy2C)
else:
nauYfLglTpcb = YyaZ4tpXu4lf(nsArGjtAdyv5)
WVxHKyX45z_L = tsdjvlgh9gDP(A9PNsCOCE7Q6, _Nnoj34sYEAF) - ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + '\x31', ord("\x08"))
for (XPh1qbAgrPgG, wmN3dvez4qzC) in pZ0NK2y6HRbn(Gbbc2qZtjy2C[::-ehT0Px3KOsy9(chr(0b110000) + chr(2628 - 2517) + '\x31', 8)], nsArGjtAdyv5[::-ehT0Px3KOsy9('\x30' + '\157' + '\x31', 8)]):
if XPh1qbAgrPgG != ehT0Px3KOsy9(chr(1156 - 1108) + chr(484 - 373) + '\061', 8) and wmN3dvez4qzC != ehT0Px3KOsy9('\060' + chr(11656 - 11545) + '\061', 8) and (XPh1qbAgrPgG != wmN3dvez4qzC):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'Q)\x0c\'\x90/W\xd6\x04&\xf6\xb7\x9b \xda\xd2S`\xc8\x89\xf7\x821\x9f\x04S\xd9\x96d,\xdf\xdc\xa6"%v\xf4\xce\xf7\x19\x1fd\x1e'), chr(0b1100100) + chr(101) + '\143' + chr(0b1001111 + 0o40) + chr(100) + chr(8589 - 8488))(chr(0b111 + 0o156) + '\x74' + chr(0b1100110) + '\055' + '\x38') % (Gbbc2qZtjy2C, nsArGjtAdyv5))
nauYfLglTpcb[WVxHKyX45z_L] = tsdjvlgh9gDP(XPh1qbAgrPgG, wmN3dvez4qzC)
WVxHKyX45z_L -= ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(10666 - 10555) + chr(818 - 769), 8)
return KNyTy8rYcwji(nauYfLglTpcb)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
ones
|
def ones(shape, ctx=None, dtype=None, **kwargs):
"""Returns a new array filled with all ones, with the given shape and type.
Parameters
----------
shape : int or tuple of int or list of int
The shape of the empty array.
ctx : Context, optional
An optional device context.
Defaults to the current default context (``mxnet.context.current_context()``).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A new array of the specified shape filled with all ones.
Examples
--------
>>> mx.nd.ones(1).asnumpy()
array([ 1.], dtype=float32)
>>> mx.nd.ones((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.ones((1,2), dtype='float16').asnumpy()
array([[ 1., 1.]], dtype=float16)
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._ones(shape=shape, ctx=ctx, dtype=dtype, **kwargs)
|
python
|
def ones(shape, ctx=None, dtype=None, **kwargs):
"""Returns a new array filled with all ones, with the given shape and type.
Parameters
----------
shape : int or tuple of int or list of int
The shape of the empty array.
ctx : Context, optional
An optional device context.
Defaults to the current default context (``mxnet.context.current_context()``).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A new array of the specified shape filled with all ones.
Examples
--------
>>> mx.nd.ones(1).asnumpy()
array([ 1.], dtype=float32)
>>> mx.nd.ones((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.ones((1,2), dtype='float16').asnumpy()
array([[ 1., 1.]], dtype=float16)
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._ones(shape=shape, ctx=ctx, dtype=dtype, **kwargs)
|
[
"def",
"ones",
"(",
"shape",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable= unused-argument",
"if",
"ctx",
"is",
"None",
":",
"ctx",
"=",
"current_context",
"(",
")",
"dtype",
"=",
"mx_real_t",
"if",
"dtype",
"is",
"None",
"else",
"dtype",
"# pylint: disable= no-member, protected-access",
"return",
"_internal",
".",
"_ones",
"(",
"shape",
"=",
"shape",
",",
"ctx",
"=",
"ctx",
",",
"dtype",
"=",
"dtype",
",",
"*",
"*",
"kwargs",
")"
] |
Returns a new array filled with all ones, with the given shape and type.
Parameters
----------
shape : int or tuple of int or list of int
The shape of the empty array.
ctx : Context, optional
An optional device context.
Defaults to the current default context (``mxnet.context.current_context()``).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A new array of the specified shape filled with all ones.
Examples
--------
>>> mx.nd.ones(1).asnumpy()
array([ 1.], dtype=float32)
>>> mx.nd.ones((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.ones((1,2), dtype='float16').asnumpy()
array([[ 1., 1.]], dtype=float16)
|
[
"Returns",
"a",
"new",
"array",
"filled",
"with",
"all",
"ones",
"with",
"the",
"given",
"shape",
"and",
"type",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2402-L2436
|
train
|
Returns a new array filled with all ones with the given shape and 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,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej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9UM0,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(0b110001) + chr(0b110101) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + chr(50) + chr(0b11 + 0o55) + '\x36', 14366 - 14358), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b1000 + 0o51) + chr(0b110001) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + '\x31' + chr(0b110001) + chr(2084 - 2036), 37409 - 37401), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(1148 - 1098) + chr(345 - 295) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(484 - 435) + chr(0b110001 + 0o0) + '\067', 0b1000), ehT0Px3KOsy9(chr(338 - 290) + chr(0b1101111) + '\067' + chr(0b10101 + 0o33), 46868 - 46860), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110100) + chr(935 - 882), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\063' + chr(52) + chr(51), 27484 - 27476), ehT0Px3KOsy9(chr(1126 - 1078) + chr(0b101 + 0o152) + chr(342 - 287) + chr(0b11 + 0o61), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\x34' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1001000 + 0o47) + '\067' + chr(0b11100 + 0o30), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + chr(1963 - 1908) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(189 - 139) + chr(2088 - 2034), 27437 - 27429), ehT0Px3KOsy9(chr(0b110000) + chr(11821 - 11710) + chr(0b101110 + 0o5) + chr(0b101001 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b11000 + 0o32) + chr(0b101011 + 0o11) + chr(0b110000 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1669 - 1620) + chr(0b110101) + '\x36', 42804 - 42796), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + '\x32' + chr(491 - 443), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1000 + 0o53) + chr(332 - 277) + chr(0b100 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(2285 - 2237) + chr(111) + '\061' + chr(0b100 + 0o60) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(609 - 558) + chr(1696 - 1647) + chr(1215 - 1161), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(931 - 820) + chr(0b101 + 0o55) + chr(858 - 810) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101 + 0o152) + '\x31' + '\x36' + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(6604 - 6493) + chr(0b11 + 0o57) + chr(0b0 + 0o61) + chr(1179 - 1131), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\065' + chr(0b10 + 0o65), 0o10), ehT0Px3KOsy9(chr(212 - 164) + '\x6f' + chr(0b110010) + chr(0b110100) + '\060', 31657 - 31649), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(172 - 118) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110101) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100000 + 0o22) + chr(879 - 828) + '\060', 40867 - 40859), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1946 - 1895) + '\067' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(2393 - 2344) + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(2352 - 2302) + '\060' + chr(1722 - 1670), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\062' + chr(0b1100 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(49) + chr(0b110111), 13277 - 13269), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b101001 + 0o11) + chr(1686 - 1635), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2402 - 2348) + chr(692 - 637), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11546 - 11435) + '\061' + chr(0b110111) + chr(54), 0o10), ehT0Px3KOsy9(chr(898 - 850) + '\x6f' + chr(51) + '\x37' + '\x33', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(1409 - 1298) + chr(1418 - 1365) + chr(48), 1148 - 1140)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'B'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100 + 0o0) + '\145')(chr(13464 - 13347) + chr(0b1001011 + 0o51) + '\x66' + chr(913 - 868) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Q9MMic9MQj7n(nauYfLglTpcb, oM3jLo753XfX=None, jSV9IKnemH7K=None, **M8EIoTs2GJXE):
if oM3jLo753XfX is None:
oM3jLo753XfX = XCj8K5DCp8y0()
jSV9IKnemH7K = JsaW5JBGnibT if jSV9IKnemH7K is None else jSV9IKnemH7K
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'3\xe9$-\xe3'), '\x64' + chr(0b101000 + 0o75) + chr(99) + '\157' + '\x64' + '\145')('\165' + chr(0b1001100 + 0o50) + chr(0b1100110) + chr(45) + '\070'))(shape=nauYfLglTpcb, ctx=oM3jLo753XfX, dtype=jSV9IKnemH7K, **M8EIoTs2GJXE)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
full
|
def full(shape, val, ctx=None, dtype=mx_real_t, out=None):
"""Returns a new array of given shape and type, filled with the given value `val`.
Parameters
--------
shape : int or tuple of int
The shape of the new array.
val : scalar
Fill value.
ctx : Context, optional
Device context (default is the current default context).
dtype : `str` or `numpy.dtype`, optional
The data type of the returned `NDArray`. The default datatype is `float32`.
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
`NDArray` filled with `val`, with the given shape, ctx, and dtype.
Examples
--------
>>> mx.nd.full(1, 2.0).asnumpy()
array([ 2.], dtype=float32)
>>> mx.nd.full((1, 2), 2.0, mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.full((1, 2), 2.0, dtype='float16').asnumpy()
array([[ 2., 2.]], dtype=float16)
"""
out = empty(shape, ctx, dtype) if out is None else out
out[:] = val
return out
|
python
|
def full(shape, val, ctx=None, dtype=mx_real_t, out=None):
"""Returns a new array of given shape and type, filled with the given value `val`.
Parameters
--------
shape : int or tuple of int
The shape of the new array.
val : scalar
Fill value.
ctx : Context, optional
Device context (default is the current default context).
dtype : `str` or `numpy.dtype`, optional
The data type of the returned `NDArray`. The default datatype is `float32`.
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
`NDArray` filled with `val`, with the given shape, ctx, and dtype.
Examples
--------
>>> mx.nd.full(1, 2.0).asnumpy()
array([ 2.], dtype=float32)
>>> mx.nd.full((1, 2), 2.0, mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.full((1, 2), 2.0, dtype='float16').asnumpy()
array([[ 2., 2.]], dtype=float16)
"""
out = empty(shape, ctx, dtype) if out is None else out
out[:] = val
return out
|
[
"def",
"full",
"(",
"shape",
",",
"val",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"mx_real_t",
",",
"out",
"=",
"None",
")",
":",
"out",
"=",
"empty",
"(",
"shape",
",",
"ctx",
",",
"dtype",
")",
"if",
"out",
"is",
"None",
"else",
"out",
"out",
"[",
":",
"]",
"=",
"val",
"return",
"out"
] |
Returns a new array of given shape and type, filled with the given value `val`.
Parameters
--------
shape : int or tuple of int
The shape of the new array.
val : scalar
Fill value.
ctx : Context, optional
Device context (default is the current default context).
dtype : `str` or `numpy.dtype`, optional
The data type of the returned `NDArray`. The default datatype is `float32`.
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
`NDArray` filled with `val`, with the given shape, ctx, and dtype.
Examples
--------
>>> mx.nd.full(1, 2.0).asnumpy()
array([ 2.], dtype=float32)
>>> mx.nd.full((1, 2), 2.0, mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.full((1, 2), 2.0, dtype='float16').asnumpy()
array([[ 2., 2.]], dtype=float16)
|
[
"Returns",
"a",
"new",
"array",
"of",
"given",
"shape",
"and",
"type",
"filled",
"with",
"the",
"given",
"value",
"val",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2440-L2472
|
train
|
Returns a new array of given shape and type filled with the given value val.
|
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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y6IV0tyJQ,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(8912 - 8801) + '\065' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10110 + 0o33) + chr(52) + chr(0b101001 + 0o15), 27705 - 27697), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + '\061' + chr(0b110101) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(0b11000 + 0o31) + chr(55) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10001 + 0o40) + chr(49) + chr(0b100000 + 0o26), 11889 - 11881), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10100 + 0o36) + chr(0b11100 + 0o30) + chr(473 - 421), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + '\062' + chr(54) + chr(538 - 484), 57482 - 57474), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + '\x32' + chr(288 - 240) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100 + 0o143) + chr(0b110011) + chr(0b110110) + chr(58 - 9), 0b1000), ehT0Px3KOsy9(chr(1752 - 1704) + chr(0b1101111) + '\061' + '\x31' + chr(0b110000 + 0o5), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1277 - 1226) + chr(0b1000 + 0o55) + chr(50), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(51) + chr(0b11101 + 0o30), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(2039 - 1989) + '\x31', 6359 - 6351), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(53) + chr(0b101010 + 0o6), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b101 + 0o56) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(2387 - 2335) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(674 - 624) + chr(332 - 282), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + '\x33' + '\067' + '\062', 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(6162 - 6051) + '\x35' + '\060', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1192 - 1144) + '\157' + chr(0b110010) + chr(0b110110) + '\x31', 28081 - 28073), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + '\062' + chr(2202 - 2151) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\065' + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b101001 + 0o106) + '\x32' + chr(54) + chr(2606 - 2554), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(4317 - 4206) + chr(51) + '\064' + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(0b10011 + 0o43) + chr(0b110000), 41942 - 41934), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b10 + 0o64) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10111 + 0o32) + '\063' + '\061', 7532 - 7524), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + '\061' + chr(0b111 + 0o57) + chr(431 - 382), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3039 - 2928) + chr(1452 - 1401) + '\063' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(51) + '\x30' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(995 - 947) + chr(0b101010 + 0o105) + chr(0b110011) + '\065' + chr(1514 - 1462), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1010 + 0o50) + '\x35' + '\x31', 19565 - 19557), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(2344 - 2294) + '\x30' + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(50) + chr(0b110101) + chr(0b10101 + 0o35), 54974 - 54966), ehT0Px3KOsy9('\060' + chr(0b1001111 + 0o40) + chr(0b110001) + '\x37' + chr(0b11010 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2084 - 2031) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x06'), chr(6472 - 6372) + '\145' + '\143' + '\157' + '\144' + chr(0b1000111 + 0o36))(chr(0b1110011 + 0o2) + chr(0b1110100) + '\146' + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def KNGATxtxipLV(nauYfLglTpcb, pQxH2D_k9sXQ, oM3jLo753XfX=None, jSV9IKnemH7K=JsaW5JBGnibT, UkrMp_I0RDmo=None):
UkrMp_I0RDmo = QxT4AUiPWdm4(nauYfLglTpcb, oM3jLo753XfX, jSV9IKnemH7K) if UkrMp_I0RDmo is None else UkrMp_I0RDmo
UkrMp_I0RDmo[:] = pQxH2D_k9sXQ
return UkrMp_I0RDmo
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
array
|
def array(source_array, ctx=None, dtype=None):
"""Creates an array from any object exposing the array interface.
Parameters
----------
source_array : array_like
An object exposing the array interface, an object whose `__array__`
method returns an array, or any (nested) sequence.
ctx : Context, optional
Device context (default is the current default context).
dtype : str or numpy.dtype, optional
The data type of the output array. The default dtype is ``source_array.dtype``
if `source_array` is an `NDArray`, `float32` otherwise.
Returns
-------
NDArray
An `NDArray` with the same contents as the `source_array`.
"""
if isinstance(source_array, NDArray):
dtype = source_array.dtype if dtype is None else dtype
else:
dtype = mx_real_t if dtype is None else dtype
if not isinstance(source_array, np.ndarray):
try:
source_array = np.array(source_array, dtype=dtype)
except:
raise TypeError('source_array must be array like object')
arr = empty(source_array.shape, ctx, dtype)
arr[:] = source_array
return arr
|
python
|
def array(source_array, ctx=None, dtype=None):
"""Creates an array from any object exposing the array interface.
Parameters
----------
source_array : array_like
An object exposing the array interface, an object whose `__array__`
method returns an array, or any (nested) sequence.
ctx : Context, optional
Device context (default is the current default context).
dtype : str or numpy.dtype, optional
The data type of the output array. The default dtype is ``source_array.dtype``
if `source_array` is an `NDArray`, `float32` otherwise.
Returns
-------
NDArray
An `NDArray` with the same contents as the `source_array`.
"""
if isinstance(source_array, NDArray):
dtype = source_array.dtype if dtype is None else dtype
else:
dtype = mx_real_t if dtype is None else dtype
if not isinstance(source_array, np.ndarray):
try:
source_array = np.array(source_array, dtype=dtype)
except:
raise TypeError('source_array must be array like object')
arr = empty(source_array.shape, ctx, dtype)
arr[:] = source_array
return arr
|
[
"def",
"array",
"(",
"source_array",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"source_array",
",",
"NDArray",
")",
":",
"dtype",
"=",
"source_array",
".",
"dtype",
"if",
"dtype",
"is",
"None",
"else",
"dtype",
"else",
":",
"dtype",
"=",
"mx_real_t",
"if",
"dtype",
"is",
"None",
"else",
"dtype",
"if",
"not",
"isinstance",
"(",
"source_array",
",",
"np",
".",
"ndarray",
")",
":",
"try",
":",
"source_array",
"=",
"np",
".",
"array",
"(",
"source_array",
",",
"dtype",
"=",
"dtype",
")",
"except",
":",
"raise",
"TypeError",
"(",
"'source_array must be array like object'",
")",
"arr",
"=",
"empty",
"(",
"source_array",
".",
"shape",
",",
"ctx",
",",
"dtype",
")",
"arr",
"[",
":",
"]",
"=",
"source_array",
"return",
"arr"
] |
Creates an array from any object exposing the array interface.
Parameters
----------
source_array : array_like
An object exposing the array interface, an object whose `__array__`
method returns an array, or any (nested) sequence.
ctx : Context, optional
Device context (default is the current default context).
dtype : str or numpy.dtype, optional
The data type of the output array. The default dtype is ``source_array.dtype``
if `source_array` is an `NDArray`, `float32` otherwise.
Returns
-------
NDArray
An `NDArray` with the same contents as the `source_array`.
|
[
"Creates",
"an",
"array",
"from",
"any",
"object",
"exposing",
"the",
"array",
"interface",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2475-L2505
|
train
|
Creates an array from any object exposing the array interface.
|
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,rI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ujaz9UM0,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' + chr(366 - 314) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b0 + 0o63) + '\x31', 14527 - 14519), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101 + 0o56) + chr(0b110101) + chr(2374 - 2321), 0o10), ehT0Px3KOsy9(chr(361 - 313) + chr(0b1101111) + chr(0b110001) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b101011 + 0o104) + chr(0b110001) + '\x35' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(48) + chr(1448 - 1396), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1795 - 1744) + chr(1631 - 1580) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1110 + 0o46), 0o10), ehT0Px3KOsy9(chr(964 - 916) + chr(5620 - 5509) + chr(717 - 667) + chr(0b10111 + 0o40) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100011 + 0o20) + chr(0b110111) + chr(0b100011 + 0o23), 0b1000), ehT0Px3KOsy9('\060' + chr(8037 - 7926) + '\062' + chr(165 - 117) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(1022 - 971) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(1294 - 1243) + chr(0b1111 + 0o43), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1010 + 0o47) + chr(1574 - 1523) + chr(0b101000 + 0o17), 22035 - 22027), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(0b11111 + 0o25) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(2747 - 2636) + chr(50) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(51) + '\060' + chr(0b110111), 62413 - 62405), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(1193 - 1082) + '\062' + chr(968 - 914) + chr(52), 57474 - 57466), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(3719 - 3608) + chr(0b110010) + chr(0b110001) + chr(49), 6905 - 6897), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + chr(50) + '\x34' + chr(0b110100), 46200 - 46192), ehT0Px3KOsy9('\060' + '\157' + chr(285 - 234) + chr(0b110010) + '\064', 46366 - 46358), ehT0Px3KOsy9(chr(48) + chr(9386 - 9275) + chr(0b110 + 0o55) + chr(2744 - 2691) + chr(2721 - 2668), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100000 + 0o23) + chr(0b11010 + 0o30), 0o10), ehT0Px3KOsy9(chr(1708 - 1660) + chr(2402 - 2291) + '\x33' + '\x36' + chr(1931 - 1881), 0b1000), ehT0Px3KOsy9(chr(48) + chr(5466 - 5355) + chr(0b110010) + chr(55) + chr(0b0 + 0o63), 0o10), ehT0Px3KOsy9(chr(1555 - 1507) + chr(0b1101111) + '\061' + chr(0b101101 + 0o11) + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\064' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + '\x33' + '\060' + chr(53), 0o10), ehT0Px3KOsy9(chr(995 - 947) + chr(111) + '\066' + chr(0b11110 + 0o31), 0o10), ehT0Px3KOsy9(chr(163 - 115) + chr(0b1101111) + chr(50) + '\060' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(6913 - 6802) + '\063' + chr(0b101011 + 0o11) + chr(1286 - 1238), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11422 - 11311) + '\061' + chr(49) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(921 - 872) + chr(1046 - 996), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + chr(0b110001) + chr(145 - 90), 8), ehT0Px3KOsy9(chr(1113 - 1065) + '\x6f' + chr(0b11011 + 0o27) + chr(0b110100) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(621 - 573) + chr(2915 - 2804) + chr(51) + chr(0b100010 + 0o17) + chr(0b110100), 32052 - 32044), ehT0Px3KOsy9(chr(48) + chr(6473 - 6362) + chr(1726 - 1677) + chr(0b110100) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(0b1110 + 0o44) + '\x35', 0o10), ehT0Px3KOsy9(chr(465 - 417) + '\x6f' + chr(1212 - 1161), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010000 + 0o37) + chr(50) + chr(1442 - 1393) + chr(1108 - 1059), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(858 - 810) + chr(6789 - 6678) + chr(0b110101 + 0o0) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x08'), chr(0b1001001 + 0o33) + chr(6043 - 5942) + chr(2885 - 2786) + chr(0b0 + 0o157) + '\x64' + chr(101))(chr(117) + chr(0b10000 + 0o144) + '\x66' + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def B0ePDhpqxN5n(RYfxCklHRUIZ, oM3jLo753XfX=None, jSV9IKnemH7K=None):
if PlSM16l2KDPD(RYfxCklHRUIZ, GdqFjMbtKL7s):
jSV9IKnemH7K = RYfxCklHRUIZ.jSV9IKnemH7K if jSV9IKnemH7K is None else jSV9IKnemH7K
else:
jSV9IKnemH7K = JsaW5JBGnibT if jSV9IKnemH7K is None else jSV9IKnemH7K
if not PlSM16l2KDPD(RYfxCklHRUIZ, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'H}\x8c}\x1f%\xa3'), chr(0b1000100 + 0o40) + '\x65' + chr(0b1100011) + chr(5313 - 5202) + '\x64' + chr(0b1001010 + 0o33))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))):
try:
RYfxCklHRUIZ = WqUC3KWvYVup.B0ePDhpqxN5n(RYfxCklHRUIZ, dtype=jSV9IKnemH7K)
except ZVWAAMjVVHHl:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'Uv\x98}\x0e!\x85e\xcf\x8c\xe5a\xba2Qe\xb3\x94\xeb\xc1\xf4\x8ch\x80\xda\x0c\x83\xa9^\xeb\x85kem\xcb\xa9\x07\xe1'), '\144' + chr(0b1001110 + 0o27) + chr(99) + chr(0b100111 + 0o110) + '\144' + chr(0b101 + 0o140))(chr(0b1100 + 0o151) + chr(341 - 225) + chr(102) + chr(0b101101) + '\x38'))
ZxkNvNvuRNy5 = QxT4AUiPWdm4(RYfxCklHRUIZ.nauYfLglTpcb, oM3jLo753XfX, jSV9IKnemH7K)
ZxkNvNvuRNy5[:] = RYfxCklHRUIZ
return ZxkNvNvuRNy5
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
moveaxis
|
def moveaxis(tensor, source, destination):
"""Moves the `source` axis into the `destination` position
while leaving the other axes in their original order
Parameters
----------
tensor : mx.nd.array
The array which axes should be reordered
source : int or sequence of int
Original position of the axes to move. Can be negative but must be unique.
destination : int or sequence of int
Destination position for each of the original axes. Can be negative but must be unique.
Returns
-------
result : mx.nd.array
Array with moved axes.
Examples
--------
>>> X = mx.nd.array([[1, 2, 3], [4, 5, 6]])
>>> mx.nd.moveaxis(X, 0, 1).shape
(3L, 2L)
>>> X = mx.nd.zeros((3, 4, 5))
>>> mx.nd.moveaxis(X, [0, 1], [-1, -2]).shape
(5, 4, 3)
"""
try:
source = np.core.numeric.normalize_axis_tuple(source, tensor.ndim)
except IndexError:
raise ValueError('Source should verify 0 <= source < tensor.ndim'
'Got %d' % source)
try:
destination = np.core.numeric.normalize_axis_tuple(destination, tensor.ndim)
except IndexError:
raise ValueError('Destination should verify 0 <= destination < tensor.ndim (%d).'
% tensor.ndim, 'Got %d' % destination)
if len(source) != len(destination):
raise ValueError('`source` and `destination` arguments must have '
'the same number of elements')
order = [n for n in range(tensor.ndim) if n not in source]
for dest, src in sorted(zip(destination, source)):
order.insert(dest, src)
return op.transpose(tensor, order)
|
python
|
def moveaxis(tensor, source, destination):
"""Moves the `source` axis into the `destination` position
while leaving the other axes in their original order
Parameters
----------
tensor : mx.nd.array
The array which axes should be reordered
source : int or sequence of int
Original position of the axes to move. Can be negative but must be unique.
destination : int or sequence of int
Destination position for each of the original axes. Can be negative but must be unique.
Returns
-------
result : mx.nd.array
Array with moved axes.
Examples
--------
>>> X = mx.nd.array([[1, 2, 3], [4, 5, 6]])
>>> mx.nd.moveaxis(X, 0, 1).shape
(3L, 2L)
>>> X = mx.nd.zeros((3, 4, 5))
>>> mx.nd.moveaxis(X, [0, 1], [-1, -2]).shape
(5, 4, 3)
"""
try:
source = np.core.numeric.normalize_axis_tuple(source, tensor.ndim)
except IndexError:
raise ValueError('Source should verify 0 <= source < tensor.ndim'
'Got %d' % source)
try:
destination = np.core.numeric.normalize_axis_tuple(destination, tensor.ndim)
except IndexError:
raise ValueError('Destination should verify 0 <= destination < tensor.ndim (%d).'
% tensor.ndim, 'Got %d' % destination)
if len(source) != len(destination):
raise ValueError('`source` and `destination` arguments must have '
'the same number of elements')
order = [n for n in range(tensor.ndim) if n not in source]
for dest, src in sorted(zip(destination, source)):
order.insert(dest, src)
return op.transpose(tensor, order)
|
[
"def",
"moveaxis",
"(",
"tensor",
",",
"source",
",",
"destination",
")",
":",
"try",
":",
"source",
"=",
"np",
".",
"core",
".",
"numeric",
".",
"normalize_axis_tuple",
"(",
"source",
",",
"tensor",
".",
"ndim",
")",
"except",
"IndexError",
":",
"raise",
"ValueError",
"(",
"'Source should verify 0 <= source < tensor.ndim'",
"'Got %d'",
"%",
"source",
")",
"try",
":",
"destination",
"=",
"np",
".",
"core",
".",
"numeric",
".",
"normalize_axis_tuple",
"(",
"destination",
",",
"tensor",
".",
"ndim",
")",
"except",
"IndexError",
":",
"raise",
"ValueError",
"(",
"'Destination should verify 0 <= destination < tensor.ndim (%d).'",
"%",
"tensor",
".",
"ndim",
",",
"'Got %d'",
"%",
"destination",
")",
"if",
"len",
"(",
"source",
")",
"!=",
"len",
"(",
"destination",
")",
":",
"raise",
"ValueError",
"(",
"'`source` and `destination` arguments must have '",
"'the same number of elements'",
")",
"order",
"=",
"[",
"n",
"for",
"n",
"in",
"range",
"(",
"tensor",
".",
"ndim",
")",
"if",
"n",
"not",
"in",
"source",
"]",
"for",
"dest",
",",
"src",
"in",
"sorted",
"(",
"zip",
"(",
"destination",
",",
"source",
")",
")",
":",
"order",
".",
"insert",
"(",
"dest",
",",
"src",
")",
"return",
"op",
".",
"transpose",
"(",
"tensor",
",",
"order",
")"
] |
Moves the `source` axis into the `destination` position
while leaving the other axes in their original order
Parameters
----------
tensor : mx.nd.array
The array which axes should be reordered
source : int or sequence of int
Original position of the axes to move. Can be negative but must be unique.
destination : int or sequence of int
Destination position for each of the original axes. Can be negative but must be unique.
Returns
-------
result : mx.nd.array
Array with moved axes.
Examples
--------
>>> X = mx.nd.array([[1, 2, 3], [4, 5, 6]])
>>> mx.nd.moveaxis(X, 0, 1).shape
(3L, 2L)
>>> X = mx.nd.zeros((3, 4, 5))
>>> mx.nd.moveaxis(X, [0, 1], [-1, -2]).shape
(5, 4, 3)
|
[
"Moves",
"the",
"source",
"axis",
"into",
"the",
"destination",
"position",
"while",
"leaving",
"the",
"other",
"axes",
"in",
"their",
"original",
"order"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2508-L2556
|
train
|
Moves the source axis into the destination position
while leaving the other axes in their original 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,_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,OZY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K2y6HRbn,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' + chr(51) + chr(0b110110) + chr(1967 - 1915), 59894 - 59886), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110101) + chr(1540 - 1488), 60806 - 60798), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010 + 0o0) + chr(0b101111 + 0o2) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(6156 - 6045) + chr(1310 - 1261) + '\065' + chr(0b100100 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + chr(51) + '\x32' + chr(0b110101 + 0o2), 0o10), ehT0Px3KOsy9(chr(634 - 586) + '\157' + chr(0b1001 + 0o52) + chr(0b110001) + chr(0b10001 + 0o44), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(0b110001) + chr(0b110101) + chr(0b10101 + 0o33), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b110011) + chr(0b100110 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b11011 + 0o124) + chr(0b100001 + 0o21) + chr(53) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1720 - 1672) + chr(111) + chr(0b110011) + '\060' + chr(0b110101 + 0o2), 0b1000), ehT0Px3KOsy9(chr(508 - 460) + chr(0b111010 + 0o65) + '\062' + '\x31' + chr(1574 - 1519), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b1 + 0o66), 55679 - 55671), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(940 - 892) + chr(0b1001111 + 0o40) + '\062' + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1612 - 1501) + chr(51) + '\064' + chr(0b11100 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101010 + 0o10) + chr(55) + chr(48), 0o10), ehT0Px3KOsy9(chr(2203 - 2155) + chr(111) + chr(2716 - 2663) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(236 - 187) + '\x33' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(2038 - 1990) + '\x6f' + '\x33' + '\062' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(53) + '\066', 29312 - 29304), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1376 - 1327) + chr(51) + chr(49), 8), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(49) + '\x37' + '\063', 5043 - 5035), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(53) + chr(2192 - 2141), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1149 - 1099) + '\x30' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(443 - 390) + '\x32', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1011 + 0o46) + '\x36' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1683 - 1633) + chr(52) + '\066', 0b1000), ehT0Px3KOsy9(chr(766 - 718) + chr(3104 - 2993) + chr(0b11011 + 0o27) + '\x35' + chr(0b101101 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110011), 8354 - 8346), ehT0Px3KOsy9(chr(1816 - 1768) + chr(111) + chr(0b110010) + chr(0b110000) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(11029 - 10918) + chr(49) + '\x33' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b100010 + 0o21) + '\x33' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1007 - 959) + chr(0b11111 + 0o120) + chr(0b110001) + chr(2767 - 2713) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(1187 - 1137) + '\065' + chr(1711 - 1660), 8), ehT0Px3KOsy9(chr(747 - 699) + chr(0b1101111) + chr(0b11010 + 0o31) + chr(53) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(53) + chr(0b110110), 51816 - 51808), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(1867 - 1817) + chr(0b110010) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100101 + 0o15) + chr(53) + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + '\x31' + '\x37' + '\x37', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001 + 0o4) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xda'), '\x64' + chr(10129 - 10028) + chr(99) + chr(261 - 150) + chr(0b1100100) + chr(0b101110 + 0o67))(chr(0b1110101) + '\164' + '\x66' + chr(775 - 730) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ZOj9d9CNstEU(LK3cpXJU3UM0, Qas9W3D0Xbzi, aLUruFn2BYyj):
try:
Qas9W3D0Xbzi = WqUC3KWvYVup.core.numeric.normalize_axis_tuple(Qas9W3D0Xbzi, LK3cpXJU3UM0.gompHBiTsfJT)
except _fsda0v2_OKU:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7C\xfc\x18\xb4\xa8\xe4\x1b1\xc4\xb2\xe3s\x08\xd5\x80\xcaA<\xa8\x0ei[\x97\xb8J\x03\xc9\xdci\xe6<\xfcJ\x8b\x9e\xcb\xfa\xd8\x10\x86\x02\xe7\x0e\xbe\xa0\x83\x07-\x8b\xe2\xeb'), chr(100) + chr(4059 - 3958) + '\x63' + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(722 - 666)) % Qas9W3D0Xbzi)
try:
aLUruFn2BYyj = WqUC3KWvYVup.core.numeric.normalize_axis_tuple(aLUruFn2BYyj, LK3cpXJU3UM0.gompHBiTsfJT)
except _fsda0v2_OKU:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0I\xfa\x1e\xbe\xa3\xa5\x1c0\xc4\xa9\xafd@\xcc\x90\xd4Lz\xa7K+\x12\xcd\xfcJ@\x86\x95&\xa5=\xb9\x05\xdf\x83\xc0\xf5\xdf\x16\x9bB\xa9V\xf7\xb9\xa1\x06*\xc4\xb5\xa1yL\xca\x88\x98\x00\x7f\xb5\x07w'), '\144' + chr(101) + chr(0b10 + 0o141) + chr(0b1010000 + 0o37) + chr(0b101001 + 0o73) + chr(0b1100101))('\165' + chr(116) + chr(7628 - 7526) + chr(0b101101) + chr(56)) % xafqLlk3kkUe(LK3cpXJU3UM0, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93C\xe4\x1a\x9f\x8f\xad<*\xcd\x8d\xdb'), '\144' + '\x65' + chr(0b1100011) + chr(0b101010 + 0o105) + chr(0b1100001 + 0o3) + chr(0b101010 + 0o73))(chr(3307 - 3190) + chr(116) + chr(0b1100010 + 0o4) + chr(0b101101) + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3C\xfdJ\xf2\xa9'), chr(100) + chr(0b1100101 + 0o0) + chr(0b1100011) + '\x6f' + chr(0b11 + 0o141) + chr(0b1100101))('\x75' + '\164' + chr(2606 - 2504) + '\x2d' + chr(56)) % aLUruFn2BYyj)
if c2A0yzQpDQB3(Qas9W3D0Xbzi) != c2A0yzQpDQB3(aLUruFn2BYyj):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x94_\xe6\x1f\xa5\xae\xa1\x08y\xca\xa9\xeb7H\xc7\x80\xcb\\3\xbfO-\x12\xc4\xeb\nP\xc7\xdb|\xf04\xb9\x18\xdf\x99\x8e\xf9\xde\x0c\x80\x0c\xe1\x0b\xa1\xa8\xe4\x1c1\xce\xe7\xfcvE\xc6\xc5\xd6]7\xb3K+[\xc4\xe3J\x15\xca\xccv\xe07\xa8\x05'), chr(6620 - 6520) + '\145' + chr(0b101001 + 0o72) + chr(0b1100010 + 0o15) + '\x64' + chr(242 - 141))('\x75' + chr(0b1110100) + chr(6949 - 6847) + chr(0b101101) + chr(56)))
hO2LnONV9lny = [m1NkCryOw9Bx for m1NkCryOw9Bx in vQr8gNKaIaWE(LK3cpXJU3UM0.gompHBiTsfJT) if m1NkCryOw9Bx not in Qas9W3D0Xbzi]
for (r6aMMPMZwN9t, SBY5QklkRnQv) in vUlqIvNSaRMa(pZ0NK2y6HRbn(aLUruFn2BYyj, Qas9W3D0Xbzi)):
xafqLlk3kkUe(hO2LnONV9lny, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9dB\xfa\x0f\xa5\xb9'), '\144' + '\145' + chr(3321 - 3222) + chr(0b1101111) + chr(0b1010 + 0o132) + chr(0b111100 + 0o51))(chr(8441 - 8324) + chr(2716 - 2600) + chr(5569 - 5467) + '\x2d' + '\x38'))(r6aMMPMZwN9t, SBY5QklkRnQv)
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80^\xe8\x04\xa4\xbd\xab\x1b<'), chr(100) + chr(101) + '\x63' + chr(111) + chr(0b110100 + 0o60) + '\x65')(chr(0b1110101) + '\x74' + chr(0b1010001 + 0o25) + '\x2d' + chr(56)))(LK3cpXJU3UM0, hO2LnONV9lny)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
arange
|
def arange(start, stop=None, step=1.0, repeat=1, infer_range=None, ctx=None, dtype=mx_real_t):
"""Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [`start`, `stop`). In other
words, the interval includes `start` but excludes `stop`. The function is
similar to the built-in Python function `range` and to `numpy.arange`,
but returns an `NDArray`.
Parameters
----------
start : number, optional
Start of interval. The default start value is 0.
stop : number
End of interval.
step : number, optional
Spacing between values. The default step size is 1.
repeat : int, optional
Number of times to repeat each element. The default repeat count is 1.
infer_range : boolean, optional
When set to True, infer the stop position from the start, step,
repeat, and output tensor size.
ctx : Context, optional
Device context. Default context is the current default context.
dtype : str or numpy.dtype, optional
The data type of the `NDArray`. The default datatype is `np.float32`.
Returns
-------
NDArray
`NDArray` of evenly spaced values in the specified range.
Examples
--------
>>> mx.nd.arange(3).asnumpy()
array([ 0., 1., 2.], dtype=float32)
>>> mx.nd.arange(2, 6).asnumpy()
array([ 2., 3., 4., 5.], dtype=float32)
>>> mx.nd.arange(2, 6, step=2).asnumpy()
array([ 2., 4.], dtype=float32)
>>> mx.nd.arange(2, 6, step=1.5, repeat=2).asnumpy()
array([ 2. , 2. , 3.5, 3.5, 5. , 5. ], dtype=float32)
>>> mx.nd.arange(2, 6, step=2, repeat=3, dtype='int32').asnumpy()
array([2, 2, 2, 4, 4, 4], dtype=int32)
"""
if infer_range is not None:
warnings.warn('`infer_range` argument has been deprecated',
DeprecationWarning)
if ctx is None:
ctx = current_context()
return _internal._arange(start=start, stop=stop, step=step, repeat=repeat,
infer_range=False, dtype=dtype, ctx=str(ctx))
|
python
|
def arange(start, stop=None, step=1.0, repeat=1, infer_range=None, ctx=None, dtype=mx_real_t):
"""Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [`start`, `stop`). In other
words, the interval includes `start` but excludes `stop`. The function is
similar to the built-in Python function `range` and to `numpy.arange`,
but returns an `NDArray`.
Parameters
----------
start : number, optional
Start of interval. The default start value is 0.
stop : number
End of interval.
step : number, optional
Spacing between values. The default step size is 1.
repeat : int, optional
Number of times to repeat each element. The default repeat count is 1.
infer_range : boolean, optional
When set to True, infer the stop position from the start, step,
repeat, and output tensor size.
ctx : Context, optional
Device context. Default context is the current default context.
dtype : str or numpy.dtype, optional
The data type of the `NDArray`. The default datatype is `np.float32`.
Returns
-------
NDArray
`NDArray` of evenly spaced values in the specified range.
Examples
--------
>>> mx.nd.arange(3).asnumpy()
array([ 0., 1., 2.], dtype=float32)
>>> mx.nd.arange(2, 6).asnumpy()
array([ 2., 3., 4., 5.], dtype=float32)
>>> mx.nd.arange(2, 6, step=2).asnumpy()
array([ 2., 4.], dtype=float32)
>>> mx.nd.arange(2, 6, step=1.5, repeat=2).asnumpy()
array([ 2. , 2. , 3.5, 3.5, 5. , 5. ], dtype=float32)
>>> mx.nd.arange(2, 6, step=2, repeat=3, dtype='int32').asnumpy()
array([2, 2, 2, 4, 4, 4], dtype=int32)
"""
if infer_range is not None:
warnings.warn('`infer_range` argument has been deprecated',
DeprecationWarning)
if ctx is None:
ctx = current_context()
return _internal._arange(start=start, stop=stop, step=step, repeat=repeat,
infer_range=False, dtype=dtype, ctx=str(ctx))
|
[
"def",
"arange",
"(",
"start",
",",
"stop",
"=",
"None",
",",
"step",
"=",
"1.0",
",",
"repeat",
"=",
"1",
",",
"infer_range",
"=",
"None",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"mx_real_t",
")",
":",
"if",
"infer_range",
"is",
"not",
"None",
":",
"warnings",
".",
"warn",
"(",
"'`infer_range` argument has been deprecated'",
",",
"DeprecationWarning",
")",
"if",
"ctx",
"is",
"None",
":",
"ctx",
"=",
"current_context",
"(",
")",
"return",
"_internal",
".",
"_arange",
"(",
"start",
"=",
"start",
",",
"stop",
"=",
"stop",
",",
"step",
"=",
"step",
",",
"repeat",
"=",
"repeat",
",",
"infer_range",
"=",
"False",
",",
"dtype",
"=",
"dtype",
",",
"ctx",
"=",
"str",
"(",
"ctx",
")",
")"
] |
Returns evenly spaced values within a given interval.
Values are generated within the half-open interval [`start`, `stop`). In other
words, the interval includes `start` but excludes `stop`. The function is
similar to the built-in Python function `range` and to `numpy.arange`,
but returns an `NDArray`.
Parameters
----------
start : number, optional
Start of interval. The default start value is 0.
stop : number
End of interval.
step : number, optional
Spacing between values. The default step size is 1.
repeat : int, optional
Number of times to repeat each element. The default repeat count is 1.
infer_range : boolean, optional
When set to True, infer the stop position from the start, step,
repeat, and output tensor size.
ctx : Context, optional
Device context. Default context is the current default context.
dtype : str or numpy.dtype, optional
The data type of the `NDArray`. The default datatype is `np.float32`.
Returns
-------
NDArray
`NDArray` of evenly spaced values in the specified range.
Examples
--------
>>> mx.nd.arange(3).asnumpy()
array([ 0., 1., 2.], dtype=float32)
>>> mx.nd.arange(2, 6).asnumpy()
array([ 2., 3., 4., 5.], dtype=float32)
>>> mx.nd.arange(2, 6, step=2).asnumpy()
array([ 2., 4.], dtype=float32)
>>> mx.nd.arange(2, 6, step=1.5, repeat=2).asnumpy()
array([ 2. , 2. , 3.5, 3.5, 5. , 5. ], dtype=float32)
>>> mx.nd.arange(2, 6, step=2, repeat=3, dtype='int32').asnumpy()
array([2, 2, 2, 4, 4, 4], dtype=int32)
|
[
"Returns",
"evenly",
"spaced",
"values",
"within",
"a",
"given",
"interval",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2560-L2610
|
train
|
Returns an NDArrayArray of evenly spaced values within a given interval.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7Cc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L8qwsX,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(0b101010 + 0o6) + chr(111) + '\063' + chr(2757 - 2703) + chr(1934 - 1882), 30738 - 30730), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b11000 + 0o35) + chr(122 - 74), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b10110 + 0o131) + '\062' + chr(50) + '\x30', 0b1000), ehT0Px3KOsy9(chr(117 - 69) + '\157' + chr(0b1110 + 0o44) + chr(52) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110000 + 0o77) + chr(1079 - 1029) + chr(0b110001) + chr(53), 4644 - 4636), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(0b110001) + chr(55) + chr(0b110010 + 0o3), 0o10), ehT0Px3KOsy9(chr(48) + chr(7758 - 7647) + chr(51) + '\067' + chr(53), 30516 - 30508), ehT0Px3KOsy9(chr(0b110000) + chr(383 - 272) + chr(164 - 114) + '\062' + chr(0b1 + 0o57), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\064' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(0b110011) + chr(1376 - 1324) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x36' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(0b11101 + 0o26) + chr(379 - 326) + '\061', 57475 - 57467), ehT0Px3KOsy9(chr(1386 - 1338) + '\157' + '\x33' + chr(0b110000) + chr(0b11111 + 0o25), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(48) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(49) + chr(0b100100 + 0o20), 0o10), ehT0Px3KOsy9(chr(2237 - 2189) + chr(111) + chr(263 - 214) + '\x35' + '\x30', 5172 - 5164), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + '\x33' + '\x30' + chr(0b100010 + 0o22), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(54) + chr(0b100101 + 0o16), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b1011 + 0o47) + chr(2236 - 2185) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(2226 - 2178) + chr(9026 - 8915) + '\x33' + '\x37', 56768 - 56760), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\062' + chr(0b10110 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(319 - 269) + '\x34' + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1061 - 1006) + chr(48), 5131 - 5123), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + '\061' + chr(0b1010 + 0o54) + '\063', 14845 - 14837), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\x33' + chr(1220 - 1167) + '\x31', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\x32' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + '\x37' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(1734 - 1686) + '\157' + chr(0b110001) + chr(2195 - 2144) + chr(0b1 + 0o61), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1932 - 1883) + chr(0b0 + 0o63) + chr(1268 - 1215), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11100 + 0o26) + '\x30' + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\067' + chr(1936 - 1882), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010 + 0o1) + '\x31' + chr(0b11011 + 0o26), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(892 - 843) + '\x30', 31895 - 31887), ehT0Px3KOsy9(chr(599 - 551) + chr(0b1001111 + 0o40) + chr(53) + '\064', 59951 - 59943), ehT0Px3KOsy9('\060' + '\157' + chr(1139 - 1089) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(50) + chr(0b110111) + '\064', 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + '\063' + '\063' + chr(0b110100), 53992 - 53984), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(2480 - 2430) + chr(0b110011), 18297 - 18289), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o61) + '\x30', 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\x30' + '\061', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(0b1001 + 0o54) + chr(0b101100 + 0o4), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xda'), '\x64' + '\145' + chr(99) + chr(0b1100111 + 0o10) + chr(100) + '\x65')('\165' + chr(6069 - 5953) + '\146' + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ltl4zeSqo3vr(avRbFsnfJxQj, i64wROPYXl1w=None, kDuFsAhEatcU=1.0, hpyK9c505LBh=ehT0Px3KOsy9('\x30' + chr(7436 - 7325) + chr(0b110001), ord("\x08")), nOjrgjGmjPMO=None, oM3jLo753XfX=None, jSV9IKnemH7K=JsaW5JBGnibT):
if nOjrgjGmjPMO is not None:
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b"\x9a\xec\xd5\xc8\xc3?\x9c\xf2'\xa9?\x84"), chr(0b111110 + 0o46) + chr(2620 - 2519) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\165' + chr(0b110011 + 0o101) + chr(7884 - 7782) + chr(0b101101) + chr(0b101010 + 0o16)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\xc1\xfe\xc0\xe8\x0f\xa2\xe2\x00\x89\x13\x8c\xa4\xa0m\x1a\xa3\xc6\xf1z\xbd\xd1\x18\x1b\x88\xa5\xda88\xe4P\xe9lI`\xce\xb9\xf0i\xf5\x91\xcc'), chr(6847 - 6747) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(117) + chr(12874 - 12758) + chr(0b1100110) + chr(0b101101) + chr(0b111000)), ker4pIJmdvxf)
if oM3jLo753XfX is None:
oM3jLo753XfX = XCj8K5DCp8y0()
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\xc9\xe2\xc7\xe3\x1a\x98'), chr(0b1100100) + chr(101) + chr(0b10000 + 0o123) + '\x6f' + '\144' + '\x65')(chr(0b1110101) + chr(0b110111 + 0o75) + '\x66' + '\055' + chr(56)))(start=avRbFsnfJxQj, stop=i64wROPYXl1w, step=kDuFsAhEatcU, repeat=hpyK9c505LBh, infer_range=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1992 - 1944), ord("\x08")), dtype=jSV9IKnemH7K, ctx=M8_cKLkHVB2V(oM3jLo753XfX))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
_ufunc_helper
|
def _ufunc_helper(lhs, rhs, fn_array, fn_scalar, lfn_scalar, rfn_scalar=None):
""" Helper function for element-wise operation.
The function will perform numpy-like broadcasting if needed and call different functions.
Parameters
--------
lhs : NDArray or numeric value
Left-hand side operand.
rhs : NDArray or numeric value
Right-hand operand,
fn_array : function
Function to be called if both lhs and rhs are of ``NDArray`` type.
fn_scalar : function
Function to be called if both lhs and rhs are numeric values.
lfn_scalar : function
Function to be called if lhs is ``NDArray`` while rhs is numeric value
rfn_scalar : function
Function to be called if lhs is numeric value while rhs is ``NDArray``;
if none is provided, then the function is commutative, so rfn_scalar is equal to lfn_scalar
Returns
--------
NDArray
result array
"""
if isinstance(lhs, numeric_types):
if isinstance(rhs, numeric_types):
return fn_scalar(lhs, rhs)
else:
if rfn_scalar is None:
# commutative function
return lfn_scalar(rhs, float(lhs))
else:
return rfn_scalar(rhs, float(lhs))
elif isinstance(rhs, numeric_types):
return lfn_scalar(lhs, float(rhs))
elif isinstance(rhs, NDArray):
return fn_array(lhs, rhs)
else:
raise TypeError('type %s not supported' % str(type(rhs)))
|
python
|
def _ufunc_helper(lhs, rhs, fn_array, fn_scalar, lfn_scalar, rfn_scalar=None):
""" Helper function for element-wise operation.
The function will perform numpy-like broadcasting if needed and call different functions.
Parameters
--------
lhs : NDArray or numeric value
Left-hand side operand.
rhs : NDArray or numeric value
Right-hand operand,
fn_array : function
Function to be called if both lhs and rhs are of ``NDArray`` type.
fn_scalar : function
Function to be called if both lhs and rhs are numeric values.
lfn_scalar : function
Function to be called if lhs is ``NDArray`` while rhs is numeric value
rfn_scalar : function
Function to be called if lhs is numeric value while rhs is ``NDArray``;
if none is provided, then the function is commutative, so rfn_scalar is equal to lfn_scalar
Returns
--------
NDArray
result array
"""
if isinstance(lhs, numeric_types):
if isinstance(rhs, numeric_types):
return fn_scalar(lhs, rhs)
else:
if rfn_scalar is None:
# commutative function
return lfn_scalar(rhs, float(lhs))
else:
return rfn_scalar(rhs, float(lhs))
elif isinstance(rhs, numeric_types):
return lfn_scalar(lhs, float(rhs))
elif isinstance(rhs, NDArray):
return fn_array(lhs, rhs)
else:
raise TypeError('type %s not supported' % str(type(rhs)))
|
[
"def",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"fn_array",
",",
"fn_scalar",
",",
"lfn_scalar",
",",
"rfn_scalar",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"lhs",
",",
"numeric_types",
")",
":",
"if",
"isinstance",
"(",
"rhs",
",",
"numeric_types",
")",
":",
"return",
"fn_scalar",
"(",
"lhs",
",",
"rhs",
")",
"else",
":",
"if",
"rfn_scalar",
"is",
"None",
":",
"# commutative function",
"return",
"lfn_scalar",
"(",
"rhs",
",",
"float",
"(",
"lhs",
")",
")",
"else",
":",
"return",
"rfn_scalar",
"(",
"rhs",
",",
"float",
"(",
"lhs",
")",
")",
"elif",
"isinstance",
"(",
"rhs",
",",
"numeric_types",
")",
":",
"return",
"lfn_scalar",
"(",
"lhs",
",",
"float",
"(",
"rhs",
")",
")",
"elif",
"isinstance",
"(",
"rhs",
",",
"NDArray",
")",
":",
"return",
"fn_array",
"(",
"lhs",
",",
"rhs",
")",
"else",
":",
"raise",
"TypeError",
"(",
"'type %s not supported'",
"%",
"str",
"(",
"type",
"(",
"rhs",
")",
")",
")"
] |
Helper function for element-wise operation.
The function will perform numpy-like broadcasting if needed and call different functions.
Parameters
--------
lhs : NDArray or numeric value
Left-hand side operand.
rhs : NDArray or numeric value
Right-hand operand,
fn_array : function
Function to be called if both lhs and rhs are of ``NDArray`` type.
fn_scalar : function
Function to be called if both lhs and rhs are numeric values.
lfn_scalar : function
Function to be called if lhs is ``NDArray`` while rhs is numeric value
rfn_scalar : function
Function to be called if lhs is numeric value while rhs is ``NDArray``;
if none is provided, then the function is commutative, so rfn_scalar is equal to lfn_scalar
Returns
--------
NDArray
result array
|
[
"Helper",
"function",
"for",
"element",
"-",
"wise",
"operation",
".",
"The",
"function",
"will",
"perform",
"numpy",
"-",
"like",
"broadcasting",
"if",
"needed",
"and",
"call",
"different",
"functions",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2615-L2659
|
train
|
This function is used to perform numpy - like broadcasting of two elements of the tree tree
|
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(chr(0b110000) + '\157' + chr(51) + chr(0b10111 + 0o33) + '\x32', 1285 - 1277), ehT0Px3KOsy9(chr(852 - 804) + '\157' + '\x35' + chr(0b1000 + 0o56), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2431 - 2381) + chr(0b110001) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(1331 - 1281) + chr(506 - 457) + chr(1888 - 1839), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(521 - 471) + chr(54) + chr(50), 30445 - 30437), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7926 - 7815) + '\063' + chr(2036 - 1983) + chr(508 - 458), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b1000 + 0o56) + chr(0b100011 + 0o17), 39914 - 39906), ehT0Px3KOsy9(chr(48) + chr(5686 - 5575) + '\x33' + chr(1180 - 1131) + chr(0b110101), 53150 - 53142), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(2301 - 2253) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + chr(0b101100 + 0o5) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(49) + chr(0b110110), 13457 - 13449), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + '\061' + chr(0b11110 + 0o22), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b101111 + 0o5) + '\066', 37543 - 37535), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(52) + chr(51), 52734 - 52726), ehT0Px3KOsy9(chr(48) + chr(0b1010001 + 0o36) + chr(307 - 258) + '\x36' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(1364 - 1316), 5535 - 5527), ehT0Px3KOsy9(chr(0b110000) + chr(9650 - 9539) + chr(0b11010 + 0o35) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + '\x33' + chr(0b110010) + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(8216 - 8105) + chr(0b10001 + 0o41) + '\x32' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(1381 - 1333) + '\x6f' + chr(0b110001) + '\x32' + '\067', 10063 - 10055), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1010 + 0o53) + '\065', 8267 - 8259), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(50) + chr(53) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\067' + chr(0b1111 + 0o44), 49081 - 49073), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x31' + chr(464 - 414), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b11110 + 0o25) + '\064' + chr(1856 - 1805), 2262 - 2254), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x37' + chr(2513 - 2460), 10987 - 10979), ehT0Px3KOsy9(chr(1918 - 1870) + chr(111) + '\061' + chr(350 - 299) + chr(0b101011 + 0o6), 0b1000), ehT0Px3KOsy9(chr(1263 - 1215) + chr(0b100010 + 0o115) + '\063' + chr(0b110110) + chr(1271 - 1218), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110011) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\067' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(951 - 902) + chr(52) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(55), 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(50) + chr(0b110110) + chr(0b100000 + 0o27), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\064' + '\060', 17276 - 17268), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110000) + chr(0b110 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4736 - 4625) + chr(0b110011) + chr(630 - 580) + chr(0b110011 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b101 + 0o55) + '\067' + '\067', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(1207 - 1154) + '\x30', 11668 - 11660)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\x35' + chr(1472 - 1424), 41855 - 41847)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), chr(100) + chr(8764 - 8663) + chr(99) + '\157' + chr(0b11011 + 0o111) + '\x65')(chr(0b1101010 + 0o13) + chr(1045 - 929) + '\146' + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, E67w68KlbzM0, cFBTIBFXrrnK, SAE76jA_OWq0, ui_DIH8r16Ux=None):
if PlSM16l2KDPD(cuj9DsjDUyqP, _oZ7ToMS5xAg):
if PlSM16l2KDPD(TLyjFoww1L3N, _oZ7ToMS5xAg):
return cFBTIBFXrrnK(cuj9DsjDUyqP, TLyjFoww1L3N)
elif ui_DIH8r16Ux is None:
return SAE76jA_OWq0(TLyjFoww1L3N, kkSX4ccExqw4(cuj9DsjDUyqP))
else:
return ui_DIH8r16Ux(TLyjFoww1L3N, kkSX4ccExqw4(cuj9DsjDUyqP))
elif PlSM16l2KDPD(TLyjFoww1L3N, _oZ7ToMS5xAg):
return SAE76jA_OWq0(cuj9DsjDUyqP, kkSX4ccExqw4(TLyjFoww1L3N))
elif PlSM16l2KDPD(TLyjFoww1L3N, GdqFjMbtKL7s):
return E67w68KlbzM0(cuj9DsjDUyqP, TLyjFoww1L3N)
else:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6W\xfe\xec\x92?\x99\xd2\xa3/{\xee\xbb\x93S\x03gH\xa6\xf73'), chr(100) + chr(0b11101 + 0o110) + '\x63' + chr(111) + '\x64' + chr(3187 - 3086))('\x75' + '\x74' + chr(0b1001000 + 0o36) + '\055' + chr(0b111000)) % M8_cKLkHVB2V(wmQmyeWBmUpv(TLyjFoww1L3N)))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
add
|
def add(lhs, rhs):
"""Returns element-wise sum of the input arrays with broadcasting.
Equivalent to ``lhs + rhs``, ``mx.nd.broadcast_add(lhs, rhs)`` and
``mx.nd.broadcast_plus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be added.
rhs : scalar or mxnet.ndarray.array
Second array to be added.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise sum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x+2).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> (x+y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.add(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> (z + y).asnumpy()
array([[ 0., 1.],
[ 1., 2.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_add,
operator.add,
_internal._plus_scalar,
None)
|
python
|
def add(lhs, rhs):
"""Returns element-wise sum of the input arrays with broadcasting.
Equivalent to ``lhs + rhs``, ``mx.nd.broadcast_add(lhs, rhs)`` and
``mx.nd.broadcast_plus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be added.
rhs : scalar or mxnet.ndarray.array
Second array to be added.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise sum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x+2).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> (x+y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.add(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> (z + y).asnumpy()
array([[ 0., 1.],
[ 1., 2.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_add,
operator.add,
_internal._plus_scalar,
None)
|
[
"def",
"add",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_add",
",",
"operator",
".",
"add",
",",
"_internal",
".",
"_plus_scalar",
",",
"None",
")"
] |
Returns element-wise sum of the input arrays with broadcasting.
Equivalent to ``lhs + rhs``, ``mx.nd.broadcast_add(lhs, rhs)`` and
``mx.nd.broadcast_plus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be added.
rhs : scalar or mxnet.ndarray.array
Second array to be added.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise sum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x+2).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> (x+y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.add(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 2., 2., 2.]], dtype=float32)
>>> (z + y).asnumpy()
array([[ 0., 1.],
[ 1., 2.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"sum",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2663-L2721
|
train
|
Adds two arrays with broadcasting.
|
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,qqrhSm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8UVFey,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(2169 - 2121) + '\x6f' + '\062' + '\065' + '\066', 0o10), ehT0Px3KOsy9(chr(166 - 118) + '\x6f' + chr(50) + chr(553 - 500) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(52) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + '\063' + '\064' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4691 - 4580) + chr(52) + '\067', 1951 - 1943), ehT0Px3KOsy9(chr(1690 - 1642) + '\x6f' + '\x32' + '\067' + '\064', 0b1000), ehT0Px3KOsy9(chr(1950 - 1902) + chr(111) + '\063' + chr(48) + '\x34', 11237 - 11229), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(856 - 806) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2963 - 2852) + chr(0b110011) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11111 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(578 - 527) + '\x31', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(51) + chr(1577 - 1527) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(2347 - 2298) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101010 + 0o10) + '\x36' + chr(0b1101 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(335 - 286), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1470 - 1420) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1576 - 1527), 8), ehT0Px3KOsy9(chr(0b110000) + chr(5599 - 5488) + chr(51) + '\x33' + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110111) + chr(0b100001 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1100011 + 0o14) + chr(0b110011) + '\x37' + '\x34', 19016 - 19008), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b11010 + 0o34) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x36' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2635 - 2524) + chr(0b110011) + chr(54) + chr(0b1010 + 0o54), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + chr(0b110011) + '\063' + '\062', 24331 - 24323), ehT0Px3KOsy9(chr(0b110000) + chr(5599 - 5488) + chr(0b110001) + '\x35' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(0b110011) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b110111) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(790 - 742) + chr(111) + '\063' + chr(0b110110) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(7237 - 7126) + '\x31' + '\x33' + '\060', 17172 - 17164), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + '\067' + chr(0b11110 + 0o24), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(2576 - 2525) + '\062', 1714 - 1706), ehT0Px3KOsy9('\x30' + chr(2652 - 2541) + '\063' + '\x30' + '\064', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1229 - 1174), 32840 - 32832), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b11100 + 0o31), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b101011 + 0o10) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x36' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x33' + chr(50), 8), ehT0Px3KOsy9(chr(48) + chr(1491 - 1380) + chr(51) + '\063' + '\067', 39337 - 39329)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(3580 - 3469) + chr(1200 - 1147) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x80'), chr(100) + chr(101) + '\x63' + '\157' + chr(100) + chr(0b11010 + 0o113))(chr(0b1110101) + '\164' + chr(102) + '\x2d' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def uJ0q9cG5ZOR3(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xdb\xca\x81C\xdf\xa5&mYx\xb1l'), chr(0b1100100) + chr(0b1010000 + 0o25) + chr(0b1100011) + chr(0b11100 + 0o123) + chr(0b1100100) + '\145')('\165' + chr(5341 - 5225) + chr(109 - 7) + chr(0b11100 + 0o21) + '\070')), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\xe3\x95\x91\x1e\xdf\x83`CIK\xe6'), chr(0b1100100) + '\145' + chr(0b1000011 + 0o40) + '\x6f' + chr(0b1100100) + chr(101))(chr(6371 - 6254) + chr(116) + chr(102) + '\x2d' + chr(56))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xd9\xc9\x95T\xe3\xb76xjx\xa7'), '\x64' + chr(0b1100101) + chr(6500 - 6401) + chr(1783 - 1672) + '\x64' + chr(0b1100101))(chr(117) + '\164' + chr(0b1000001 + 0o45) + chr(45) + '\070')), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
subtract
|
def subtract(lhs, rhs):
"""Returns element-wise difference of the input arrays with broadcasting.
Equivalent to ``lhs - rhs``, ``mx.nd.broadcast_sub(lhs, rhs)`` and
``mx.nd.broadcast_minus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be subtracted.
rhs : scalar or mxnet.ndarray.array
Second array to be subtracted.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise difference of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x-2).asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
>>> (x-y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.subtract(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z-y).asnumpy()
array([[ 0., 1.],
[-1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_sub,
operator.sub,
_internal._minus_scalar,
_internal._rminus_scalar)
|
python
|
def subtract(lhs, rhs):
"""Returns element-wise difference of the input arrays with broadcasting.
Equivalent to ``lhs - rhs``, ``mx.nd.broadcast_sub(lhs, rhs)`` and
``mx.nd.broadcast_minus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be subtracted.
rhs : scalar or mxnet.ndarray.array
Second array to be subtracted.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise difference of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x-2).asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
>>> (x-y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.subtract(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z-y).asnumpy()
array([[ 0., 1.],
[-1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_sub,
operator.sub,
_internal._minus_scalar,
_internal._rminus_scalar)
|
[
"def",
"subtract",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_sub",
",",
"operator",
".",
"sub",
",",
"_internal",
".",
"_minus_scalar",
",",
"_internal",
".",
"_rminus_scalar",
")"
] |
Returns element-wise difference of the input arrays with broadcasting.
Equivalent to ``lhs - rhs``, ``mx.nd.broadcast_sub(lhs, rhs)`` and
``mx.nd.broadcast_minus(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be subtracted.
rhs : scalar or mxnet.ndarray.array
Second array to be subtracted.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise difference of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x-2).asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
>>> (x-y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.subtract(x,y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z-y).asnumpy()
array([[ 0., 1.],
[-1., 0.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"difference",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2725-L2783
|
train
|
Returns element - wise difference of two arrays with broadcasting.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtv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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(4692 - 4581) + chr(0b110101) + chr(1353 - 1300), ord("\x08")), ehT0Px3KOsy9('\060' + chr(5822 - 5711) + chr(50) + '\067' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\066' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o22) + '\x30' + chr(0b1110 + 0o42), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1108 - 1059) + '\x31' + chr(1543 - 1492), 0o10), ehT0Px3KOsy9(chr(215 - 167) + '\157' + chr(0b110011) + chr(0b110010) + chr(824 - 773), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(2177 - 2125) + chr(404 - 353), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b11101 + 0o122) + chr(1468 - 1415) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10011 + 0o36) + '\065' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1444 - 1396) + chr(111) + '\062' + '\061' + chr(0b10001 + 0o46), 4143 - 4135), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(0b110010) + '\062' + chr(0b11100 + 0o30), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(49) + chr(0b10 + 0o61), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b11001 + 0o33) + chr(0b110100), 53111 - 53103), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1001001 + 0o46) + chr(0b110010) + chr(54) + chr(0b10000 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\063' + chr(1783 - 1731) + chr(73 - 22), 7522 - 7514), ehT0Px3KOsy9(chr(48) + chr(840 - 729) + chr(50) + chr(0b110100) + '\x36', 11652 - 11644), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110101 + 0o0) + chr(1076 - 1021), 22032 - 22024), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110011) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10100 + 0o35) + chr(0b110110) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1875 - 1820), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101111 + 0o5) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b10100 + 0o133) + chr(786 - 736) + chr(1128 - 1080) + chr(50), 31771 - 31763), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110000) + chr(1784 - 1730), 0b1000), ehT0Px3KOsy9(chr(1339 - 1291) + '\157' + chr(1708 - 1657) + chr(49) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(50) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(54) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + chr(0b101001 + 0o13) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b111 + 0o52) + chr(0b110011) + '\x31', 353 - 345), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\067' + chr(48), 0o10), ehT0Px3KOsy9(chr(1857 - 1809) + '\157' + '\062' + chr(736 - 685) + chr(0b11100 + 0o26), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(1144 - 1092) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110100) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(49) + chr(0b11 + 0o60) + '\066', 26070 - 26062), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110101), 25343 - 25335), ehT0Px3KOsy9(chr(1858 - 1810) + chr(0b101011 + 0o104) + chr(1539 - 1490) + chr(0b100100 + 0o15) + chr(2220 - 2170), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x32', 4203 - 4195), ehT0Px3KOsy9(chr(348 - 300) + chr(0b1101111) + '\x33' + chr(0b11010 + 0o32) + chr(472 - 420), ord("\x08")), ehT0Px3KOsy9(chr(1070 - 1022) + '\x6f' + '\x31' + chr(0b110010 + 0o5) + '\x36', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x03'), chr(0b1010000 + 0o24) + chr(4970 - 4869) + chr(7970 - 7871) + chr(9131 - 9020) + chr(0b1100100) + chr(101))('\x75' + chr(2970 - 2854) + chr(0b1100110) + chr(0b1 + 0o54) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def swHo32JYwFMW(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'O\xcc\xde\xa1/\xb0B\\\x1d\xd0l\xe1i'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(8519 - 8418))(chr(0b10101 + 0o140) + chr(0b1110100) + chr(623 - 521) + chr(0b101101) + chr(0b111000))), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xcb\xd3'), chr(0b1100010 + 0o2) + '\145' + chr(99) + chr(4977 - 4866) + '\144' + chr(101))(chr(926 - 809) + chr(0b1110100) + '\146' + chr(1771 - 1726) + '\x38')), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'r\xd3\xd8\xae>\xa0|\\\n\xees\xf5y'), '\144' + chr(0b10100 + 0o121) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(0b1001000 + 0o55) + chr(0b1110100) + chr(102) + '\055' + chr(0b100111 + 0o21))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'r\xcc\xdc\xa9%\xa6Pp\x1a\xec~\xf8j\x16'), chr(100) + chr(0b1100 + 0o131) + chr(0b1100011) + chr(1201 - 1090) + chr(100) + chr(0b1100101))(chr(0b1101001 + 0o14) + '\164' + chr(102) + chr(45) + '\070')))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
multiply
|
def multiply(lhs, rhs):
"""Returns element-wise product of the input arrays with broadcasting.
Equivalent to ``lhs * rhs`` and ``mx.nd.broadcast_mul(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be multiplied.
rhs : scalar or mxnet.ndarray.array
Second array to be multiplied.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise multiplication of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x*2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x*y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.multiply(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z*y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_mul,
operator.mul,
_internal._mul_scalar,
None)
|
python
|
def multiply(lhs, rhs):
"""Returns element-wise product of the input arrays with broadcasting.
Equivalent to ``lhs * rhs`` and ``mx.nd.broadcast_mul(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be multiplied.
rhs : scalar or mxnet.ndarray.array
Second array to be multiplied.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise multiplication of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x*2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x*y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.multiply(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z*y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_mul,
operator.mul,
_internal._mul_scalar,
None)
|
[
"def",
"multiply",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_mul",
",",
"operator",
".",
"mul",
",",
"_internal",
".",
"_mul_scalar",
",",
"None",
")"
] |
Returns element-wise product of the input arrays with broadcasting.
Equivalent to ``lhs * rhs`` and ``mx.nd.broadcast_mul(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be multiplied.
rhs : scalar or mxnet.ndarray.array
Second array to be multiplied.
If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise multiplication of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x*2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x*y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.multiply(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z*y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"product",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2787-L2844
|
train
|
Returns element - wise multiplication of the input arrays with broadcasting.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadl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_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' + '\x6f' + chr(0b100001 + 0o21) + '\061' + '\x36', 38471 - 38463), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1110 + 0o44) + chr(0b1111 + 0o47) + '\x37', 35071 - 35063), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(282 - 229) + chr(0b1001 + 0o50), 38540 - 38532), ehT0Px3KOsy9(chr(466 - 418) + chr(111) + chr(0b110001) + '\061', 54452 - 54444), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(10194 - 10083) + '\061' + chr(0b110011) + chr(0b11100 + 0o27), 44028 - 44020), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + '\061' + chr(50) + chr(1975 - 1926), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b100011 + 0o22) + '\064', 0o10), ehT0Px3KOsy9(chr(2079 - 2031) + '\157' + chr(0b110001) + chr(53) + chr(1071 - 1018), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(691 - 642) + chr(0b11110 + 0o30) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11110 + 0o24) + chr(0b110111) + chr(52), 65253 - 65245), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b101111 + 0o10) + chr(0b11001 + 0o36), 27643 - 27635), ehT0Px3KOsy9(chr(621 - 573) + chr(0b1101111) + chr(0b101001 + 0o12) + chr(0b10111 + 0o35) + chr(1817 - 1765), 0o10), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(0b110010) + '\x36' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\067' + chr(1573 - 1518), 0o10), ehT0Px3KOsy9(chr(1082 - 1034) + chr(0b10011 + 0o134) + chr(49) + '\063' + chr(49), 0b1000), ehT0Px3KOsy9(chr(499 - 451) + chr(0b1001 + 0o146) + '\062' + chr(1726 - 1673), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2405 - 2294) + chr(0b110011) + chr(1890 - 1838), 35097 - 35089), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b110010) + chr(50) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(8657 - 8546) + chr(1142 - 1092) + chr(478 - 427) + chr(1373 - 1324), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + '\x37' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(659 - 548) + chr(50) + chr(0b110010) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + chr(0b110111) + chr(0b101111 + 0o10), 8), ehT0Px3KOsy9('\060' + chr(0b100100 + 0o113) + '\x33' + chr(0b101111 + 0o7) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001 + 0o2) + chr(775 - 721) + chr(0b1001 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(1440 - 1391) + chr(1733 - 1683), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + chr(384 - 334) + '\065' + chr(0b1 + 0o64), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(10954 - 10843) + chr(0b110011) + chr(1032 - 978) + '\x33', 8), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(1616 - 1567) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(50) + chr(1034 - 986), 21349 - 21341), ehT0Px3KOsy9('\x30' + '\157' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4284 - 4173) + '\061' + '\065' + chr(1798 - 1746), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000101 + 0o52) + '\x33' + chr(49) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + chr(51) + chr(0b110100) + chr(1821 - 1771), 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(1150 - 1099) + '\060' + chr(0b110001), 32526 - 32518), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(11951 - 11840) + '\061' + chr(1669 - 1617) + '\063', 65078 - 65070), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + chr(1887 - 1836) + '\060' + chr(0b110000), 25158 - 25150), ehT0Px3KOsy9(chr(2301 - 2253) + '\x6f' + chr(1066 - 1017) + chr(0b110000 + 0o4) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(51) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110100) + chr(1423 - 1369), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b101100 + 0o103) + chr(0b1 + 0o64) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0'), chr(100) + chr(2862 - 2761) + '\x63' + chr(785 - 674) + '\x64' + chr(6402 - 6301))(chr(117) + '\x74' + '\x66' + '\x2d' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def GAPluJ7SNlqH(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\xc5Fh?2\x8d\x1e\x00\xe3\x92\x91\xd8'), '\x64' + chr(5312 - 5211) + chr(99) + chr(0b1101111) + chr(0b100011 + 0o101) + '\x65')('\x75' + chr(0b11010 + 0o132) + chr(0b1001101 + 0o31) + chr(1002 - 957) + chr(364 - 308))), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xc2E'), '\x64' + chr(0b1100101) + chr(99) + chr(7806 - 7695) + '\144' + chr(3292 - 3191))(chr(0b1110101) + '\x74' + chr(0b1000100 + 0o42) + chr(0b100111 + 0o6) + chr(1014 - 958))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1\xda\\e\x04"\x8f\x0c\x18\xdd\x8d'), chr(0b1001100 + 0o30) + chr(624 - 523) + chr(8143 - 8044) + '\157' + '\x64' + chr(4999 - 4898))('\165' + chr(0b1110100) + chr(0b111 + 0o137) + chr(0b101101) + chr(0b101101 + 0o13))), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
divide
|
def divide(lhs, rhs):
"""Returns element-wise division of the input arrays with broadcasting.
Equivalent to ``lhs / rhs`` and ``mx.nd.broadcast_div(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in division.
rhs : scalar or mxnet.ndarray.array
Second array in division.
The arrays to be divided. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise division of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*2
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 2.],
[ 2.]], dtype=float32)
>>> x/2
<NDArray 2x3 @cpu(0)>
>>> (x/3).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x/y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> mx.nd.divide(x,y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_div,
operator.truediv,
_internal._div_scalar,
_internal._rdiv_scalar)
|
python
|
def divide(lhs, rhs):
"""Returns element-wise division of the input arrays with broadcasting.
Equivalent to ``lhs / rhs`` and ``mx.nd.broadcast_div(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in division.
rhs : scalar or mxnet.ndarray.array
Second array in division.
The arrays to be divided. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise division of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*2
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 2.],
[ 2.]], dtype=float32)
>>> x/2
<NDArray 2x3 @cpu(0)>
>>> (x/3).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x/y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> mx.nd.divide(x,y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_div,
operator.truediv,
_internal._div_scalar,
_internal._rdiv_scalar)
|
[
"def",
"divide",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_div",
",",
"operator",
".",
"truediv",
",",
"_internal",
".",
"_div_scalar",
",",
"_internal",
".",
"_rdiv_scalar",
")"
] |
Returns element-wise division of the input arrays with broadcasting.
Equivalent to ``lhs / rhs`` and ``mx.nd.broadcast_div(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in division.
rhs : scalar or mxnet.ndarray.array
Second array in division.
The arrays to be divided. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise division of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*2
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 2.],
[ 2.]], dtype=float32)
>>> x/2
<NDArray 2x3 @cpu(0)>
>>> (x/3).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> (x/y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
>>> mx.nd.divide(x,y).asnumpy()
array([[ 3., 3., 3.],
[ 3., 3., 3.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"division",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2848-L2901
|
train
|
Returns an NDArray that is the element - wise division of the input arrays with broadcasting.
|
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,a9IK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KaLo,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(0b110001 + 0o76) + chr(50) + '\062' + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(235 - 187) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(761 - 712) + chr(0b110100), 45786 - 45778), ehT0Px3KOsy9('\x30' + chr(10880 - 10769) + '\062' + chr(0b110101) + chr(0b110 + 0o53), 44904 - 44896), ehT0Px3KOsy9('\x30' + '\157' + chr(117 - 66) + chr(54) + chr(2332 - 2283), 39107 - 39099), ehT0Px3KOsy9(chr(48) + chr(111) + chr(715 - 664) + '\x35' + chr(259 - 204), 33208 - 33200), ehT0Px3KOsy9('\x30' + chr(9103 - 8992) + chr(169 - 118) + chr(0b1111 + 0o50) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(295 - 245) + '\x35', 52584 - 52576), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b110001) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b101 + 0o152) + chr(1032 - 982) + chr(0b1101 + 0o52) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(655 - 603) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b110111) + chr(1146 - 1096), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6585 - 6474) + chr(0b10110 + 0o34) + chr(0b110110) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(835 - 782) + chr(166 - 116), 0b1000), ehT0Px3KOsy9(chr(1678 - 1630) + chr(7321 - 7210) + chr(0b10100 + 0o37) + chr(0b101000 + 0o15) + '\067', 8), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\x36' + '\060', 49900 - 49892), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2196 - 2146) + '\060' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(10586 - 10475) + chr(0b110001) + chr(0b110110) + chr(0b110011 + 0o2), 0b1000), ehT0Px3KOsy9(chr(1792 - 1744) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(0b1001 + 0o50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + '\062' + chr(53) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\064' + chr(53 - 0), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10136 - 10025) + chr(1751 - 1700) + chr(407 - 356) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b100001 + 0o21) + chr(53) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x32' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(0b110100 + 0o73) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(3466 - 3355) + chr(2358 - 2308) + chr(0b10 + 0o57) + chr(117 - 67), 0b1000), ehT0Px3KOsy9('\060' + chr(8847 - 8736) + '\062' + chr(764 - 713), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11185 - 11074) + chr(50) + chr(1482 - 1434) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(1950 - 1902) + chr(0b1101111) + chr(51) + '\x32' + chr(0b1011 + 0o45), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101111 + 0o3) + '\063' + chr(2854 - 2799), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(51) + chr(542 - 489), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\x31' + chr(1285 - 1236), ord("\x08")), ehT0Px3KOsy9(chr(1959 - 1911) + chr(0b1101111) + '\063' + chr(51) + chr(0b101 + 0o55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1142 - 1031) + '\x34' + '\x32', 29676 - 29668), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(51) + chr(1180 - 1126) + chr(52), 0b1000), ehT0Px3KOsy9(chr(282 - 234) + '\157' + '\061' + '\x37' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1994 - 1944) + chr(820 - 767), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1560 - 1511) + chr(0b101110 + 0o7) + chr(902 - 847), 0b1000), ehT0Px3KOsy9(chr(1985 - 1937) + '\x6f' + '\x31' + '\x33' + chr(1357 - 1306), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\065', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + chr(0b1101 + 0o50) + chr(48), 43121 - 43113)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf'), '\x64' + chr(101) + chr(0b1011000 + 0o13) + '\x6f' + '\144' + '\145')('\165' + '\x74' + chr(5508 - 5406) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def LD68aBifa9MM(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf37c\xc8\x95\x8c\x9af\xff\xe3C\x93\xc5'), '\144' + chr(101) + chr(7849 - 7750) + '\157' + chr(7458 - 7358) + chr(0b10101 + 0o120))(chr(0b1110100 + 0o1) + chr(0b1101110 + 0o6) + chr(0b1100110) + chr(763 - 718) + '\070')), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe57y\xcc\x95\x86\x8d'), chr(0b1100100) + chr(834 - 733) + chr(3596 - 3497) + chr(0b1101000 + 0o7) + chr(0b1100000 + 0o4) + '\145')(chr(117) + chr(0b1 + 0o163) + chr(102) + chr(0b101101) + chr(0b111000))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce!e\xdf\xae\x9c\x98t\xe7\xddU'), chr(1339 - 1239) + chr(0b1110 + 0o127) + chr(3362 - 3263) + chr(0b1000001 + 0o56) + '\144' + '\145')(chr(9837 - 9720) + '\164' + '\x66' + chr(45) + chr(0b111000))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce7h\xc0\x87\xb0\x88v\xea\xd0F\x88'), chr(0b1001000 + 0o34) + chr(427 - 326) + '\143' + '\157' + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b110 + 0o156) + '\146' + chr(45) + chr(56))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
modulo
|
def modulo(lhs, rhs):
"""Returns element-wise modulo of the input arrays with broadcasting.
Equivalent to ``lhs % rhs`` and ``mx.nd.broadcast_mod(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in modulo.
rhs : scalar or mxnet.ndarray.array
Second array in modulo.
The arrays to be taken modulo. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise modulo of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*4
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 4.],
[ 4.]], dtype=float32)
>>> x%5
<NDArray 2x3 @cpu(0)>
>>> (x%5).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x%y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.modulo(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_mod,
operator.mod,
_internal._mod_scalar,
_internal._rmod_scalar)
|
python
|
def modulo(lhs, rhs):
"""Returns element-wise modulo of the input arrays with broadcasting.
Equivalent to ``lhs % rhs`` and ``mx.nd.broadcast_mod(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in modulo.
rhs : scalar or mxnet.ndarray.array
Second array in modulo.
The arrays to be taken modulo. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise modulo of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*4
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 4.],
[ 4.]], dtype=float32)
>>> x%5
<NDArray 2x3 @cpu(0)>
>>> (x%5).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x%y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.modulo(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_mod,
operator.mod,
_internal._mod_scalar,
_internal._rmod_scalar)
|
[
"def",
"modulo",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_mod",
",",
"operator",
".",
"mod",
",",
"_internal",
".",
"_mod_scalar",
",",
"_internal",
".",
"_rmod_scalar",
")"
] |
Returns element-wise modulo of the input arrays with broadcasting.
Equivalent to ``lhs % rhs`` and ``mx.nd.broadcast_mod(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array in modulo.
rhs : scalar or mxnet.ndarray.array
Second array in modulo.
The arrays to be taken modulo. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise modulo of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))*6
>>> y = mx.nd.ones((2,1))*4
>>> x.asnumpy()
array([[ 6., 6., 6.],
[ 6., 6., 6.]], dtype=float32)
>>> y.asnumpy()
array([[ 4.],
[ 4.]], dtype=float32)
>>> x%5
<NDArray 2x3 @cpu(0)>
>>> (x%5).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x%y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.modulo(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"modulo",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2905-L2958
|
train
|
Returns an NDArray containing the element - wise modulo of the input arrays.
|
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,hOkXjmluKZf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_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' + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(813 - 764) + chr(0b111 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x36' + chr(2467 - 2412), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1902 - 1791) + chr(0b110010) + chr(48) + '\066', 0o10), ehT0Px3KOsy9(chr(1001 - 953) + chr(111) + chr(51) + chr(0b110111) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\061' + chr(0b10001 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(166 - 55) + chr(0b110001) + '\066' + chr(0b10000 + 0o40), 51713 - 51705), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x30' + chr(1332 - 1277), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b110000 + 0o1) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\x31' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(524 - 471) + '\067', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(0b110001) + chr(797 - 748) + chr(0b11 + 0o55), 60381 - 60373), ehT0Px3KOsy9('\060' + chr(0b111110 + 0o61) + chr(0b101100 + 0o7) + chr(667 - 618) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(8940 - 8829) + chr(0b11011 + 0o26) + chr(0b100000 + 0o22) + chr(0b10001 + 0o43), ord("\x08")), ehT0Px3KOsy9(chr(233 - 185) + chr(0b1000111 + 0o50) + chr(0b1010 + 0o51) + '\062' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110010) + chr(54), 8858 - 8850), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1000011 + 0o54) + chr(0b11111 + 0o22) + chr(0b1000 + 0o52) + chr(0b101000 + 0o11), 28840 - 28832), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(919 - 867) + chr(0b100100 + 0o17), 0b1000), ehT0Px3KOsy9(chr(495 - 447) + chr(0b1001001 + 0o46) + chr(2364 - 2315) + chr(1780 - 1728) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x36' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8277 - 8166) + chr(49) + '\x32' + '\x34', 8), ehT0Px3KOsy9(chr(1018 - 970) + chr(111) + chr(0b110010) + chr(1656 - 1607) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110010) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(52) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110011) + chr(0b101 + 0o54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\x31' + '\066' + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + chr(690 - 579) + '\067' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + '\x32' + '\065' + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\065' + chr(0b10110 + 0o32), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\062' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1529 - 1479) + chr(50), 13195 - 13187), ehT0Px3KOsy9(chr(971 - 923) + chr(0b1101011 + 0o4) + chr(1464 - 1415) + chr(0b11110 + 0o23) + chr(55), 59034 - 59026), ehT0Px3KOsy9('\060' + '\x6f' + '\x35' + chr(0b110101), 10622 - 10614), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\x32' + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(3913 - 3802) + chr(1413 - 1363) + chr(50) + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11001 + 0o30) + chr(48) + chr(2186 - 2136), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8460 - 8349) + '\x32' + chr(0b101100 + 0o6) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\x32' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(551 - 501) + chr(54) + chr(371 - 317), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b10000 + 0o137) + '\x35' + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1000001 + 0o43) + '\x65')(chr(0b1101010 + 0o13) + chr(116) + '\x66' + chr(1678 - 1633) + chr(0b1010 + 0o56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def mAr6V4ymkcYy(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b"G>\x18\xe7\x9bm\x114\x05\x11B'\xaf"), chr(0b1100010 + 0o2) + chr(0b1000011 + 0o42) + chr(99) + chr(111) + chr(0b1000 + 0o134) + chr(0b1100101))('\x75' + '\x74' + chr(0b1011011 + 0o13) + chr(1816 - 1771) + chr(0b1 + 0o67))), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'H#\x13'), chr(0b110011 + 0o61) + chr(101) + '\143' + chr(111) + '\x64' + chr(0b1100101))('\165' + chr(0b1001 + 0o153) + chr(0b1011001 + 0o15) + chr(0b101101) + chr(214 - 158))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'z!\x18\xe2\xa0}\x13&\x1d/]'), chr(0b1000010 + 0o42) + chr(0b100110 + 0o77) + chr(0b1100011) + chr(0b1101111) + chr(3949 - 3849) + chr(0b1100101))(chr(3970 - 3853) + chr(7632 - 7516) + chr(0b1101 + 0o131) + chr(0b1011 + 0o42) + chr(56))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'z>\x1a\xe9\x9bQ\x03$\x10"N:'), chr(0b11 + 0o141) + chr(0b111111 + 0o46) + chr(0b1100011) + chr(111) + chr(6869 - 6769) + '\145')(chr(8683 - 8566) + chr(0b1110100) + chr(102) + chr(665 - 620) + '\x38')))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
power
|
def power(base, exp):
"""Returns result of first array elements raised to powers from second array, element-wise
with broadcasting.
Equivalent to ``base ** exp`` and ``mx.nd.broadcast_power(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
base : scalar or NDArray
The base array
exp : scalar or NDArray
The exponent array. If ``base.shape != exp.shape``, they must be
broadcastable to a common shape.
Returns
--------
NDArray
The bases in x raised to the exponents in y.
Examples
--------
>>> x = mx.nd.ones((2,3))*2
>>> y = mx.nd.arange(1,3).reshape((2,1))
>>> z = mx.nd.arange(1,3).reshape((2,1))
>>> x.asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> y.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> z.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> (x**2).asnumpy()
array([[ 4., 4., 4.],
[ 4., 4., 4.]], dtype=float32)
>>> (x**y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> mx.nd.power(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> (z**y).asnumpy()
array([[ 1.],
[ 4.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
base,
exp,
op.broadcast_power,
operator.pow,
_internal._power_scalar,
_internal._rpower_scalar)
|
python
|
def power(base, exp):
"""Returns result of first array elements raised to powers from second array, element-wise
with broadcasting.
Equivalent to ``base ** exp`` and ``mx.nd.broadcast_power(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
base : scalar or NDArray
The base array
exp : scalar or NDArray
The exponent array. If ``base.shape != exp.shape``, they must be
broadcastable to a common shape.
Returns
--------
NDArray
The bases in x raised to the exponents in y.
Examples
--------
>>> x = mx.nd.ones((2,3))*2
>>> y = mx.nd.arange(1,3).reshape((2,1))
>>> z = mx.nd.arange(1,3).reshape((2,1))
>>> x.asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> y.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> z.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> (x**2).asnumpy()
array([[ 4., 4., 4.],
[ 4., 4., 4.]], dtype=float32)
>>> (x**y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> mx.nd.power(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> (z**y).asnumpy()
array([[ 1.],
[ 4.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
base,
exp,
op.broadcast_power,
operator.pow,
_internal._power_scalar,
_internal._rpower_scalar)
|
[
"def",
"power",
"(",
"base",
",",
"exp",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"base",
",",
"exp",
",",
"op",
".",
"broadcast_power",
",",
"operator",
".",
"pow",
",",
"_internal",
".",
"_power_scalar",
",",
"_internal",
".",
"_rpower_scalar",
")"
] |
Returns result of first array elements raised to powers from second array, element-wise
with broadcasting.
Equivalent to ``base ** exp`` and ``mx.nd.broadcast_power(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
base : scalar or NDArray
The base array
exp : scalar or NDArray
The exponent array. If ``base.shape != exp.shape``, they must be
broadcastable to a common shape.
Returns
--------
NDArray
The bases in x raised to the exponents in y.
Examples
--------
>>> x = mx.nd.ones((2,3))*2
>>> y = mx.nd.arange(1,3).reshape((2,1))
>>> z = mx.nd.arange(1,3).reshape((2,1))
>>> x.asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> y.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> z.asnumpy()
array([[ 1.],
[ 2.]], dtype=float32)
>>> (x**2).asnumpy()
array([[ 4., 4., 4.],
[ 4., 4., 4.]], dtype=float32)
>>> (x**y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> mx.nd.power(x,y).asnumpy()
array([[ 2., 2., 2.],
[ 4., 4., 4.]], dtype=float32)
>>> (z**y).asnumpy()
array([[ 1.],
[ 4.]], dtype=float32)
|
[
"Returns",
"result",
"of",
"first",
"array",
"elements",
"raised",
"to",
"powers",
"from",
"second",
"array",
"element",
"-",
"wise",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2962-L3020
|
train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wAeSQh7N,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(1498 - 1450) + chr(111) + chr(0b110011) + chr(0b110011), 13289 - 13281), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + '\x32' + chr(2009 - 1959) + chr(1616 - 1568), 0o10), ehT0Px3KOsy9(chr(1715 - 1667) + chr(12001 - 11890) + chr(50) + chr(0b101010 + 0o7) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + chr(1028 - 973) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(745 - 694) + '\x37' + chr(0b10110 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(12261 - 12150) + '\x32' + '\x34' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b110001) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x36' + chr(2174 - 2120), 53314 - 53306), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(94 - 43) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + chr(2200 - 2145), 41856 - 41848), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000 + 0o1) + '\x36' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1274 - 1163) + '\065', 19672 - 19664), ehT0Px3KOsy9(chr(1671 - 1623) + chr(0b101100 + 0o103) + chr(0b110101) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110011) + '\060' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11010 + 0o125) + chr(0b110011) + '\x33' + chr(0b100101 + 0o14), 0o10), ehT0Px3KOsy9('\x30' + chr(8331 - 8220) + '\x31' + chr(52) + chr(51), 39547 - 39539), ehT0Px3KOsy9(chr(48) + chr(3976 - 3865) + '\063' + chr(1036 - 988) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1250 - 1202) + chr(0b100 + 0o153) + '\x32' + chr(0b11010 + 0o31) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100010 + 0o15) + chr(49) + '\061' + '\066', 13541 - 13533), ehT0Px3KOsy9(chr(48) + chr(0b1010000 + 0o37) + '\062' + chr(0b110100) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(638 - 587) + '\x34' + chr(55), 27444 - 27436), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\x33' + chr(1959 - 1907), 19085 - 19077), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(787 - 676) + chr(0b110001) + '\x35' + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(1614 - 1563), 19320 - 19312), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o66) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + chr(1761 - 1706) + '\x34', 9453 - 9445), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(397 - 342) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x37' + '\061', 8), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + chr(49) + chr(0b110101) + chr(0b10101 + 0o40), 22059 - 22051), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101 + 0o142) + chr(1305 - 1255) + '\x31', 16697 - 16689), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(0b110011) + '\x30', 43440 - 43432), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(1227 - 1176) + chr(1036 - 981), 23314 - 23306), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(49) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1001 + 0o56) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1000101 + 0o52) + chr(51) + chr(0b110000) + chr(51), 50429 - 50421), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1100011 + 0o14) + '\061' + chr(0b110010) + '\065', 58768 - 58760), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(2040 - 1991) + chr(0b1101 + 0o44), 18652 - 18644), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1110 + 0o44) + chr(2460 - 2410) + '\x30', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1805 - 1752) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'5'), chr(100) + chr(1320 - 1219) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(9686 - 9585))(chr(117) + chr(6025 - 5909) + chr(7329 - 7227) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def GpqOSrxEIkxx(XLXqkmM_0GVx, quvessij56om):
return ds3d0f99cgFg(XLXqkmM_0GVx, quvessij56om, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'y\xe2\xe2X\x9c\xc6<q\xb8i*H\x01`\\'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\165' + chr(0b1000100 + 0o60) + '\x66' + chr(0b11 + 0o52) + '\x38')), xafqLlk3kkUe(xJShi6yitBWy, xafqLlk3kkUe(SXOLrMavuUCe(b'k\xff\xfa'), '\x64' + '\145' + chr(3948 - 3849) + '\x6f' + chr(0b10001 + 0o123) + chr(1718 - 1617))(chr(1837 - 1720) + chr(12790 - 12674) + '\x66' + chr(45) + chr(0b100001 + 0o27))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'D\xe0\xe2N\x9d\xd7\x02q\xafW6F\x04'), chr(0b1100100) + chr(0b110001 + 0o64) + '\x63' + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(2543 - 2487))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'D\xe2\xfdV\x8f\xc0/]\xbfU;K\x17w'), '\x64' + chr(101) + '\143' + chr(111) + chr(100) + chr(0b11011 + 0o112))(chr(13454 - 13337) + chr(0b1011110 + 0o26) + '\146' + '\x2d' + chr(322 - 266))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
maximum
|
def maximum(lhs, rhs):
"""Returns element-wise maximum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_maximum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise maximum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.maximum(x, 2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.maximum(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.maximum(y, z).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_maximum,
lambda x, y: x if x > y else y,
_internal._maximum_scalar,
None)
|
python
|
def maximum(lhs, rhs):
"""Returns element-wise maximum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_maximum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise maximum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.maximum(x, 2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.maximum(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.maximum(y, z).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_maximum,
lambda x, y: x if x > y else y,
_internal._maximum_scalar,
None)
|
[
"def",
"maximum",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_maximum",
",",
"lambda",
"x",
",",
"y",
":",
"x",
"if",
"x",
">",
"y",
"else",
"y",
",",
"_internal",
".",
"_maximum_scalar",
",",
"None",
")"
] |
Returns element-wise maximum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_maximum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise maximum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.maximum(x, 2).asnumpy()
array([[ 2., 2., 2.],
[ 2., 2., 2.]], dtype=float32)
>>> mx.nd.maximum(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.maximum(y, z).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"maximum",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3024-L3077
|
train
|
Returns the element - wise maximum of the input arrays with broadcasting.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGF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jMfR0,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' + '\x6f' + '\062' + '\x33' + chr(0b0 + 0o66), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101011 + 0o10) + chr(1960 - 1906) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001100 + 0o43) + '\062' + chr(0b110100) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(83 - 29) + '\066', 8977 - 8969), ehT0Px3KOsy9(chr(48) + chr(7637 - 7526) + chr(52), 1945 - 1937), ehT0Px3KOsy9('\x30' + chr(0b100010 + 0o115) + chr(0b11101 + 0o30) + chr(1165 - 1113), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(0b110111) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o46) + chr(1337 - 1282) + chr(1966 - 1916), 9267 - 9259), ehT0Px3KOsy9(chr(0b110000) + chr(10822 - 10711) + '\x32' + chr(0b100011 + 0o22) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100111 + 0o13) + '\x31' + chr(0b110000 + 0o5), 52925 - 52917), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(237 - 186) + chr(0b1 + 0o60) + chr(0b110010), 40206 - 40198), ehT0Px3KOsy9(chr(0b110000) + chr(0b11111 + 0o120) + chr(0b110001) + chr(424 - 373) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\064' + chr(0b110000 + 0o2), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(52) + chr(2594 - 2540), 40842 - 40834), ehT0Px3KOsy9(chr(1651 - 1603) + '\157' + chr(51) + chr(0b10010 + 0o42) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + '\x33' + chr(0b111 + 0o56) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(51) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110011) + chr(0b10101 + 0o42) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(50) + chr(1808 - 1754) + chr(1400 - 1346), 11789 - 11781), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + '\064' + chr(0b101001 + 0o12), 43503 - 43495), ehT0Px3KOsy9('\060' + '\157' + '\067' + '\x30', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1309 - 1260) + chr(0b110011) + chr(1610 - 1557), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1 + 0o62) + chr(51), 43740 - 43732), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(1558 - 1510) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(570 - 522) + chr(0b1101111) + chr(49) + chr(2116 - 2066) + chr(2648 - 2596), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(0b110011) + '\067' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b111001 + 0o66) + chr(0b10100 + 0o43) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10101 + 0o36) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2977 - 2866) + chr(0b110001) + chr(3002 - 2947) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + '\x33' + '\066' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(0b110101) + chr(0b110001), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110001) + chr(87 - 34), 0b1000), ehT0Px3KOsy9(chr(1955 - 1907) + chr(4631 - 4520) + '\062' + chr(1530 - 1480) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + '\063' + chr(0b110000) + chr(0b101100 + 0o5), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b11101 + 0o31) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + '\x32' + chr(0b110001) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\065' + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(1535 - 1481) + chr(516 - 465), 32854 - 32846), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b1011 + 0o52) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + '\x36' + chr(0b110010), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\065' + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0'), '\x64' + chr(0b100110 + 0o77) + '\x63' + '\157' + '\144' + chr(101))('\x75' + '\x74' + chr(8920 - 8818) + chr(45) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _dNSs6gxhn0f(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\x84\xcaW`OY\xc9\xd8\xd2\xa79Z\x0f\x8c\x9c\xb3'), '\144' + chr(4129 - 4028) + chr(0b1001111 + 0o24) + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(0b110111 + 0o75) + chr(102) + chr(0b101101) + chr(1024 - 968))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: OeWW0F1dBPRQ if OeWW0F1dBPRQ > SqiSOtYOqOJH else SqiSOtYOqOJH, xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x9b\xc4NmAM\xd7\xf3\xfe\xa99N\x07\x93'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(1807 - 1707) + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + '\x2d' + '\070')), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
minimum
|
def minimum(lhs, rhs):
"""Returns element-wise minimum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_minimum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise minimum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.minimum(x, 2).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_minimum,
lambda x, y: x if x < y else y,
_internal._minimum_scalar,
None)
|
python
|
def minimum(lhs, rhs):
"""Returns element-wise minimum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_minimum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise minimum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.minimum(x, 2).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_minimum,
lambda x, y: x if x < y else y,
_internal._minimum_scalar,
None)
|
[
"def",
"minimum",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_minimum",
",",
"lambda",
"x",
",",
"y",
":",
"x",
"if",
"x",
"<",
"y",
"else",
"y",
",",
"_internal",
".",
"_minimum_scalar",
",",
"None",
")"
] |
Returns element-wise minimum of the input arrays with broadcasting.
Equivalent to ``mx.nd.broadcast_minimum(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
The element-wise minimum of the input arrays.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.minimum(x, 2).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.minimum(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
|
[
"Returns",
"element",
"-",
"wise",
"minimum",
"of",
"the",
"input",
"arrays",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3081-L3134
|
train
|
Returns the element - wise minimum of the input arrays with broadcasting.
|
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,qqrhS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v8UVFey,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' + chr(0b110010) + chr(52) + '\067', 117 - 109), ehT0Px3KOsy9(chr(1236 - 1188) + chr(111) + chr(51) + '\067' + '\063', 47677 - 47669), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\061' + '\065' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b101111 + 0o3) + chr(2447 - 2396), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\x35' + chr(53), 12512 - 12504), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10011 + 0o40) + chr(1500 - 1449) + chr(0b100010 + 0o20), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101101 + 0o102) + chr(2021 - 1971) + chr(1868 - 1820) + chr(109 - 59), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4738 - 4627) + chr(55) + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1981 - 1930) + chr(0b110110) + chr(0b11001 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(2192 - 2138) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(0b10111 + 0o32) + '\066' + chr(52), 11051 - 11043), ehT0Px3KOsy9(chr(2054 - 2006) + '\x6f' + chr(462 - 412) + chr(1975 - 1923) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o45) + chr(2010 - 1961) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110111) + chr(1912 - 1863), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101001 + 0o13) + chr(54), 17775 - 17767), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b1111 + 0o45) + '\064', 25368 - 25360), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110100) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + chr(51) + chr(51) + chr(0b101100 + 0o10), 0o10), ehT0Px3KOsy9(chr(1940 - 1892) + chr(0b1010100 + 0o33) + chr(1573 - 1522) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(12064 - 11953) + '\061' + chr(52) + chr(0b10001 + 0o37), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110 + 0o55) + chr(50) + '\x37', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110101) + chr(1377 - 1327), 1455 - 1447), ehT0Px3KOsy9('\060' + chr(7425 - 7314) + chr(2129 - 2076) + chr(0b110011), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011011 + 0o24) + '\062' + '\x35' + chr(50), 31435 - 31427), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b1 + 0o61) + chr(754 - 706) + chr(49), 20900 - 20892), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b10010 + 0o37) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11111 + 0o24) + chr(50) + chr(0b10100 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001 + 0o0) + '\x33' + chr(0b110000), 52271 - 52263), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\x33' + chr(50), 0b1000), ehT0Px3KOsy9(chr(1869 - 1821) + '\x6f' + chr(1404 - 1354) + chr(1068 - 1017) + chr(0b110011), 29842 - 29834), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x31' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(0b110010) + '\x37' + chr(0b110111), 9937 - 9929), ehT0Px3KOsy9(chr(2045 - 1997) + chr(8238 - 8127) + chr(0b110001) + '\x30' + chr(0b11000 + 0o36), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101111 + 0o3) + '\063' + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\064' + chr(0b10000 + 0o44), 8), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + chr(1211 - 1160) + '\066' + '\x35', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + '\065' + chr(0b100001 + 0o17), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), '\144' + chr(4401 - 4300) + chr(5618 - 5519) + chr(0b1101111) + chr(2068 - 1968) + chr(0b1100101))('\x75' + chr(0b1110011 + 0o1) + '\146' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def YIAZqmKHfin_(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\x89\x01\xf2\x89\xb9\xe3K\x86\xab\x19\xcd$Dl\x8c\x8e'), '\x64' + chr(101) + '\143' + chr(0b1101011 + 0o4) + chr(0b111011 + 0o51) + chr(0b101111 + 0o66))(chr(0b1110101) + chr(0b1110100) + chr(0b10010 + 0o124) + '\x2d' + chr(0b111000))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: OeWW0F1dBPRQ if OeWW0F1dBPRQ < SqiSOtYOqOJH else SqiSOtYOqOJH, xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x96\x07\xfd\x84\xb7\xf7U\xad\x87\x17\xc5&Ls'), chr(100) + chr(101) + chr(3121 - 3022) + chr(111) + chr(0b1100100) + chr(0b1000100 + 0o41))('\165' + chr(774 - 658) + chr(102) + chr(0b101101) + '\x38')), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
equal
|
def equal(lhs, rhs):
"""Returns the result of element-wise **equal to** (==) comparison operation with
broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are same,
otherwise return 0(false).
Equivalent to ``lhs == rhs`` and ``mx.nd.broadcast_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x == 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x == y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.equal(x,y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_equal,
lambda x, y: 1 if x == y else 0,
_internal._equal_scalar,
None)
|
python
|
def equal(lhs, rhs):
"""Returns the result of element-wise **equal to** (==) comparison operation with
broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are same,
otherwise return 0(false).
Equivalent to ``lhs == rhs`` and ``mx.nd.broadcast_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x == 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x == y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.equal(x,y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_equal,
lambda x, y: 1 if x == y else 0,
_internal._equal_scalar,
None)
|
[
"def",
"equal",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_equal",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"==",
"y",
"else",
"0",
",",
"_internal",
".",
"_equal_scalar",
",",
"None",
")"
] |
Returns the result of element-wise **equal to** (==) comparison operation with
broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are same,
otherwise return 0(false).
Equivalent to ``lhs == rhs`` and ``mx.nd.broadcast_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x == 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x == y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.equal(x,y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"equal",
"to",
"**",
"(",
"==",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3138-L3198
|
train
|
Returns the result of element - wise equal to comparison with broadcasting.
|
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,rIcPej9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UM0,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(2094 - 2045) + chr(2607 - 2554) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(1402 - 1352), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + '\x33' + chr(0b1011 + 0o47), 4930 - 4922), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + chr(49) + '\061' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1115 - 1067) + chr(0b1101111) + '\x33' + chr(609 - 560) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(2232 - 2184) + chr(6144 - 6033) + chr(0b110001) + '\063' + '\065', 0b1000), ehT0Px3KOsy9(chr(521 - 473) + '\x6f' + chr(0b110010) + chr(0b110010 + 0o1) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1874 - 1826) + chr(0b11010 + 0o125) + '\062' + chr(0b110111) + chr(0b100011 + 0o21), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(51) + chr(51), 11190 - 11182), ehT0Px3KOsy9(chr(48) + chr(10083 - 9972) + '\x31' + chr(0b110110) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + '\062' + '\064' + chr(1194 - 1140), ord("\x08")), ehT0Px3KOsy9(chr(2279 - 2231) + chr(111) + chr(0b101100 + 0o7) + chr(54) + chr(1122 - 1071), ord("\x08")), ehT0Px3KOsy9(chr(2301 - 2253) + chr(111) + chr(1781 - 1728) + '\062', 43689 - 43681), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(2201 - 2147) + '\063', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1000 + 0o52) + '\063' + chr(0b1010 + 0o47), 27394 - 27386), ehT0Px3KOsy9(chr(1357 - 1309) + '\157' + chr(51) + chr(0b110111) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x34' + '\x31', 53495 - 53487), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(1242 - 1190) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\062' + chr(0b110011) + chr(0b101000 + 0o17), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(52) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b100101 + 0o15) + chr(55) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1436 - 1388) + chr(0b1011000 + 0o27) + chr(0b110001) + chr(0b11000 + 0o33) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1010 + 0o47) + chr(158 - 107) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\061' + chr(234 - 181), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + '\066' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(54) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11000 + 0o37) + chr(0b10101 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(931 - 883) + chr(111) + '\x33' + chr(0b110110) + chr(0b11000 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(482 - 434) + '\157' + chr(851 - 800) + chr(0b101011 + 0o12), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + chr(0b101001 + 0o11) + '\x37' + '\x30', 32815 - 32807), ehT0Px3KOsy9('\x30' + chr(0b1001011 + 0o44) + chr(0b110001) + chr(52) + chr(882 - 827), ord("\x08")), ehT0Px3KOsy9(chr(951 - 903) + chr(111) + chr(50) + '\x33' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(1446 - 1397) + chr(216 - 164) + chr(1196 - 1144), 0o10), ehT0Px3KOsy9('\060' + chr(3120 - 3009) + chr(0b101001 + 0o11) + '\061' + chr(53), 3803 - 3795), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10010 + 0o40) + chr(0b110111 + 0o0) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b10 + 0o155) + '\063' + chr(0b110001) + chr(48), 0b1000), ehT0Px3KOsy9(chr(1689 - 1641) + '\x6f' + '\062' + chr(2042 - 1989) + '\067', 18261 - 18253), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(53) + '\061', 8), ehT0Px3KOsy9(chr(1306 - 1258) + chr(0b1011001 + 0o26) + chr(50) + chr(49) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1538 - 1490) + chr(0b110000 + 0o77) + '\061' + chr(0b110110) + '\x31', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110101) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'G'), chr(0b1100100) + chr(9797 - 9696) + chr(0b11111 + 0o104) + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + '\164' + '\146' + chr(0b10101 + 0o30) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Ndbzm8Gf14QP(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0bx\xb5.\xaa>\xfa\xcf\xaf-\xc3\x82_\x92\xf5'), '\x64' + chr(0b111011 + 0o52) + chr(0b1100011) + '\157' + '\144' + chr(0b111010 + 0o53))('\165' + '\x74' + '\146' + chr(0b10001 + 0o34) + chr(1600 - 1544))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110001), ord("\x08")) if OeWW0F1dBPRQ == SqiSOtYOqOJH else ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + '\x30', 0o10), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'6o\xab:\xaf1\xc4\xcf\xb8\x13\xca\x92X'), chr(0b111 + 0o135) + '\145' + chr(99) + chr(111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1000000 + 0o64) + chr(0b1100110) + '\x2d' + chr(56))), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
not_equal
|
def not_equal(lhs, rhs):
"""Returns the result of element-wise **not equal to** (!=) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are different,
otherwise return 0(false).
Equivalent to ``lhs != rhs`` and ``mx.nd.broadcast_not_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
>>> (x != 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x != y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.not_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z != y).asnumpy()
array([[ 0., 1.],
[ 1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_not_equal,
lambda x, y: 1 if x != y else 0,
_internal._not_equal_scalar,
None)
|
python
|
def not_equal(lhs, rhs):
"""Returns the result of element-wise **not equal to** (!=) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are different,
otherwise return 0(false).
Equivalent to ``lhs != rhs`` and ``mx.nd.broadcast_not_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
>>> (x != 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x != y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.not_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z != y).asnumpy()
array([[ 0., 1.],
[ 1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_not_equal,
lambda x, y: 1 if x != y else 0,
_internal._not_equal_scalar,
None)
|
[
"def",
"not_equal",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_not_equal",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"!=",
"y",
"else",
"0",
",",
"_internal",
".",
"_not_equal_scalar",
",",
"None",
")"
] |
Returns the result of element-wise **not equal to** (!=) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if corresponding elements are different,
otherwise return 0(false).
Equivalent to ``lhs != rhs`` and ``mx.nd.broadcast_not_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (z == y).asnumpy()
array([[ 1., 0.],
[ 0., 1.]], dtype=float32)
>>> (x != 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x != y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.not_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z != y).asnumpy()
array([[ 0., 1.],
[ 1., 0.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"not",
"equal",
"to",
"**",
"(",
"!",
"=",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3202-L3265
|
train
|
Returns the result of element - wise not equal to ** = 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,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,sznFqD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7fO0,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(0b100000 + 0o20) + chr(0b110000 + 0o77) + chr(0b101110 + 0o3) + chr(0b11010 + 0o31) + chr(3025 - 2970), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9638 - 9527) + chr(1578 - 1524) + chr(1029 - 975), 15493 - 15485), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + '\062' + chr(49) + chr(240 - 189), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(0b1001 + 0o56) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\063' + '\063', 6510 - 6502), ehT0Px3KOsy9('\060' + chr(6058 - 5947) + '\065' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\060' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(2499 - 2388) + '\061' + chr(0b10010 + 0o43) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b110100) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x33', 56186 - 56178), ehT0Px3KOsy9('\x30' + chr(0b110011 + 0o74) + '\x33' + '\067' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(54) + chr(986 - 933), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(2178 - 2127) + chr(0b110111) + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\065' + chr(0b110011), 1217 - 1209), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(55) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(7289 - 7178) + '\062' + chr(0b11110 + 0o31) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2458 - 2347) + chr(0b110001) + '\066' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(996 - 948) + '\157' + chr(54) + chr(48), 0o10), ehT0Px3KOsy9(chr(352 - 304) + '\x6f' + '\062' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3365 - 3254) + chr(50) + chr(0b0 + 0o66) + chr(1194 - 1146), 4673 - 4665), ehT0Px3KOsy9(chr(1341 - 1293) + chr(111) + chr(2572 - 2521) + chr(1756 - 1708) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11111 + 0o24) + '\x36' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(173 - 124) + '\067' + '\x34', 47072 - 47064), ehT0Px3KOsy9(chr(48) + chr(7205 - 7094) + '\x31' + '\x32' + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11110 + 0o24) + '\x34' + chr(2381 - 2326), 0o10), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + chr(0b110010) + chr(1020 - 970) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b10001 + 0o41) + chr(0b110110) + chr(888 - 835), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110001 + 0o76) + chr(0b1001 + 0o52) + chr(48) + chr(1990 - 1939), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(234 - 184) + chr(0b110000 + 0o3) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111 + 0o0) + chr(51) + chr(50) + '\x36', 0o10), ehT0Px3KOsy9(chr(1700 - 1652) + '\157' + '\x32' + chr(54) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(2632 - 2521) + '\061' + chr(0b1111 + 0o42), 59064 - 59056), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(2299 - 2250) + chr(0b110 + 0o56), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110101) + chr(51), 8), ehT0Px3KOsy9('\x30' + chr(0b0 + 0o157) + chr(0b110010 + 0o1) + '\060' + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1010 + 0o47) + chr(0b110110) + chr(317 - 267), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x31' + '\x35', 46165 - 46157), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b100101 + 0o13) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b101100 + 0o4) + '\x30', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\065' + chr(1491 - 1443), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'q'), '\144' + chr(101) + '\143' + chr(857 - 746) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + chr(0b101010 + 0o74) + chr(1323 - 1278) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jC5UJb27_ZST(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'=D\xe4\x9d\xffM\xa3\x19\xd0D\x90Z\x8d\xb4\xdf\xc9\x04Qy'), chr(0b1100100) + '\145' + chr(6198 - 6099) + chr(11139 - 11028) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(5127 - 5011) + chr(10144 - 10042) + chr(0b1 + 0o54) + chr(56))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(48) + chr(111) + '\x31', 0o10) if OeWW0F1dBPRQ != SqiSOtYOqOJH else ehT0Px3KOsy9(chr(295 - 247) + chr(0b1101111) + '\x30', 0b1000), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00X\xe4\x88\xc4K\xb3\x1f\xc5w\xa1F\x9a\x8a\xd6\xd9\x03'), '\144' + chr(101) + chr(99) + '\157' + chr(0b110101 + 0o57) + '\x65')(chr(0b1001011 + 0o52) + chr(116) + '\146' + '\055' + '\070')), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
greater
|
def greater(lhs, rhs):
"""Returns the result of element-wise **greater than** (>) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than rhs,
otherwise return 0(false).
Equivalent to ``lhs > rhs`` and ``mx.nd.broadcast_greater(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x > 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x > y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.greater(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z > y).asnumpy()
array([[ 0., 1.],
[ 0., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_greater,
lambda x, y: 1 if x > y else 0,
_internal._greater_scalar,
_internal._lesser_scalar)
|
python
|
def greater(lhs, rhs):
"""Returns the result of element-wise **greater than** (>) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than rhs,
otherwise return 0(false).
Equivalent to ``lhs > rhs`` and ``mx.nd.broadcast_greater(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x > 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x > y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.greater(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z > y).asnumpy()
array([[ 0., 1.],
[ 0., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_greater,
lambda x, y: 1 if x > y else 0,
_internal._greater_scalar,
_internal._lesser_scalar)
|
[
"def",
"greater",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_greater",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
">",
"y",
"else",
"0",
",",
"_internal",
".",
"_greater_scalar",
",",
"_internal",
".",
"_lesser_scalar",
")"
] |
Returns the result of element-wise **greater than** (>) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than rhs,
otherwise return 0(false).
Equivalent to ``lhs > rhs`` and ``mx.nd.broadcast_greater(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x > 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x > y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.greater(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
>>> (z > y).asnumpy()
array([[ 0., 1.],
[ 0., 0.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"greater",
"than",
"**",
"(",
">",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3269-L3329
|
train
|
Returns the result of element - wise greater than rhs comparison operation
with broadcasting.
|
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,Kk1hd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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(0b110011) + chr(280 - 225) + chr(2082 - 2034), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x33' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(2288 - 2239), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1261 - 1150) + chr(50) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1640 - 1588) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1444 - 1395) + chr(0b110001) + chr(0b11001 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b100001 + 0o116) + chr(0b1 + 0o60) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10011 + 0o40) + '\x37' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(6150 - 6039) + '\061' + '\x32' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(0b110011) + chr(0b1010 + 0o52) + chr(52), 0o10), ehT0Px3KOsy9(chr(982 - 934) + chr(111) + chr(0b11101 + 0o24) + '\062' + chr(0b100000 + 0o25), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b10010 + 0o43) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(52) + '\067', 0b1000), ehT0Px3KOsy9(chr(1692 - 1644) + chr(5811 - 5700) + chr(0b100111 + 0o20) + chr(49), 0o10), ehT0Px3KOsy9(chr(1514 - 1466) + chr(111) + '\x35' + chr(53), 0b1000), ehT0Px3KOsy9(chr(421 - 373) + chr(0b1100001 + 0o16) + chr(651 - 601) + chr(0b101000 + 0o17), 0b1000), ehT0Px3KOsy9('\060' + chr(3718 - 3607) + '\x33' + '\x37' + chr(1737 - 1682), 49917 - 49909), ehT0Px3KOsy9('\060' + chr(4577 - 4466) + chr(0b10000 + 0o43) + '\066' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x35' + chr(703 - 651), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b1 + 0o63) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110100) + chr(0b1010 + 0o51), 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + '\064' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(0b110111) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(590 - 540) + '\x36' + chr(0b1101 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8774 - 8663) + '\061' + chr(0b110001) + chr(0b11 + 0o62), 0o10), ehT0Px3KOsy9(chr(613 - 565) + '\157' + chr(2207 - 2156) + chr(53) + '\066', 52096 - 52088), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(2056 - 2005) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(619 - 568) + '\x36', 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(3534 - 3423) + chr(50) + '\067' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(6160 - 6049) + '\063' + '\065' + chr(1216 - 1164), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(731 - 680) + chr(2412 - 2359), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + chr(49) + chr(55) + '\066', 10874 - 10866), ehT0Px3KOsy9('\x30' + chr(1985 - 1874) + chr(0b101 + 0o54) + chr(543 - 495) + '\063', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b100000 + 0o25) + chr(0b101101 + 0o3), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(795 - 747) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o61), 0o10), ehT0Px3KOsy9(chr(1826 - 1778) + chr(0b110100 + 0o73) + '\x31' + chr(55) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1620 - 1565) + '\x33', 34723 - 34715), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(12213 - 12102) + '\064' + chr(0b110101), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(433 - 385) + '\157' + chr(0b110101) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6'), chr(0b1100100) + chr(1016 - 915) + chr(0b10111 + 0o114) + '\157' + chr(0b1011 + 0o131) + chr(0b110 + 0o137))(chr(8264 - 8147) + chr(0b1011001 + 0o33) + chr(8242 - 8140) + chr(0b10100 + 0o31) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def J3L2JbxNiC5D(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b"\x9a.fuB*m\x88'\xbb2\x18\xc2XYr\x8d"), chr(0b1100 + 0o130) + chr(101) + chr(0b1001011 + 0o30) + chr(7372 - 7261) + chr(3548 - 3448) + '\x65')(chr(11677 - 11560) + chr(5987 - 5871) + chr(0b1001000 + 0o36) + '\055' + '\x38')), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', 19733 - 19725) if OeWW0F1dBPRQ > SqiSOtYOqOJH else ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(0b101011 + 0o5), 0b1000), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7;{qG=i\x89\x0c\x976\x0b\xcbX_'), '\144' + chr(7906 - 7805) + '\143' + chr(10643 - 10532) + '\x64' + chr(5647 - 5546))(chr(0b101 + 0o160) + chr(0b1110100) + chr(3831 - 3729) + chr(1847 - 1802) + chr(2741 - 2685))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa70lgU,~\xa4 \x874\x06\xc6K'), chr(0b1001110 + 0o26) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1010001 + 0o25) + '\055' + chr(2622 - 2566))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
greater_equal
|
def greater_equal(lhs, rhs):
"""Returns the result of element-wise **greater than or equal to** (>=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than equal to rhs,
otherwise return 0(false).
Equivalent to ``lhs >= rhs`` and ``mx.nd.broadcast_greater_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x >= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x >= y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.greater_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (z >= y).asnumpy()
array([[ 1., 1.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_greater_equal,
lambda x, y: 1 if x >= y else 0,
_internal._greater_equal_scalar,
_internal._lesser_equal_scalar)
|
python
|
def greater_equal(lhs, rhs):
"""Returns the result of element-wise **greater than or equal to** (>=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than equal to rhs,
otherwise return 0(false).
Equivalent to ``lhs >= rhs`` and ``mx.nd.broadcast_greater_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x >= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x >= y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.greater_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (z >= y).asnumpy()
array([[ 1., 1.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_greater_equal,
lambda x, y: 1 if x >= y else 0,
_internal._greater_equal_scalar,
_internal._lesser_equal_scalar)
|
[
"def",
"greater_equal",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_greater_equal",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
">=",
"y",
"else",
"0",
",",
"_internal",
".",
"_greater_equal_scalar",
",",
"_internal",
".",
"_lesser_equal_scalar",
")"
] |
Returns the result of element-wise **greater than or equal to** (>=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are greater than equal to rhs,
otherwise return 0(false).
Equivalent to ``lhs >= rhs`` and ``mx.nd.broadcast_greater_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x >= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x >= y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.greater_equal(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (z >= y).asnumpy()
array([[ 1., 1.],
[ 0., 1.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"greater",
"than",
"or",
"equal",
"to",
"**",
"(",
">",
"=",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3333-L3393
|
train
|
Returns the result of element - wise greater than or equal to ( > = ) comparison
operation with broadcasting.
|
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(chr(48) + '\157' + chr(0b110001) + '\065' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(134 - 86) + chr(0b1100101 + 0o12) + chr(1252 - 1201) + chr(55) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(11607 - 11496) + chr(0b100011 + 0o20) + chr(0b10011 + 0o35) + chr(0b1011 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b100111 + 0o110) + chr(0b110001) + chr(0b11100 + 0o31) + chr(1962 - 1910), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1338 - 1227) + chr(0b110111) + '\062', 0o10), ehT0Px3KOsy9(chr(1906 - 1858) + chr(0b1010111 + 0o30) + chr(0b1011 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(1723 - 1668), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3576 - 3465) + chr(53) + chr(109 - 56), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + '\063' + chr(51) + '\065', 39543 - 39535), ehT0Px3KOsy9('\060' + chr(0b1101100 + 0o3) + chr(0b110010 + 0o2) + '\x37', 34695 - 34687), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b10111 + 0o36) + '\063', 27806 - 27798), ehT0Px3KOsy9('\060' + chr(6808 - 6697) + chr(0b1110 + 0o43) + '\x37' + chr(0b1 + 0o66), ord("\x08")), ehT0Px3KOsy9(chr(1299 - 1251) + '\x6f' + chr(0b110001) + chr(2741 - 2686) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\067' + '\x35', 5525 - 5517), ehT0Px3KOsy9(chr(717 - 669) + chr(0b1101000 + 0o7) + '\x33' + '\060' + chr(0b110000), 8), ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(1545 - 1496) + '\x35' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100100 + 0o16) + '\x33' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(312 - 263) + chr(186 - 135) + '\x34', 43855 - 43847), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110100) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1402 - 1354) + chr(111) + chr(0b1110 + 0o43) + chr(48) + chr(52), 55891 - 55883), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o61) + chr(0b110001) + '\061', 24433 - 24425), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(48) + chr(416 - 364), ord("\x08")), ehT0Px3KOsy9(chr(1524 - 1476) + chr(111) + chr(1833 - 1782) + chr(1978 - 1930) + '\064', 8), ehT0Px3KOsy9(chr(1113 - 1065) + chr(0b1101111) + chr(454 - 403) + chr(751 - 702) + '\x37', 0b1000), ehT0Px3KOsy9(chr(778 - 730) + chr(0b10011 + 0o134) + chr(49) + '\066' + chr(0b100110 + 0o20), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000 + 0o7) + '\062', 8), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + '\x31' + chr(431 - 382) + '\x36', 61299 - 61291), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b110101 + 0o72) + chr(0b110001) + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(2596 - 2544) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7148 - 7037) + chr(0b1010 + 0o53) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(0b101000 + 0o13) + '\067' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(0b110011) + chr(0b10 + 0o62) + '\x33', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + '\x35' + '\067', 26278 - 26270), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1784 - 1735) + '\064' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(1730 - 1677) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110110) + chr(0b1 + 0o61), 36964 - 36956), ehT0Px3KOsy9(chr(930 - 882) + chr(10251 - 10140) + '\x33' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(1168 - 1119) + '\065' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1699 - 1651) + '\157' + '\062' + chr(0b110101) + chr(0b110110), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(10245 - 10134) + '\x35' + chr(2167 - 2119), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'C'), '\144' + chr(2850 - 2749) + '\x63' + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1011000 + 0o35) + chr(0b100110 + 0o116) + chr(102) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _vQgc1LpvOSe(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\x88\xaf\r^`n^\xa9x\x0c\r\x1a\x9c\xb4\x0c\xeb\x03A5\xbc\xa5\xa8'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(0b111101 + 0o67) + '\x66' + chr(0b101101) + '\070')), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9('\x30' + '\157' + chr(1278 - 1229), ord("\x08")) if OeWW0F1dBPRQ >= SqiSOtYOqOJH else ehT0Px3KOsy9('\x30' + '\x6f' + '\x30', ord("\x08")), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'2\x9d\xb2\t[wj_\x82B\x1a\n\x1e\x91\x9f\x1a\xfa=H%\xbb'), chr(0b1100100) + '\145' + '\143' + chr(0b1011111 + 0o20) + chr(0b1100100) + chr(101))('\165' + '\164' + '\146' + '\055' + '\x38')), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'2\x96\xa5\x1fIf}r\xb8V\x1e\x1e\x13\xa2\xb3\n\xf80E6'), chr(100) + chr(3230 - 3129) + chr(0b1100011) + '\157' + '\144' + chr(8621 - 8520))(chr(0b101000 + 0o115) + '\x74' + '\146' + chr(0b101101) + '\x38')))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
lesser
|
def lesser(lhs, rhs):
"""Returns the result of element-wise **lesser than** (<) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are less than rhs,
otherwise return 0(false).
Equivalent to ``lhs < rhs`` and ``mx.nd.broadcast_lesser(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x < 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x < y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.lesser(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (z < y).asnumpy()
array([[ 0., 0.],
[ 1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_lesser,
lambda x, y: 1 if x < y else 0,
_internal._lesser_scalar,
_internal._greater_scalar)
|
python
|
def lesser(lhs, rhs):
"""Returns the result of element-wise **lesser than** (<) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are less than rhs,
otherwise return 0(false).
Equivalent to ``lhs < rhs`` and ``mx.nd.broadcast_lesser(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x < 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x < y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.lesser(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (z < y).asnumpy()
array([[ 0., 0.],
[ 1., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_lesser,
lambda x, y: 1 if x < y else 0,
_internal._lesser_scalar,
_internal._greater_scalar)
|
[
"def",
"lesser",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_lesser",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"<",
"y",
"else",
"0",
",",
"_internal",
".",
"_lesser_scalar",
",",
"_internal",
".",
"_greater_scalar",
")"
] |
Returns the result of element-wise **lesser than** (<) comparison operation
with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are less than rhs,
otherwise return 0(false).
Equivalent to ``lhs < rhs`` and ``mx.nd.broadcast_lesser(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x < 1).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (x < y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> mx.nd.lesser(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 0., 0., 0.]], dtype=float32)
>>> (z < y).asnumpy()
array([[ 0., 0.],
[ 1., 0.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"lesser",
"than",
"**",
"(",
"<",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3397-L3457
|
train
|
Returns the result of element - wise lesser than operation on the input arrays.
|
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,GNd6AVv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P,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(0b111011 + 0o64) + chr(0b1001 + 0o54) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11010 + 0o30) + chr(0b110111) + chr(0b100001 + 0o23), 35024 - 35016), ehT0Px3KOsy9(chr(295 - 247) + chr(0b1101111) + chr(1272 - 1221) + chr(1224 - 1173) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(1325 - 1214) + chr(49) + chr(2910 - 2855) + chr(48), 16254 - 16246), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011000 + 0o27) + '\x31' + '\063' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10111 + 0o40) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(135 - 87) + chr(0b1000110 + 0o51) + chr(0b110001) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1407 - 1356), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b110011) + '\063' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + chr(51) + chr(2367 - 2315) + '\x32', 9257 - 9249), ehT0Px3KOsy9(chr(943 - 895) + '\157' + chr(0b110010) + chr(53) + chr(48), 53110 - 53102), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101010 + 0o10) + '\x34' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110101) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(12156 - 12045) + '\x31' + chr(0b110011) + chr(0b10000 + 0o42), 31055 - 31047), ehT0Px3KOsy9(chr(1795 - 1747) + '\157' + chr(49) + '\063' + chr(1724 - 1674), 8), ehT0Px3KOsy9(chr(131 - 83) + chr(0b1101111) + chr(107 - 57) + chr(0b1111 + 0o50) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(2656 - 2545) + chr(1118 - 1067) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(2008 - 1897) + chr(0b110011) + '\x33' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\065' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(10156 - 10045) + chr(0b101110 + 0o3) + chr(265 - 210) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(973 - 922) + chr(730 - 680), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101001 + 0o12) + chr(52) + chr(635 - 587), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b110101) + chr(0b110100), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b110100) + chr(51), 34193 - 34185), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(48) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(2137 - 2083) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\063' + chr(52) + chr(0b1 + 0o60), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1001 + 0o52) + '\063' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(376 - 328) + chr(4728 - 4617) + chr(55) + chr(2426 - 2376), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\065' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11100 + 0o25) + '\064' + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(1227 - 1174), 64949 - 64941), ehT0Px3KOsy9('\060' + chr(3017 - 2906) + chr(50) + '\065' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + chr(668 - 617) + '\x31' + chr(0b110001), 36750 - 36742), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1010 + 0o145) + chr(0b1010 + 0o51) + chr(0b101111 + 0o3) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(11812 - 11701) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10 + 0o63) + chr(268 - 219), 61557 - 61549)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x35' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x02'), '\144' + chr(4728 - 4627) + chr(99) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1101110 + 0o7) + '\164' + chr(0b1100110) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Z30G3g0MzRMF(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'N\xce\xb1\x19=^ip\xa8\xbd\xc4\xc5\x19)?\xc8'), chr(0b10101 + 0o117) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b10000 + 0o125))('\165' + chr(116) + chr(0b101100 + 0o72) + chr(0b101101) + chr(0b111000))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + '\x31', 0b1000) if OeWW0F1dBPRQ < SqiSOtYOqOJH else ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11010 + 0o26), 8), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b's\xd0\xbb\x0b*Xz\\\xaf\x81\xc9\xcc\x0b('), '\144' + chr(101) + chr(0b10 + 0o141) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1001101 + 0o50) + '\x74' + '\x66' + chr(0b101101) + chr(2739 - 2683))), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b's\xdb\xac\x1d8Imq\x83\x91\xcb\xc1\x06;('), chr(0b101000 + 0o74) + chr(0b1000111 + 0o36) + chr(438 - 339) + '\157' + chr(0b1100100) + '\145')(chr(0b1111 + 0o146) + chr(116) + chr(0b1001001 + 0o35) + chr(1560 - 1515) + '\x38')))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
lesser_equal
|
def lesser_equal(lhs, rhs):
"""Returns the result of element-wise **lesser than or equal to** (<=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are
lesser than equal to rhs, otherwise return 0(false).
Equivalent to ``lhs <= rhs`` and ``mx.nd.broadcast_lesser_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x <= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x <= y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.lesser_equal(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z <= y).asnumpy()
array([[ 1., 0.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_lesser_equal,
lambda x, y: 1 if x <= y else 0,
_internal._lesser_equal_scalar,
_internal._greater_equal_scalar)
|
python
|
def lesser_equal(lhs, rhs):
"""Returns the result of element-wise **lesser than or equal to** (<=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are
lesser than equal to rhs, otherwise return 0(false).
Equivalent to ``lhs <= rhs`` and ``mx.nd.broadcast_lesser_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x <= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x <= y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.lesser_equal(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z <= y).asnumpy()
array([[ 1., 0.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_lesser_equal,
lambda x, y: 1 if x <= y else 0,
_internal._lesser_equal_scalar,
_internal._greater_equal_scalar)
|
[
"def",
"lesser_equal",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_lesser_equal",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"<=",
"y",
"else",
"0",
",",
"_internal",
".",
"_lesser_equal_scalar",
",",
"_internal",
".",
"_greater_equal_scalar",
")"
] |
Returns the result of element-wise **lesser than or equal to** (<=) comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements are
lesser than equal to rhs, otherwise return 0(false).
Equivalent to ``lhs <= rhs`` and ``mx.nd.broadcast_lesser_equal(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First array to be compared.
rhs : scalar or mxnet.ndarray.array
Second array to be compared. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> (x <= 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> (x <= y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.lesser_equal(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> (z <= y).asnumpy()
array([[ 1., 0.],
[ 1., 1.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"lesser",
"than",
"or",
"equal",
"to",
"**",
"(",
"<",
"=",
")",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3461-L3521
|
train
|
Returns the result of element - wise lesser than or equal to ** = rhs **.
|
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,FXUco0R3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WNS,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' + chr(51) + chr(1188 - 1135) + chr(1580 - 1531), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(2242 - 2188) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(55) + chr(645 - 595), 0b1000), ehT0Px3KOsy9(chr(405 - 357) + '\157' + '\062' + '\060' + chr(0b1000 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(0b101 + 0o54) + chr(0b101110 + 0o5) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(744 - 696) + chr(6121 - 6010) + '\x33' + '\062' + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1000 + 0o51) + '\x32' + chr(54), 14373 - 14365), ehT0Px3KOsy9(chr(446 - 398) + '\x6f' + chr(49) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b100000 + 0o23) + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(0b110011) + '\x33' + chr(258 - 204), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x35' + '\062', 0o10), ehT0Px3KOsy9(chr(434 - 386) + '\x6f' + '\062' + chr(51) + chr(50), 34124 - 34116), ehT0Px3KOsy9('\060' + chr(111) + '\x36' + chr(0b110110), 38399 - 38391), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + '\x33' + chr(53) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b110011) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(51) + chr(297 - 246) + chr(0b11111 + 0o23), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + '\x33' + chr(52) + chr(0b1000 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b110010) + chr(54) + chr(418 - 364), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + chr(0b110001) + '\x36' + chr(0b101100 + 0o7), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + chr(1466 - 1415) + '\x35' + chr(0b110001 + 0o0), 8), ehT0Px3KOsy9(chr(571 - 523) + '\x6f' + '\063' + '\060' + chr(48), 59443 - 59435), ehT0Px3KOsy9(chr(1667 - 1619) + chr(11076 - 10965) + chr(0b10011 + 0o40) + '\x36' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + '\x33' + chr(0b110000) + '\x34', 0b1000), ehT0Px3KOsy9(chr(1675 - 1627) + chr(111) + chr(0b100100 + 0o15) + '\x33' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b110 + 0o54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x34' + chr(0b110110), 46838 - 46830), ehT0Px3KOsy9(chr(1498 - 1450) + chr(0b101 + 0o152) + '\062' + chr(52) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + chr(996 - 947) + chr(48) + '\066', 12069 - 12061), ehT0Px3KOsy9(chr(1287 - 1239) + chr(0b1101111) + chr(298 - 247) + chr(307 - 256) + '\064', 46801 - 46793), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(5244 - 5133) + chr(0b110011) + '\063' + chr(54), 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(0b1011 + 0o47) + chr(0b110110) + '\x36', 8), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(54) + chr(0b11111 + 0o22), 0b1000), ehT0Px3KOsy9(chr(891 - 843) + chr(0b0 + 0o157) + chr(1282 - 1233) + '\x30' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b10010 + 0o40) + chr(0b110011 + 0o4) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101 + 0o56) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(446 - 398) + chr(111) + chr(69 - 19) + chr(979 - 931) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011111 + 0o20) + chr(0b110010) + chr(293 - 242) + '\061', 58485 - 58477), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(596 - 547) + chr(0b1101 + 0o45) + chr(0b101000 + 0o17), 6179 - 6171), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(790 - 741) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1482 - 1434) + '\157' + chr(0b110010) + chr(51) + '\066', 37385 - 37377)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + '\065' + '\060', 36440 - 36432)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7'), chr(0b110111 + 0o55) + '\145' + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1010 + 0o134) + chr(0b101101) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def MT2xgYAVfwP9(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\x87U\xe7=\xb77~,\x81\xc6\xffE\x9f\xbd\xa8\xba\xd3\x02\x9c\xa1\x9b'), chr(100) + '\x65' + chr(3618 - 3519) + chr(0b1011110 + 0o21) + chr(0b1100100) + chr(0b1100101))(chr(297 - 180) + chr(116) + chr(9426 - 9324) + '\x2d' + '\070')), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b110111 + 0o70) + chr(0b110000 + 0o1), ord("\x08")) if OeWW0F1dBPRQ <= SqiSOtYOqOJH else ehT0Px3KOsy9(chr(1242 - 1194) + chr(111) + chr(0b110000), ord("\x08")), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\x99_\xf5*\xb1$R=\xaf\xdf\xfbZ\xb3\xab\xb9\x84\xda\x12\x9b'), chr(0b1100100) + chr(0b1100101) + chr(777 - 678) + '\157' + chr(2521 - 2421) + chr(0b1011010 + 0o13))('\x75' + chr(0b1000 + 0o154) + '\146' + chr(45) + '\070')), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\x92H\xe38\xa03\x7f\x07\xbb\xdb\xefW\x80\x87\xa9\x86\xd7\x1f\x88\xb2'), '\144' + chr(101) + chr(0b1100011) + chr(0b1100011 + 0o14) + chr(0b1100100) + chr(101))(chr(6981 - 6864) + chr(7905 - 7789) + chr(3528 - 3426) + '\x2d' + chr(0b111000))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
logical_and
|
def logical_and(lhs, rhs):
"""Returns the result of element-wise **logical and** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements and rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs and rhs`` and ``mx.nd.broadcast_logical_and(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_and,
lambda x, y: 1 if x and y else 0,
_internal._logical_and_scalar,
None)
|
python
|
def logical_and(lhs, rhs):
"""Returns the result of element-wise **logical and** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements and rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs and rhs`` and ``mx.nd.broadcast_logical_and(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_and,
lambda x, y: 1 if x and y else 0,
_internal._logical_and_scalar,
None)
|
[
"def",
"logical_and",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_logical_and",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"and",
"y",
"else",
"0",
",",
"_internal",
".",
"_logical_and_scalar",
",",
"None",
")"
] |
Returns the result of element-wise **logical and** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements and rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs and rhs`` and ``mx.nd.broadcast_logical_and(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(x, y).asnumpy()
array([[ 0., 0., 0.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_and(z, y).asnumpy()
array([[ 0., 0.],
[ 0., 1.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"logical",
"and",
"**",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3524-L3581
|
train
|
Returns the result of element - wise logical and comparison
operation with broadcasting.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cK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CqssyYhLtLC,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(0b1101111) + chr(50) + chr(50) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(53) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + '\066', 8), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(53) + '\066', 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1001101 + 0o42) + chr(0b101101 + 0o10) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + '\061' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011 + 0o1) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1469 - 1418) + '\x32' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(0b110010) + '\x35' + chr(0b10000 + 0o41), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2625 - 2514) + chr(0b100010 + 0o21) + chr(1349 - 1296) + '\064', 18143 - 18135), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + '\x31' + '\x33' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(11001 - 10890) + chr(0b110010) + chr(0b110111) + '\x35', 26662 - 26654), ehT0Px3KOsy9('\060' + chr(0b10011 + 0o134) + chr(50) + chr(0b110000) + chr(2781 - 2726), 0b1000), ehT0Px3KOsy9(chr(48) + chr(12041 - 11930) + chr(50) + '\061' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(5641 - 5530) + '\062' + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101 + 0o54) + chr(51) + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(398 - 349) + chr(0b110001) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2779 - 2668) + '\061' + chr(0b101 + 0o57) + chr(0b0 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(128 - 80) + chr(0b1101111) + '\064' + chr(0b110111), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(610 - 561), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x34' + chr(54), 42325 - 42317), ehT0Px3KOsy9(chr(1874 - 1826) + chr(0b1101111) + chr(0b110001) + '\062' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(8385 - 8274) + chr(49) + '\066' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111 + 0o150) + chr(2269 - 2218) + chr(0b101111 + 0o4) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(1696 - 1645) + chr(107 - 55), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(50) + '\x32', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\061' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11011 + 0o31) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x37' + chr(0b110011), 7500 - 7492), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(810 - 761) + chr(1161 - 1110) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x34' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b10110 + 0o36) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(659 - 610) + chr(0b10110 + 0o33) + chr(0b100110 + 0o20), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1101 + 0o44) + '\063' + chr(0b101101 + 0o11), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(1921 - 1872) + chr(54) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011100 + 0o23) + chr(0b110011) + chr(55) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x34' + chr(1663 - 1615), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\065' + chr(51), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\065' + chr(1482 - 1434), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd'), '\x64' + '\x65' + '\x63' + chr(0b10111 + 0o130) + chr(8243 - 8143) + chr(0b101100 + 0o71))(chr(117) + '\x74' + chr(115 - 13) + chr(45) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jNGEhSEDmtWz(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\\A\x0fHmF\xa1\xdd\xb31\xd2\xe0\xe4\xc88#C\x00IM'), chr(0b10011 + 0o121) + '\x65' + '\143' + chr(2457 - 2346) + chr(100) + '\145')('\x75' + chr(4031 - 3915) + '\146' + '\x2d' + chr(0b111000))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + '\x31', 59928 - 59920) if OeWW0F1dBPRQ and SqiSOtYOqOJH else ehT0Px3KOsy9(chr(0b110000) + chr(0b1011000 + 0o27) + '\060', 38400 - 38392), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xccBA\tEmF\xbe\xf6\x8d3\xd9\xd8\xfe\xc88#}\x13'), chr(4072 - 3972) + '\x65' + chr(912 - 813) + '\157' + chr(0b1100100) + chr(8826 - 8725))(chr(0b1011101 + 0o30) + '\164' + '\146' + chr(45) + chr(0b111000))), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
logical_or
|
def logical_or(lhs, rhs):
"""Returns the result of element-wise **logical or** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs or rhs`` and ``mx.nd.broadcast_logical_or(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(z, y).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_or,
lambda x, y: 1 if x or y else 0,
_internal._logical_or_scalar,
None)
|
python
|
def logical_or(lhs, rhs):
"""Returns the result of element-wise **logical or** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs or rhs`` and ``mx.nd.broadcast_logical_or(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(z, y).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_or,
lambda x, y: 1 if x or y else 0,
_internal._logical_or_scalar,
None)
|
[
"def",
"logical_or",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_logical_or",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"x",
"or",
"y",
"else",
"0",
",",
"_internal",
".",
"_logical_or_scalar",
",",
"None",
")"
] |
Returns the result of element-wise **logical or** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``lhs or rhs`` and ``mx.nd.broadcast_logical_or(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, 1).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> mx.nd.logical_or(z, y).asnumpy()
array([[ 0., 1.],
[ 1., 1.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"logical",
"or",
"**",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3584-L3641
|
train
|
Returns the result of element - wise logical or comparison with broadcasting.
|
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_m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sdjvlgh9gDP,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(2040 - 1992) + chr(0b101110 + 0o101) + '\061' + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b0 + 0o61) + '\x31' + '\066', 0b1000), ehT0Px3KOsy9(chr(2164 - 2116) + chr(0b1101111) + chr(49) + chr(54) + chr(0b110 + 0o53), 47433 - 47425), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b100011 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(1735 - 1687) + chr(111) + '\063' + chr(51), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\067' + chr(2521 - 2469), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(2494 - 2444) + chr(54) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + chr(696 - 644) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11000 + 0o34) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\063' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11871 - 11760) + '\064' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(105 - 55) + chr(0b110011) + chr(0b110101 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(55) + chr(1782 - 1730), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\x34' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4298 - 4187) + chr(0b110011) + chr(0b110001) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(351 - 303) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b11000 + 0o127) + '\x33' + chr(54) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(986 - 937) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11082 - 10971) + chr(0b1011 + 0o46) + chr(53) + chr(0b110110), 41281 - 41273), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(50) + chr(0b1000 + 0o56) + chr(0b10100 + 0o37), 5760 - 5752), ehT0Px3KOsy9(chr(624 - 576) + '\x6f' + chr(51) + chr(0b101001 + 0o14) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\062' + chr(49) + '\062', 63656 - 63648), ehT0Px3KOsy9(chr(48) + chr(0b1011000 + 0o27) + chr(0b110001) + '\x32', 64433 - 64425), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(48) + chr(52), 0o10), ehT0Px3KOsy9(chr(376 - 328) + chr(0b1101111) + chr(0b110011) + chr(51) + '\067', 61935 - 61927), ehT0Px3KOsy9('\x30' + '\157' + chr(916 - 867) + chr(48) + chr(0b100000 + 0o22), 54828 - 54820), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(3694 - 3583) + '\x31' + chr(51), 20725 - 20717), ehT0Px3KOsy9(chr(48) + chr(8269 - 8158) + chr(51) + chr(0b110111), 52677 - 52669), ehT0Px3KOsy9(chr(414 - 366) + '\157' + chr(1349 - 1294) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(552 - 498) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110100) + '\065', 3028 - 3020), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(3387 - 3276) + chr(1253 - 1202) + chr(0b100111 + 0o16) + chr(53), 0b1000), ehT0Px3KOsy9(chr(77 - 29) + chr(111) + chr(0b10101 + 0o35) + '\x32' + chr(247 - 199), 0o10), ehT0Px3KOsy9(chr(1614 - 1566) + chr(3590 - 3479) + chr(0b110011) + '\061' + chr(0b100000 + 0o27), 36484 - 36476), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110001) + chr(2440 - 2390), ord("\x08")), ehT0Px3KOsy9(chr(395 - 347) + chr(7486 - 7375) + chr(0b110011) + '\x37' + chr(49), 24751 - 24743), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(4280 - 4169) + '\061' + chr(0b11011 + 0o25) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(825 - 774) + chr(0b110100) + chr(1635 - 1587), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + '\x31' + chr(0b10110 + 0o33), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101110 + 0o1) + '\061' + chr(0b101010 + 0o11) + chr(1769 - 1716), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + '\x35' + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'a'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(789 - 689) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(0b100000 + 0o15) + chr(0b101100 + 0o14)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def FeNZQYGaie1g(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'-<\x1eD\x7f\xdf\xd7RW\x02H\xf0\x9b\x8a\xa8\xa6\x9fV\x01\xc1'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(2244 - 2143))(chr(12298 - 12181) + chr(0b1110100) + chr(102) + chr(1399 - 1354) + chr(66 - 10))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9(chr(801 - 753) + chr(0b1101111) + '\x31', 40721 - 40713) if OeWW0F1dBPRQ or SqiSOtYOqOJH else ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(48), ord("\x08")), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x10"\x1eBr\xdf\xd7M|2V\xc0\x8f\x80\xaa\xab\x92{'), chr(0b1100100) + chr(0b1010111 + 0o16) + chr(1976 - 1877) + chr(0b111011 + 0o64) + '\x64' + chr(0b100010 + 0o103))('\x75' + chr(9045 - 8929) + '\x66' + chr(45) + chr(0b11111 + 0o31))), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
logical_xor
|
def logical_xor(lhs, rhs):
"""Returns the result of element-wise **logical xor** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``bool(lhs) ^ bool(rhs)`` and ``mx.nd.broadcast_logical_xor(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_xor(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_xor,
lambda x, y: 1 if bool(x) ^ bool(y) else 0,
_internal._logical_xor_scalar,
None)
|
python
|
def logical_xor(lhs, rhs):
"""Returns the result of element-wise **logical xor** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``bool(lhs) ^ bool(rhs)`` and ``mx.nd.broadcast_logical_xor(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_xor(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
"""
# pylint: disable= no-member, protected-access
return _ufunc_helper(
lhs,
rhs,
op.broadcast_logical_xor,
lambda x, y: 1 if bool(x) ^ bool(y) else 0,
_internal._logical_xor_scalar,
None)
|
[
"def",
"logical_xor",
"(",
"lhs",
",",
"rhs",
")",
":",
"# pylint: disable= no-member, protected-access",
"return",
"_ufunc_helper",
"(",
"lhs",
",",
"rhs",
",",
"op",
".",
"broadcast_logical_xor",
",",
"lambda",
"x",
",",
"y",
":",
"1",
"if",
"bool",
"(",
"x",
")",
"^",
"bool",
"(",
"y",
")",
"else",
"0",
",",
"_internal",
".",
"_logical_xor_scalar",
",",
"None",
")"
] |
Returns the result of element-wise **logical xor** comparison
operation with broadcasting.
For each element in input arrays, return 1(true) if lhs elements or rhs elements
are true, otherwise return 0(false).
Equivalent to ``bool(lhs) ^ bool(rhs)`` and ``mx.nd.broadcast_logical_xor(lhs, rhs)``.
.. note::
If the corresponding dimensions of two arrays have the same size or one of them has size 1,
then the arrays are broadcastable to a common shape.
Parameters
----------
lhs : scalar or mxnet.ndarray.array
First input of the function.
rhs : scalar or mxnet.ndarray.array
Second input of the function. If ``lhs.shape != rhs.shape``, they must be
broadcastable to a common shape.
Returns
-------
NDArray
Output array of boolean values.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.arange(2).reshape((2,1))
>>> z = mx.nd.arange(2).reshape((1,2))
>>> x.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.asnumpy()
array([[ 0.],
[ 1.]], dtype=float32)
>>> z.asnumpy()
array([[ 0., 1.]], dtype=float32)
>>> mx.nd.logical_xor(x, y).asnumpy()
array([[ 1., 1., 1.],
[ 0., 0., 0.]], dtype=float32)
|
[
"Returns",
"the",
"result",
"of",
"element",
"-",
"wise",
"**",
"logical",
"xor",
"**",
"comparison",
"operation",
"with",
"broadcasting",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3644-L3695
|
train
|
Returns the result of element - wise logical xor operation with broadcasting.
|
Pu7Z6IJ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oZqKLA6,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(2174 - 2124) + chr(0b110101) + '\060', 31406 - 31398), ehT0Px3KOsy9(chr(1896 - 1848) + '\157' + chr(0b110010) + chr(0b110100) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1981 - 1932) + chr(0b11111 + 0o21) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(5187 - 5076) + chr(50) + '\067' + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x36' + chr(0b1011 + 0o54), 21514 - 21506), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1909 - 1859) + chr(0b110111) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110101) + chr(981 - 932), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(7630 - 7519) + chr(0b110001) + chr(54) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10001 + 0o42) + '\063' + chr(341 - 291), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o63) + '\067' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b101010 + 0o12) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10001 + 0o41) + chr(0b110100) + chr(0b0 + 0o66), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x32' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(5443 - 5332) + '\x31' + '\x34' + chr(0b10110 + 0o32), 44990 - 44982), ehT0Px3KOsy9(chr(1450 - 1402) + '\x6f' + chr(51) + '\x30' + '\x31', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b10 + 0o61) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(723 - 672) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(384 - 332) + chr(0b100110 + 0o15), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\061' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(8276 - 8165) + chr(0b110001) + chr(1307 - 1253) + chr(0b10010 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(122 - 74) + '\x6f' + '\063' + chr(0b110011 + 0o3) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11011 + 0o26) + chr(0b10010 + 0o45), 36458 - 36450), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b1111 + 0o47) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1101 + 0o44) + chr(50) + '\x34', 48544 - 48536), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o61) + '\063', 58443 - 58435), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101001 + 0o12) + chr(0b110000) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + chr(0b110111) + chr(1175 - 1125), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(6502 - 6391) + chr(51) + chr(1737 - 1685) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1010 + 0o50) + chr(48) + '\x32', 55193 - 55185), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(679 - 628) + chr(49) + chr(995 - 947), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(5821 - 5710) + '\063' + chr(1502 - 1453) + chr(1094 - 1045), 0o10), ehT0Px3KOsy9(chr(48) + chr(6631 - 6520) + chr(0b110011) + '\x31' + chr(2205 - 2151), 0o10), ehT0Px3KOsy9(chr(1493 - 1445) + '\x6f' + chr(1247 - 1198) + chr(55) + chr(53), 37610 - 37602), ehT0Px3KOsy9(chr(183 - 135) + chr(0b1101010 + 0o5) + chr(0b100011 + 0o20) + chr(53) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(7184 - 7073) + '\x33' + '\x33' + '\x32', 8), ehT0Px3KOsy9(chr(1497 - 1449) + '\157' + '\067' + '\x34', 16849 - 16841), ehT0Px3KOsy9(chr(0b110000) + chr(1297 - 1186) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\062' + chr(51) + chr(3009 - 2954), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(429 - 376) + chr(0b110000), 65325 - 65317)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x86'), '\x64' + chr(0b11001 + 0o114) + '\x63' + chr(0b111 + 0o150) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110011 + 0o1) + '\146' + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def wPAXic2OIytJ(cuj9DsjDUyqP, TLyjFoww1L3N):
return ds3d0f99cgFg(cuj9DsjDUyqP, TLyjFoww1L3N, xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xd6.\xdb\x93\xdd\x08\x05\xae\xa4\n\xc9g\xfc\x03\xa01\x80\x1bv\xb9'), chr(100) + chr(0b1100101) + '\x63' + chr(2259 - 2148) + chr(1272 - 1172) + chr(101))('\x75' + chr(0b10101 + 0o137) + chr(102) + '\055' + chr(0b1110 + 0o52))), lambda OeWW0F1dBPRQ, SqiSOtYOqOJH: ehT0Px3KOsy9('\x30' + chr(5315 - 5204) + '\x31', ord("\x08")) if WbBjf8Y7v9VN(OeWW0F1dBPRQ) ^ WbBjf8Y7v9VN(SqiSOtYOqOJH) else ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + '\060', 8), xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc8.\xdd\x9e\xdd\x08\x1a\x85\x83\t\xd4_\xe6\x03\xa01\xbe\x11'), chr(0b1010011 + 0o21) + '\145' + chr(99) + chr(0b111000 + 0o67) + chr(100) + chr(101))('\165' + '\164' + '\146' + chr(0b101101) + chr(0b111000))), None)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
concatenate
|
def concatenate(arrays, axis=0, always_copy=True):
"""DEPRECATED, use ``concat`` instead
Parameters
----------
arrays : list of `NDArray`
Arrays to be concatenate. They must have identical shape except
the first dimension. They also must have the same data type.
axis : int
The axis along which to concatenate.
always_copy : bool
Default `True`. When not `True`, if the arrays only contain one
`NDArray`, that element will be returned directly, avoid copying.
Returns
-------
NDArray
An `NDArray` that lives on the same context as `arrays[0].context`.
"""
assert isinstance(arrays, list)
assert len(arrays) > 0
assert isinstance(arrays[0], NDArray)
if not always_copy and len(arrays) == 1:
return arrays[0]
shape_axis = arrays[0].shape[axis]
shape_rest1 = arrays[0].shape[0:axis]
shape_rest2 = arrays[0].shape[axis+1:]
dtype = arrays[0].dtype
for arr in arrays[1:]:
shape_axis += arr.shape[axis]
assert shape_rest1 == arr.shape[0:axis]
assert shape_rest2 == arr.shape[axis+1:]
assert dtype == arr.dtype
ret_shape = shape_rest1 + (shape_axis,) + shape_rest2
ret = empty(ret_shape, ctx=arrays[0].context, dtype=dtype)
idx = 0
begin = [0 for _ in ret_shape]
end = list(ret_shape)
for arr in arrays:
if axis == 0:
ret[idx:idx+arr.shape[0]] = arr
else:
begin[axis] = idx
end[axis] = idx+arr.shape[axis]
# pylint: disable=no-member,protected-access
_internal._crop_assign(ret, arr, out=ret,
begin=tuple(begin),
end=tuple(end))
# pylint: enable=no-member,protected-access
idx += arr.shape[axis]
return ret
|
python
|
def concatenate(arrays, axis=0, always_copy=True):
"""DEPRECATED, use ``concat`` instead
Parameters
----------
arrays : list of `NDArray`
Arrays to be concatenate. They must have identical shape except
the first dimension. They also must have the same data type.
axis : int
The axis along which to concatenate.
always_copy : bool
Default `True`. When not `True`, if the arrays only contain one
`NDArray`, that element will be returned directly, avoid copying.
Returns
-------
NDArray
An `NDArray` that lives on the same context as `arrays[0].context`.
"""
assert isinstance(arrays, list)
assert len(arrays) > 0
assert isinstance(arrays[0], NDArray)
if not always_copy and len(arrays) == 1:
return arrays[0]
shape_axis = arrays[0].shape[axis]
shape_rest1 = arrays[0].shape[0:axis]
shape_rest2 = arrays[0].shape[axis+1:]
dtype = arrays[0].dtype
for arr in arrays[1:]:
shape_axis += arr.shape[axis]
assert shape_rest1 == arr.shape[0:axis]
assert shape_rest2 == arr.shape[axis+1:]
assert dtype == arr.dtype
ret_shape = shape_rest1 + (shape_axis,) + shape_rest2
ret = empty(ret_shape, ctx=arrays[0].context, dtype=dtype)
idx = 0
begin = [0 for _ in ret_shape]
end = list(ret_shape)
for arr in arrays:
if axis == 0:
ret[idx:idx+arr.shape[0]] = arr
else:
begin[axis] = idx
end[axis] = idx+arr.shape[axis]
# pylint: disable=no-member,protected-access
_internal._crop_assign(ret, arr, out=ret,
begin=tuple(begin),
end=tuple(end))
# pylint: enable=no-member,protected-access
idx += arr.shape[axis]
return ret
|
[
"def",
"concatenate",
"(",
"arrays",
",",
"axis",
"=",
"0",
",",
"always_copy",
"=",
"True",
")",
":",
"assert",
"isinstance",
"(",
"arrays",
",",
"list",
")",
"assert",
"len",
"(",
"arrays",
")",
">",
"0",
"assert",
"isinstance",
"(",
"arrays",
"[",
"0",
"]",
",",
"NDArray",
")",
"if",
"not",
"always_copy",
"and",
"len",
"(",
"arrays",
")",
"==",
"1",
":",
"return",
"arrays",
"[",
"0",
"]",
"shape_axis",
"=",
"arrays",
"[",
"0",
"]",
".",
"shape",
"[",
"axis",
"]",
"shape_rest1",
"=",
"arrays",
"[",
"0",
"]",
".",
"shape",
"[",
"0",
":",
"axis",
"]",
"shape_rest2",
"=",
"arrays",
"[",
"0",
"]",
".",
"shape",
"[",
"axis",
"+",
"1",
":",
"]",
"dtype",
"=",
"arrays",
"[",
"0",
"]",
".",
"dtype",
"for",
"arr",
"in",
"arrays",
"[",
"1",
":",
"]",
":",
"shape_axis",
"+=",
"arr",
".",
"shape",
"[",
"axis",
"]",
"assert",
"shape_rest1",
"==",
"arr",
".",
"shape",
"[",
"0",
":",
"axis",
"]",
"assert",
"shape_rest2",
"==",
"arr",
".",
"shape",
"[",
"axis",
"+",
"1",
":",
"]",
"assert",
"dtype",
"==",
"arr",
".",
"dtype",
"ret_shape",
"=",
"shape_rest1",
"+",
"(",
"shape_axis",
",",
")",
"+",
"shape_rest2",
"ret",
"=",
"empty",
"(",
"ret_shape",
",",
"ctx",
"=",
"arrays",
"[",
"0",
"]",
".",
"context",
",",
"dtype",
"=",
"dtype",
")",
"idx",
"=",
"0",
"begin",
"=",
"[",
"0",
"for",
"_",
"in",
"ret_shape",
"]",
"end",
"=",
"list",
"(",
"ret_shape",
")",
"for",
"arr",
"in",
"arrays",
":",
"if",
"axis",
"==",
"0",
":",
"ret",
"[",
"idx",
":",
"idx",
"+",
"arr",
".",
"shape",
"[",
"0",
"]",
"]",
"=",
"arr",
"else",
":",
"begin",
"[",
"axis",
"]",
"=",
"idx",
"end",
"[",
"axis",
"]",
"=",
"idx",
"+",
"arr",
".",
"shape",
"[",
"axis",
"]",
"# pylint: disable=no-member,protected-access",
"_internal",
".",
"_crop_assign",
"(",
"ret",
",",
"arr",
",",
"out",
"=",
"ret",
",",
"begin",
"=",
"tuple",
"(",
"begin",
")",
",",
"end",
"=",
"tuple",
"(",
"end",
")",
")",
"# pylint: enable=no-member,protected-access",
"idx",
"+=",
"arr",
".",
"shape",
"[",
"axis",
"]",
"return",
"ret"
] |
DEPRECATED, use ``concat`` instead
Parameters
----------
arrays : list of `NDArray`
Arrays to be concatenate. They must have identical shape except
the first dimension. They also must have the same data type.
axis : int
The axis along which to concatenate.
always_copy : bool
Default `True`. When not `True`, if the arrays only contain one
`NDArray`, that element will be returned directly, avoid copying.
Returns
-------
NDArray
An `NDArray` that lives on the same context as `arrays[0].context`.
|
[
"DEPRECATED",
"use",
"concat",
"instead"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3705-L3759
|
train
|
Deprecated use concat instead.
|
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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6bl9sLammpH,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 + 0o0) + '\x6f' + chr(0b101100 + 0o5) + '\061' + chr(0b110000), 37891 - 37883), ehT0Px3KOsy9(chr(264 - 216) + chr(0b1101111) + chr(0b110010) + chr(2273 - 2222) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\061' + chr(2000 - 1952), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\063' + chr(2246 - 2198), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10 + 0o60) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1100 + 0o47) + '\x32' + chr(0b11101 + 0o32), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b101011 + 0o6) + chr(511 - 463), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\x31' + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + '\x36' + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\061' + chr(856 - 808), 8), ehT0Px3KOsy9(chr(199 - 151) + chr(111) + '\062' + chr(0b110001) + '\065', 37965 - 37957), ehT0Px3KOsy9('\x30' + chr(111) + chr(2360 - 2311), 0b1000), ehT0Px3KOsy9(chr(1754 - 1706) + '\x6f' + '\x33' + '\x35' + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1549 - 1498) + chr(50) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(52) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(337 - 288) + chr(0b101001 + 0o15) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(9669 - 9558) + chr(51) + chr(1484 - 1434) + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(12110 - 11999) + '\063' + chr(1568 - 1516) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(135 - 24) + chr(79 - 30) + chr(0b110100) + chr(2697 - 2644), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1 + 0o62) + chr(0b110111) + chr(1916 - 1862), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(927 - 878) + chr(238 - 183) + chr(151 - 98), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\x33' + '\060' + chr(0b100100 + 0o20), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\x31' + chr(0b110101 + 0o1), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + '\064', 22246 - 22238), ehT0Px3KOsy9(chr(1585 - 1537) + chr(0b111101 + 0o62) + chr(0b110111) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\060' + chr(0b11101 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + '\061' + chr(0b110010) + chr(0b100 + 0o56), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1495 - 1444) + chr(0b110010) + chr(1362 - 1313), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(1349 - 1301), 39733 - 39725), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + '\063' + '\062' + '\066', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b101001 + 0o106) + '\x31' + chr(1031 - 980) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11101 + 0o25) + chr(1511 - 1459) + '\x30', 0b1000), ehT0Px3KOsy9(chr(925 - 877) + chr(6011 - 5900) + chr(0b110011) + '\063' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b100010 + 0o115) + chr(0b110010) + '\066' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(1718 - 1670) + chr(111) + chr(0b10010 + 0o37) + '\062' + chr(54), 0o10), ehT0Px3KOsy9(chr(513 - 465) + chr(6848 - 6737) + chr(0b110101) + chr(0b110000 + 0o3), 41253 - 41245), ehT0Px3KOsy9(chr(48) + chr(4221 - 4110) + chr(0b110011) + chr(0b110010) + '\x37', 8), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\062' + chr(0b1001 + 0o54) + chr(1462 - 1407), 15732 - 15724)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110101) + '\x30', 24584 - 24576)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'f'), chr(100) + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(0b1000000 + 0o45))(chr(1450 - 1333) + '\x74' + '\146' + chr(0b101101) + chr(0b101111 + 0o11)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Fk2B73DcleMI(lmEEfdW_XFlN, cRTh61qyvi24=ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(48), 0o10), yJyfteOVAy26=ehT0Px3KOsy9(chr(48) + chr(111) + chr(49), 8)):
assert PlSM16l2KDPD(lmEEfdW_XFlN, YyaZ4tpXu4lf)
assert c2A0yzQpDQB3(lmEEfdW_XFlN) > ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + '\060', 8)
assert PlSM16l2KDPD(lmEEfdW_XFlN[ehT0Px3KOsy9(chr(48) + chr(111) + chr(838 - 790), 8)], GdqFjMbtKL7s)
if not yJyfteOVAy26 and c2A0yzQpDQB3(lmEEfdW_XFlN) == ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10101 + 0o34), 8):
return lmEEfdW_XFlN[ehT0Px3KOsy9(chr(48) + chr(0b1010100 + 0o33) + chr(0b1011 + 0o45), 8)]
YtVMK89Z2y3I = lmEEfdW_XFlN[ehT0Px3KOsy9('\060' + chr(111) + chr(48), 8)].nauYfLglTpcb[cRTh61qyvi24]
_Cd52izAxC9J = lmEEfdW_XFlN[ehT0Px3KOsy9(chr(48) + chr(10136 - 10025) + chr(1240 - 1192), 8)].nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 8):cRTh61qyvi24]
Tq_4eFhuBP9V = lmEEfdW_XFlN[ehT0Px3KOsy9('\x30' + chr(6488 - 6377) + chr(0b110000), 8)].nauYfLglTpcb[cRTh61qyvi24 + ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(0b10100 + 0o35), 8):]
jSV9IKnemH7K = lmEEfdW_XFlN[ehT0Px3KOsy9('\x30' + '\157' + chr(1266 - 1218), 8)].jSV9IKnemH7K
for ZxkNvNvuRNy5 in lmEEfdW_XFlN[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001), 8):]:
YtVMK89Z2y3I += ZxkNvNvuRNy5.nauYfLglTpcb[cRTh61qyvi24]
assert _Cd52izAxC9J == xafqLlk3kkUe(ZxkNvNvuRNy5, xafqLlk3kkUe(SXOLrMavuUCe(b'&\xfbc\xd1\xfe\\\xb0$\x9d\x85+\xef'), '\x64' + chr(463 - 362) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + chr(0b101111 + 0o11)))[ehT0Px3KOsy9(chr(2228 - 2180) + chr(5631 - 5520) + chr(0b100011 + 0o15), 8):cRTh61qyvi24]
assert Tq_4eFhuBP9V == xafqLlk3kkUe(ZxkNvNvuRNy5, xafqLlk3kkUe(SXOLrMavuUCe(b'&\xfbc\xd1\xfe\\\xb0$\x9d\x85+\xef'), '\144' + chr(906 - 805) + chr(0b1100011) + chr(0b1101111) + chr(6230 - 6130) + chr(101))('\x75' + chr(0b1100000 + 0o24) + chr(0b1100011 + 0o3) + chr(0b101101) + chr(0b111000)))[cRTh61qyvi24 + ehT0Px3KOsy9(chr(1632 - 1584) + '\157' + chr(0b110 + 0o53), 8):]
assert jSV9IKnemH7K == xafqLlk3kkUe(ZxkNvNvuRNy5, xafqLlk3kkUe(SXOLrMavuUCe(b'"\xc9@\xb1\xd1[\xb9-\xa4\xbd\x7f\xc6'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(969 - 858) + chr(0b10111 + 0o115) + '\145')('\165' + chr(0b100 + 0o160) + chr(287 - 185) + chr(47 - 2) + chr(2139 - 2083)))
jurBef79zBnV = _Cd52izAxC9J + (YtVMK89Z2y3I,) + Tq_4eFhuBP9V
VHn4CV4Ymrei = QxT4AUiPWdm4(jurBef79zBnV, ctx=lmEEfdW_XFlN[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o25), 8)].context, dtype=jSV9IKnemH7K)
YlqusYB6InkM = ehT0Px3KOsy9(chr(48) + chr(4785 - 4674) + chr(48), 8)
_UO0diKSmKME = [ehT0Px3KOsy9(chr(48) + chr(7893 - 7782) + chr(48), 8) for VNGQdHSFPrso in jurBef79zBnV]
whWDZq5_lP01 = YyaZ4tpXu4lf(jurBef79zBnV)
for ZxkNvNvuRNy5 in lmEEfdW_XFlN:
if cRTh61qyvi24 == ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x30', 8):
VHn4CV4Ymrei[YlqusYB6InkM:YlqusYB6InkM + ZxkNvNvuRNy5.nauYfLglTpcb[ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\x30', 8)]] = ZxkNvNvuRNy5
else:
_UO0diKSmKME[cRTh61qyvi24] = YlqusYB6InkM
whWDZq5_lP01[cRTh61qyvi24] = YlqusYB6InkM + ZxkNvNvuRNy5.nauYfLglTpcb[cRTh61qyvi24]
xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xf9d\xe7\xe8O\xb6;\xba\x9c/\xe3'), chr(100) + chr(0b1011100 + 0o11) + chr(8487 - 8388) + '\x6f' + chr(0b1100100) + chr(3714 - 3613))(chr(9333 - 9216) + '\x74' + '\146' + chr(0b101101) + '\x38'))(VHn4CV4Ymrei, ZxkNvNvuRNy5, out=VHn4CV4Ymrei, begin=KNyTy8rYcwji(_UO0diKSmKME), end=KNyTy8rYcwji(whWDZq5_lP01))
YlqusYB6InkM += ZxkNvNvuRNy5.nauYfLglTpcb[cRTh61qyvi24]
return VHn4CV4Ymrei
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
imdecode
|
def imdecode(str_img, clip_rect=(0, 0, 0, 0), out=None, index=0, channels=3, mean=None):
"""DEPRECATED, use mx.img instead
Parameters
----------
str_img : str
Binary image data
clip_rect : iterable of 4 int
Clip decoded image to rectangle (x0, y0, x1, y1).
out : NDArray
Output buffer. Can be 3 dimensional (c, h, w) or 4 dimensional (n, c, h, w).
index : int
Output decoded image to i-th slice of 4 dimensional buffer.
channels : int
Number of channels to output. Decode to grey scale when channels = 1.
mean : NDArray
Subtract mean from decode image before outputing.
"""
# pylint: disable= no-member, protected-access, too-many-arguments
if mean is None:
mean = NDArray(_new_empty_handle())
if out is None:
return _internal._imdecode(mean, index,
clip_rect[0],
clip_rect[1],
clip_rect[2],
clip_rect[3],
channels,
len(str_img),
str_img=str_img)
else:
return _internal._imdecode(mean, index,
clip_rect[0],
clip_rect[1],
clip_rect[2],
clip_rect[3],
channels,
len(str_img),
str_img=str_img,
out=out)
|
python
|
def imdecode(str_img, clip_rect=(0, 0, 0, 0), out=None, index=0, channels=3, mean=None):
"""DEPRECATED, use mx.img instead
Parameters
----------
str_img : str
Binary image data
clip_rect : iterable of 4 int
Clip decoded image to rectangle (x0, y0, x1, y1).
out : NDArray
Output buffer. Can be 3 dimensional (c, h, w) or 4 dimensional (n, c, h, w).
index : int
Output decoded image to i-th slice of 4 dimensional buffer.
channels : int
Number of channels to output. Decode to grey scale when channels = 1.
mean : NDArray
Subtract mean from decode image before outputing.
"""
# pylint: disable= no-member, protected-access, too-many-arguments
if mean is None:
mean = NDArray(_new_empty_handle())
if out is None:
return _internal._imdecode(mean, index,
clip_rect[0],
clip_rect[1],
clip_rect[2],
clip_rect[3],
channels,
len(str_img),
str_img=str_img)
else:
return _internal._imdecode(mean, index,
clip_rect[0],
clip_rect[1],
clip_rect[2],
clip_rect[3],
channels,
len(str_img),
str_img=str_img,
out=out)
|
[
"def",
"imdecode",
"(",
"str_img",
",",
"clip_rect",
"=",
"(",
"0",
",",
"0",
",",
"0",
",",
"0",
")",
",",
"out",
"=",
"None",
",",
"index",
"=",
"0",
",",
"channels",
"=",
"3",
",",
"mean",
"=",
"None",
")",
":",
"# pylint: disable= no-member, protected-access, too-many-arguments",
"if",
"mean",
"is",
"None",
":",
"mean",
"=",
"NDArray",
"(",
"_new_empty_handle",
"(",
")",
")",
"if",
"out",
"is",
"None",
":",
"return",
"_internal",
".",
"_imdecode",
"(",
"mean",
",",
"index",
",",
"clip_rect",
"[",
"0",
"]",
",",
"clip_rect",
"[",
"1",
"]",
",",
"clip_rect",
"[",
"2",
"]",
",",
"clip_rect",
"[",
"3",
"]",
",",
"channels",
",",
"len",
"(",
"str_img",
")",
",",
"str_img",
"=",
"str_img",
")",
"else",
":",
"return",
"_internal",
".",
"_imdecode",
"(",
"mean",
",",
"index",
",",
"clip_rect",
"[",
"0",
"]",
",",
"clip_rect",
"[",
"1",
"]",
",",
"clip_rect",
"[",
"2",
"]",
",",
"clip_rect",
"[",
"3",
"]",
",",
"channels",
",",
"len",
"(",
"str_img",
")",
",",
"str_img",
"=",
"str_img",
",",
"out",
"=",
"out",
")"
] |
DEPRECATED, use mx.img instead
Parameters
----------
str_img : str
Binary image data
clip_rect : iterable of 4 int
Clip decoded image to rectangle (x0, y0, x1, y1).
out : NDArray
Output buffer. Can be 3 dimensional (c, h, w) or 4 dimensional (n, c, h, w).
index : int
Output decoded image to i-th slice of 4 dimensional buffer.
channels : int
Number of channels to output. Decode to grey scale when channels = 1.
mean : NDArray
Subtract mean from decode image before outputing.
|
[
"DEPRECATED",
"use",
"mx",
".",
"img",
"instead"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3763-L3802
|
train
|
Decode binary image into an NDArray.
|
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,N5Ee6d9Y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B3,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(403 - 355) + chr(111) + '\063' + chr(1726 - 1678) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + chr(86 - 37) + '\x30' + chr(2437 - 2387), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + chr(1787 - 1736) + '\067' + '\067', 14574 - 14566), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b1100 + 0o44), 0o10), ehT0Px3KOsy9(chr(2020 - 1972) + chr(4835 - 4724) + chr(0b110011) + chr(1710 - 1659) + chr(0b1011 + 0o46), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101001 + 0o6) + '\064' + chr(1658 - 1609), 0b1000), ehT0Px3KOsy9('\060' + chr(4578 - 4467) + chr(0b11000 + 0o32) + '\x30' + chr(0b1010 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(8027 - 7916) + '\061' + chr(1341 - 1287) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(8449 - 8338) + chr(53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1792 - 1737) + chr(0b100110 + 0o14), 0o10), ehT0Px3KOsy9(chr(1777 - 1729) + chr(8541 - 8430) + '\x32' + '\066' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(150 - 101) + chr(777 - 723) + '\063', 35493 - 35485), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(4128 - 4017) + chr(1266 - 1216) + '\x33' + chr(2103 - 2053), 64694 - 64686), ehT0Px3KOsy9('\060' + '\x6f' + chr(87 - 37) + '\x32' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2633 - 2522) + '\061' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o21) + chr(50) + '\x30', 27243 - 27235), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\x36' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2709 - 2598) + chr(1743 - 1693) + chr(0b100010 + 0o22) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\063' + chr(2184 - 2131), 0o10), ehT0Px3KOsy9(chr(48) + chr(8274 - 8163) + '\062' + chr(50) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(8226 - 8115) + chr(0b10 + 0o60) + chr(500 - 452) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(1901 - 1790) + chr(0b11111 + 0o23) + chr(1813 - 1764) + chr(52), 24785 - 24777), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(50) + chr(53) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(719 - 608) + chr(0b110011) + chr(0b110001) + chr(0b101 + 0o60), 50163 - 50155), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(354 - 302) + '\061', 8), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(7023 - 6912) + chr(0b110011) + chr(2072 - 2018) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b101011 + 0o11) + chr(48), 12612 - 12604), ehT0Px3KOsy9(chr(2230 - 2182) + chr(0b10000 + 0o137) + '\063' + chr(0b11001 + 0o32) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\065' + chr(714 - 663), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10011 + 0o40) + chr(1711 - 1656) + chr(1993 - 1941), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(2115 - 2064) + chr(0b1010 + 0o55) + chr(55), 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(689 - 640) + '\060' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(0b110110) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + '\x33' + chr(0b110101) + chr(0b11011 + 0o27), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b110111) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11001 + 0o30) + chr(49) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + '\062' + chr(0b1011 + 0o53) + chr(843 - 790), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b110001) + chr(0b110011 + 0o2) + '\x36', 4892 - 4884), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b1010 + 0o50) + chr(51) + chr(0b10000 + 0o45), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\065' + chr(0b1001 + 0o47), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xee'), chr(100) + chr(0b100011 + 0o102) + '\x63' + '\x6f' + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(597 - 552) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def u609nKcy9gUj(Di4dGC1esoWD, kT4I5JhyN1z0=(ehT0Px3KOsy9(chr(48) + chr(0b101100 + 0o103) + chr(338 - 290), ord("\x08")), ehT0Px3KOsy9(chr(2180 - 2132) + chr(111) + chr(48), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1467 - 1419), 8), ehT0Px3KOsy9('\x30' + chr(11002 - 10891) + chr(0b110000), 8)), UkrMp_I0RDmo=None, XdowRbJKZWL9=ehT0Px3KOsy9('\060' + '\157' + chr(0b110000), 8), H2MQqAZeamNo=ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011), ord("\x08")), aJhItC_Vawlw=None):
if aJhItC_Vawlw is None:
aJhItC_Vawlw = GdqFjMbtKL7s(MlIogZPOb_GR())
if UkrMp_I0RDmo is None:
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f+\x92t\xbcB\xeb\x12M'), chr(4959 - 4859) + chr(3304 - 3203) + chr(99) + chr(0b1101111) + chr(1322 - 1222) + '\145')(chr(0b10011 + 0o142) + chr(11935 - 11819) + chr(0b1100110) + '\x2d' + chr(0b11 + 0o65)))(aJhItC_Vawlw, XdowRbJKZWL9, kT4I5JhyN1z0[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110000), 8)], kT4I5JhyN1z0[ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11111 + 0o22), 0o10)], kT4I5JhyN1z0[ehT0Px3KOsy9('\x30' + chr(12234 - 12123) + chr(50), 0o10)], kT4I5JhyN1z0[ehT0Px3KOsy9(chr(260 - 212) + chr(0b111000 + 0o67) + chr(2239 - 2188), 8)], H2MQqAZeamNo, c2A0yzQpDQB3(Di4dGC1esoWD), str_img=Di4dGC1esoWD)
else:
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f+\x92t\xbcB\xeb\x12M'), '\144' + '\x65' + '\143' + chr(0b110000 + 0o77) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100 + 0o0) + '\146' + chr(623 - 578) + chr(2336 - 2280)))(aJhItC_Vawlw, XdowRbJKZWL9, kT4I5JhyN1z0[ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + '\060', 8)], kT4I5JhyN1z0[ehT0Px3KOsy9(chr(1375 - 1327) + chr(9576 - 9465) + chr(0b110001), 8)], kT4I5JhyN1z0[ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(50), 8)], kT4I5JhyN1z0[ehT0Px3KOsy9(chr(1969 - 1921) + chr(1155 - 1044) + chr(51), 8)], H2MQqAZeamNo, c2A0yzQpDQB3(Di4dGC1esoWD), str_img=Di4dGC1esoWD, out=UkrMp_I0RDmo)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
zeros
|
def zeros(shape, ctx=None, dtype=None, **kwargs):
"""Returns a new array filled with all zeros, with the given shape and type.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.zeros(1).asnumpy()
array([ 0.], dtype=float32)
>>> mx.nd.zeros((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.zeros((1,2), mx.gpu(0), 'float16').asnumpy()
array([[ 0., 0.]], dtype=float16)
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype, **kwargs)
|
python
|
def zeros(shape, ctx=None, dtype=None, **kwargs):
"""Returns a new array filled with all zeros, with the given shape and type.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.zeros(1).asnumpy()
array([ 0.], dtype=float32)
>>> mx.nd.zeros((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.zeros((1,2), mx.gpu(0), 'float16').asnumpy()
array([[ 0., 0.]], dtype=float16)
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._zeros(shape=shape, ctx=ctx, dtype=dtype, **kwargs)
|
[
"def",
"zeros",
"(",
"shape",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable= unused-argument",
"if",
"ctx",
"is",
"None",
":",
"ctx",
"=",
"current_context",
"(",
")",
"dtype",
"=",
"mx_real_t",
"if",
"dtype",
"is",
"None",
"else",
"dtype",
"# pylint: disable= no-member, protected-access",
"return",
"_internal",
".",
"_zeros",
"(",
"shape",
"=",
"shape",
",",
"ctx",
"=",
"ctx",
",",
"dtype",
"=",
"dtype",
",",
"*",
"*",
"kwargs",
")"
] |
Returns a new array filled with all zeros, with the given shape and type.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
out : NDArray, optional
The output NDArray (default is `None`).
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.zeros(1).asnumpy()
array([ 0.], dtype=float32)
>>> mx.nd.zeros((1,2), mx.gpu(0))
<NDArray 1x2 @gpu(0)>
>>> mx.nd.zeros((1,2), mx.gpu(0), 'float16').asnumpy()
array([[ 0., 0.]], dtype=float16)
|
[
"Returns",
"a",
"new",
"array",
"filled",
"with",
"all",
"zeros",
"with",
"the",
"given",
"shape",
"and",
"type",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3805-L3838
|
train
|
Returns a new array filled with all zeros with the given shape and 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,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHro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3g84rNiEdDQ,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(0b1000011 + 0o54) + '\063' + chr(0b1001 + 0o47) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1859 - 1808) + '\x35' + chr(1017 - 963), 12403 - 12395), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(394 - 283) + '\x31' + chr(53) + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(52) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(55) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9721 - 9610) + chr(1409 - 1358) + chr(54) + chr(0b10010 + 0o42), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101111 + 0o2) + chr(55) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + chr(852 - 801) + '\x36' + chr(0b110110), 16019 - 16011), ehT0Px3KOsy9('\x30' + '\x6f' + '\064' + chr(0b10011 + 0o40), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + chr(0b110011) + chr(0b110001 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(0b110011) + '\x30' + chr(53), 32860 - 32852), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1100111 + 0o10) + chr(0b11 + 0o57) + '\062' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b100100 + 0o17) + chr(0b101 + 0o55) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(55) + '\x32', 58077 - 58069), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(50) + '\x34' + '\x37', 44515 - 44507), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(1534 - 1485) + chr(2240 - 2186) + chr(0b110010), 31317 - 31309), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\067' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\067' + chr(0b1101 + 0o50), 0o10), ehT0Px3KOsy9('\060' + chr(1809 - 1698) + chr(55) + chr(48), 48803 - 48795), ehT0Px3KOsy9('\060' + '\157' + chr(1528 - 1474) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(766 - 715) + chr(53) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\x33' + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4428 - 4317) + '\x33' + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(10082 - 9971) + chr(0b101011 + 0o11) + '\067', 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + '\x34' + chr(1018 - 970), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3447 - 3336) + '\062' + '\067' + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1301 - 1251) + chr(52) + '\x37', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(523 - 472) + chr(0b11 + 0o55) + chr(670 - 617), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(422 - 372) + '\x33' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1889 - 1841) + chr(0b1001 + 0o146) + chr(0b110011) + chr(53) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(54) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\066' + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x36' + chr(565 - 517), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + chr(49) + '\066' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\063' + chr(50) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(4969 - 4858) + chr(647 - 597) + chr(55) + chr(515 - 462), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b101110 + 0o101) + chr(2187 - 2136) + '\x36' + '\x32', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(1414 - 1361) + chr(0b10001 + 0o37), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xed'), chr(9837 - 9737) + chr(0b10001 + 0o124) + chr(99) + chr(0b1100000 + 0o17) + chr(3571 - 3471) + chr(3130 - 3029))('\165' + '\x74' + chr(0b1100110) + '\x2d' + chr(1474 - 1418)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _rHwoyvtca4E(nauYfLglTpcb, oM3jLo753XfX=None, jSV9IKnemH7K=None, **M8EIoTs2GJXE):
if oM3jLo753XfX is None:
oM3jLo753XfX = XCj8K5DCp8y0()
jSV9IKnemH7K = JsaW5JBGnibT if jSV9IKnemH7K is None else jSV9IKnemH7K
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\x94i\x19\x0c\x0b'), '\144' + chr(1053 - 952) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b10110 + 0o137) + chr(116) + '\146' + chr(0b11110 + 0o17) + '\x38'))(shape=nauYfLglTpcb, ctx=oM3jLo753XfX, dtype=jSV9IKnemH7K, **M8EIoTs2GJXE)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
eye
|
def eye(N, M=0, k=0, ctx=None, dtype=None, **kwargs):
"""Return a 2-D array with ones on the diagonal and zeros elsewhere.
Parameters
----------
N: int
Number of rows in the output.
M: int, optional
Number of columns in the output. If 0, defaults to N.
k: int, optional
Index of the diagonal: 0 (the default) refers to the main diagonal,
a positive value refers to an upper diagonal,
and a negative value to a lower diagonal.
ctx: Context, optional
An optional device context (default is the current default context)
dtype: str or numpy.dtype, optional
An optional value type (default is `float32`)
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.eye(2)
[[ 1. 0.]
[ 0. 1.]]
<NDArray 2x2 @cpu(0)>
>>> mx.nd.eye(2, 3, 1)
[[ 0. 1. 0.]
[ 0. 0. 1.]]
<NDArray 2x3 @cpu(0)>
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._eye(N=N, M=M, k=k, ctx=ctx, dtype=dtype, **kwargs)
|
python
|
def eye(N, M=0, k=0, ctx=None, dtype=None, **kwargs):
"""Return a 2-D array with ones on the diagonal and zeros elsewhere.
Parameters
----------
N: int
Number of rows in the output.
M: int, optional
Number of columns in the output. If 0, defaults to N.
k: int, optional
Index of the diagonal: 0 (the default) refers to the main diagonal,
a positive value refers to an upper diagonal,
and a negative value to a lower diagonal.
ctx: Context, optional
An optional device context (default is the current default context)
dtype: str or numpy.dtype, optional
An optional value type (default is `float32`)
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.eye(2)
[[ 1. 0.]
[ 0. 1.]]
<NDArray 2x2 @cpu(0)>
>>> mx.nd.eye(2, 3, 1)
[[ 0. 1. 0.]
[ 0. 0. 1.]]
<NDArray 2x3 @cpu(0)>
"""
# pylint: disable= unused-argument
if ctx is None:
ctx = current_context()
dtype = mx_real_t if dtype is None else dtype
# pylint: disable= no-member, protected-access
return _internal._eye(N=N, M=M, k=k, ctx=ctx, dtype=dtype, **kwargs)
|
[
"def",
"eye",
"(",
"N",
",",
"M",
"=",
"0",
",",
"k",
"=",
"0",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"# pylint: disable= unused-argument",
"if",
"ctx",
"is",
"None",
":",
"ctx",
"=",
"current_context",
"(",
")",
"dtype",
"=",
"mx_real_t",
"if",
"dtype",
"is",
"None",
"else",
"dtype",
"# pylint: disable= no-member, protected-access",
"return",
"_internal",
".",
"_eye",
"(",
"N",
"=",
"N",
",",
"M",
"=",
"M",
",",
"k",
"=",
"k",
",",
"ctx",
"=",
"ctx",
",",
"dtype",
"=",
"dtype",
",",
"*",
"*",
"kwargs",
")"
] |
Return a 2-D array with ones on the diagonal and zeros elsewhere.
Parameters
----------
N: int
Number of rows in the output.
M: int, optional
Number of columns in the output. If 0, defaults to N.
k: int, optional
Index of the diagonal: 0 (the default) refers to the main diagonal,
a positive value refers to an upper diagonal,
and a negative value to a lower diagonal.
ctx: Context, optional
An optional device context (default is the current default context)
dtype: str or numpy.dtype, optional
An optional value type (default is `float32`)
Returns
-------
NDArray
A created array
Examples
--------
>>> mx.nd.eye(2)
[[ 1. 0.]
[ 0. 1.]]
<NDArray 2x2 @cpu(0)>
>>> mx.nd.eye(2, 3, 1)
[[ 0. 1. 0.]
[ 0. 0. 1.]]
<NDArray 2x3 @cpu(0)>
|
[
"Return",
"a",
"2",
"-",
"D",
"array",
"with",
"ones",
"on",
"the",
"diagonal",
"and",
"zeros",
"elsewhere",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3841-L3880
|
train
|
Return a 2 - D array with ones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zuw0hjv33u,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(0b100010 + 0o16) + '\157' + chr(0b100100 + 0o16) + chr(1250 - 1201) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110001) + chr(52) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(2511 - 2460) + chr(0b111 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(53) + chr(50), 61135 - 61127), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110110) + chr(0b1101 + 0o50), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + '\063' + chr(51) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(462 - 411) + '\060' + chr(0b11011 + 0o30), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1294 - 1245) + chr(0b110100) + chr(1292 - 1238), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(49) + chr(0b10101 + 0o36) + chr(0b1010 + 0o47), 0b1000), ehT0Px3KOsy9(chr(48) + chr(7544 - 7433) + chr(51) + chr(48) + chr(87 - 39), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(54) + chr(0b110000), 61969 - 61961), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10101 + 0o36) + '\x36' + chr(0b100110 + 0o13), 21651 - 21643), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(54), 50891 - 50883), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x35' + chr(2067 - 2012), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + chr(2461 - 2411) + '\062', 0b1000), ehT0Px3KOsy9(chr(1117 - 1069) + '\x6f' + chr(0b10 + 0o57) + chr(293 - 238) + chr(1796 - 1746), 0b1000), ehT0Px3KOsy9('\x30' + chr(3792 - 3681) + '\x32' + '\066' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2109 - 2059) + chr(0b10000 + 0o45) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(2319 - 2270) + chr(1986 - 1937) + chr(49), 0b1000), ehT0Px3KOsy9(chr(1159 - 1111) + '\157' + '\x32' + chr(2596 - 2542) + '\063', 10951 - 10943), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(50) + chr(49) + '\x34', 12421 - 12413), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110010 + 0o0) + chr(235 - 181), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b110010) + '\x34' + '\060', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b111011 + 0o64) + '\061' + chr(2499 - 2449) + chr(0b101 + 0o56), 57113 - 57105), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b10101 + 0o132) + '\061' + chr(1822 - 1769) + '\x35', 0b1000), ehT0Px3KOsy9(chr(896 - 848) + chr(0b110010 + 0o75) + chr(1953 - 1904) + chr(2017 - 1968) + chr(2446 - 2394), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(11934 - 11823) + chr(0b11100 + 0o27) + chr(0b100000 + 0o20) + '\060', 8), ehT0Px3KOsy9(chr(2016 - 1968) + chr(111) + chr(300 - 250) + chr(0b110000) + chr(0b11111 + 0o22), 430 - 422), ehT0Px3KOsy9(chr(211 - 163) + '\x6f' + '\061' + '\067' + chr(0b101011 + 0o5), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110100) + chr(0b100011 + 0o15), 0o10), ehT0Px3KOsy9(chr(248 - 200) + '\157' + chr(0b100 + 0o56) + chr(54) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2586 - 2535) + '\x30' + chr(0b100100 + 0o15), 0o10), ehT0Px3KOsy9('\x30' + chr(10621 - 10510) + chr(53) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b101001 + 0o11) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x34' + '\x30', 46379 - 46371), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + chr(1570 - 1519) + chr(0b1000 + 0o56), 22465 - 22457), ehT0Px3KOsy9(chr(48) + chr(5873 - 5762) + chr(0b110010) + '\063' + chr(0b110000), 62375 - 62367), ehT0Px3KOsy9('\060' + chr(0b1010100 + 0o33) + '\x33' + chr(0b110110) + '\x35', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(559 - 506) + chr(0b110000), 12690 - 12682)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4'), chr(0b1100100) + chr(8946 - 8845) + chr(99) + chr(0b1000001 + 0o56) + chr(0b1000010 + 0o42) + '\x65')(chr(0b11001 + 0o134) + '\x74' + chr(0b11111 + 0o107) + chr(0b1 + 0o54) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def BPNK75oMvQCx(vn4sOrFiSB4c, ed0oVQ7n0Y_q=ehT0Px3KOsy9(chr(48) + chr(111) + '\060', 8), OolUPRJhRaJd=ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100010 + 0o16), 8), oM3jLo753XfX=None, jSV9IKnemH7K=None, **M8EIoTs2GJXE):
if oM3jLo753XfX is None:
oM3jLo753XfX = XCj8K5DCp8y0()
jSV9IKnemH7K = JsaW5JBGnibT if jSV9IKnemH7K is None else jSV9IKnemH7K
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\x01e\x0f'), '\144' + chr(3331 - 3230) + chr(0b100000 + 0o103) + chr(111) + chr(0b1011010 + 0o12) + chr(8184 - 8083))(chr(8911 - 8794) + '\164' + chr(5320 - 5218) + '\x2d' + '\070'))(N=vn4sOrFiSB4c, M=ed0oVQ7n0Y_q, k=OolUPRJhRaJd, ctx=oM3jLo753XfX, dtype=jSV9IKnemH7K, **M8EIoTs2GJXE)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
empty
|
def empty(shape, ctx=None, dtype=None):
"""Returns a new array of given shape and type, without initializing entries.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
Returns
-------
NDArray
A created array.
"""
if isinstance(shape, int):
shape = (shape, )
if ctx is None:
ctx = current_context()
if dtype is None:
dtype = mx_real_t
return NDArray(handle=_new_alloc_handle(shape, ctx, False, dtype))
|
python
|
def empty(shape, ctx=None, dtype=None):
"""Returns a new array of given shape and type, without initializing entries.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
Returns
-------
NDArray
A created array.
"""
if isinstance(shape, int):
shape = (shape, )
if ctx is None:
ctx = current_context()
if dtype is None:
dtype = mx_real_t
return NDArray(handle=_new_alloc_handle(shape, ctx, False, dtype))
|
[
"def",
"empty",
"(",
"shape",
",",
"ctx",
"=",
"None",
",",
"dtype",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"shape",
",",
"int",
")",
":",
"shape",
"=",
"(",
"shape",
",",
")",
"if",
"ctx",
"is",
"None",
":",
"ctx",
"=",
"current_context",
"(",
")",
"if",
"dtype",
"is",
"None",
":",
"dtype",
"=",
"mx_real_t",
"return",
"NDArray",
"(",
"handle",
"=",
"_new_alloc_handle",
"(",
"shape",
",",
"ctx",
",",
"False",
",",
"dtype",
")",
")"
] |
Returns a new array of given shape and type, without initializing entries.
Parameters
----------
shape : int or tuple of int
The shape of the empty array.
ctx : Context, optional
An optional device context (default is the current default context).
dtype : str or numpy.dtype, optional
An optional value type (default is `float32`).
Returns
-------
NDArray
A created array.
|
[
"Returns",
"a",
"new",
"array",
"of",
"given",
"shape",
"and",
"type",
"without",
"initializing",
"entries",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3884-L3908
|
train
|
Returns an empty array with given shape and 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,koCeDPYTr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ZT,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(267 - 218) + '\062' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(52) + chr(397 - 343), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(0b100100 + 0o22) + chr(0b110011 + 0o2), 50353 - 50345), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(174 - 124) + '\063' + chr(53), 62436 - 62428), ehT0Px3KOsy9(chr(1933 - 1885) + chr(3767 - 3656) + chr(0b110100) + chr(0b110001 + 0o0), 59376 - 59368), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110101) + '\x33', 0b1000), ehT0Px3KOsy9(chr(1341 - 1293) + chr(0b110011 + 0o74) + '\062' + '\061' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(419 - 368) + '\x34' + chr(316 - 264), 53957 - 53949), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11111 + 0o23) + chr(0b100111 + 0o11) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1001 + 0o51) + chr(0b100 + 0o60) + chr(48), 40873 - 40865), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(55) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(0b1001 + 0o52) + '\064' + chr(555 - 501), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(0b110110) + chr(0b1010 + 0o55), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(51) + chr(0b1011 + 0o51) + '\x32', 53088 - 53080), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\060' + chr(1165 - 1114), 31885 - 31877), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b10011 + 0o134) + chr(1927 - 1877) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b1001 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(2165 - 2117) + chr(0b1011000 + 0o27) + chr(53) + chr(1905 - 1857), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b110001) + chr(0b110100), 20152 - 20144), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + chr(0b110 + 0o55) + chr(49), 23161 - 23153), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b110001) + '\x36' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\x37' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(223 - 175) + chr(551 - 499), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100 + 0o56) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(210 - 160) + chr(860 - 812) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b11000 + 0o30) + chr(424 - 376), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(50) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + '\062' + '\066' + chr(0b10001 + 0o44), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1100 + 0o45) + chr(0b100110 + 0o12) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b1 + 0o60) + chr(0b10110 + 0o35), 31147 - 31139), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(1794 - 1746) + chr(53), 13281 - 13273), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1627 - 1576) + chr(0b110110) + chr(2054 - 2003), 0b1000), ehT0Px3KOsy9(chr(1916 - 1868) + chr(0b1101111) + chr(55) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1100101 + 0o12) + '\x33' + chr(51) + chr(1518 - 1470), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3319 - 3208) + '\x31' + chr(2532 - 2481) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(2539 - 2488) + '\064' + chr(0b110000 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\x37' + chr(0b110111), 8005 - 7997), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x34' + chr(54), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + chr(691 - 638) + chr(54), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100111 + 0o16) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'{'), chr(0b1010 + 0o132) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\144' + chr(0b101010 + 0o73))(chr(2944 - 2827) + chr(3449 - 3333) + chr(9517 - 9415) + chr(45) + chr(1177 - 1121)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def QxT4AUiPWdm4(nauYfLglTpcb, oM3jLo753XfX=None, jSV9IKnemH7K=None):
if PlSM16l2KDPD(nauYfLglTpcb, ehT0Px3KOsy9):
nauYfLglTpcb = (nauYfLglTpcb,)
if oM3jLo753XfX is None:
oM3jLo753XfX = XCj8K5DCp8y0()
if jSV9IKnemH7K is None:
jSV9IKnemH7K = JsaW5JBGnibT
return GdqFjMbtKL7s(handle=dH4mZSHhFjwi(nauYfLglTpcb, oM3jLo753XfX, ehT0Px3KOsy9(chr(2090 - 2042) + chr(8887 - 8776) + chr(0b110000), 0o10), jSV9IKnemH7K))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
histogram
|
def histogram(a, bins=10, range=None):
"""Compute the histogram of the input data.
Parameters
----------
a : NDArray
Input data. The histogram is computed over the flattened array.
bins : int or sequence of scalars
If bins is an int, it defines the number of equal-width bins in the
given range (10, by default). If bins is a sequence, it defines the bin edges,
including the rightmost edge, allowing for non-uniform bin widths.
range : (float, float), optional
The lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()).
Values outside the range are ignored. The first element of the range must be less than or
equal to the second. range affects the automatic bin computation as well, the range will
be equally divided by the number of bins.
Returns
-------
NDArray
A created array.
"""
# pylint: disable= no-member, protected-access
if isinstance(bins, NDArray):
return _internal._histogram(data=a, bins=bins)
elif isinstance(bins, integer_types):
if range is None:
warnings.warn("range is not specified, using numpy's result "
"to ensure consistency with numpy")
res, bin_bounds = np.histogram(a.asnumpy(), bins=bins)
return array(res), array(bin_bounds)
return _internal._histogram(data=a, bin_cnt=bins, range=range)
raise ValueError("bins argument should be either an integer or an NDArray")
|
python
|
def histogram(a, bins=10, range=None):
"""Compute the histogram of the input data.
Parameters
----------
a : NDArray
Input data. The histogram is computed over the flattened array.
bins : int or sequence of scalars
If bins is an int, it defines the number of equal-width bins in the
given range (10, by default). If bins is a sequence, it defines the bin edges,
including the rightmost edge, allowing for non-uniform bin widths.
range : (float, float), optional
The lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()).
Values outside the range are ignored. The first element of the range must be less than or
equal to the second. range affects the automatic bin computation as well, the range will
be equally divided by the number of bins.
Returns
-------
NDArray
A created array.
"""
# pylint: disable= no-member, protected-access
if isinstance(bins, NDArray):
return _internal._histogram(data=a, bins=bins)
elif isinstance(bins, integer_types):
if range is None:
warnings.warn("range is not specified, using numpy's result "
"to ensure consistency with numpy")
res, bin_bounds = np.histogram(a.asnumpy(), bins=bins)
return array(res), array(bin_bounds)
return _internal._histogram(data=a, bin_cnt=bins, range=range)
raise ValueError("bins argument should be either an integer or an NDArray")
|
[
"def",
"histogram",
"(",
"a",
",",
"bins",
"=",
"10",
",",
"range",
"=",
"None",
")",
":",
"# pylint: disable= no-member, protected-access",
"if",
"isinstance",
"(",
"bins",
",",
"NDArray",
")",
":",
"return",
"_internal",
".",
"_histogram",
"(",
"data",
"=",
"a",
",",
"bins",
"=",
"bins",
")",
"elif",
"isinstance",
"(",
"bins",
",",
"integer_types",
")",
":",
"if",
"range",
"is",
"None",
":",
"warnings",
".",
"warn",
"(",
"\"range is not specified, using numpy's result \"",
"\"to ensure consistency with numpy\"",
")",
"res",
",",
"bin_bounds",
"=",
"np",
".",
"histogram",
"(",
"a",
".",
"asnumpy",
"(",
")",
",",
"bins",
"=",
"bins",
")",
"return",
"array",
"(",
"res",
")",
",",
"array",
"(",
"bin_bounds",
")",
"return",
"_internal",
".",
"_histogram",
"(",
"data",
"=",
"a",
",",
"bin_cnt",
"=",
"bins",
",",
"range",
"=",
"range",
")",
"raise",
"ValueError",
"(",
"\"bins argument should be either an integer or an NDArray\"",
")"
] |
Compute the histogram of the input data.
Parameters
----------
a : NDArray
Input data. The histogram is computed over the flattened array.
bins : int or sequence of scalars
If bins is an int, it defines the number of equal-width bins in the
given range (10, by default). If bins is a sequence, it defines the bin edges,
including the rightmost edge, allowing for non-uniform bin widths.
range : (float, float), optional
The lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()).
Values outside the range are ignored. The first element of the range must be less than or
equal to the second. range affects the automatic bin computation as well, the range will
be equally divided by the number of bins.
Returns
-------
NDArray
A created array.
|
[
"Compute",
"the",
"histogram",
"of",
"the",
"input",
"data",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3912-L3946
|
train
|
Compute the histogram over the input data.
|
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,N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srOC7R_,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(3802 - 3691) + chr(0b110010) + '\x35' + chr(52), 29280 - 29272), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1100101 + 0o12) + chr(49) + chr(51) + chr(1116 - 1062), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b110000) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b110000) + chr(522 - 470), 50830 - 50822), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\064' + chr(0b100001 + 0o23), 13929 - 13921), ehT0Px3KOsy9(chr(0b110000) + chr(8391 - 8280) + chr(1222 - 1168) + '\063', 32278 - 32270), ehT0Px3KOsy9(chr(2167 - 2119) + chr(111) + chr(0b10010 + 0o44) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(2331 - 2282), 25333 - 25325), ehT0Px3KOsy9(chr(2081 - 2033) + chr(111) + '\063' + chr(55) + chr(0b101100 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11789 - 11678) + chr(50) + chr(0b110000) + chr(0b110100), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(50) + chr(53), 51905 - 51897), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(51) + chr(0b101101 + 0o7) + '\064', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(2359 - 2309) + chr(51) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(2205 - 2157) + '\157' + '\061' + chr(779 - 729) + chr(753 - 702), ord("\x08")), ehT0Px3KOsy9(chr(1194 - 1146) + chr(2366 - 2255) + chr(1399 - 1348) + chr(0b100101 + 0o22) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10961 - 10850) + '\061' + '\x30' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(566 - 518) + '\x6f' + '\061' + chr(182 - 133) + '\067', 30292 - 30284), ehT0Px3KOsy9(chr(376 - 328) + chr(111) + chr(49) + chr(0b110010) + chr(0b110 + 0o55), 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + '\x35' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1448 - 1397) + chr(1165 - 1117) + chr(53), 42527 - 42519), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + '\061' + '\x31', 0o10), ehT0Px3KOsy9(chr(1967 - 1919) + chr(0b1101111) + '\061' + chr(0b101001 + 0o11) + chr(1715 - 1667), 0o10), ehT0Px3KOsy9('\x30' + chr(12044 - 11933) + '\062' + chr(0b1101 + 0o44) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\x30' + chr(0b101101 + 0o11), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9009 - 8898) + '\063' + chr(0b110111) + chr(926 - 878), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4718 - 4607) + chr(0b100100 + 0o17) + chr(0b101011 + 0o13), 50181 - 50173), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10010 + 0o40) + chr(55) + '\060', 0b1000), ehT0Px3KOsy9(chr(2081 - 2033) + chr(111) + chr(0b110011) + chr(0b10100 + 0o36), 41816 - 41808), ehT0Px3KOsy9('\x30' + '\157' + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(0b100001 + 0o26) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2231 - 2177) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(49) + chr(2294 - 2246), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(922 - 871) + '\065' + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101100 + 0o3) + chr(0b110000 + 0o3) + '\061', 13674 - 13666), ehT0Px3KOsy9('\x30' + chr(4610 - 4499) + chr(0b10 + 0o60) + chr(0b1111 + 0o41) + chr(55), 43094 - 43086), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1282 - 1232) + chr(51) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1065 - 1017) + chr(111) + chr(0b100110 + 0o14) + chr(0b110100) + '\063', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(1749 - 1697), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1659 - 1611) + '\x6f' + chr(0b110101) + chr(0b101001 + 0o7), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x82'), chr(100) + chr(101) + chr(0b1011011 + 0o10) + '\157' + '\x64' + '\x65')(chr(0b1011001 + 0o34) + chr(6562 - 6446) + chr(4916 - 4814) + chr(0b110 + 0o47) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def _D4Zw9btUTuQ(XPh1qbAgrPgG, KQ4BDFoY4RVo=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(50), ord("\x08")), vQr8gNKaIaWE=None):
if PlSM16l2KDPD(KQ4BDFoY4RVo, GdqFjMbtKL7s):
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf36(\xf7\x90\\Rc\x9a\xe9'), chr(7658 - 7558) + chr(0b1100101) + chr(3372 - 3273) + chr(111) + '\144' + chr(2129 - 2028))(chr(117) + '\x74' + '\146' + chr(0b100110 + 0o7) + chr(0b111000)))(data=XPh1qbAgrPgG, bins=KQ4BDFoY4RVo)
elif PlSM16l2KDPD(KQ4BDFoY4RVo, GakrcjanQCW1):
if vQr8gNKaIaWE is None:
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\x1a\x04\xea\xaaqTs\xbd\xca\x9ec'), '\144' + chr(101) + chr(99) + '\157' + chr(0b110101 + 0o57) + '\x65')(chr(3357 - 3240) + chr(1936 - 1820) + '\x66' + chr(0b0 + 0o55) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xde?/\xe3\x81\x13\\b\xdb\xea\xbaz\xc4\xee#\x98'&5@\xa0-|\xaf\xb3\x8bw\xd6}%\\\x8c_\xb8\x93>\xf4\xbb\xd1I\xdf+-\xf0\xc4GZ1\x9e\xea\xa6{\x96\xf8s\x9e+! @\xb6=5\xe1\xa5\x81>\xcfsqZ\xd9\\\xbd\x87i\xfe"), chr(100) + '\145' + chr(0b1100001 + 0o2) + chr(0b1011000 + 0o27) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + chr(0b11110 + 0o110) + chr(1026 - 981) + chr(0b10101 + 0o43)))
(MsbwfslwLjRO, fcsjxri_aYD0) = WqUC3KWvYVup._D4Zw9btUTuQ(XPh1qbAgrPgG.asnumpy(), bins=KQ4BDFoY4RVo)
return (B0ePDhpqxN5n(MsbwfslwLjRO), B0ePDhpqxN5n(fcsjxri_aYD0))
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf36(\xf7\x90\\Rc\x9a\xe9'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(102) + chr(1880 - 1835) + '\x38'))(data=XPh1qbAgrPgG, bin_cnt=KQ4BDFoY4RVo, range=vQr8gNKaIaWE)
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xce7/\xf7\xc4RGv\x8e\xe9\xb0`\x90\xbd \x95+:?M\xe5+5\xaf\xa3\x91j\xd0\x7fw\x12\x98\\\xe8\x83w\xf3\xfe\xc4I\xde~.\xf6\xc4R[1\xb5\xc0\x94|\x96\xfc*'), chr(5787 - 5687) + chr(101) + '\x63' + chr(0b1011111 + 0o20) + chr(0b100000 + 0o104) + chr(1508 - 1407))('\x75' + chr(116) + '\x66' + chr(723 - 678) + chr(0b100011 + 0o25)))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
split_v2
|
def split_v2(ary, indices_or_sections, axis=0, squeeze_axis=False):
"""Split an array into multiple sub-arrays.
Parameters
----------
ary : NDArray
Array to be divided into sub-arrays.
indices_or_sections : int or tuple of ints
If `indices_or_sections` is an integer, N, the array will be divided
into N equal arrays along `axis`. If such a split is not possible,
an error is raised.
If `indices_or_sections` is a 1-D array of sorted integers, the entries
indicate where along `axis` the array is split. For example,
``[2, 3]`` would, for ``axis=0``, result in
- ary[:2]
- ary[2:3]
- ary[3:]
If an index exceeds the dimension of the array along `axis`,
an empty sub-array is returned correspondingly.
axis : int, optional
The axis along which to split, default is 0.
squeeze_axis: boolean, optional
Whether to squeeze the axis of sub-arrays or not, only useful when size
of the sub-arrays are 1 on the `axis`. Default is False.
Returns
-------
NDArray
A created array.
"""
indices = []
axis_size = ary.shape[axis]
if isinstance(indices_or_sections, int):
sections = indices_or_sections
if axis_size % sections:
raise ValueError('array split does not result in an equal division')
section_size = int(axis_size / sections)
indices = [i * section_size for i in range(sections)]
elif isinstance(indices_or_sections, tuple):
indices = [0] + list(indices_or_sections)
else:
raise ValueError('indices_or_sections must either int or tuple of ints')
return _internal._split_v2(ary, indices, axis, squeeze_axis)
|
python
|
def split_v2(ary, indices_or_sections, axis=0, squeeze_axis=False):
"""Split an array into multiple sub-arrays.
Parameters
----------
ary : NDArray
Array to be divided into sub-arrays.
indices_or_sections : int or tuple of ints
If `indices_or_sections` is an integer, N, the array will be divided
into N equal arrays along `axis`. If such a split is not possible,
an error is raised.
If `indices_or_sections` is a 1-D array of sorted integers, the entries
indicate where along `axis` the array is split. For example,
``[2, 3]`` would, for ``axis=0``, result in
- ary[:2]
- ary[2:3]
- ary[3:]
If an index exceeds the dimension of the array along `axis`,
an empty sub-array is returned correspondingly.
axis : int, optional
The axis along which to split, default is 0.
squeeze_axis: boolean, optional
Whether to squeeze the axis of sub-arrays or not, only useful when size
of the sub-arrays are 1 on the `axis`. Default is False.
Returns
-------
NDArray
A created array.
"""
indices = []
axis_size = ary.shape[axis]
if isinstance(indices_or_sections, int):
sections = indices_or_sections
if axis_size % sections:
raise ValueError('array split does not result in an equal division')
section_size = int(axis_size / sections)
indices = [i * section_size for i in range(sections)]
elif isinstance(indices_or_sections, tuple):
indices = [0] + list(indices_or_sections)
else:
raise ValueError('indices_or_sections must either int or tuple of ints')
return _internal._split_v2(ary, indices, axis, squeeze_axis)
|
[
"def",
"split_v2",
"(",
"ary",
",",
"indices_or_sections",
",",
"axis",
"=",
"0",
",",
"squeeze_axis",
"=",
"False",
")",
":",
"indices",
"=",
"[",
"]",
"axis_size",
"=",
"ary",
".",
"shape",
"[",
"axis",
"]",
"if",
"isinstance",
"(",
"indices_or_sections",
",",
"int",
")",
":",
"sections",
"=",
"indices_or_sections",
"if",
"axis_size",
"%",
"sections",
":",
"raise",
"ValueError",
"(",
"'array split does not result in an equal division'",
")",
"section_size",
"=",
"int",
"(",
"axis_size",
"/",
"sections",
")",
"indices",
"=",
"[",
"i",
"*",
"section_size",
"for",
"i",
"in",
"range",
"(",
"sections",
")",
"]",
"elif",
"isinstance",
"(",
"indices_or_sections",
",",
"tuple",
")",
":",
"indices",
"=",
"[",
"0",
"]",
"+",
"list",
"(",
"indices_or_sections",
")",
"else",
":",
"raise",
"ValueError",
"(",
"'indices_or_sections must either int or tuple of ints'",
")",
"return",
"_internal",
".",
"_split_v2",
"(",
"ary",
",",
"indices",
",",
"axis",
",",
"squeeze_axis",
")"
] |
Split an array into multiple sub-arrays.
Parameters
----------
ary : NDArray
Array to be divided into sub-arrays.
indices_or_sections : int or tuple of ints
If `indices_or_sections` is an integer, N, the array will be divided
into N equal arrays along `axis`. If such a split is not possible,
an error is raised.
If `indices_or_sections` is a 1-D array of sorted integers, the entries
indicate where along `axis` the array is split. For example,
``[2, 3]`` would, for ``axis=0``, result in
- ary[:2]
- ary[2:3]
- ary[3:]
If an index exceeds the dimension of the array along `axis`,
an empty sub-array is returned correspondingly.
axis : int, optional
The axis along which to split, default is 0.
squeeze_axis: boolean, optional
Whether to squeeze the axis of sub-arrays or not, only useful when size
of the sub-arrays are 1 on the `axis`. Default is False.
Returns
-------
NDArray
A created array.
|
[
"Split",
"an",
"array",
"into",
"multiple",
"sub",
"-",
"arrays",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L3949-L3992
|
train
|
Splits an array into multiple sub - arrays along a given axis.
|
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,bdLu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CViZiX,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(289 - 241) + '\x6f' + chr(0b1001 + 0o50) + chr(50) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x36' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6065 - 5954) + '\x31' + chr(53) + chr(54), 48855 - 48847), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(3886 - 3775) + '\x32' + '\x37' + '\065', 23419 - 23411), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\061' + '\x34', 55216 - 55208), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2064 - 2010) + chr(2667 - 2614), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(50) + '\065', 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(0b100000 + 0o22) + chr(0b100 + 0o56) + '\x32', 22963 - 22955), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(53) + chr(51), 22575 - 22567), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100101 + 0o20) + chr(0b10110 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + '\066' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1010 + 0o47) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(155 - 100) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(52) + chr(0b1000 + 0o57), 40160 - 40152), ehT0Px3KOsy9('\060' + chr(11287 - 11176) + '\066' + chr(0b110001 + 0o6), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(0b110101) + chr(0b101 + 0o56), 29424 - 29416), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b101 + 0o54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(932 - 881) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b10010 + 0o36) + chr(0b10010 + 0o40), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11111 + 0o120) + chr(0b100101 + 0o15) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(51) + chr(52) + chr(0b110101), 38795 - 38787), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(54), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(1329 - 1277) + chr(0b100 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4806 - 4695) + chr(51) + chr(2341 - 2291) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9092 - 8981) + chr(50) + chr(0b110001) + chr(2028 - 1976), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110100) + chr(0b1110 + 0o51), 27699 - 27691), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101110 + 0o1) + chr(54) + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110 + 0o54) + '\060' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1110 + 0o141) + chr(0b1011 + 0o50) + chr(0b110011) + chr(0b100111 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b10111 + 0o130) + chr(0b110011) + '\066' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100101 + 0o16) + '\064' + chr(0b110111), 58157 - 58149), ehT0Px3KOsy9(chr(2268 - 2220) + chr(0b11101 + 0o122) + chr(0b110011) + chr(0b110111) + '\063', 0o10), ehT0Px3KOsy9(chr(1781 - 1733) + chr(4214 - 4103) + '\x32' + chr(334 - 281) + chr(0b110000), 44897 - 44889), ehT0Px3KOsy9(chr(2038 - 1990) + chr(6821 - 6710) + chr(0b100 + 0o63) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1690 - 1642) + '\x6f' + chr(0b110010) + chr(51) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(10099 - 9988) + chr(50) + '\060' + chr(52), 36154 - 36146), ehT0Px3KOsy9('\x30' + '\157' + chr(2017 - 1963) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b0 + 0o63), 37652 - 37644)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(511 - 463) + chr(0b1101111) + chr(53) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'y'), '\144' + chr(0b1000100 + 0o41) + '\x63' + '\x6f' + chr(100) + chr(578 - 477))('\x75' + chr(0b10111 + 0o135) + '\x66' + chr(621 - 576) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def OF7buBICGWwf(zKLVv6md2mvg, i1e8y39Ty_xx, cRTh61qyvi24=ehT0Px3KOsy9('\x30' + chr(4825 - 4714) + chr(48), 0o10), MMP_SE9VMreN=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', 8)):
pIcoaXENl5Pw = []
jiF2v5nsFpUB = zKLVv6md2mvg.nauYfLglTpcb[cRTh61qyvi24]
if PlSM16l2KDPD(i1e8y39Ty_xx, ehT0Px3KOsy9):
osRv5CFR3cO5 = i1e8y39Ty_xx
if jiF2v5nsFpUB % osRv5CFR3cO5:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'6@\x1c\xdc\xf5\x15\xe6\xe2GG\x03/~\x11\xc2D\x8bg\xb7\xf65\x97KZ\x95\xba\xf8\x07[\xe9\xfd\x94\x89\xdb\xcdJ\xed\xe5X33[\x18\xd4\xff\\\xfa\xfc'), '\144' + '\145' + chr(6730 - 6631) + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(5135 - 5019) + '\x66' + chr(0b10101 + 0o30) + chr(0b1111 + 0o51)))
KO9Q7tcITxz9 = ehT0Px3KOsy9(jiF2v5nsFpUB / osRv5CFR3cO5)
pIcoaXENl5Pw = [WVxHKyX45z_L * KO9Q7tcITxz9 for WVxHKyX45z_L in vQr8gNKaIaWE(osRv5CFR3cO5)]
elif PlSM16l2KDPD(i1e8y39Ty_xx, KNyTy8rYcwji):
pIcoaXENl5Pw = [ehT0Px3KOsy9(chr(595 - 547) + chr(0b1101111) + chr(48), 8)] + YyaZ4tpXu4lf(i1e8y39Ty_xx)
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'>\\\n\xd4\xefP\xe6\xcdD\\(|\x7f\x1d\xd3^\xc4g\xab\xa2x\x90]]\xc0\xb3\xe5SZ\xe2\xaf\xd5\x8e\x95\xdc\x1b\xf7\xf6\x14g"B\x02\xd8\xacZ\xf3\xb2B@\x03|'), '\x64' + '\x65' + chr(99) + chr(3319 - 3208) + '\x64' + '\145')('\x75' + chr(0b1011010 + 0o32) + '\x66' + '\x2d' + chr(56)))
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\x08A\x1e\xd1\xe5A\xca\xe4\x19'), '\144' + chr(0b110011 + 0o62) + '\x63' + '\x6f' + '\144' + chr(0b1100101))(chr(0b111100 + 0o71) + '\164' + '\x66' + '\x2d' + chr(1097 - 1041)))(zKLVv6md2mvg, pIcoaXENl5Pw, cRTh61qyvi24, MMP_SE9VMreN)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
to_dlpack_for_read
|
def to_dlpack_for_read(data):
"""Returns a reference view of NDArray that represents as DLManagedTensor until
all previous write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> z
[[1. 1. 1.]
[1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
"""
data.wait_to_read()
dlpack = DLPackHandle()
check_call(_LIB.MXNDArrayToDLPack(data.handle, ctypes.byref(dlpack)))
return ctypes.pythonapi.PyCapsule_New(dlpack, _c_str_dltensor, _c_dlpack_deleter)
|
python
|
def to_dlpack_for_read(data):
"""Returns a reference view of NDArray that represents as DLManagedTensor until
all previous write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> z
[[1. 1. 1.]
[1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
"""
data.wait_to_read()
dlpack = DLPackHandle()
check_call(_LIB.MXNDArrayToDLPack(data.handle, ctypes.byref(dlpack)))
return ctypes.pythonapi.PyCapsule_New(dlpack, _c_str_dltensor, _c_dlpack_deleter)
|
[
"def",
"to_dlpack_for_read",
"(",
"data",
")",
":",
"data",
".",
"wait_to_read",
"(",
")",
"dlpack",
"=",
"DLPackHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayToDLPack",
"(",
"data",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"dlpack",
")",
")",
")",
"return",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_New",
"(",
"dlpack",
",",
"_c_str_dltensor",
",",
"_c_dlpack_deleter",
")"
] |
Returns a reference view of NDArray that represents as DLManagedTensor until
all previous write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> z
[[1. 1. 1.]
[1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
|
[
"Returns",
"a",
"reference",
"view",
"of",
"NDArray",
"that",
"represents",
"as",
"DLManagedTensor",
"until",
"all",
"previous",
"write",
"operations",
"on",
"the",
"current",
"array",
"are",
"finished",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L4007-L4036
|
train
|
Returns a reference view of NDArray that represents as DLManagedTensor until all previous write operations on the current array are finished.
|
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(0b10111 + 0o31) + chr(111) + chr(50) + chr(53), 0o10), ehT0Px3KOsy9(chr(132 - 84) + chr(0b1101111) + chr(0b11111 + 0o24) + chr(48) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(2180 - 2132) + chr(111) + '\063' + chr(52) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + chr(1160 - 1105) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1100 + 0o46) + '\060' + chr(0b101110 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100110 + 0o111) + chr(50) + '\061' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o62), 55177 - 55169), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(50) + '\064' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\063' + chr(0b110000), 44960 - 44952), ehT0Px3KOsy9(chr(48) + chr(7419 - 7308) + chr(2073 - 2022) + chr(509 - 458) + '\x30', 0o10), ehT0Px3KOsy9(chr(305 - 257) + '\x6f' + chr(0b101011 + 0o6) + '\062' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1100 + 0o47) + chr(378 - 326) + chr(0b110011), 61296 - 61288), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11000 + 0o32) + chr(0b11011 + 0o33) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(1861 - 1811) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(2691 - 2637) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1011 + 0o50) + chr(0b10 + 0o61) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(48) + chr(0b11100 + 0o33), 0b1000), ehT0Px3KOsy9(chr(1649 - 1601) + '\157' + chr(0b100 + 0o57) + '\x30' + chr(0b110101), 8), ehT0Px3KOsy9(chr(1645 - 1597) + chr(6751 - 6640) + chr(0b101 + 0o55) + '\x34' + chr(1621 - 1569), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(870 - 816) + '\x30', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11111 + 0o23) + chr(52) + chr(0b101101 + 0o7), 8), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(4408 - 4297) + '\x31' + chr(2518 - 2466) + chr(1044 - 991), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111010 + 0o65) + chr(0b110001) + chr(0b110101) + chr(0b11101 + 0o27), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x34' + '\062', 29183 - 29175), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101110 + 0o11), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\x34' + chr(0b110001), 245 - 237), ehT0Px3KOsy9('\x30' + chr(11828 - 11717) + chr(0b110001 + 0o2) + chr(1929 - 1875) + '\x32', 1570 - 1562), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(0b10101 + 0o34) + '\x37' + '\x32', 52330 - 52322), ehT0Px3KOsy9(chr(552 - 504) + chr(0b11110 + 0o121) + chr(0b110110 + 0o1) + chr(0b10110 + 0o41), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(1665 - 1615) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(949 - 898) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + '\x32' + '\x34' + chr(611 - 559), 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(1071 - 1020) + chr(0b110111) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b101001 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b110111), 21409 - 21401), ehT0Px3KOsy9(chr(669 - 621) + chr(111) + chr(49) + chr(1921 - 1873) + chr(0b110100 + 0o1), 0o10), ehT0Px3KOsy9(chr(1878 - 1830) + chr(111) + chr(51) + chr(0b10001 + 0o43) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\064' + chr(0b110100), 30069 - 30061), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b1101 + 0o45) + chr(0b101000 + 0o15), 0b1000), ehT0Px3KOsy9('\x30' + chr(9490 - 9379) + chr(0b10011 + 0o37) + chr(0b11000 + 0o32) + '\060', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2257 - 2209) + chr(0b1101111) + chr(1516 - 1463) + chr(0b11100 + 0o24), 57610 - 57602)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(0b1100100) + chr(0b1001000 + 0o35) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b11101 + 0o130) + '\x74' + chr(0b1100110) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def GC_Luv7wdS1q(ULnjp6D6efFH):
xafqLlk3kkUe(ULnjp6D6efFH, xafqLlk3kkUe(SXOLrMavuUCe(b'b\xa4\x8fM\xde\xf9j\xfa\xea\xbd6\x87'), chr(0b1000111 + 0o35) + chr(0b11101 + 0o110) + chr(9284 - 9185) + chr(111) + '\144' + chr(0b1100101))('\165' + '\164' + '\146' + chr(0b100110 + 0o7) + chr(0b111000)))()
gdIoI1sMSUxG = byrYfxfjX9no()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'X\x9d\xa8}\xc0\xffw\xc4\xe1\x8c8\xa7\xf9\xc2Q\xbc\xec'), chr(0b100000 + 0o104) + '\x65' + '\x63' + '\x6f' + '\x64' + chr(0b1001111 + 0o26))(chr(117) + chr(10020 - 9904) + chr(0b1100110) + chr(1110 - 1065) + '\070'))(xafqLlk3kkUe(ULnjp6D6efFH, xafqLlk3kkUe(SXOLrMavuUCe(b'F\xbd\xb2L\xcc\xfcC\xff\xfc\xa2\r\x9b'), '\x64' + chr(0b1100101) + chr(5687 - 5588) + chr(0b1101111) + '\144' + '\x65')(chr(5858 - 5741) + chr(0b1110100) + '\x66' + chr(0b1 + 0o54) + '\x38')), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'w\xbc\x94\\\xe7'), chr(8859 - 8759) + '\145' + '\143' + chr(9868 - 9757) + chr(0b1100100) + chr(101))(chr(117) + chr(2192 - 2076) + chr(102) + chr(45) + chr(0b110100 + 0o4)))(gdIoI1sMSUxG)))
return xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'E\xbc\xa5X\xf1\xfep\xc9\xfd\x87\x19\x86\xc2'), chr(1150 - 1050) + chr(9981 - 9880) + '\x63' + '\x6f' + '\144' + chr(101))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(0b111000)))(gdIoI1sMSUxG, dO4XNLaQmAN6, YgTXD7jm6rrZ)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
to_dlpack_for_write
|
def to_dlpack_for_write(data):
"""Returns a reference view of NDArray that represents as DLManagedTensor until
all previous read/write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
"""
check_call(_LIB.MXNDArrayWaitToWrite(data.handle))
dlpack = DLPackHandle()
check_call(_LIB.MXNDArrayToDLPack(data.handle, ctypes.byref(dlpack)))
return ctypes.pythonapi.PyCapsule_New(dlpack, _c_str_dltensor, _c_dlpack_deleter)
|
python
|
def to_dlpack_for_write(data):
"""Returns a reference view of NDArray that represents as DLManagedTensor until
all previous read/write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
"""
check_call(_LIB.MXNDArrayWaitToWrite(data.handle))
dlpack = DLPackHandle()
check_call(_LIB.MXNDArrayToDLPack(data.handle, ctypes.byref(dlpack)))
return ctypes.pythonapi.PyCapsule_New(dlpack, _c_str_dltensor, _c_dlpack_deleter)
|
[
"def",
"to_dlpack_for_write",
"(",
"data",
")",
":",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayWaitToWrite",
"(",
"data",
".",
"handle",
")",
")",
"dlpack",
"=",
"DLPackHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayToDLPack",
"(",
"data",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"dlpack",
")",
")",
")",
"return",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_New",
"(",
"dlpack",
",",
"_c_str_dltensor",
",",
"_c_dlpack_deleter",
")"
] |
Returns a reference view of NDArray that represents as DLManagedTensor until
all previous read/write operations on the current array are finished.
Parameters
----------
data: NDArray
input data.
Returns
-------
PyCapsule (the pointer of DLManagedTensor)
a reference view of NDArray that represents as DLManagedTensor.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
|
[
"Returns",
"a",
"reference",
"view",
"of",
"NDArray",
"that",
"represents",
"as",
"DLManagedTensor",
"until",
"all",
"previous",
"read",
"/",
"write",
"operations",
"on",
"the",
"current",
"array",
"are",
"finished",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L4038-L4068
|
train
|
Returns a reference view of NDArray that represents as DLManagedTensor until all previous read and write operations on the current array are finished.
|
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(chr(1854 - 1806) + '\157' + '\x32' + chr(0b11110 + 0o31) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(54) + chr(54), 0b1000), ehT0Px3KOsy9(chr(2036 - 1988) + '\157' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b100011 + 0o15), 0b1000), ehT0Px3KOsy9(chr(1121 - 1073) + chr(0b1101111) + chr(2136 - 2085) + chr(52) + chr(0b100101 + 0o16), 42973 - 42965), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b110010) + chr(1727 - 1677) + '\064', 11829 - 11821), ehT0Px3KOsy9(chr(987 - 939) + '\x6f' + chr(51) + chr(0b110111) + '\063', 0b1000), ehT0Px3KOsy9(chr(292 - 244) + chr(5903 - 5792) + chr(0b110001) + chr(2453 - 2399) + chr(1791 - 1743), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1597 - 1542) + chr(1529 - 1474), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(54) + chr(0b11000 + 0o31), 54132 - 54124), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(55) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o32) + chr(0b101010 + 0o13) + chr(2429 - 2379), 17067 - 17059), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + chr(0b110000 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\061' + '\061' + chr(0b11011 + 0o25), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x33' + chr(1019 - 966), 6270 - 6262), ehT0Px3KOsy9('\x30' + '\157' + '\x34' + chr(0b100001 + 0o23), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\066' + chr(48), 0o10), ehT0Px3KOsy9(chr(163 - 115) + '\x6f' + chr(1046 - 995) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\x30' + chr(0b110011), 26070 - 26062), ehT0Px3KOsy9(chr(2032 - 1984) + '\x6f' + chr(49) + '\062', 44494 - 44486), ehT0Px3KOsy9(chr(48) + chr(1708 - 1597) + '\063' + '\x30' + chr(2419 - 2364), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100110 + 0o111) + chr(0b110001) + chr(0b11011 + 0o31) + chr(0b101001 + 0o13), 0o10), ehT0Px3KOsy9(chr(829 - 781) + chr(0b1101111) + '\062' + chr(0b110110) + chr(0b110011), 58093 - 58085), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + chr(477 - 422), 54267 - 54259), ehT0Px3KOsy9(chr(146 - 98) + '\157' + chr(50) + '\067', 17285 - 17277), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(53) + '\x34', 40776 - 40768), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(50) + chr(2482 - 2428), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + '\063' + '\x34' + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(2506 - 2395) + chr(0b110011) + '\063' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\065' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x33' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + '\x31' + chr(0b110111) + chr(0b110111), 12970 - 12962), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11111 + 0o24) + chr(0b110001) + chr(55), 20460 - 20452), ehT0Px3KOsy9(chr(1072 - 1024) + chr(0b1101111) + chr(49) + '\067' + '\063', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + '\x33' + chr(0b101011 + 0o13) + chr(1104 - 1054), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\067' + chr(52), 42358 - 42350), ehT0Px3KOsy9(chr(1790 - 1742) + chr(8635 - 8524) + chr(49) + '\061', 20636 - 20628), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(1218 - 1166) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(51) + chr(49), 13102 - 13094)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\x35' + chr(692 - 644), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x96'), chr(100) + chr(0b10100 + 0o121) + chr(99) + chr(0b11011 + 0o124) + '\144' + chr(101))(chr(6835 - 6718) + chr(7610 - 7494) + chr(7903 - 7801) + chr(0b1101 + 0o40) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def u0qlKZzQb3RL(ULnjp6D6efFH):
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5nNL\xa2\xe6\x89\x11F\xe6X\xc3Y\x1c\xb2sBr7o'), chr(6900 - 6800) + chr(0b1111 + 0o126) + chr(99) + chr(1741 - 1630) + chr(100) + chr(0b1000000 + 0o45))(chr(0b11111 + 0o126) + '\x74' + chr(0b1001101 + 0o31) + '\x2d' + '\x38'))(xafqLlk3kkUe(ULnjp6D6efFH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xebNT}\xae\xe5\xbd*[\xcbc\xd2'), chr(0b1100100) + '\x65' + chr(0b1011101 + 0o6) + chr(0b101111 + 0o100) + chr(100) + '\x65')(chr(0b1011011 + 0o32) + chr(0b1110100) + '\x66' + '\055' + chr(331 - 275)))))
gdIoI1sMSUxG = byrYfxfjX9no()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5nNL\xa2\xe6\x89\x11F\xe5V\xeea\x18\xbcG['), '\x64' + chr(2511 - 2410) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(8885 - 8768) + '\x74' + chr(102) + '\x2d' + '\070'))(xafqLlk3kkUe(ULnjp6D6efFH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xebNT}\xae\xe5\xbd*[\xcbc\xd2'), chr(0b1100100 + 0o0) + chr(0b101001 + 0o74) + chr(0b111100 + 0o47) + chr(8298 - 8187) + chr(100) + '\145')(chr(4318 - 4201) + chr(3151 - 3035) + '\x66' + '\055' + '\x38')), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaOrm\x85'), '\144' + '\x65' + chr(99) + '\x6f' + '\144' + chr(101))(chr(0b1110101) + '\x74' + '\x66' + chr(0b101001 + 0o4) + '\x38'))(gdIoI1sMSUxG)))
return xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8OCi\x93\xe7\x8e\x1cZ\xeew\xcfZ'), chr(8490 - 8390) + chr(3843 - 3742) + '\x63' + '\x6f' + chr(0b1101 + 0o127) + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + chr(587 - 542) + '\x38'))(gdIoI1sMSUxG, dO4XNLaQmAN6, YgTXD7jm6rrZ)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
from_dlpack
|
def from_dlpack(dlpack):
"""Returns a NDArray backed by a dlpack tensor.
Parameters
----------
dlpack: PyCapsule (the pointer of DLManagedTensor)
input data
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> type(z)
<class 'mxnet.ndarray.ndarray.NDArray'>
>>> z
[[ 1. 1. 1.]
[ 1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
"""
handle = NDArrayHandle()
dlpack = ctypes.py_object(dlpack)
assert ctypes.pythonapi.PyCapsule_IsValid(dlpack, _c_str_dltensor), ValueError(
'Invalid DLPack Tensor. DLTensor capsules can be consumed only once.')
dlpack_handle = ctypes.c_void_p(ctypes.pythonapi.PyCapsule_GetPointer(dlpack, _c_str_dltensor))
check_call(_LIB.MXNDArrayFromDLPack(dlpack_handle, ctypes.byref(handle)))
# Rename PyCapsule (DLPack)
ctypes.pythonapi.PyCapsule_SetName(dlpack, _c_str_used_dltensor)
# delete the deleter of the old dlpack
ctypes.pythonapi.PyCapsule_SetDestructor(dlpack, None)
return NDArray(handle=handle)
|
python
|
def from_dlpack(dlpack):
"""Returns a NDArray backed by a dlpack tensor.
Parameters
----------
dlpack: PyCapsule (the pointer of DLManagedTensor)
input data
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> type(z)
<class 'mxnet.ndarray.ndarray.NDArray'>
>>> z
[[ 1. 1. 1.]
[ 1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
"""
handle = NDArrayHandle()
dlpack = ctypes.py_object(dlpack)
assert ctypes.pythonapi.PyCapsule_IsValid(dlpack, _c_str_dltensor), ValueError(
'Invalid DLPack Tensor. DLTensor capsules can be consumed only once.')
dlpack_handle = ctypes.c_void_p(ctypes.pythonapi.PyCapsule_GetPointer(dlpack, _c_str_dltensor))
check_call(_LIB.MXNDArrayFromDLPack(dlpack_handle, ctypes.byref(handle)))
# Rename PyCapsule (DLPack)
ctypes.pythonapi.PyCapsule_SetName(dlpack, _c_str_used_dltensor)
# delete the deleter of the old dlpack
ctypes.pythonapi.PyCapsule_SetDestructor(dlpack, None)
return NDArray(handle=handle)
|
[
"def",
"from_dlpack",
"(",
"dlpack",
")",
":",
"handle",
"=",
"NDArrayHandle",
"(",
")",
"dlpack",
"=",
"ctypes",
".",
"py_object",
"(",
"dlpack",
")",
"assert",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_IsValid",
"(",
"dlpack",
",",
"_c_str_dltensor",
")",
",",
"ValueError",
"(",
"'Invalid DLPack Tensor. DLTensor capsules can be consumed only once.'",
")",
"dlpack_handle",
"=",
"ctypes",
".",
"c_void_p",
"(",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_GetPointer",
"(",
"dlpack",
",",
"_c_str_dltensor",
")",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayFromDLPack",
"(",
"dlpack_handle",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
")",
"# Rename PyCapsule (DLPack)",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_SetName",
"(",
"dlpack",
",",
"_c_str_used_dltensor",
")",
"# delete the deleter of the old dlpack",
"ctypes",
".",
"pythonapi",
".",
"PyCapsule_SetDestructor",
"(",
"dlpack",
",",
"None",
")",
"return",
"NDArray",
"(",
"handle",
"=",
"handle",
")"
] |
Returns a NDArray backed by a dlpack tensor.
Parameters
----------
dlpack: PyCapsule (the pointer of DLManagedTensor)
input data
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.to_dlpack_for_read(x)
>>> type(y)
<class 'PyCapsule'>
>>> z = mx.nd.from_dlpack(y)
>>> type(z)
<class 'mxnet.ndarray.ndarray.NDArray'>
>>> z
[[ 1. 1. 1.]
[ 1. 1. 1.]]
<NDArray 2x3 @cpu(0)>
>>> w = mx.nd.to_dlpack_for_write(x)
>>> type(w)
<class 'PyCapsule'>
>>> u = mx.nd.from_dlpack(w)
>>> u += 1
>>> x
[[2. 2. 2.]
[2. 2. 2.]]
<NDArray 2x3 @cpu(0)>
|
[
"Returns",
"a",
"NDArray",
"backed",
"by",
"a",
"dlpack",
"tensor",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L4070-L4117
|
train
|
Returns a NDArray backed by a dlpack tensor.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcY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8qwsX,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) + '\x6f' + '\x33' + chr(2421 - 2370) + chr(48), 49368 - 49360), ehT0Px3KOsy9('\060' + '\157' + chr(0b0 + 0o61) + chr(1713 - 1662) + chr(2612 - 2560), 5539 - 5531), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(1711 - 1663) + chr(0b1101111) + chr(0b110110 + 0o1) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(1669 - 1617), 0o10), ehT0Px3KOsy9('\060' + chr(11991 - 11880) + '\x33' + '\x30' + chr(0b110011), 34667 - 34659), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b10011 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(95 - 42), 8), ehT0Px3KOsy9(chr(1464 - 1416) + chr(0b101000 + 0o107) + chr(0b110010) + '\067' + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011111 + 0o20) + '\062' + '\x35' + chr(0b1111 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + chr(6981 - 6870) + '\x33' + '\x35' + chr(332 - 283), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b11000 + 0o33) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(1552 - 1501) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b110110 + 0o1) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10555 - 10444) + chr(50) + '\x36' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(334 - 283) + chr(54) + chr(1456 - 1406), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b101000 + 0o12) + '\x33' + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + chr(0b1111 + 0o43) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11110 + 0o30) + chr(0b11000 + 0o34), 36670 - 36662), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x34' + '\061', 0o10), ehT0Px3KOsy9(chr(2071 - 2023) + chr(2895 - 2784) + '\063' + '\066' + chr(348 - 297), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + '\061' + chr(0b110100) + '\x35', 34301 - 34293), ehT0Px3KOsy9(chr(48) + chr(7145 - 7034) + '\x32' + chr(0b110100) + chr(0b101111 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9324 - 9213) + chr(50) + '\063' + '\x35', 43262 - 43254), ehT0Px3KOsy9(chr(1028 - 980) + chr(0b1101111) + '\063' + '\062' + chr(0b110110), 52285 - 52277), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + '\062' + '\x30' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\064' + chr(727 - 673), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(54) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110001) + chr(52) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100001 + 0o116) + chr(51) + '\x34' + chr(0b10101 + 0o34), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\x32' + '\064', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(1728 - 1679) + chr(1452 - 1398), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100101 + 0o12) + chr(51) + chr(1562 - 1510) + chr(0b1101 + 0o43), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110111) + chr(1447 - 1394), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b1000 + 0o55) + chr(1335 - 1285), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10111 + 0o35) + chr(0b110011 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(820 - 772) + '\157' + chr(51) + chr(145 - 95) + chr(0b1010 + 0o55), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(51) + chr(0b1100 + 0o51), 1580 - 1572), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(0b0 + 0o62) + '\x31', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065' + chr(1818 - 1770), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(9381 - 9270) + '\x64' + '\145')(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def MAppX5Q3RCPy(gdIoI1sMSUxG):
SxTuMqFZdzZx = v4apgis0SrXp()
gdIoI1sMSUxG = RyQ4N1viUrfz.py_object(gdIoI1sMSUxG)
assert xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88%VYl\xb0~y\xdf\xf5\xa0\xafN\x9e\xdf\x9b\xfb'), '\144' + chr(101) + chr(2777 - 2678) + chr(0b101110 + 0o101) + chr(4576 - 4476) + chr(0b1000111 + 0o36))(chr(117) + chr(116) + chr(5613 - 5511) + chr(45) + '\x38'))(gdIoI1sMSUxG, dO4XNLaQmAN6), q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x912cYp\xaao5\xfe\xe6\xb9\xbd{\x94\x93\xa6\xfa~GN\x81K\x87\xd9\x9a\xd3\x03X\x11\x8e\xe6\xee\x83\\\x9aW\xa2`\xb8\xe2\xf8?tV<\xa1n5\xd9\xc5\x87\xafm\x92\xd6\x96\xbf\x7fZM\x8aE\xc8\xf3\xb5\xe2H'), '\x64' + chr(0b11011 + 0o112) + chr(99) + '\x6f' + '\x64' + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(0b11 + 0o52) + chr(0b110110 + 0o2)))
ey_BMlvnlRfU = RyQ4N1viUrfz.c_void_p(RyQ4N1viUrfz.pythonapi.PyCapsule_GetPointer(gdIoI1sMSUxG, dO4XNLaQmAN6))
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95\x04[|]\xb1yt\xc3\xec\x9b\xb3u\xbb\xff\xa2\xfes_'), '\144' + chr(0b1100101) + chr(99) + '\x6f' + chr(6295 - 6195) + '\x65')(chr(1917 - 1800) + '\164' + '\146' + '\055' + '\070'))(ey_BMlvnlRfU, xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xba%g]z'), chr(0b1100100) + chr(101) + '\143' + chr(0b1100110 + 0o11) + chr(100) + chr(0b1100101))('\x75' + '\x74' + '\x66' + '\x2d' + chr(0b111000)))(SxTuMqFZdzZx)))
xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88%VYl\xb0~y\xdf\xf5\xba\xb9l\xb1\xd2\x9f\xfa'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b111000 + 0o54) + chr(0b1100101))(chr(4953 - 4836) + chr(11117 - 11001) + chr(0b1100110) + chr(0b10100 + 0o31) + chr(0b1 + 0o67)))(gdIoI1sMSUxG, JGLKT2RGoFX_)
xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'\x88%VYl\xb0~y\xdf\xf5\xba\xb9l\xbb\xd6\x81\xebbAB\x87\n\xd5'), chr(100) + chr(3103 - 3002) + chr(0b110111 + 0o54) + chr(111) + chr(0b1001110 + 0o26) + '\145')('\165' + chr(5985 - 5869) + '\x66' + '\x2d' + chr(56)))(gdIoI1sMSUxG, None)
return GdqFjMbtKL7s(handle=SxTuMqFZdzZx)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
from_numpy
|
def from_numpy(ndarray, zero_copy=True):
"""Returns an MXNet's NDArray backed by Numpy's ndarray.
Parameters
----------
ndarray: numpy.ndarray
input data
zero_copy: bool
Whether we use DLPack's zero-copy conversion to convert to MXNet's NDArray.
This is only available for c-contiguous arrays, i.e. array.flags[C_CONTIGUOUS] == True.
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
"""
def _make_manager_ctx(obj):
pyobj = ctypes.py_object(obj)
void_p = ctypes.c_void_p.from_buffer(pyobj)
ctypes.pythonapi.Py_IncRef(pyobj)
return void_p
def _make_dl_tensor(array):
if str(array.dtype) not in DLDataType.TYPE_MAP:
raise ValueError(str(array.dtype) + " is not supported.")
dl_tensor = DLTensor()
dl_tensor.data = array.ctypes.data_as(ctypes.c_void_p)
dl_tensor.ctx = DLContext(1, 0)
dl_tensor.ndim = array.ndim
dl_tensor.dtype = DLDataType.TYPE_MAP[str(array.dtype)]
dl_tensor.shape = array.ctypes.shape_as(ctypes.c_int64)
dl_tensor.strides = None
dl_tensor.byte_offset = 0
return dl_tensor
def _make_dl_managed_tensor(array):
c_obj = DLManagedTensor()
c_obj.dl_tensor = _make_dl_tensor(array)
c_obj.manager_ctx = _make_manager_ctx(array)
c_obj.deleter = dl_managed_tensor_deleter
return c_obj
if not zero_copy:
return array(ndarray, dtype=ndarray.dtype)
if not ndarray.flags['C_CONTIGUOUS']:
raise ValueError("Only c-contiguous arrays are supported for zero-copy")
c_obj = _make_dl_managed_tensor(ndarray)
address = ctypes.addressof(c_obj)
address = ctypes.cast(address, ctypes.c_void_p)
handle = NDArrayHandle()
check_call(_LIB.MXNDArrayFromDLPack(address, ctypes.byref(handle)))
return NDArray(handle=handle)
|
python
|
def from_numpy(ndarray, zero_copy=True):
"""Returns an MXNet's NDArray backed by Numpy's ndarray.
Parameters
----------
ndarray: numpy.ndarray
input data
zero_copy: bool
Whether we use DLPack's zero-copy conversion to convert to MXNet's NDArray.
This is only available for c-contiguous arrays, i.e. array.flags[C_CONTIGUOUS] == True.
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
"""
def _make_manager_ctx(obj):
pyobj = ctypes.py_object(obj)
void_p = ctypes.c_void_p.from_buffer(pyobj)
ctypes.pythonapi.Py_IncRef(pyobj)
return void_p
def _make_dl_tensor(array):
if str(array.dtype) not in DLDataType.TYPE_MAP:
raise ValueError(str(array.dtype) + " is not supported.")
dl_tensor = DLTensor()
dl_tensor.data = array.ctypes.data_as(ctypes.c_void_p)
dl_tensor.ctx = DLContext(1, 0)
dl_tensor.ndim = array.ndim
dl_tensor.dtype = DLDataType.TYPE_MAP[str(array.dtype)]
dl_tensor.shape = array.ctypes.shape_as(ctypes.c_int64)
dl_tensor.strides = None
dl_tensor.byte_offset = 0
return dl_tensor
def _make_dl_managed_tensor(array):
c_obj = DLManagedTensor()
c_obj.dl_tensor = _make_dl_tensor(array)
c_obj.manager_ctx = _make_manager_ctx(array)
c_obj.deleter = dl_managed_tensor_deleter
return c_obj
if not zero_copy:
return array(ndarray, dtype=ndarray.dtype)
if not ndarray.flags['C_CONTIGUOUS']:
raise ValueError("Only c-contiguous arrays are supported for zero-copy")
c_obj = _make_dl_managed_tensor(ndarray)
address = ctypes.addressof(c_obj)
address = ctypes.cast(address, ctypes.c_void_p)
handle = NDArrayHandle()
check_call(_LIB.MXNDArrayFromDLPack(address, ctypes.byref(handle)))
return NDArray(handle=handle)
|
[
"def",
"from_numpy",
"(",
"ndarray",
",",
"zero_copy",
"=",
"True",
")",
":",
"def",
"_make_manager_ctx",
"(",
"obj",
")",
":",
"pyobj",
"=",
"ctypes",
".",
"py_object",
"(",
"obj",
")",
"void_p",
"=",
"ctypes",
".",
"c_void_p",
".",
"from_buffer",
"(",
"pyobj",
")",
"ctypes",
".",
"pythonapi",
".",
"Py_IncRef",
"(",
"pyobj",
")",
"return",
"void_p",
"def",
"_make_dl_tensor",
"(",
"array",
")",
":",
"if",
"str",
"(",
"array",
".",
"dtype",
")",
"not",
"in",
"DLDataType",
".",
"TYPE_MAP",
":",
"raise",
"ValueError",
"(",
"str",
"(",
"array",
".",
"dtype",
")",
"+",
"\" is not supported.\"",
")",
"dl_tensor",
"=",
"DLTensor",
"(",
")",
"dl_tensor",
".",
"data",
"=",
"array",
".",
"ctypes",
".",
"data_as",
"(",
"ctypes",
".",
"c_void_p",
")",
"dl_tensor",
".",
"ctx",
"=",
"DLContext",
"(",
"1",
",",
"0",
")",
"dl_tensor",
".",
"ndim",
"=",
"array",
".",
"ndim",
"dl_tensor",
".",
"dtype",
"=",
"DLDataType",
".",
"TYPE_MAP",
"[",
"str",
"(",
"array",
".",
"dtype",
")",
"]",
"dl_tensor",
".",
"shape",
"=",
"array",
".",
"ctypes",
".",
"shape_as",
"(",
"ctypes",
".",
"c_int64",
")",
"dl_tensor",
".",
"strides",
"=",
"None",
"dl_tensor",
".",
"byte_offset",
"=",
"0",
"return",
"dl_tensor",
"def",
"_make_dl_managed_tensor",
"(",
"array",
")",
":",
"c_obj",
"=",
"DLManagedTensor",
"(",
")",
"c_obj",
".",
"dl_tensor",
"=",
"_make_dl_tensor",
"(",
"array",
")",
"c_obj",
".",
"manager_ctx",
"=",
"_make_manager_ctx",
"(",
"array",
")",
"c_obj",
".",
"deleter",
"=",
"dl_managed_tensor_deleter",
"return",
"c_obj",
"if",
"not",
"zero_copy",
":",
"return",
"array",
"(",
"ndarray",
",",
"dtype",
"=",
"ndarray",
".",
"dtype",
")",
"if",
"not",
"ndarray",
".",
"flags",
"[",
"'C_CONTIGUOUS'",
"]",
":",
"raise",
"ValueError",
"(",
"\"Only c-contiguous arrays are supported for zero-copy\"",
")",
"c_obj",
"=",
"_make_dl_managed_tensor",
"(",
"ndarray",
")",
"address",
"=",
"ctypes",
".",
"addressof",
"(",
"c_obj",
")",
"address",
"=",
"ctypes",
".",
"cast",
"(",
"address",
",",
"ctypes",
".",
"c_void_p",
")",
"handle",
"=",
"NDArrayHandle",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayFromDLPack",
"(",
"address",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
")",
"return",
"NDArray",
"(",
"handle",
"=",
"handle",
")"
] |
Returns an MXNet's NDArray backed by Numpy's ndarray.
Parameters
----------
ndarray: numpy.ndarray
input data
zero_copy: bool
Whether we use DLPack's zero-copy conversion to convert to MXNet's NDArray.
This is only available for c-contiguous arrays, i.e. array.flags[C_CONTIGUOUS] == True.
Returns
-------
NDArray
a NDArray backed by a dlpack tensor
|
[
"Returns",
"an",
"MXNet",
"s",
"NDArray",
"backed",
"by",
"Numpy",
"s",
"ndarray",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L4167-L4222
|
train
|
Returns an MXNet s NDArray backed by Numpy s ndarray.
|
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,koCeDPYTrOF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,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' + '\x31' + '\060' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(921 - 872) + '\x33' + chr(210 - 158), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x34' + chr(0b110 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\066' + '\x35', 2742 - 2734), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(2121 - 2073) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1420 - 1372) + chr(111) + '\x31' + chr(50) + chr(647 - 597), 58899 - 58891), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(0b101001 + 0o12) + '\x32' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\063' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(0b100110 + 0o13) + chr(50) + chr(0b110010 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\060' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b101011 + 0o12) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\061' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b10101 + 0o132) + '\x31' + chr(1127 - 1075) + '\064', 0b1000), ehT0Px3KOsy9(chr(605 - 557) + chr(0b1000101 + 0o52) + chr(0b100001 + 0o20) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5988 - 5877) + '\062' + chr(2908 - 2853) + chr(0b100110 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1010010 + 0o35) + '\065' + '\x35', 8640 - 8632), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1111 + 0o43) + chr(2366 - 2312) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + '\x37', 8), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b100111 + 0o110) + chr(0b100011 + 0o16) + chr(636 - 587) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001101 + 0o42) + '\x32' + chr(53) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b110100) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\x34' + chr(2121 - 2070), 0o10), ehT0Px3KOsy9('\x30' + chr(8087 - 7976) + chr(0b1 + 0o60) + chr(0b101001 + 0o16) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\063' + chr(55), 0b1000), ehT0Px3KOsy9(chr(295 - 247) + chr(111) + chr(413 - 361) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b110001) + chr(0b111 + 0o52) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(197 - 147) + '\x36' + chr(2260 - 2208), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + '\066' + chr(52), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b101000 + 0o17) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(1431 - 1383) + chr(111) + chr(50) + chr(50) + '\x34', 27355 - 27347), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110100) + '\062', 45892 - 45884), ehT0Px3KOsy9(chr(720 - 672) + '\x6f' + chr(2112 - 2063) + '\x37' + chr(0b100011 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110110) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o12) + chr(50) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(2410 - 2360) + chr(55) + chr(0b1001 + 0o56), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\061' + '\x37', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + chr(0b110101) + chr(0b100011 + 0o15), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'k'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Zcr_nmosV63p(VtU1DncglWAm, BBJzbxdoByJB=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1596 - 1547), ord("\x08"))):
def hzBOSxtv2Vom(mDuDykdz0pcm):
nsCHJsUib40w = RyQ4N1viUrfz.py_object(mDuDykdz0pcm)
hVY4ttKNAz_v = RyQ4N1viUrfz.c_void_p.from_buffer(nsCHJsUib40w)
xafqLlk3kkUe(RyQ4N1viUrfz.pythonapi, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15%>\xfc\x7f\xb7\x00\xb6\xbb'), '\144' + '\x65' + chr(0b1100011) + chr(6794 - 6683) + chr(100) + chr(1875 - 1774))(chr(6215 - 6098) + chr(116) + '\146' + '\x2d' + '\070'))(nsCHJsUib40w)
return hVY4ttKNAz_v
def fMb1wwm9B7Zq(B0ePDhpqxN5n):
if M8_cKLkHVB2V(xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'/\x0f7\x8cX\x9f<\xb6\xb0\x1c\xb6`'), chr(0b1000101 + 0o37) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(101))(chr(0b10001 + 0o144) + chr(7620 - 7504) + chr(0b10100 + 0o122) + '\055' + '\070'))) not in xafqLlk3kkUe(uE70M6HPVHOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x11\x051\xf0N\x99\x13\x83'), '\x64' + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b11101 + 0o110))(chr(0b1110101) + '\x74' + '\x66' + chr(0b100101 + 0o10) + '\x38')):
raise q1QCh3W88sgk(M8_cKLkHVB2V(xafqLlk3kkUe(B0ePDhpqxN5n, xafqLlk3kkUe(SXOLrMavuUCe(b'/\x0f7\x8cX\x9f<\xb6\xb0\x1c\xb6`'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(5784 - 5673) + chr(5667 - 5567) + '\x65')(chr(9880 - 9763) + '\164' + '\146' + chr(0b101101) + '\070'))) + xafqLlk3kkUe(SXOLrMavuUCe(b'e5\x12\x95\x7f\xbb&\xf3\xae!\xf1[\xa0\x16{\xdaI\x9b'), '\x64' + '\x65' + chr(99) + '\157' + chr(100) + chr(0b110 + 0o137))(chr(5029 - 4912) + chr(116) + chr(0b1100110) + chr(0b100100 + 0o11) + '\x38'))
XVX18o6sPVvg = WYQ7L2o2qt9Z()
XVX18o6sPVvg.ULnjp6D6efFH = B0ePDhpqxN5n.ctypes.data_as(RyQ4N1viUrfz.c_void_p)
XVX18o6sPVvg.oM3jLo753XfX = wrSUJItz_g6A(ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(6867 - 6756) + '\060', 409 - 401))
XVX18o6sPVvg.gompHBiTsfJT = B0ePDhpqxN5n.gompHBiTsfJT
XVX18o6sPVvg.jSV9IKnemH7K = uE70M6HPVHOp.TYPE_MAP[M8_cKLkHVB2V(B0ePDhpqxN5n.jSV9IKnemH7K)]
XVX18o6sPVvg.nauYfLglTpcb = B0ePDhpqxN5n.ctypes.shape_as(RyQ4N1viUrfz.c_int64)
XVX18o6sPVvg.r8knJmMTTKwv = None
XVX18o6sPVvg.ZjdMTOrSbDij = ehT0Px3KOsy9('\x30' + '\x6f' + '\x30', 8)
return XVX18o6sPVvg
def ov8Rj9J7pYGs(B0ePDhpqxN5n):
wd6zd6FJIna8 = rpvMLXHsYrOw()
wd6zd6FJIna8.XVX18o6sPVvg = fMb1wwm9B7Zq(B0ePDhpqxN5n)
wd6zd6FJIna8.kJhOIcR4tG2q = hzBOSxtv2Vom(B0ePDhpqxN5n)
wd6zd6FJIna8._IFuVS_Wf7BF = Tf0bJIfqXWqT
return wd6zd6FJIna8
if not BBJzbxdoByJB:
return B0ePDhpqxN5n(VtU1DncglWAm, dtype=xafqLlk3kkUe(VtU1DncglWAm, xafqLlk3kkUe(SXOLrMavuUCe(b'/\x0f7\x8cX\x9f<\xb6\xb0\x1c\xb6`'), '\x64' + '\145' + chr(978 - 879) + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1101000 + 0o14) + chr(3504 - 3402) + chr(45) + chr(56))))
if not xafqLlk3kkUe(VtU1DncglWAm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x11iV\xffK\x833\x9a\x8a6\xf3O'), chr(0b11010 + 0o112) + chr(101) + chr(0b100010 + 0o101) + '\157' + '\x64' + chr(3361 - 3260))(chr(0b11 + 0o162) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)))[xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\x03"\xfa_\x80\x1b\x94\x88\x1b\xd4x'), chr(100) + chr(0b1001100 + 0o31) + chr(2683 - 2584) + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b1101101 + 0o7) + chr(0b10101 + 0o121) + chr(45) + chr(56))]:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\n2\r\xcc1\xb7\x7f\xb0\xb2:\xf5B\xa8\x11`\xca^\x95n;\xdf\xc6ix\xc3\x1f-@,?\xc1D\xca\xfb\xd0\x08W3\x9f)*.A\xcft\xa6=\xfe\xbe;\xf1R'), chr(0b1001 + 0o133) + '\145' + '\x63' + '\x6f' + chr(0b1010011 + 0o21) + chr(0b1100101))('\165' + '\x74' + chr(791 - 689) + chr(0b10 + 0o53) + chr(0b111000)))
wd6zd6FJIna8 = ov8Rj9J7pYGs(VtU1DncglWAm)
X7NarG1APFyo = RyQ4N1viUrfz.addressof(wd6zd6FJIna8)
X7NarG1APFyo = RyQ4N1viUrfz.cast(X7NarG1APFyo, RyQ4N1viUrfz.c_void_p)
SxTuMqFZdzZx = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x08\x04/\xf1P\xa6 \xb2\xa4\x12\xf3D\xa2 C\xefL\xd6d'), chr(100) + '\145' + '\143' + '\x6f' + chr(2666 - 2566) + chr(101))(chr(5258 - 5141) + chr(116) + '\x66' + '\055' + '\070'))(X7NarG1APFyo, xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b"'%\x13\xd0w"), '\x64' + '\145' + chr(99) + chr(0b1001100 + 0o43) + '\144' + chr(0b1100101))(chr(10074 - 9957) + '\164' + chr(0b1000000 + 0o46) + chr(421 - 376) + '\070'))(SxTuMqFZdzZx)))
return GdqFjMbtKL7s(handle=SxTuMqFZdzZx)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._get_index_nd
|
def _get_index_nd(self, key):
"""Returns an index array for use in scatter_nd and gather_nd."""
def _is_advanced_index(index):
"""The definition of advanced index here includes integers as well, while
integers are considered as basic index type when the key contains only
slices and integers."""
return not isinstance(index, py_slice)
if isinstance(key, (NDArray, np.ndarray, list, integer_types, py_slice)):
key = (key,)
assert isinstance(key, tuple),\
'index=%s must be a NDArray, or np.ndarray, or list, or tuple ' \
' type to use advanced indexing, received type=%s' % (str(key), str(type(key)))
assert len(key) > 0, "Cannot slice with empty indices"
shape = self.shape
assert len(shape) >= len(key),\
"Slicing dimensions exceeds array dimensions, %d vs %d" % (len(key), len(shape))
indices = []
dtype = 'int32' # index data type passed to gather_nd op
need_broadcast = (len(key) != 1)
advanced_indices = [] # include list, NDArray, np.ndarray, integer
basic_indices = [] # include only slices
advanced_index_bshape = None # final advanced index shape
for i, idx_i in enumerate(key):
is_advanced_index = True
if isinstance(idx_i, (np.ndarray, list, tuple)):
idx_i = array(idx_i, ctx=self.context, dtype=dtype)
advanced_indices.append(i)
elif isinstance(idx_i, py_slice):
start, stop, step = _get_index_range(idx_i.start, idx_i.stop, shape[i], idx_i.step)
idx_i = arange(start, stop, step, ctx=self.context, dtype=dtype)
basic_indices.append(i)
is_advanced_index = False
elif isinstance(idx_i, integer_types):
start, stop, step = _get_index_range(idx_i, idx_i+1, shape[i], 1)
idx_i = arange(start, stop, step, ctx=self.context, dtype=dtype)
advanced_indices.append(i)
elif isinstance(idx_i, NDArray):
if dtype != idx_i.dtype:
idx_i = idx_i.astype(dtype)
advanced_indices.append(i)
else:
raise IndexError('Indexing NDArray with index=%s of type=%s is not supported'
% (str(key), str(type(key))))
if is_advanced_index:
if advanced_index_bshape is None:
advanced_index_bshape = idx_i.shape
elif advanced_index_bshape != idx_i.shape:
need_broadcast = True
advanced_index_bshape = _get_broadcast_shape(advanced_index_bshape, idx_i.shape)
indices.append(idx_i)
# Get final index shape for gather_nd. See the following reference
# for determining the output array shape.
# https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html#combining-advanced-and-basic-indexing # pylint: disable=line-too-long
if len(advanced_indices) == 0:
raise ValueError('Advanced index tuple must contain at least one of the following types:'
' list, tuple, NDArray, np.ndarray, integer, received index=%s' % key)
# determine the output array's shape by checking whether advanced_indices are all adjacent
# or separated by slices
advanced_indices_adjacent = True
for i in range(0, len(advanced_indices)-1):
if advanced_indices[i] + 1 != advanced_indices[i+1]:
advanced_indices_adjacent = False
break
index_bshape_list = [] # index broadcasted shape
if advanced_indices_adjacent:
for i in range(0, advanced_indices[0]):
index_bshape_list.extend(indices[i].shape)
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape_list.extend(advanced_index_bshape)
for i in range(advanced_indices[-1]+1, len(indices)):
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape_list.extend(indices[i].shape)
else:
index_bshape_list.extend(advanced_index_bshape)
for i in basic_indices:
index_bshape_list.extend(indices[i].shape)
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape = tuple(index_bshape_list)
# Need to broadcast all ndarrays in indices to the final shape.
# For example, suppose an array has shape=(5, 6, 7, 8) and
# key=(slice(1, 5), [[1, 2]], slice(2, 5), [1]).
# Since key[1] and key[3] are two advanced indices here and they are
# separated by basic indices key[0] and key[2], the output shape
# is (1, 2, 4, 3), where the first two elements come from the shape
# that key[1] and key[3] should broadcast to, which is (1, 2), and
# the last two elements come from the shape of two basic indices.
# In order to broadcast all basic and advanced indices to the output shape,
# we need to reshape them based on their axis. For example, to broadcast key[0],
# with shape=(4,), we first need to reshape it into (1, 1, 4, 1), and then
# broadcast the reshaped array to (1, 2, 4, 3); to broadcast key[1], we first
# reshape it into (1, 2, 1, 1), then broadcast the reshaped array to (1, 2, 4, 3).
if need_broadcast:
broadcasted_indices = []
idx_rshape = [1] * len(index_bshape)
if advanced_indices_adjacent:
advanced_index_bshape_start = advanced_indices[0] # start index of advanced_index_bshape in index_shape
advanced_index_bshape_stop = advanced_index_bshape_start + len(advanced_index_bshape)
for i, idx in enumerate(key):
if _is_advanced_index(idx):
k = advanced_index_bshape_stop
# find the reshaped shape for indices[i]
for dim_size in indices[i].shape[::-1]:
k -= 1
idx_rshape[k] = dim_size
else:
if i < advanced_indices[0]: # slice is on the left side of advanced indices
idx_rshape[i] = indices[i].shape[0]
elif i > advanced_indices[-1]: # slice is on the right side of advanced indices
idx_rshape[i-len(key)] = indices[i].shape[0]
else:
raise ValueError('basic index i=%d cannot be between advanced index i=%d and i=%d'
% (i, advanced_indices[0], advanced_indices[-1]))
# broadcast current index to the final shape
broadcasted_indices.append(indices[i].reshape(tuple(idx_rshape)).broadcast_to(index_bshape))
# reset idx_rshape to ones
for j, _ in enumerate(idx_rshape):
idx_rshape[j] = 1
else:
basic_index_offset = len(advanced_index_bshape)
for i, idx in enumerate(key):
if _is_advanced_index(idx):
k = len(advanced_index_bshape)
for dim_size in indices[i].shape[::-1]:
k -= 1
idx_rshape[k] = dim_size
else:
idx_rshape[basic_index_offset] = indices[i].shape[0]
basic_index_offset += 1
# broadcast current index to the final shape
broadcasted_indices.append(indices[i].reshape(tuple(idx_rshape)).broadcast_to(index_bshape))
# reset idx_rshape to ones
for j, _ in enumerate(idx_rshape):
idx_rshape[j] = 1
indices = broadcasted_indices
return op.stack(*indices)
|
python
|
def _get_index_nd(self, key):
"""Returns an index array for use in scatter_nd and gather_nd."""
def _is_advanced_index(index):
"""The definition of advanced index here includes integers as well, while
integers are considered as basic index type when the key contains only
slices and integers."""
return not isinstance(index, py_slice)
if isinstance(key, (NDArray, np.ndarray, list, integer_types, py_slice)):
key = (key,)
assert isinstance(key, tuple),\
'index=%s must be a NDArray, or np.ndarray, or list, or tuple ' \
' type to use advanced indexing, received type=%s' % (str(key), str(type(key)))
assert len(key) > 0, "Cannot slice with empty indices"
shape = self.shape
assert len(shape) >= len(key),\
"Slicing dimensions exceeds array dimensions, %d vs %d" % (len(key), len(shape))
indices = []
dtype = 'int32' # index data type passed to gather_nd op
need_broadcast = (len(key) != 1)
advanced_indices = [] # include list, NDArray, np.ndarray, integer
basic_indices = [] # include only slices
advanced_index_bshape = None # final advanced index shape
for i, idx_i in enumerate(key):
is_advanced_index = True
if isinstance(idx_i, (np.ndarray, list, tuple)):
idx_i = array(idx_i, ctx=self.context, dtype=dtype)
advanced_indices.append(i)
elif isinstance(idx_i, py_slice):
start, stop, step = _get_index_range(idx_i.start, idx_i.stop, shape[i], idx_i.step)
idx_i = arange(start, stop, step, ctx=self.context, dtype=dtype)
basic_indices.append(i)
is_advanced_index = False
elif isinstance(idx_i, integer_types):
start, stop, step = _get_index_range(idx_i, idx_i+1, shape[i], 1)
idx_i = arange(start, stop, step, ctx=self.context, dtype=dtype)
advanced_indices.append(i)
elif isinstance(idx_i, NDArray):
if dtype != idx_i.dtype:
idx_i = idx_i.astype(dtype)
advanced_indices.append(i)
else:
raise IndexError('Indexing NDArray with index=%s of type=%s is not supported'
% (str(key), str(type(key))))
if is_advanced_index:
if advanced_index_bshape is None:
advanced_index_bshape = idx_i.shape
elif advanced_index_bshape != idx_i.shape:
need_broadcast = True
advanced_index_bshape = _get_broadcast_shape(advanced_index_bshape, idx_i.shape)
indices.append(idx_i)
# Get final index shape for gather_nd. See the following reference
# for determining the output array shape.
# https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html#combining-advanced-and-basic-indexing # pylint: disable=line-too-long
if len(advanced_indices) == 0:
raise ValueError('Advanced index tuple must contain at least one of the following types:'
' list, tuple, NDArray, np.ndarray, integer, received index=%s' % key)
# determine the output array's shape by checking whether advanced_indices are all adjacent
# or separated by slices
advanced_indices_adjacent = True
for i in range(0, len(advanced_indices)-1):
if advanced_indices[i] + 1 != advanced_indices[i+1]:
advanced_indices_adjacent = False
break
index_bshape_list = [] # index broadcasted shape
if advanced_indices_adjacent:
for i in range(0, advanced_indices[0]):
index_bshape_list.extend(indices[i].shape)
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape_list.extend(advanced_index_bshape)
for i in range(advanced_indices[-1]+1, len(indices)):
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape_list.extend(indices[i].shape)
else:
index_bshape_list.extend(advanced_index_bshape)
for i in basic_indices:
index_bshape_list.extend(indices[i].shape)
if not need_broadcast and indices[i].shape != advanced_index_bshape:
need_broadcast = True
index_bshape = tuple(index_bshape_list)
# Need to broadcast all ndarrays in indices to the final shape.
# For example, suppose an array has shape=(5, 6, 7, 8) and
# key=(slice(1, 5), [[1, 2]], slice(2, 5), [1]).
# Since key[1] and key[3] are two advanced indices here and they are
# separated by basic indices key[0] and key[2], the output shape
# is (1, 2, 4, 3), where the first two elements come from the shape
# that key[1] and key[3] should broadcast to, which is (1, 2), and
# the last two elements come from the shape of two basic indices.
# In order to broadcast all basic and advanced indices to the output shape,
# we need to reshape them based on their axis. For example, to broadcast key[0],
# with shape=(4,), we first need to reshape it into (1, 1, 4, 1), and then
# broadcast the reshaped array to (1, 2, 4, 3); to broadcast key[1], we first
# reshape it into (1, 2, 1, 1), then broadcast the reshaped array to (1, 2, 4, 3).
if need_broadcast:
broadcasted_indices = []
idx_rshape = [1] * len(index_bshape)
if advanced_indices_adjacent:
advanced_index_bshape_start = advanced_indices[0] # start index of advanced_index_bshape in index_shape
advanced_index_bshape_stop = advanced_index_bshape_start + len(advanced_index_bshape)
for i, idx in enumerate(key):
if _is_advanced_index(idx):
k = advanced_index_bshape_stop
# find the reshaped shape for indices[i]
for dim_size in indices[i].shape[::-1]:
k -= 1
idx_rshape[k] = dim_size
else:
if i < advanced_indices[0]: # slice is on the left side of advanced indices
idx_rshape[i] = indices[i].shape[0]
elif i > advanced_indices[-1]: # slice is on the right side of advanced indices
idx_rshape[i-len(key)] = indices[i].shape[0]
else:
raise ValueError('basic index i=%d cannot be between advanced index i=%d and i=%d'
% (i, advanced_indices[0], advanced_indices[-1]))
# broadcast current index to the final shape
broadcasted_indices.append(indices[i].reshape(tuple(idx_rshape)).broadcast_to(index_bshape))
# reset idx_rshape to ones
for j, _ in enumerate(idx_rshape):
idx_rshape[j] = 1
else:
basic_index_offset = len(advanced_index_bshape)
for i, idx in enumerate(key):
if _is_advanced_index(idx):
k = len(advanced_index_bshape)
for dim_size in indices[i].shape[::-1]:
k -= 1
idx_rshape[k] = dim_size
else:
idx_rshape[basic_index_offset] = indices[i].shape[0]
basic_index_offset += 1
# broadcast current index to the final shape
broadcasted_indices.append(indices[i].reshape(tuple(idx_rshape)).broadcast_to(index_bshape))
# reset idx_rshape to ones
for j, _ in enumerate(idx_rshape):
idx_rshape[j] = 1
indices = broadcasted_indices
return op.stack(*indices)
|
[
"def",
"_get_index_nd",
"(",
"self",
",",
"key",
")",
":",
"def",
"_is_advanced_index",
"(",
"index",
")",
":",
"\"\"\"The definition of advanced index here includes integers as well, while\n integers are considered as basic index type when the key contains only\n slices and integers.\"\"\"",
"return",
"not",
"isinstance",
"(",
"index",
",",
"py_slice",
")",
"if",
"isinstance",
"(",
"key",
",",
"(",
"NDArray",
",",
"np",
".",
"ndarray",
",",
"list",
",",
"integer_types",
",",
"py_slice",
")",
")",
":",
"key",
"=",
"(",
"key",
",",
")",
"assert",
"isinstance",
"(",
"key",
",",
"tuple",
")",
",",
"'index=%s must be a NDArray, or np.ndarray, or list, or tuple '",
"' type to use advanced indexing, received type=%s'",
"%",
"(",
"str",
"(",
"key",
")",
",",
"str",
"(",
"type",
"(",
"key",
")",
")",
")",
"assert",
"len",
"(",
"key",
")",
">",
"0",
",",
"\"Cannot slice with empty indices\"",
"shape",
"=",
"self",
".",
"shape",
"assert",
"len",
"(",
"shape",
")",
">=",
"len",
"(",
"key",
")",
",",
"\"Slicing dimensions exceeds array dimensions, %d vs %d\"",
"%",
"(",
"len",
"(",
"key",
")",
",",
"len",
"(",
"shape",
")",
")",
"indices",
"=",
"[",
"]",
"dtype",
"=",
"'int32'",
"# index data type passed to gather_nd op",
"need_broadcast",
"=",
"(",
"len",
"(",
"key",
")",
"!=",
"1",
")",
"advanced_indices",
"=",
"[",
"]",
"# include list, NDArray, np.ndarray, integer",
"basic_indices",
"=",
"[",
"]",
"# include only slices",
"advanced_index_bshape",
"=",
"None",
"# final advanced index shape",
"for",
"i",
",",
"idx_i",
"in",
"enumerate",
"(",
"key",
")",
":",
"is_advanced_index",
"=",
"True",
"if",
"isinstance",
"(",
"idx_i",
",",
"(",
"np",
".",
"ndarray",
",",
"list",
",",
"tuple",
")",
")",
":",
"idx_i",
"=",
"array",
"(",
"idx_i",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"dtype",
")",
"advanced_indices",
".",
"append",
"(",
"i",
")",
"elif",
"isinstance",
"(",
"idx_i",
",",
"py_slice",
")",
":",
"start",
",",
"stop",
",",
"step",
"=",
"_get_index_range",
"(",
"idx_i",
".",
"start",
",",
"idx_i",
".",
"stop",
",",
"shape",
"[",
"i",
"]",
",",
"idx_i",
".",
"step",
")",
"idx_i",
"=",
"arange",
"(",
"start",
",",
"stop",
",",
"step",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"dtype",
")",
"basic_indices",
".",
"append",
"(",
"i",
")",
"is_advanced_index",
"=",
"False",
"elif",
"isinstance",
"(",
"idx_i",
",",
"integer_types",
")",
":",
"start",
",",
"stop",
",",
"step",
"=",
"_get_index_range",
"(",
"idx_i",
",",
"idx_i",
"+",
"1",
",",
"shape",
"[",
"i",
"]",
",",
"1",
")",
"idx_i",
"=",
"arange",
"(",
"start",
",",
"stop",
",",
"step",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"dtype",
")",
"advanced_indices",
".",
"append",
"(",
"i",
")",
"elif",
"isinstance",
"(",
"idx_i",
",",
"NDArray",
")",
":",
"if",
"dtype",
"!=",
"idx_i",
".",
"dtype",
":",
"idx_i",
"=",
"idx_i",
".",
"astype",
"(",
"dtype",
")",
"advanced_indices",
".",
"append",
"(",
"i",
")",
"else",
":",
"raise",
"IndexError",
"(",
"'Indexing NDArray with index=%s of type=%s is not supported'",
"%",
"(",
"str",
"(",
"key",
")",
",",
"str",
"(",
"type",
"(",
"key",
")",
")",
")",
")",
"if",
"is_advanced_index",
":",
"if",
"advanced_index_bshape",
"is",
"None",
":",
"advanced_index_bshape",
"=",
"idx_i",
".",
"shape",
"elif",
"advanced_index_bshape",
"!=",
"idx_i",
".",
"shape",
":",
"need_broadcast",
"=",
"True",
"advanced_index_bshape",
"=",
"_get_broadcast_shape",
"(",
"advanced_index_bshape",
",",
"idx_i",
".",
"shape",
")",
"indices",
".",
"append",
"(",
"idx_i",
")",
"# Get final index shape for gather_nd. See the following reference",
"# for determining the output array shape.",
"# https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.indexing.html#combining-advanced-and-basic-indexing # pylint: disable=line-too-long",
"if",
"len",
"(",
"advanced_indices",
")",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"'Advanced index tuple must contain at least one of the following types:'",
"' list, tuple, NDArray, np.ndarray, integer, received index=%s'",
"%",
"key",
")",
"# determine the output array's shape by checking whether advanced_indices are all adjacent",
"# or separated by slices",
"advanced_indices_adjacent",
"=",
"True",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"len",
"(",
"advanced_indices",
")",
"-",
"1",
")",
":",
"if",
"advanced_indices",
"[",
"i",
"]",
"+",
"1",
"!=",
"advanced_indices",
"[",
"i",
"+",
"1",
"]",
":",
"advanced_indices_adjacent",
"=",
"False",
"break",
"index_bshape_list",
"=",
"[",
"]",
"# index broadcasted shape",
"if",
"advanced_indices_adjacent",
":",
"for",
"i",
"in",
"range",
"(",
"0",
",",
"advanced_indices",
"[",
"0",
"]",
")",
":",
"index_bshape_list",
".",
"extend",
"(",
"indices",
"[",
"i",
"]",
".",
"shape",
")",
"if",
"not",
"need_broadcast",
"and",
"indices",
"[",
"i",
"]",
".",
"shape",
"!=",
"advanced_index_bshape",
":",
"need_broadcast",
"=",
"True",
"index_bshape_list",
".",
"extend",
"(",
"advanced_index_bshape",
")",
"for",
"i",
"in",
"range",
"(",
"advanced_indices",
"[",
"-",
"1",
"]",
"+",
"1",
",",
"len",
"(",
"indices",
")",
")",
":",
"if",
"not",
"need_broadcast",
"and",
"indices",
"[",
"i",
"]",
".",
"shape",
"!=",
"advanced_index_bshape",
":",
"need_broadcast",
"=",
"True",
"index_bshape_list",
".",
"extend",
"(",
"indices",
"[",
"i",
"]",
".",
"shape",
")",
"else",
":",
"index_bshape_list",
".",
"extend",
"(",
"advanced_index_bshape",
")",
"for",
"i",
"in",
"basic_indices",
":",
"index_bshape_list",
".",
"extend",
"(",
"indices",
"[",
"i",
"]",
".",
"shape",
")",
"if",
"not",
"need_broadcast",
"and",
"indices",
"[",
"i",
"]",
".",
"shape",
"!=",
"advanced_index_bshape",
":",
"need_broadcast",
"=",
"True",
"index_bshape",
"=",
"tuple",
"(",
"index_bshape_list",
")",
"# Need to broadcast all ndarrays in indices to the final shape.",
"# For example, suppose an array has shape=(5, 6, 7, 8) and",
"# key=(slice(1, 5), [[1, 2]], slice(2, 5), [1]).",
"# Since key[1] and key[3] are two advanced indices here and they are",
"# separated by basic indices key[0] and key[2], the output shape",
"# is (1, 2, 4, 3), where the first two elements come from the shape",
"# that key[1] and key[3] should broadcast to, which is (1, 2), and",
"# the last two elements come from the shape of two basic indices.",
"# In order to broadcast all basic and advanced indices to the output shape,",
"# we need to reshape them based on their axis. For example, to broadcast key[0],",
"# with shape=(4,), we first need to reshape it into (1, 1, 4, 1), and then",
"# broadcast the reshaped array to (1, 2, 4, 3); to broadcast key[1], we first",
"# reshape it into (1, 2, 1, 1), then broadcast the reshaped array to (1, 2, 4, 3).",
"if",
"need_broadcast",
":",
"broadcasted_indices",
"=",
"[",
"]",
"idx_rshape",
"=",
"[",
"1",
"]",
"*",
"len",
"(",
"index_bshape",
")",
"if",
"advanced_indices_adjacent",
":",
"advanced_index_bshape_start",
"=",
"advanced_indices",
"[",
"0",
"]",
"# start index of advanced_index_bshape in index_shape",
"advanced_index_bshape_stop",
"=",
"advanced_index_bshape_start",
"+",
"len",
"(",
"advanced_index_bshape",
")",
"for",
"i",
",",
"idx",
"in",
"enumerate",
"(",
"key",
")",
":",
"if",
"_is_advanced_index",
"(",
"idx",
")",
":",
"k",
"=",
"advanced_index_bshape_stop",
"# find the reshaped shape for indices[i]",
"for",
"dim_size",
"in",
"indices",
"[",
"i",
"]",
".",
"shape",
"[",
":",
":",
"-",
"1",
"]",
":",
"k",
"-=",
"1",
"idx_rshape",
"[",
"k",
"]",
"=",
"dim_size",
"else",
":",
"if",
"i",
"<",
"advanced_indices",
"[",
"0",
"]",
":",
"# slice is on the left side of advanced indices",
"idx_rshape",
"[",
"i",
"]",
"=",
"indices",
"[",
"i",
"]",
".",
"shape",
"[",
"0",
"]",
"elif",
"i",
">",
"advanced_indices",
"[",
"-",
"1",
"]",
":",
"# slice is on the right side of advanced indices",
"idx_rshape",
"[",
"i",
"-",
"len",
"(",
"key",
")",
"]",
"=",
"indices",
"[",
"i",
"]",
".",
"shape",
"[",
"0",
"]",
"else",
":",
"raise",
"ValueError",
"(",
"'basic index i=%d cannot be between advanced index i=%d and i=%d'",
"%",
"(",
"i",
",",
"advanced_indices",
"[",
"0",
"]",
",",
"advanced_indices",
"[",
"-",
"1",
"]",
")",
")",
"# broadcast current index to the final shape",
"broadcasted_indices",
".",
"append",
"(",
"indices",
"[",
"i",
"]",
".",
"reshape",
"(",
"tuple",
"(",
"idx_rshape",
")",
")",
".",
"broadcast_to",
"(",
"index_bshape",
")",
")",
"# reset idx_rshape to ones",
"for",
"j",
",",
"_",
"in",
"enumerate",
"(",
"idx_rshape",
")",
":",
"idx_rshape",
"[",
"j",
"]",
"=",
"1",
"else",
":",
"basic_index_offset",
"=",
"len",
"(",
"advanced_index_bshape",
")",
"for",
"i",
",",
"idx",
"in",
"enumerate",
"(",
"key",
")",
":",
"if",
"_is_advanced_index",
"(",
"idx",
")",
":",
"k",
"=",
"len",
"(",
"advanced_index_bshape",
")",
"for",
"dim_size",
"in",
"indices",
"[",
"i",
"]",
".",
"shape",
"[",
":",
":",
"-",
"1",
"]",
":",
"k",
"-=",
"1",
"idx_rshape",
"[",
"k",
"]",
"=",
"dim_size",
"else",
":",
"idx_rshape",
"[",
"basic_index_offset",
"]",
"=",
"indices",
"[",
"i",
"]",
".",
"shape",
"[",
"0",
"]",
"basic_index_offset",
"+=",
"1",
"# broadcast current index to the final shape",
"broadcasted_indices",
".",
"append",
"(",
"indices",
"[",
"i",
"]",
".",
"reshape",
"(",
"tuple",
"(",
"idx_rshape",
")",
")",
".",
"broadcast_to",
"(",
"index_bshape",
")",
")",
"# reset idx_rshape to ones",
"for",
"j",
",",
"_",
"in",
"enumerate",
"(",
"idx_rshape",
")",
":",
"idx_rshape",
"[",
"j",
"]",
"=",
"1",
"indices",
"=",
"broadcasted_indices",
"return",
"op",
".",
"stack",
"(",
"*",
"indices",
")"
] |
Returns an index array for use in scatter_nd and gather_nd.
|
[
"Returns",
"an",
"index",
"array",
"for",
"use",
"in",
"scatter_nd",
"and",
"gather_nd",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L518-L662
|
train
|
Returns an index array for use in scatter_nd and gather_nd.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh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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('\x30' + '\x6f' + chr(2011 - 1961) + chr(0b110010) + chr(2497 - 2447), 0b1000), ehT0Px3KOsy9(chr(461 - 413) + chr(111) + chr(0b110011) + chr(50) + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(54) + chr(1307 - 1254), 0o10), ehT0Px3KOsy9(chr(1326 - 1278) + '\x6f' + chr(51) + chr(0b110100) + chr(0b10101 + 0o33), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\x37' + chr(2476 - 2426), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10110 + 0o34) + '\060' + chr(0b110000 + 0o5), 0b1000), ehT0Px3KOsy9(chr(297 - 249) + chr(0b1101111) + chr(1807 - 1758) + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(48) + chr(0b11011 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(974 - 924) + chr(497 - 445) + '\067', 38418 - 38410), ehT0Px3KOsy9('\060' + '\x6f' + chr(1743 - 1692) + '\060' + chr(1456 - 1402), 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(0b100001 + 0o20) + chr(51) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1723 - 1674) + chr(0b110000) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + '\062' + chr(795 - 743), 63459 - 63451), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(0b110011) + chr(624 - 569) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + chr(49) + chr(0b110011) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(48) + chr(2034 - 1985), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x33' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110010) + chr(368 - 316), 25707 - 25699), ehT0Px3KOsy9(chr(126 - 78) + chr(0b1101111) + chr(0b11 + 0o57) + chr(2146 - 2092) + chr(0b100101 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o31) + '\063' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(49) + '\064' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\066' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(0b1011 + 0o46) + '\x32' + chr(0b10111 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1927 - 1878) + '\066' + chr(54), 56309 - 56301), ehT0Px3KOsy9(chr(1188 - 1140) + chr(111) + chr(49) + chr(0b100 + 0o56) + chr(0b100001 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111000 + 0o67) + chr(0b110001) + '\x36' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(1337 - 1289) + chr(0b1100001 + 0o16) + chr(0b110001 + 0o1) + chr(2550 - 2498) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\x37' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11001 + 0o126) + '\062' + chr(53) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(843 - 792) + '\x30' + chr(54), 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1011111 + 0o20) + chr(49) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + chr(638 - 588) + chr(0b100111 + 0o16) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o6), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b101110 + 0o2) + chr(1344 - 1296), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7398 - 7287) + chr(49) + chr(0b110001) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110100) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(2860 - 2749) + chr(0b110010) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(272 - 161) + chr(0b110010) + chr(1066 - 1015) + chr(2135 - 2087), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(709 - 656) + chr(267 - 219), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc'), '\x64' + chr(0b1100101) + chr(0b11101 + 0o106) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + '\164' + '\x66' + chr(0b1 + 0o54) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def TJvOSM90SZxI(oVre8I6UXc3b, K3J4ZwSlE0sT):
def llzOPxjR5_A4(XdowRbJKZWL9):
return not PlSM16l2KDPD(XdowRbJKZWL9, k9CegK7r1Mog)
if PlSM16l2KDPD(K3J4ZwSlE0sT, (GdqFjMbtKL7s, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb0\x94\x92\x88l\xfc'), chr(0b1001001 + 0o33) + '\145' + '\143' + '\x6f' + chr(1833 - 1733) + '\145')(chr(0b1110101) + chr(0b110101 + 0o77) + chr(0b1100110) + '\055' + chr(0b111000))), YyaZ4tpXu4lf, GakrcjanQCW1, k9CegK7r1Mog)):
K3J4ZwSlE0sT = (K3J4ZwSlE0sT,)
assert PlSM16l2KDPD(K3J4ZwSlE0sT, KNyTy8rYcwji), xafqLlk3kkUe(SXOLrMavuUCe(b"\xfb\xba\x91\x85\x820\xa0\x0f\xe6\xca\xb3.4t\x9e:\xa1\xfd\xb4\xf8\xdc'\x05#\x17,_\x84\x96\xde\xe6c\xda-\xeed(Wa\xf9\xeb\xf8\xd5\x8f\x88-\xe9\x15\xb5\xd3\xea}/&\xdc+\xf4\xec\xf8\xd3\xb8F\x03(\x060S\xd0\x96\x8c\xb3~\xcf#\xe1d?D}\xfb\xf7\xb0\xd5\x89\x94i\xe0\x04\xaf\xc9\xa1q`&\x99<\xe4\xf5\xe2\xd3\xfcF\x03(\x060N\x81\x8a"), '\x64' + chr(101) + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1001001 + 0o53) + '\146' + '\055' + chr(0b110010 + 0o6)) % (M8_cKLkHVB2V(K3J4ZwSlE0sT), M8_cKLkHVB2V(wmQmyeWBmUpv(K3J4ZwSlE0sT)))
assert c2A0yzQpDQB3(K3J4ZwSlE0sT) > ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(48), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1\xb5\x9b\x8e\x95y\xa5\x0f\xaa\xce\xa58`#\x95+\xe9\xbc\xf1\xdb\xe8\x12\x0eq\x1f;\x17\xcd\x9a\xc9\xb5'), chr(0b1110 + 0o126) + chr(5975 - 5874) + chr(0b110011 + 0o60) + '\x6f' + chr(0b1100100) + chr(0b1000111 + 0o36))(chr(117) + '\x74' + chr(0b1100110) + chr(0b11010 + 0o23) + chr(0b1010 + 0o56))
nauYfLglTpcb = oVre8I6UXc3b.nauYfLglTpcb
assert c2A0yzQpDQB3(nauYfLglTpcb) >= c2A0yzQpDQB3(K3J4ZwSlE0sT), xafqLlk3kkUe(SXOLrMavuUCe(b"\xc1\xb8\x9c\x83\x93c\xe2\\\xa2\xce\xab8.'\x950\xef\xef\xb4\xd3\xe0\x05\x124\x12&S\xc5\x8b\xde\xa7t\x8ag\xe9m,K`\xf1\xfd\xba\x86\xcc\xda(\xe1\\\xb0\xd4\xe6x$"), chr(0b1000000 + 0o44) + chr(6989 - 6888) + '\143' + chr(6978 - 6867) + '\x64' + chr(101))(chr(0b1101001 + 0o14) + '\x74' + chr(727 - 625) + chr(45) + chr(0b110111 + 0o1)) % (c2A0yzQpDQB3(K3J4ZwSlE0sT), c2A0yzQpDQB3(nauYfLglTpcb))
pIcoaXENl5Pw = []
jSV9IKnemH7K = xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb\xba\x81\xd3\xc8'), chr(598 - 498) + '\145' + '\143' + '\x6f' + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(102) + '\x2d' + chr(0b110011 + 0o5))
iGqcaDL39b_U = c2A0yzQpDQB3(K3J4ZwSlE0sT) != ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b110001 + 0o0), ord("\x08"))
IGTuwwfkgNB6 = []
QB4_I2A3h058 = []
a7PJmjLqw7lt = None
for (WVxHKyX45z_L, SeACqptD49ni) in YlkZvXL8qwsX(K3J4ZwSlE0sT):
AdT84__55lYf = ehT0Px3KOsy9('\x30' + '\x6f' + chr(1746 - 1697), 8)
if PlSM16l2KDPD(SeACqptD49ni, (xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb0\x94\x92\x88l\xfc'), chr(0b1000 + 0o134) + chr(3533 - 3432) + '\143' + '\157' + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + chr(45) + chr(586 - 530))), YyaZ4tpXu4lf, KNyTy8rYcwji)):
SeACqptD49ni = B0ePDhpqxN5n(SeACqptD49ni, ctx=oVre8I6UXc3b.context, dtype=jSV9IKnemH7K)
xafqLlk3kkUe(IGTuwwfkgNB6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(0b111011 + 0o51) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56)))(WVxHKyX45z_L)
elif PlSM16l2KDPD(SeACqptD49ni, k9CegK7r1Mog):
(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU) = tB08RW78ckHp(SeACqptD49ni.start, SeACqptD49ni.i64wROPYXl1w, nauYfLglTpcb[WVxHKyX45z_L], SeACqptD49ni.kDuFsAhEatcU)
SeACqptD49ni = ltl4zeSqo3vr(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU, ctx=oVre8I6UXc3b.context, dtype=jSV9IKnemH7K)
xafqLlk3kkUe(QB4_I2A3h058, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(100) + chr(0b101011 + 0o72) + chr(0b1100011) + '\157' + chr(0b111101 + 0o47) + '\145')('\165' + '\x74' + chr(2194 - 2092) + chr(0b101101) + '\x38'))(WVxHKyX45z_L)
AdT84__55lYf = ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\x30', 8)
elif PlSM16l2KDPD(SeACqptD49ni, GakrcjanQCW1):
(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU) = tB08RW78ckHp(SeACqptD49ni, SeACqptD49ni + ehT0Px3KOsy9(chr(48) + '\157' + '\x31', 8), nauYfLglTpcb[WVxHKyX45z_L], ehT0Px3KOsy9(chr(1239 - 1191) + chr(0b1101111) + '\x31', 8))
SeACqptD49ni = ltl4zeSqo3vr(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU, ctx=oVre8I6UXc3b.context, dtype=jSV9IKnemH7K)
xafqLlk3kkUe(IGTuwwfkgNB6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(100) + chr(0b10000 + 0o125) + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(117) + '\x74' + chr(0b1100110) + '\055' + '\070'))(WVxHKyX45z_L)
elif PlSM16l2KDPD(SeACqptD49ni, GdqFjMbtKL7s):
if jSV9IKnemH7K != xafqLlk3kkUe(SeACqptD49ni, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x87\xa3\xd9\xb3F\xeb\x19\xab\xef\xf1\x16'), chr(0b100 + 0o140) + chr(5324 - 5223) + '\143' + '\x6f' + '\144' + chr(0b1100101))('\x75' + '\164' + chr(3218 - 3116) + chr(2010 - 1965) + '\x38')):
SeACqptD49ni = SeACqptD49ni.astype(jSV9IKnemH7K)
xafqLlk3kkUe(IGTuwwfkgNB6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(0b111110 + 0o46) + chr(101) + chr(0b1100011) + '\x6f' + chr(7993 - 7893) + chr(4026 - 3925))('\165' + chr(0b110110 + 0o76) + chr(102) + chr(45) + chr(56)))(WVxHKyX45z_L)
else:
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\xba\x91\x85\x82d\xeb\x1b\xe6\xe9\x82\x1c2&\x9d&\xa1\xeb\xfd\xc2\xf0F\x1e?\x120\x0b\x99\xdc\xdf\xe6b\xcc#\xf4y9@.\xbd\xe1\xf4\x9c\x93\xdac\xea\x08\xe6\xd4\xb3-0;\x8e+\xe4\xf8'), '\144' + '\x65' + chr(99) + chr(111) + chr(100) + chr(101))(chr(117) + '\164' + chr(0b111 + 0o137) + chr(45) + chr(0b111000)) % (M8_cKLkHVB2V(K3J4ZwSlE0sT), M8_cKLkHVB2V(wmQmyeWBmUpv(K3J4ZwSlE0sT))))
if AdT84__55lYf:
if a7PJmjLqw7lt is None:
a7PJmjLqw7lt = SeACqptD49ni.nauYfLglTpcb
elif a7PJmjLqw7lt != xafqLlk3kkUe(SeACqptD49ni, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(4011 - 3911) + '\x65' + chr(694 - 595) + chr(0b1101111) + chr(0b110110 + 0o56) + '\145')(chr(7141 - 7024) + chr(116) + '\x66' + '\x2d' + chr(0b110111 + 0o1))):
iGqcaDL39b_U = ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001), 8)
a7PJmjLqw7lt = IxOyKBkqovAi(a7PJmjLqw7lt, SeACqptD49ni.nauYfLglTpcb)
xafqLlk3kkUe(pIcoaXENl5Pw, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(0b1100000 + 0o4) + chr(0b1001000 + 0o35) + chr(4605 - 4506) + '\157' + chr(100) + chr(0b1010100 + 0o21))('\x75' + chr(116) + '\x66' + '\055' + chr(291 - 235)))(SeACqptD49ni)
if c2A0yzQpDQB3(IGTuwwfkgNB6) == ehT0Px3KOsy9(chr(48) + chr(4123 - 4012) + chr(1327 - 1279), 8):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3\xb0\x83\x81\x94n\xe0\x18\xe6\xce\xa89%,\xdc+\xf4\xec\xf8\xd3\xb8\x0b\x02"\x02u\x10\xcb\x97\xd8\xa7d\xc4#\xe1tiIv\xf9\xe1\xa0\xd5\x8f\x94h\xa5\x13\xa0\x87\xb25%t\x9a0\xed\xf0\xfb\xc1\xf1\x08\x10q\x02,\x03\xc1\x8a\x96\xe6a\xc3p\xf4,iQf\xe8\xfe\xb1\xd9\xc0\xb4I\xc4\x0e\xb4\xc6\xbfq`:\x8cq\xef\xf8\xf5\xc4\xea\x07\x0e}V<\x1d\xd0\x9c\xcb\xa3\x7f\x86#\xf2e*@z\xee\xf7\xb0\xd5\x89\x94i\xe0\x04\xfb\x82\xb5'), '\x64' + chr(0b10 + 0o143) + chr(0b1100011) + chr(11944 - 11833) + '\x64' + '\x65')('\165' + chr(0b1011100 + 0o30) + chr(0b1001000 + 0o36) + '\055' + chr(56)) % K3J4ZwSlE0sT)
PYWEbTzHdnQS = ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31', 8)
for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x30', 8), c2A0yzQpDQB3(IGTuwwfkgNB6) - ehT0Px3KOsy9(chr(48) + chr(5539 - 5428) + chr(0b11110 + 0o23), 8)):
if IGTuwwfkgNB6[WVxHKyX45z_L] + ehT0Px3KOsy9(chr(0b110000) + chr(830 - 719) + chr(1421 - 1372), 8) != IGTuwwfkgNB6[WVxHKyX45z_L + ehT0Px3KOsy9('\x30' + chr(1716 - 1605) + chr(49), 8)]:
PYWEbTzHdnQS = ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + chr(0b110000), 8)
break
EmzRhZch2XQY = []
if PYWEbTzHdnQS:
for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8), IGTuwwfkgNB6[ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), 8)]):
xafqLlk3kkUe(EmzRhZch2XQY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xac\x81\x85\x94i'), chr(6371 - 6271) + chr(0b1000101 + 0o40) + '\x63' + chr(0b1010111 + 0o30) + chr(0b1010001 + 0o23) + chr(0b110000 + 0o65))(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(0b10010 + 0o46)))(xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), '\x64' + '\x65' + chr(0b1100011) + chr(1102 - 991) + '\144' + chr(101))(chr(117) + chr(0b1110100) + chr(324 - 222) + chr(0b101101) + chr(0b111000))))
if not iGqcaDL39b_U and xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(9510 - 9410) + chr(4404 - 4303) + '\x63' + chr(111) + '\144' + chr(101))(chr(117) + chr(12394 - 12278) + chr(102) + chr(1467 - 1422) + chr(56))) != a7PJmjLqw7lt:
iGqcaDL39b_U = ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 8)
xafqLlk3kkUe(EmzRhZch2XQY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xac\x81\x85\x94i'), '\144' + chr(0b1100101) + '\x63' + '\157' + chr(0b110 + 0o136) + '\145')(chr(10660 - 10543) + chr(0b1101 + 0o147) + '\146' + chr(0b101101) + chr(56)))(a7PJmjLqw7lt)
for WVxHKyX45z_L in vQr8gNKaIaWE(IGTuwwfkgNB6[-ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b110011 + 0o74) + chr(49), 8)] + ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001), 8), c2A0yzQpDQB3(pIcoaXENl5Pw)):
if not iGqcaDL39b_U and xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(6787 - 6687) + chr(101) + chr(0b111110 + 0o45) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1100100 + 0o20) + chr(0b1100110) + chr(97 - 52) + '\x38')) != a7PJmjLqw7lt:
iGqcaDL39b_U = ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(49), 8)
xafqLlk3kkUe(EmzRhZch2XQY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xac\x81\x85\x94i'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(0b11101 + 0o20) + chr(0b100111 + 0o21)))(xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(0b101100 + 0o70) + '\145' + '\x63' + chr(2392 - 2281) + chr(100) + '\x65')(chr(13483 - 13366) + chr(4733 - 4617) + chr(0b1100110) + chr(0b101000 + 0o5) + chr(0b111000))))
else:
xafqLlk3kkUe(EmzRhZch2XQY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xac\x81\x85\x94i'), chr(100) + '\x65' + '\143' + chr(111) + chr(3462 - 3362) + chr(7220 - 7119))('\x75' + chr(116) + chr(102) + chr(0b1011 + 0o42) + '\x38'))(a7PJmjLqw7lt)
for WVxHKyX45z_L in QB4_I2A3h058:
xafqLlk3kkUe(EmzRhZch2XQY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xac\x81\x85\x94i'), '\x64' + chr(0b1000001 + 0o44) + chr(240 - 141) + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(4098 - 3996) + chr(0b101101) + '\070'))(xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(8993 - 8893) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1001110 + 0o26) + chr(0b1100101))('\x75' + chr(116) + chr(0b111110 + 0o50) + '\055' + chr(0b111000))))
if not iGqcaDL39b_U and xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), chr(1528 - 1428) + chr(0b1100101) + '\x63' + chr(1007 - 896) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(1665 - 1620) + '\x38')) != a7PJmjLqw7lt:
iGqcaDL39b_U = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061', 8)
x1itLWlEGpkE = KNyTy8rYcwji(EmzRhZch2XQY)
if iGqcaDL39b_U:
CyN5bZDgFogS = []
RYbwri1Tn84e = [ehT0Px3KOsy9(chr(1667 - 1619) + chr(3956 - 3845) + chr(0b101101 + 0o4), 8)] * c2A0yzQpDQB3(x1itLWlEGpkE)
if PYWEbTzHdnQS:
M_IH8vVBA86y = IGTuwwfkgNB6[ehT0Px3KOsy9(chr(0b110000) + chr(0b100101 + 0o112) + chr(48), 8)]
FPF8l1kkqbMf = M_IH8vVBA86y + c2A0yzQpDQB3(a7PJmjLqw7lt)
for (WVxHKyX45z_L, YlqusYB6InkM) in YlkZvXL8qwsX(K3J4ZwSlE0sT):
if llzOPxjR5_A4(YlqusYB6InkM):
OolUPRJhRaJd = FPF8l1kkqbMf
for xhpEmD8ce_NZ in xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), '\144' + chr(3515 - 3414) + chr(0b111010 + 0o51) + chr(11261 - 11150) + chr(100) + '\x65')(chr(117) + '\164' + chr(4739 - 4637) + '\055' + chr(499 - 443)))[::-ehT0Px3KOsy9(chr(935 - 887) + '\x6f' + '\x31', 8)]:
OolUPRJhRaJd -= ehT0Px3KOsy9('\060' + chr(4280 - 4169) + chr(1439 - 1390), 8)
RYbwri1Tn84e[OolUPRJhRaJd] = xhpEmD8ce_NZ
elif WVxHKyX45z_L < IGTuwwfkgNB6[ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(0b111 + 0o51), 8)]:
RYbwri1Tn84e[WVxHKyX45z_L] = pIcoaXENl5Pw[WVxHKyX45z_L].nauYfLglTpcb[ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1001010 + 0o45) + '\060', 8)]
elif WVxHKyX45z_L > IGTuwwfkgNB6[-ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + '\061', 8)]:
RYbwri1Tn84e[WVxHKyX45z_L - c2A0yzQpDQB3(K3J4ZwSlE0sT)] = pIcoaXENl5Pw[WVxHKyX45z_L].nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(48), 8)]
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xb5\x86\x89\x99-\xec\x12\xa2\xc2\xbe})i\xd9;\xa1\xff\xf5\xd8\xf6\t\x03q\x140S\xc6\x9c\xd8\xb1h\xcfm\xa0a-Sr\xf6\xf1\xb1\x91\xc0\x93c\xe1\x19\xbe\x87\xaf`e0\xdc>\xef\xf8\xb4\xdf\xa5C\x13'), chr(3112 - 3012) + '\x65' + chr(1444 - 1345) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(881 - 836) + chr(0b111000)) % (WVxHKyX45z_L, IGTuwwfkgNB6[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1473 - 1425), 8)], IGTuwwfkgNB6[-ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b110001), 8)]))
xafqLlk3kkUe(CyN5bZDgFogS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(0b101001 + 0o73) + '\x65' + chr(0b1100011) + chr(0b1010110 + 0o31) + chr(100) + '\145')(chr(0b1010110 + 0o37) + chr(8722 - 8606) + chr(102) + chr(0b11000 + 0o25) + chr(56)))(xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L].reshape(KNyTy8rYcwji(RYbwri1Tn84e)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xa6\x9a\x81\x9en\xe4\x0f\xb2\xf8\xb22'), chr(0b100010 + 0o102) + chr(2859 - 2758) + '\x63' + '\157' + '\x64' + chr(101))(chr(8692 - 8575) + chr(0b1011010 + 0o32) + '\x66' + chr(0b10111 + 0o26) + chr(0b101101 + 0o13)))(x1itLWlEGpkE))
for (tlORBuYsiw3X, VNGQdHSFPrso) in YlkZvXL8qwsX(RYbwri1Tn84e):
RYbwri1Tn84e[tlORBuYsiw3X] = ehT0Px3KOsy9(chr(1635 - 1587) + chr(0b110000 + 0o77) + '\061', 8)
else:
JCr5c1TvIhBy = c2A0yzQpDQB3(a7PJmjLqw7lt)
for (WVxHKyX45z_L, YlqusYB6InkM) in YlkZvXL8qwsX(K3J4ZwSlE0sT):
if llzOPxjR5_A4(YlqusYB6InkM):
OolUPRJhRaJd = c2A0yzQpDQB3(a7PJmjLqw7lt)
for xhpEmD8ce_NZ in xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc\xb5\x80\xb9\x9cA\xe2\x10\x92\xd7\xa5?'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(0b1000111 + 0o35) + '\x65')('\165' + chr(0b1110100) + chr(3539 - 3437) + '\055' + chr(1161 - 1105)))[::-ehT0Px3KOsy9('\060' + chr(7453 - 7342) + chr(1016 - 967), 8)]:
OolUPRJhRaJd -= ehT0Px3KOsy9(chr(828 - 780) + chr(111) + chr(1852 - 1803), 8)
RYbwri1Tn84e[OolUPRJhRaJd] = xhpEmD8ce_NZ
else:
RYbwri1Tn84e[JCr5c1TvIhBy] = pIcoaXENl5Pw[WVxHKyX45z_L].nauYfLglTpcb[ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + '\060', 8)]
JCr5c1TvIhBy += ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\x31', 8)
xafqLlk3kkUe(CyN5bZDgFogS, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xa4\x85\x85\x94i'), chr(0b111010 + 0o52) + chr(10006 - 9905) + chr(0b10001 + 0o122) + chr(0b1010110 + 0o31) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1001011 + 0o51) + chr(0b1100110) + '\x2d' + chr(0b10011 + 0o45)))(xafqLlk3kkUe(pIcoaXENl5Pw[WVxHKyX45z_L].reshape(KNyTy8rYcwji(RYbwri1Tn84e)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xa6\x9a\x81\x9en\xe4\x0f\xb2\xf8\xb22'), '\144' + chr(0b10010 + 0o123) + '\143' + '\157' + chr(100) + '\x65')(chr(7586 - 7469) + chr(0b10111 + 0o135) + chr(9125 - 9023) + '\x2d' + chr(0b11011 + 0o35)))(x1itLWlEGpkE))
for (tlORBuYsiw3X, VNGQdHSFPrso) in YlkZvXL8qwsX(RYbwri1Tn84e):
RYbwri1Tn84e[tlORBuYsiw3X] = ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\061', 8)
pIcoaXENl5Pw = CyN5bZDgFogS
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xa0\x94\x83\x91'), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(9151 - 9034) + chr(13159 - 13043) + '\x66' + chr(1041 - 996) + chr(56)))(*pIcoaXENl5Pw)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._prepare_value_nd
|
def _prepare_value_nd(self, value, vshape):
"""Given value and vshape, create an `NDArray` from value with the same
context and dtype as the current one and broadcast it to vshape."""
if isinstance(value, numeric_types):
value_nd = full(shape=vshape, val=value, ctx=self.context, dtype=self.dtype)
elif isinstance(value, NDArray):
value_nd = value.as_in_context(self.context)
if value_nd.dtype != self.dtype:
value_nd = value_nd.astype(self.dtype)
else:
try:
value_nd = array(value, ctx=self.context, dtype=self.dtype)
except:
raise TypeError('NDArray does not support assignment with non-array-like'
' object %s of type %s' % (str(value), str(type(value))))
if value_nd.shape != vshape:
value_nd = value_nd.broadcast_to(vshape)
return value_nd
|
python
|
def _prepare_value_nd(self, value, vshape):
"""Given value and vshape, create an `NDArray` from value with the same
context and dtype as the current one and broadcast it to vshape."""
if isinstance(value, numeric_types):
value_nd = full(shape=vshape, val=value, ctx=self.context, dtype=self.dtype)
elif isinstance(value, NDArray):
value_nd = value.as_in_context(self.context)
if value_nd.dtype != self.dtype:
value_nd = value_nd.astype(self.dtype)
else:
try:
value_nd = array(value, ctx=self.context, dtype=self.dtype)
except:
raise TypeError('NDArray does not support assignment with non-array-like'
' object %s of type %s' % (str(value), str(type(value))))
if value_nd.shape != vshape:
value_nd = value_nd.broadcast_to(vshape)
return value_nd
|
[
"def",
"_prepare_value_nd",
"(",
"self",
",",
"value",
",",
"vshape",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"numeric_types",
")",
":",
"value_nd",
"=",
"full",
"(",
"shape",
"=",
"vshape",
",",
"val",
"=",
"value",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"self",
".",
"dtype",
")",
"elif",
"isinstance",
"(",
"value",
",",
"NDArray",
")",
":",
"value_nd",
"=",
"value",
".",
"as_in_context",
"(",
"self",
".",
"context",
")",
"if",
"value_nd",
".",
"dtype",
"!=",
"self",
".",
"dtype",
":",
"value_nd",
"=",
"value_nd",
".",
"astype",
"(",
"self",
".",
"dtype",
")",
"else",
":",
"try",
":",
"value_nd",
"=",
"array",
"(",
"value",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"self",
".",
"dtype",
")",
"except",
":",
"raise",
"TypeError",
"(",
"'NDArray does not support assignment with non-array-like'",
"' object %s of type %s'",
"%",
"(",
"str",
"(",
"value",
")",
",",
"str",
"(",
"type",
"(",
"value",
")",
")",
")",
")",
"if",
"value_nd",
".",
"shape",
"!=",
"vshape",
":",
"value_nd",
"=",
"value_nd",
".",
"broadcast_to",
"(",
"vshape",
")",
"return",
"value_nd"
] |
Given value and vshape, create an `NDArray` from value with the same
context and dtype as the current one and broadcast it to vshape.
|
[
"Given",
"value",
"and",
"vshape",
"create",
"an",
"NDArray",
"from",
"value",
"with",
"the",
"same",
"context",
"and",
"dtype",
"as",
"the",
"current",
"one",
"and",
"broadcast",
"it",
"to",
"vshape",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L664-L681
|
train
|
Given value and vshape create an NDArray from value with the same
context and dtype as the current one and broadcast it to vshape.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,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hlZjMfR0,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' + chr(254 - 199) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(55) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1084 - 973) + chr(0b110100) + '\x31', 12744 - 12736), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100011 + 0o20) + chr(0b0 + 0o64) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\067' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1000010 + 0o55) + chr(879 - 829) + chr(743 - 694) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(2248 - 2200) + chr(11782 - 11671) + '\x36' + '\x37', 55576 - 55568), ehT0Px3KOsy9(chr(0b110000) + chr(6193 - 6082) + chr(0b110011) + chr(0b100000 + 0o20) + chr(0b11010 + 0o27), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(846 - 797) + chr(1635 - 1582) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b101110 + 0o6) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1597 - 1548) + '\065' + chr(234 - 186), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011000 + 0o27) + chr(1677 - 1625) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1111 + 0o44) + chr(0b10010 + 0o42) + '\x34', 0o10), ehT0Px3KOsy9(chr(2262 - 2214) + chr(111) + chr(0b110010) + chr(0b110100) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + '\x37' + chr(2011 - 1956), 8799 - 8791), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + '\062' + '\061' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b0 + 0o62) + '\x36' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(1075 - 1027) + chr(0b1101111) + chr(0b110010) + chr(55) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(7243 - 7132) + chr(0b10000 + 0o47), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(900 - 789) + chr(0b10101 + 0o41) + chr(1616 - 1562), 44529 - 44521), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(1401 - 1352) + chr(0b1 + 0o57) + chr(0b100010 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\x35' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(1780 - 1732) + '\157' + chr(49) + '\067' + chr(1759 - 1704), 55978 - 55970), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + '\x32' + chr(0b1000 + 0o53) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(54) + '\060', 22725 - 22717), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + '\x33' + chr(52) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\064' + '\x34', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x34' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(63 - 15) + chr(4577 - 4466) + chr(69 - 18) + chr(55) + '\063', 57119 - 57111), ehT0Px3KOsy9(chr(0b110000) + chr(0b111101 + 0o62) + chr(0b10100 + 0o35) + '\063' + chr(0b10010 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\062' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + '\061' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1001 + 0o50) + '\066' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1441 - 1388) + chr(0b11110 + 0o25), 33531 - 33523), ehT0Px3KOsy9('\x30' + chr(8076 - 7965) + chr(0b100010 + 0o17), 27539 - 27531), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(54) + chr(0b110 + 0o52), 4003 - 3995), ehT0Px3KOsy9(chr(2172 - 2124) + chr(111) + chr(0b100000 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(0b10010 + 0o40) + '\x30' + chr(1221 - 1170), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4148 - 4037) + chr(50) + chr(0b1110 + 0o51) + '\x34', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + chr(0b100011 + 0o15), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), chr(811 - 711) + '\x65' + chr(99) + chr(0b10001 + 0o136) + '\x64' + chr(8625 - 8524))('\x75' + '\x74' + chr(903 - 801) + chr(45) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def b4osIvi1wBhB(oVre8I6UXc3b, QmmgWUB13VCJ, OPJ_bqtS0a4E):
if PlSM16l2KDPD(QmmgWUB13VCJ, _oZ7ToMS5xAg):
BXfShsAHZFBp = KNGATxtxipLV(shape=OPJ_bqtS0a4E, val=QmmgWUB13VCJ, ctx=oVre8I6UXc3b.context, dtype=oVre8I6UXc3b.jSV9IKnemH7K)
elif PlSM16l2KDPD(QmmgWUB13VCJ, GdqFjMbtKL7s):
BXfShsAHZFBp = QmmgWUB13VCJ.as_in_context(oVre8I6UXc3b.context)
if xafqLlk3kkUe(BXfShsAHZFBp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95(w\xda\xf1\xc5Y\xa4\x04,_k'), chr(0b1100100) + chr(5933 - 5832) + chr(99) + chr(111) + '\144' + chr(10067 - 9966))(chr(0b101011 + 0o112) + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000))) != xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95(w\xda\xf1\xc5Y\xa4\x04,_k'), chr(8757 - 8657) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(12653 - 12536) + chr(1280 - 1164) + chr(0b1000110 + 0o40) + chr(0b101101) + chr(0b111000))):
BXfShsAHZFBp = BXfShsAHZFBp.astype(oVre8I6UXc3b.jSV9IKnemH7K)
else:
try:
BXfShsAHZFBp = B0ePDhpqxN5n(QmmgWUB13VCJ, ctx=oVre8I6UXc3b.context, dtype=oVre8I6UXc3b.jSV9IKnemH7K)
except ZVWAAMjVVHHl:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1?`\x91\xca\xefN\xe1\r\x0b\rS\xc4\xc9yK\xab\xc7\xcdwF)Z\x0b\xbeQ\x96\x97\xcd\x9c1z\xaf\x19_!\x87l\xf7\xd4\xdf\x15N\x8d\x95\xefE\xb3\x08\x1dEL\x8d\xccs\x1f\xe4\xd6\xd2bU2\x08Z\xed\x10\x8a\x82\x84\x8f&g\xafW\x0er'), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(3445 - 3329) + '\146' + '\x2d' + chr(0b10001 + 0o47)) % (M8_cKLkHVB2V(QmmgWUB13VCJ), M8_cKLkHVB2V(wmQmyeWBmUpv(QmmgWUB13VCJ))))
if xafqLlk3kkUe(BXfShsAHZFBp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\x1aT\xba\xde\xc2P\xad=\x14\x0bB'), chr(7438 - 7338) + chr(0b1100101) + chr(6205 - 6106) + '\157' + '\x64' + '\x65')(chr(8959 - 8842) + chr(0b1100100 + 0o20) + '\146' + chr(0b1110 + 0o37) + chr(0b111000))) != OPJ_bqtS0a4E:
BXfShsAHZFBp = BXfShsAHZFBp.broadcast_to(OPJ_bqtS0a4E)
return BXfShsAHZFBp
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._set_nd_basic_indexing
|
def _set_nd_basic_indexing(self, key, value):
"""This function is called by __setitem__ when key is a basic index, i.e.
an integer, or a slice, or a tuple of integers and slices. No restrictions
on the values of slices' steps."""
shape = self.shape
if isinstance(key, integer_types):
if key < 0:
key += shape[0]
if key < 0 or key >= shape[0]:
if key < 0:
key -= shape[0]
raise IndexError('index %d is out of bounds for axis 0 with size %d'
% (key, shape[0]))
key = py_slice(key, key+1) # key must be >= 0 here
if isinstance(key, py_slice):
assign_to_self = key.step is None or key.step == 1
assign_to_self &= key.start is None or key.start == 0
assign_to_self &= key.stop is None or key.stop == shape[0]
if assign_to_self: # trivial case, assign value to self
if isinstance(value, NDArray):
if value.handle is not self.handle:
if value.shape != shape:
value = value.broadcast_to(shape)
value.copyto(self)
elif isinstance(value, numeric_types):
_internal._full(shape=shape, ctx=self.context,
dtype=self.dtype, value=float(value), out=self)
elif isinstance(value, (np.ndarray, np.generic)):
if isinstance(value, np.generic) or value.shape != shape:
value = np.broadcast_to(value, shape)
self._sync_copyfrom(value)
else: # value might be a list or a tuple
value_nd = self._prepare_value_nd(value, shape)
value_nd.copyto(self)
return
else: # non-trivial case, use _slice_assign or _slice_assign_scalar
key = (key,)
assert isinstance(key, tuple), "key=%s must be a tuple of slices and integers" % str(key)
assert len(key) <= len(shape), "Indexing dimensions exceed array dimensions, %d vs %d"\
% (len(key), len(shape))
begin = []
end = []
steps = []
oshape = [] # output shape of slice using key
vshape = [] # value shape of data[key]
for i, slice_i in enumerate(key):
dim_size = 1
if isinstance(slice_i, py_slice):
begin.append(slice_i.start)
end.append(slice_i.stop)
steps.append(slice_i.step)
start, stop, step = _get_index_range(slice_i.start, slice_i.stop,
shape[i], slice_i.step)
dim_size = _get_dim_size(start, stop, step)
vshape.append(dim_size)
elif isinstance(slice_i, integer_types):
begin.append(slice_i)
end.append(slice_i+1 if slice_i != -1 else self.shape[i])
steps.append(1)
else:
raise ValueError("basic indexing does not support index=%s of type=%s"
% (str(slice_i), str(type(slice_i))))
oshape.append(dim_size)
oshape.extend(shape[len(key):])
vshape.extend(shape[len(key):])
# if key contains all integers, vshape should be (1,)
if len(vshape) == 0:
vshape.append(1)
oshape = tuple(oshape)
vshape = tuple(vshape)
if isinstance(value, numeric_types):
_internal._slice_assign_scalar(self, out=self, begin=begin, end=end,
step=steps, scalar=float(value))
else:
value_nd = self._prepare_value_nd(value, vshape)
if vshape != oshape:
value_nd = value_nd.reshape(oshape)
_internal._slice_assign(self, value_nd, begin, end, steps, out=self)
|
python
|
def _set_nd_basic_indexing(self, key, value):
"""This function is called by __setitem__ when key is a basic index, i.e.
an integer, or a slice, or a tuple of integers and slices. No restrictions
on the values of slices' steps."""
shape = self.shape
if isinstance(key, integer_types):
if key < 0:
key += shape[0]
if key < 0 or key >= shape[0]:
if key < 0:
key -= shape[0]
raise IndexError('index %d is out of bounds for axis 0 with size %d'
% (key, shape[0]))
key = py_slice(key, key+1) # key must be >= 0 here
if isinstance(key, py_slice):
assign_to_self = key.step is None or key.step == 1
assign_to_self &= key.start is None or key.start == 0
assign_to_self &= key.stop is None or key.stop == shape[0]
if assign_to_self: # trivial case, assign value to self
if isinstance(value, NDArray):
if value.handle is not self.handle:
if value.shape != shape:
value = value.broadcast_to(shape)
value.copyto(self)
elif isinstance(value, numeric_types):
_internal._full(shape=shape, ctx=self.context,
dtype=self.dtype, value=float(value), out=self)
elif isinstance(value, (np.ndarray, np.generic)):
if isinstance(value, np.generic) or value.shape != shape:
value = np.broadcast_to(value, shape)
self._sync_copyfrom(value)
else: # value might be a list or a tuple
value_nd = self._prepare_value_nd(value, shape)
value_nd.copyto(self)
return
else: # non-trivial case, use _slice_assign or _slice_assign_scalar
key = (key,)
assert isinstance(key, tuple), "key=%s must be a tuple of slices and integers" % str(key)
assert len(key) <= len(shape), "Indexing dimensions exceed array dimensions, %d vs %d"\
% (len(key), len(shape))
begin = []
end = []
steps = []
oshape = [] # output shape of slice using key
vshape = [] # value shape of data[key]
for i, slice_i in enumerate(key):
dim_size = 1
if isinstance(slice_i, py_slice):
begin.append(slice_i.start)
end.append(slice_i.stop)
steps.append(slice_i.step)
start, stop, step = _get_index_range(slice_i.start, slice_i.stop,
shape[i], slice_i.step)
dim_size = _get_dim_size(start, stop, step)
vshape.append(dim_size)
elif isinstance(slice_i, integer_types):
begin.append(slice_i)
end.append(slice_i+1 if slice_i != -1 else self.shape[i])
steps.append(1)
else:
raise ValueError("basic indexing does not support index=%s of type=%s"
% (str(slice_i), str(type(slice_i))))
oshape.append(dim_size)
oshape.extend(shape[len(key):])
vshape.extend(shape[len(key):])
# if key contains all integers, vshape should be (1,)
if len(vshape) == 0:
vshape.append(1)
oshape = tuple(oshape)
vshape = tuple(vshape)
if isinstance(value, numeric_types):
_internal._slice_assign_scalar(self, out=self, begin=begin, end=end,
step=steps, scalar=float(value))
else:
value_nd = self._prepare_value_nd(value, vshape)
if vshape != oshape:
value_nd = value_nd.reshape(oshape)
_internal._slice_assign(self, value_nd, begin, end, steps, out=self)
|
[
"def",
"_set_nd_basic_indexing",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"shape",
"=",
"self",
".",
"shape",
"if",
"isinstance",
"(",
"key",
",",
"integer_types",
")",
":",
"if",
"key",
"<",
"0",
":",
"key",
"+=",
"shape",
"[",
"0",
"]",
"if",
"key",
"<",
"0",
"or",
"key",
">=",
"shape",
"[",
"0",
"]",
":",
"if",
"key",
"<",
"0",
":",
"key",
"-=",
"shape",
"[",
"0",
"]",
"raise",
"IndexError",
"(",
"'index %d is out of bounds for axis 0 with size %d'",
"%",
"(",
"key",
",",
"shape",
"[",
"0",
"]",
")",
")",
"key",
"=",
"py_slice",
"(",
"key",
",",
"key",
"+",
"1",
")",
"# key must be >= 0 here",
"if",
"isinstance",
"(",
"key",
",",
"py_slice",
")",
":",
"assign_to_self",
"=",
"key",
".",
"step",
"is",
"None",
"or",
"key",
".",
"step",
"==",
"1",
"assign_to_self",
"&=",
"key",
".",
"start",
"is",
"None",
"or",
"key",
".",
"start",
"==",
"0",
"assign_to_self",
"&=",
"key",
".",
"stop",
"is",
"None",
"or",
"key",
".",
"stop",
"==",
"shape",
"[",
"0",
"]",
"if",
"assign_to_self",
":",
"# trivial case, assign value to self",
"if",
"isinstance",
"(",
"value",
",",
"NDArray",
")",
":",
"if",
"value",
".",
"handle",
"is",
"not",
"self",
".",
"handle",
":",
"if",
"value",
".",
"shape",
"!=",
"shape",
":",
"value",
"=",
"value",
".",
"broadcast_to",
"(",
"shape",
")",
"value",
".",
"copyto",
"(",
"self",
")",
"elif",
"isinstance",
"(",
"value",
",",
"numeric_types",
")",
":",
"_internal",
".",
"_full",
"(",
"shape",
"=",
"shape",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"self",
".",
"dtype",
",",
"value",
"=",
"float",
"(",
"value",
")",
",",
"out",
"=",
"self",
")",
"elif",
"isinstance",
"(",
"value",
",",
"(",
"np",
".",
"ndarray",
",",
"np",
".",
"generic",
")",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"np",
".",
"generic",
")",
"or",
"value",
".",
"shape",
"!=",
"shape",
":",
"value",
"=",
"np",
".",
"broadcast_to",
"(",
"value",
",",
"shape",
")",
"self",
".",
"_sync_copyfrom",
"(",
"value",
")",
"else",
":",
"# value might be a list or a tuple",
"value_nd",
"=",
"self",
".",
"_prepare_value_nd",
"(",
"value",
",",
"shape",
")",
"value_nd",
".",
"copyto",
"(",
"self",
")",
"return",
"else",
":",
"# non-trivial case, use _slice_assign or _slice_assign_scalar",
"key",
"=",
"(",
"key",
",",
")",
"assert",
"isinstance",
"(",
"key",
",",
"tuple",
")",
",",
"\"key=%s must be a tuple of slices and integers\"",
"%",
"str",
"(",
"key",
")",
"assert",
"len",
"(",
"key",
")",
"<=",
"len",
"(",
"shape",
")",
",",
"\"Indexing dimensions exceed array dimensions, %d vs %d\"",
"%",
"(",
"len",
"(",
"key",
")",
",",
"len",
"(",
"shape",
")",
")",
"begin",
"=",
"[",
"]",
"end",
"=",
"[",
"]",
"steps",
"=",
"[",
"]",
"oshape",
"=",
"[",
"]",
"# output shape of slice using key",
"vshape",
"=",
"[",
"]",
"# value shape of data[key]",
"for",
"i",
",",
"slice_i",
"in",
"enumerate",
"(",
"key",
")",
":",
"dim_size",
"=",
"1",
"if",
"isinstance",
"(",
"slice_i",
",",
"py_slice",
")",
":",
"begin",
".",
"append",
"(",
"slice_i",
".",
"start",
")",
"end",
".",
"append",
"(",
"slice_i",
".",
"stop",
")",
"steps",
".",
"append",
"(",
"slice_i",
".",
"step",
")",
"start",
",",
"stop",
",",
"step",
"=",
"_get_index_range",
"(",
"slice_i",
".",
"start",
",",
"slice_i",
".",
"stop",
",",
"shape",
"[",
"i",
"]",
",",
"slice_i",
".",
"step",
")",
"dim_size",
"=",
"_get_dim_size",
"(",
"start",
",",
"stop",
",",
"step",
")",
"vshape",
".",
"append",
"(",
"dim_size",
")",
"elif",
"isinstance",
"(",
"slice_i",
",",
"integer_types",
")",
":",
"begin",
".",
"append",
"(",
"slice_i",
")",
"end",
".",
"append",
"(",
"slice_i",
"+",
"1",
"if",
"slice_i",
"!=",
"-",
"1",
"else",
"self",
".",
"shape",
"[",
"i",
"]",
")",
"steps",
".",
"append",
"(",
"1",
")",
"else",
":",
"raise",
"ValueError",
"(",
"\"basic indexing does not support index=%s of type=%s\"",
"%",
"(",
"str",
"(",
"slice_i",
")",
",",
"str",
"(",
"type",
"(",
"slice_i",
")",
")",
")",
")",
"oshape",
".",
"append",
"(",
"dim_size",
")",
"oshape",
".",
"extend",
"(",
"shape",
"[",
"len",
"(",
"key",
")",
":",
"]",
")",
"vshape",
".",
"extend",
"(",
"shape",
"[",
"len",
"(",
"key",
")",
":",
"]",
")",
"# if key contains all integers, vshape should be (1,)",
"if",
"len",
"(",
"vshape",
")",
"==",
"0",
":",
"vshape",
".",
"append",
"(",
"1",
")",
"oshape",
"=",
"tuple",
"(",
"oshape",
")",
"vshape",
"=",
"tuple",
"(",
"vshape",
")",
"if",
"isinstance",
"(",
"value",
",",
"numeric_types",
")",
":",
"_internal",
".",
"_slice_assign_scalar",
"(",
"self",
",",
"out",
"=",
"self",
",",
"begin",
"=",
"begin",
",",
"end",
"=",
"end",
",",
"step",
"=",
"steps",
",",
"scalar",
"=",
"float",
"(",
"value",
")",
")",
"else",
":",
"value_nd",
"=",
"self",
".",
"_prepare_value_nd",
"(",
"value",
",",
"vshape",
")",
"if",
"vshape",
"!=",
"oshape",
":",
"value_nd",
"=",
"value_nd",
".",
"reshape",
"(",
"oshape",
")",
"_internal",
".",
"_slice_assign",
"(",
"self",
",",
"value_nd",
",",
"begin",
",",
"end",
",",
"steps",
",",
"out",
"=",
"self",
")"
] |
This function is called by __setitem__ when key is a basic index, i.e.
an integer, or a slice, or a tuple of integers and slices. No restrictions
on the values of slices' steps.
|
[
"This",
"function",
"is",
"called",
"by",
"__setitem__",
"when",
"key",
"is",
"a",
"basic",
"index",
"i",
".",
"e",
".",
"an",
"integer",
"or",
"a",
"slice",
"or",
"a",
"tuple",
"of",
"integers",
"and",
"slices",
".",
"No",
"restrictions",
"on",
"the",
"values",
"of",
"slices",
"steps",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L683-L765
|
train
|
This function is called by the dict s basic indexing methods.
|
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,Q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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(0b11100 + 0o24) + chr(111) + chr(0b110010) + '\062' + '\x31', 41076 - 41068), ehT0Px3KOsy9(chr(48) + '\157' + '\067' + chr(2301 - 2253), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b110110) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(11945 - 11834) + '\x31' + chr(1176 - 1123) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(0b11000 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + chr(50) + '\x36' + chr(1766 - 1712), 25842 - 25834), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b0 + 0o65) + '\064', 61064 - 61056), ehT0Px3KOsy9(chr(48) + chr(12039 - 11928) + chr(2248 - 2195) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b101101 + 0o4) + chr(878 - 827), 8509 - 8501), ehT0Px3KOsy9(chr(48) + '\157' + '\066' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110001) + '\x33' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(184 - 136) + chr(111) + chr(0b110011) + chr(799 - 749) + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9(chr(1013 - 965) + chr(111) + '\x32' + chr(0b110101) + chr(0b100110 + 0o20), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(360 - 309) + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(1202 - 1154) + chr(8593 - 8482) + chr(175 - 125) + '\063' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\x33' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10111 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b101010 + 0o14) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(55) + chr(643 - 595), 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b111011 + 0o64) + chr(51) + '\063' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\x34' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(9600 - 9489) + chr(0b110010) + chr(0b110001) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111010 + 0o65) + '\x32' + chr(54) + chr(55), 46103 - 46095), ehT0Px3KOsy9(chr(1058 - 1010) + chr(111) + chr(0b101111 + 0o2) + chr(1750 - 1696) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\061' + '\x30' + chr(1505 - 1450), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(50) + chr(0b1011 + 0o54), 37254 - 37246), ehT0Px3KOsy9('\060' + chr(111) + chr(52) + chr(0b10011 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(761 - 650) + chr(1464 - 1410) + chr(1188 - 1139), 8), ehT0Px3KOsy9(chr(1686 - 1638) + chr(3794 - 3683) + chr(0b110001) + '\x33' + chr(0b10001 + 0o40), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(0b1100 + 0o53) + '\064', 424 - 416), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100111 + 0o10) + chr(0b110011) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x31' + chr(50), 3884 - 3876), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(68 - 13) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1010101 + 0o32) + chr(49) + chr(0b1101 + 0o51) + '\060', 8), ehT0Px3KOsy9('\060' + chr(7688 - 7577) + chr(0b110111) + chr(0b10101 + 0o42), 0b1000), ehT0Px3KOsy9(chr(1789 - 1741) + chr(111) + chr(54) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110000) + chr(0b110101), 32465 - 32457), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(51) + chr(0b100001 + 0o24), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(853 - 800) + chr(48), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(388 - 340) + chr(12140 - 12029) + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf'), chr(7825 - 7725) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1001000 + 0o34) + chr(101))('\165' + chr(0b1011 + 0o151) + chr(7602 - 7500) + chr(45) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zjDikNQCtPti(oVre8I6UXc3b, K3J4ZwSlE0sT, QmmgWUB13VCJ):
nauYfLglTpcb = oVre8I6UXc3b.nauYfLglTpcb
if PlSM16l2KDPD(K3J4ZwSlE0sT, GakrcjanQCW1):
if K3J4ZwSlE0sT < ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(48), ord("\x08")):
K3J4ZwSlE0sT += nauYfLglTpcb[ehT0Px3KOsy9('\060' + '\x6f' + chr(48), 8)]
if K3J4ZwSlE0sT < ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), 8) or K3J4ZwSlE0sT >= nauYfLglTpcb[ehT0Px3KOsy9('\060' + '\157' + chr(48), 8)]:
if K3J4ZwSlE0sT < ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1010 + 0o46), 8):
K3J4ZwSlE0sT -= nauYfLglTpcb[ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + '\060', 8)]
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8V\x15\n~\x96\tOkX.\xf6\xc1\x8dw\xbd4d\x12Z\xb0\xd2\xe4\xd3\x03g1JCy\xdd`#\x0eP\x0f\x16\xf24\xdc\xf9\x18\x02\x06|\xd3\x0c\x0e/'), chr(0b1100001 + 0o3) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(1752 - 1651))(chr(1836 - 1719) + chr(116) + chr(102) + '\x2d' + chr(0b110111 + 0o1)) % (K3J4ZwSlE0sT, nauYfLglTpcb[ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(0b110000), 8)]))
K3J4ZwSlE0sT = k9CegK7r1Mog(K3J4ZwSlE0sT, K3J4ZwSlE0sT + ehT0Px3KOsy9(chr(276 - 228) + chr(0b1101111) + chr(0b100000 + 0o21), ord("\x08")))
if PlSM16l2KDPD(K3J4ZwSlE0sT, k9CegK7r1Mog):
mZxIeZIxn80s = K3J4ZwSlE0sT.kDuFsAhEatcU is None or K3J4ZwSlE0sT.kDuFsAhEatcU == ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(988 - 939), 8)
mZxIeZIxn80s &= K3J4ZwSlE0sT.start is None or K3J4ZwSlE0sT.start == ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + chr(1292 - 1244), 8)
mZxIeZIxn80s &= K3J4ZwSlE0sT.i64wROPYXl1w is None or K3J4ZwSlE0sT.i64wROPYXl1w == nauYfLglTpcb[ehT0Px3KOsy9(chr(305 - 257) + chr(0b1101111) + '\x30', 8)]
if mZxIeZIxn80s:
if PlSM16l2KDPD(QmmgWUB13VCJ, GdqFjMbtKL7s):
if xafqLlk3kkUe(QmmgWUB13VCJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2@%\x1aK\xc7jq/K\x07\xae'), chr(8948 - 8848) + '\x65' + '\143' + chr(11467 - 11356) + '\x64' + chr(0b1 + 0o144))(chr(5401 - 5284) + '\x74' + chr(0b1100110) + chr(45) + chr(56))) is not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2@%\x1aK\xc7jq/K\x07\xae'), chr(0b10101 + 0o117) + chr(4594 - 4493) + chr(0b1100011) + chr(3431 - 3320) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(2758 - 2656) + '\x2d' + chr(0b111000))):
if xafqLlk3kkUe(QmmgWUB13VCJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xffY\x046`\xfaKG\x1fA>\xb4'), chr(100) + chr(101) + '\143' + chr(0b1000110 + 0o51) + chr(7313 - 7213) + chr(101))('\x75' + chr(0b1010101 + 0o37) + chr(0b1011011 + 0o13) + chr(45) + '\070')) != nauYfLglTpcb:
QmmgWUB13VCJ = QmmgWUB13VCJ.broadcast_to(nauYfLglTpcb)
xafqLlk3kkUe(QmmgWUB13VCJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2W\x01\x16r\xd9'), chr(0b1001110 + 0o26) + chr(0b1100101) + '\x63' + chr(4730 - 4619) + chr(0b1100100) + chr(3157 - 3056))(chr(0b1110101) + chr(0b1101100 + 0o10) + '\146' + '\055' + chr(0b101010 + 0o16)))(oVre8I6UXc3b)
elif PlSM16l2KDPD(QmmgWUB13VCJ, _oZ7ToMS5xAg):
xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce^\x04\x03j'), '\144' + chr(3714 - 3613) + chr(0b10101 + 0o116) + '\157' + chr(0b1011111 + 0o5) + chr(0b110 + 0o137))('\x75' + chr(0b110010 + 0o102) + '\146' + chr(45) + '\x38'))(shape=nauYfLglTpcb, ctx=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2W\x1f\x1bc\xceX'), '\x64' + chr(1454 - 1353) + chr(99) + chr(2927 - 2816) + '\x64' + chr(0b1100101))(chr(117) + chr(7546 - 7430) + chr(102) + '\x2d' + '\x38')), dtype=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b"\xfbk'VO\xfdBN&yj\x9d"), '\x64' + chr(101) + '\x63' + chr(1943 - 1832) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(5184 - 5082) + chr(45) + chr(0b111000))), value=kkSX4ccExqw4(QmmgWUB13VCJ), out=oVre8I6UXc3b)
elif PlSM16l2KDPD(QmmgWUB13VCJ, (xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\\\x10\x1dt\xd7U'), '\144' + chr(4213 - 4112) + chr(244 - 145) + chr(0b1011110 + 0o21) + chr(6119 - 6019) + chr(101))('\x75' + chr(8538 - 8422) + chr(0b1000001 + 0o45) + '\055' + chr(0b100001 + 0o27))), xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6]\x1f\nt\xdfO'), '\144' + chr(2561 - 2460) + chr(0b1100011) + chr(4222 - 4111) + '\x64' + chr(101))('\x75' + '\x74' + chr(0b11100 + 0o112) + chr(0b101101) + chr(0b111000))))):
if PlSM16l2KDPD(QmmgWUB13VCJ, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6]\x1f\nt\xdfO'), '\144' + chr(0b1100101) + '\143' + '\x6f' + chr(8203 - 8103) + '\145')('\165' + '\164' + '\146' + '\x2d' + '\x38'))) or xafqLlk3kkUe(QmmgWUB13VCJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xffY\x046`\xfaKG\x1fA>\xb4'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(2921 - 2805) + chr(0b100100 + 0o102) + '\055' + '\x38')) != nauYfLglTpcb:
QmmgWUB13VCJ = WqUC3KWvYVup.broadcast_to(QmmgWUB13VCJ, nauYfLglTpcb)
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xceK\x08\x01e\xe9OD;H;\xa4\xc1\x95'), '\144' + chr(0b100011 + 0o102) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\x65')('\165' + '\164' + chr(4662 - 4560) + '\x2d' + '\070'))(QmmgWUB13VCJ)
else:
BXfShsAHZFBp = oVre8I6UXc3b._prepare_value_nd(QmmgWUB13VCJ, nauYfLglTpcb)
xafqLlk3kkUe(BXfShsAHZFBp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2W\x01\x16r\xd9'), chr(9644 - 9544) + chr(0b1100101) + chr(0b1011001 + 0o12) + chr(111) + chr(100) + chr(0b1010101 + 0o20))(chr(0b1110101) + chr(0b1000010 + 0o62) + '\146' + chr(45) + chr(56)))(oVre8I6UXc3b)
return
else:
K3J4ZwSlE0sT = (K3J4ZwSlE0sT,)
assert PlSM16l2KDPD(K3J4ZwSlE0sT, KNyTy8rYcwji), xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa]\x08R#\xc5\x0cF>B)\xf6\xcc\x9d#\xfc{vGH\xb3\xc2\xaa\xd8\x16g$IX:\xd9kj\x1c\x1e[\x16\xec3\xdc\xf4_\x14\x1du'), chr(100) + chr(101) + chr(0b1100011) + chr(9286 - 9175) + chr(873 - 773) + chr(0b10001 + 0o124))(chr(6266 - 6149) + chr(0b1100011 + 0o21) + chr(0b1100110) + '\x2d' + chr(56)) % M8_cKLkHVB2V(K3J4ZwSlE0sT)
assert c2A0yzQpDQB3(K3J4ZwSlE0sT) <= c2A0yzQpDQB3(nauYfLglTpcb), xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8V\x15\n~\xdfBLkU4\xbb\xcb\x96p\xf44lA\x18\xba\xdf\xe9\xd2\x15#wDC+\xddaj\x19\x19RS\xeb.\xc1\xfeV\x02C&\x93H\x0b=B}\xf3\xca'), chr(0b1011111 + 0o5) + chr(0b10101 + 0o120) + chr(99) + chr(10102 - 9991) + '\x64' + chr(101))(chr(0b1011000 + 0o35) + chr(0b1010000 + 0o44) + chr(8821 - 8719) + '\x2d' + '\x38') % (c2A0yzQpDQB3(K3J4ZwSlE0sT), c2A0yzQpDQB3(nauYfLglTpcb))
_UO0diKSmKME = []
whWDZq5_lP01 = []
v0VhEmlMsO_l = []
_m4UjCHQFpqB = []
OPJ_bqtS0a4E = []
for (WVxHKyX45z_L, PPi48P5Xo9YJ) in YlkZvXL8qwsX(K3J4ZwSlE0sT):
xhpEmD8ce_NZ = ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b100 + 0o153) + chr(988 - 939), 8)
if PlSM16l2KDPD(PPi48P5Xo9YJ, k9CegK7r1Mog):
xafqLlk3kkUe(_UO0diKSmKME, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(2189 - 2089) + chr(0b1011111 + 0o6))(chr(117) + '\x74' + chr(5502 - 5400) + '\x2d' + chr(0b110000 + 0o10)))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2L\x10\x1dr'), '\144' + chr(5592 - 5491) + chr(99) + chr(4091 - 3980) + '\144' + chr(101))(chr(117) + '\164' + '\x66' + '\055' + chr(0b1 + 0o67))))
xafqLlk3kkUe(whWDZq5_lP01, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(9063 - 8963) + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b111110 + 0o50) + chr(45) + chr(56)))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x0eE\x18T\xf9|r\x13]l\xa1'), chr(100) + '\x65' + chr(99) + '\x6f' + chr(4842 - 4742) + chr(0b1010 + 0o133))(chr(0b1110101) + chr(0b1110100) + chr(0b10110 + 0o120) + chr(0b100100 + 0o11) + chr(0b11001 + 0o37))))
xafqLlk3kkUe(v0VhEmlMsO_l, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), '\x64' + chr(0b100000 + 0o105) + chr(2406 - 2307) + chr(0b1101111) + '\x64' + chr(101))(chr(8807 - 8690) + chr(0b101 + 0o157) + chr(10140 - 10038) + chr(1528 - 1483) + '\x38'))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa|\x04)u\xf7Dn*E>\x83'), chr(0b1011110 + 0o6) + '\145' + '\x63' + '\x6f' + chr(0b1011100 + 0o10) + chr(101))(chr(0b111110 + 0o67) + chr(0b1001100 + 0o50) + chr(0b1100110) + chr(0b10010 + 0o33) + '\070')))
(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU) = tB08RW78ckHp(PPi48P5Xo9YJ.start, PPi48P5Xo9YJ.i64wROPYXl1w, nauYfLglTpcb[WVxHKyX45z_L], PPi48P5Xo9YJ.kDuFsAhEatcU)
xhpEmD8ce_NZ = KBBGBFZLgTXA(avRbFsnfJxQj, i64wROPYXl1w, kDuFsAhEatcU)
xafqLlk3kkUe(OPJ_bqtS0a4E, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(0b100111 + 0o75) + chr(6659 - 6558) + chr(0b1100011) + chr(0b1000111 + 0o50) + '\x64' + chr(6387 - 6286))('\x75' + chr(0b1001 + 0o153) + chr(102) + chr(1046 - 1001) + '\070'))(xhpEmD8ce_NZ)
elif PlSM16l2KDPD(PPi48P5Xo9YJ, GakrcjanQCW1):
xafqLlk3kkUe(_UO0diKSmKME, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\144' + '\x65')('\165' + chr(0b1110100) + chr(0b111000 + 0o56) + '\055' + chr(56)))(PPi48P5Xo9YJ)
xafqLlk3kkUe(whWDZq5_lP01, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(100) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(7578 - 7461) + chr(0b1110100) + '\146' + '\055' + '\070'))(PPi48P5Xo9YJ + ehT0Px3KOsy9('\x30' + chr(111) + chr(921 - 872), 8) if PPi48P5Xo9YJ != -ehT0Px3KOsy9(chr(766 - 718) + chr(111) + '\061', 8) else xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xffY\x046`\xfaKG\x1fA>\xb4'), chr(0b1100000 + 0o4) + '\x65' + '\143' + '\x6f' + '\144' + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(0b101101) + '\x38'))[WVxHKyX45z_L])
xafqLlk3kkUe(v0VhEmlMsO_l, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(928 - 828) + chr(0b1101 + 0o130) + chr(99) + '\x6f' + chr(100) + '\145')('\x75' + '\x74' + '\146' + '\x2d' + chr(1569 - 1513)))(ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001), 8))
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b"\xf3Y\x02\x06e\x96EE/T%\xbf\xc0\x9f#\xf94gA\x18\xb1\xc8\xfe\x97\x032'U^+\xc88#\x13\x14ZN\xb8x\xdb\xb1W\x17Or\xcf\\Nv\x14."), chr(100) + chr(0b1100101) + chr(5248 - 5149) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(5522 - 5420) + chr(0b101101) + '\x38') % (M8_cKLkHVB2V(PPi48P5Xo9YJ), M8_cKLkHVB2V(wmQmyeWBmUpv(PPi48P5Xo9YJ))))
xafqLlk3kkUe(_m4UjCHQFpqB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(0b1010000 + 0o24) + chr(6979 - 6878) + chr(0b1100011) + '\157' + chr(0b111010 + 0o52) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(4784 - 4682) + chr(0b101101) + chr(0b111000)))(xhpEmD8ce_NZ)
xafqLlk3kkUe(_m4UjCHQFpqB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4@\x05\nh\xd2'), chr(100) + chr(101) + chr(0b1100011) + '\x6f' + '\144' + '\145')('\165' + '\x74' + chr(6738 - 6636) + '\055' + '\x38'))(nauYfLglTpcb[c2A0yzQpDQB3(K3J4ZwSlE0sT):])
xafqLlk3kkUe(OPJ_bqtS0a4E, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4@\x05\nh\xd2'), chr(0b1100100) + chr(101) + '\143' + chr(111) + '\x64' + chr(2711 - 2610))(chr(0b1111 + 0o146) + '\x74' + chr(0b1100110) + chr(1206 - 1161) + chr(0b111000)))(nauYfLglTpcb[c2A0yzQpDQB3(K3J4ZwSlE0sT):])
if c2A0yzQpDQB3(OPJ_bqtS0a4E) == ehT0Px3KOsy9(chr(1775 - 1727) + '\x6f' + chr(48), 8):
xafqLlk3kkUe(OPJ_bqtS0a4E, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0H\x01\nh\xd2'), chr(0b110 + 0o136) + '\145' + '\143' + chr(0b1000011 + 0o54) + '\x64' + '\145')('\x75' + '\x74' + chr(0b1100110) + '\x2d' + '\070'))(ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 8))
_m4UjCHQFpqB = KNyTy8rYcwji(_m4UjCHQFpqB)
OPJ_bqtS0a4E = KNyTy8rYcwji(OPJ_bqtS0a4E)
if PlSM16l2KDPD(QmmgWUB13VCJ, _oZ7ToMS5xAg):
xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xceK\x1d\x06e\xd3sJ8B4\xb1\xc0\xa7p\xfe:nSJ'), chr(6612 - 6512) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1000 + 0o134) + chr(7339 - 7238))(chr(4027 - 3910) + '\164' + chr(0b100011 + 0o103) + chr(45) + chr(0b111000)))(oVre8I6UXc3b, out=oVre8I6UXc3b, begin=_UO0diKSmKME, end=whWDZq5_lP01, step=v0VhEmlMsO_l, scalar=kkSX4ccExqw4(QmmgWUB13VCJ))
else:
BXfShsAHZFBp = oVre8I6UXc3b._prepare_value_nd(QmmgWUB13VCJ, OPJ_bqtS0a4E)
if OPJ_bqtS0a4E != _m4UjCHQFpqB:
BXfShsAHZFBp = BXfShsAHZFBp.reshape(_m4UjCHQFpqB)
xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xceK\x1d\x06e\xd3sJ8B4\xb1\xc0'), '\x64' + chr(1360 - 1259) + '\143' + chr(111) + chr(0b10100 + 0o120) + chr(0b111111 + 0o46))(chr(117) + '\x74' + chr(0b100001 + 0o105) + '\x2d' + chr(56)))(oVre8I6UXc3b, BXfShsAHZFBp, _UO0diKSmKME, whWDZq5_lP01, v0VhEmlMsO_l, out=oVre8I6UXc3b)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._set_nd_advanced_indexing
|
def _set_nd_advanced_indexing(self, key, value):
"""This function is called by __setitem__ when key is an advanced index."""
indices = self._get_index_nd(key)
vshape = _get_oshape_of_gather_nd_op(self.shape, indices.shape)
value_nd = self._prepare_value_nd(value, vshape)
_internal._scatter_set_nd(lhs=self, rhs=value_nd, indices=indices,
shape=self.shape, out=self)
|
python
|
def _set_nd_advanced_indexing(self, key, value):
"""This function is called by __setitem__ when key is an advanced index."""
indices = self._get_index_nd(key)
vshape = _get_oshape_of_gather_nd_op(self.shape, indices.shape)
value_nd = self._prepare_value_nd(value, vshape)
_internal._scatter_set_nd(lhs=self, rhs=value_nd, indices=indices,
shape=self.shape, out=self)
|
[
"def",
"_set_nd_advanced_indexing",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"indices",
"=",
"self",
".",
"_get_index_nd",
"(",
"key",
")",
"vshape",
"=",
"_get_oshape_of_gather_nd_op",
"(",
"self",
".",
"shape",
",",
"indices",
".",
"shape",
")",
"value_nd",
"=",
"self",
".",
"_prepare_value_nd",
"(",
"value",
",",
"vshape",
")",
"_internal",
".",
"_scatter_set_nd",
"(",
"lhs",
"=",
"self",
",",
"rhs",
"=",
"value_nd",
",",
"indices",
"=",
"indices",
",",
"shape",
"=",
"self",
".",
"shape",
",",
"out",
"=",
"self",
")"
] |
This function is called by __setitem__ when key is an advanced index.
|
[
"This",
"function",
"is",
"called",
"by",
"__setitem__",
"when",
"key",
"is",
"an",
"advanced",
"index",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L767-L773
|
train
|
This function is called by __setitem__ when key is an advanced index.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy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Error,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(2289 - 2241) + '\x6f' + '\063' + '\x36' + chr(0b101101 + 0o10), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1952 - 1903) + '\064' + chr(2659 - 2607), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010101 + 0o32) + chr(1244 - 1194) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\x31' + chr(50) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2007 - 1959) + chr(111) + chr(2099 - 2050) + chr(0b110 + 0o56) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\066' + chr(0b110111), 40997 - 40989), ehT0Px3KOsy9(chr(1453 - 1405) + '\x6f' + chr(50) + chr(0b110000) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011010 + 0o25) + chr(0b100010 + 0o23) + '\066', 0o10), ehT0Px3KOsy9(chr(462 - 414) + chr(0b10001 + 0o136) + chr(0b110001) + chr(0b1010 + 0o54) + '\x35', 0o10), ehT0Px3KOsy9(chr(2044 - 1996) + chr(111) + chr(0b10001 + 0o41) + chr(1115 - 1065) + '\067', 0o10), ehT0Px3KOsy9(chr(1704 - 1656) + chr(111) + chr(0b100001 + 0o21) + '\x31' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(0b110011) + chr(0b110111) + chr(0b110010), 24755 - 24747), ehT0Px3KOsy9(chr(0b110000) + chr(4664 - 4553) + chr(0b110011) + chr(0b110010) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(10668 - 10557) + chr(1676 - 1625) + chr(0b110100) + chr(353 - 302), 42643 - 42635), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(429 - 381) + chr(0b0 + 0o65), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110110) + chr(0b110100), 40207 - 40199), ehT0Px3KOsy9('\x30' + chr(11432 - 11321) + chr(0b110001) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(6375 - 6264) + chr(50) + chr(0b110010) + chr(53), 24418 - 24410), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110100) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1648 - 1598) + '\x30' + chr(0b110100), 9357 - 9349), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(0b110001) + '\063' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b10001 + 0o45) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10110 + 0o34) + chr(0b110000) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(1461 - 1350) + chr(51) + chr(58 - 6) + chr(1636 - 1583), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(495 - 445) + chr(1356 - 1301) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2387 - 2338) + chr(0b110100) + chr(0b101101 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + '\062' + chr(49) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(682 - 634) + chr(0b1101111) + chr(2373 - 2323) + chr(0b110010 + 0o5) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(49) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110111) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(534 - 486) + chr(0b11100 + 0o123) + chr(0b101110 + 0o4) + chr(2028 - 1977) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(782 - 734) + chr(111) + chr(0b110001) + chr(0b1110 + 0o43) + '\x33', 126 - 118), ehT0Px3KOsy9('\060' + '\157' + chr(1372 - 1321) + chr(48) + chr(0b10 + 0o63), 8), ehT0Px3KOsy9('\x30' + chr(0b1101010 + 0o5) + '\x33' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + '\x30' + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x33' + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(9774 - 9663) + chr(50) + chr(49) + chr(333 - 284), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b110100) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + chr(50) + chr(0b101 + 0o60) + chr(49), 30698 - 30690)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2128 - 2080) + '\157' + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb'), '\144' + chr(0b1100101) + '\x63' + chr(0b10011 + 0o134) + chr(100) + chr(0b1100101))(chr(0b10100 + 0o141) + chr(575 - 459) + '\146' + '\x2d' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def NFD0HG4FjJg6(oVre8I6UXc3b, K3J4ZwSlE0sT, QmmgWUB13VCJ):
pIcoaXENl5Pw = oVre8I6UXc3b._get_index_nd(K3J4ZwSlE0sT)
OPJ_bqtS0a4E = _JcPiKbKjb1D(oVre8I6UXc3b.nauYfLglTpcb, pIcoaXENl5Pw.nauYfLglTpcb)
BXfShsAHZFBp = oVre8I6UXc3b._prepare_value_nd(QmmgWUB13VCJ, OPJ_bqtS0a4E)
xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa\x17w2\x13C\xe0\\*\xe4\xe9\x8e\x8c\x8d\xa1'), chr(4367 - 4267) + '\x65' + chr(5783 - 5684) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110000 + 0o5) + chr(0b1110100) + chr(0b1011010 + 0o14) + chr(0b100 + 0o51) + '\070'))(lhs=oVre8I6UXc3b, rhs=BXfShsAHZFBp, indices=pIcoaXENl5Pw, shape=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b\x05a\n\x01{\xe2B!\xe7\xef\x98'), chr(100) + chr(101) + chr(0b10000 + 0o123) + chr(0b1010 + 0o145) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1001011 + 0o33) + chr(2000 - 1955) + '\070')), out=oVre8I6UXc3b)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._get_nd_basic_indexing
|
def _get_nd_basic_indexing(self, key):
"""This function is called when key is a slice, or an integer,
or a tuple of slices or integers"""
shape = self.shape
if isinstance(key, integer_types):
if key > shape[0] - 1:
raise IndexError(
'index {} is out of bounds for axis 0 with size {}'.format(
key, shape[0]))
return self._at(key)
elif isinstance(key, py_slice):
if key.step is not None and key.step != 1:
if key.step == 0:
raise ValueError("slice step cannot be zero")
return op.slice(self, begin=(key.start,), end=(key.stop,), step=(key.step,))
elif key.start is not None or key.stop is not None:
return self._slice(key.start, key.stop)
else:
return self
if not isinstance(key, tuple):
raise ValueError('index=%s must be a slice, or an ineger, or a tuple'
' of slices and integers to use basic indexing, received type=%s'
% (str(key), str(type(key))))
assert len(key) != 0, 'basic index cannot be an empty tuple'
begin = []
end = []
step = []
kept_axes = [] # axes where slice_i is a slice
i = -1
for i, slice_i in enumerate(key):
if isinstance(slice_i, integer_types):
begin.append(slice_i)
end.append(slice_i+1 if slice_i != -1 else self.shape[i])
step.append(1)
elif isinstance(slice_i, py_slice):
if slice_i.step == 0:
raise ValueError('basic index=%s cannot have slice=%s with step = 0'
% (str(key), str(slice_i)))
begin.append(slice_i.start)
end.append(slice_i.stop)
step.append(slice_i.step)
kept_axes.append(i)
else:
raise ValueError('basic_indexing does not support slicing with '
'index=%s of type=%s.' % (str(slice_i), str(type(slice_i))))
kept_axes.extend(range(i+1, len(shape)))
sliced_nd = op.slice(self, begin, end, step)
if len(kept_axes) == len(shape):
return sliced_nd
# squeeze sliced_shape to remove the axes indexed by integers
oshape = []
sliced_shape = sliced_nd.shape
for axis in kept_axes:
oshape.append(sliced_shape[axis])
# if key is a tuple of integers, still need to keep 1 dim
# while in Numpy, the output will become an value instead of an ndarray
if len(oshape) == 0:
oshape.append(1)
oshape = tuple(oshape)
assert np.prod(oshape) == np.prod(sliced_shape), 'oshape=%s has different size'\
' than sliced_shape=%s'\
% (oshape, sliced_shape)
return sliced_nd.reshape(oshape)
|
python
|
def _get_nd_basic_indexing(self, key):
"""This function is called when key is a slice, or an integer,
or a tuple of slices or integers"""
shape = self.shape
if isinstance(key, integer_types):
if key > shape[0] - 1:
raise IndexError(
'index {} is out of bounds for axis 0 with size {}'.format(
key, shape[0]))
return self._at(key)
elif isinstance(key, py_slice):
if key.step is not None and key.step != 1:
if key.step == 0:
raise ValueError("slice step cannot be zero")
return op.slice(self, begin=(key.start,), end=(key.stop,), step=(key.step,))
elif key.start is not None or key.stop is not None:
return self._slice(key.start, key.stop)
else:
return self
if not isinstance(key, tuple):
raise ValueError('index=%s must be a slice, or an ineger, or a tuple'
' of slices and integers to use basic indexing, received type=%s'
% (str(key), str(type(key))))
assert len(key) != 0, 'basic index cannot be an empty tuple'
begin = []
end = []
step = []
kept_axes = [] # axes where slice_i is a slice
i = -1
for i, slice_i in enumerate(key):
if isinstance(slice_i, integer_types):
begin.append(slice_i)
end.append(slice_i+1 if slice_i != -1 else self.shape[i])
step.append(1)
elif isinstance(slice_i, py_slice):
if slice_i.step == 0:
raise ValueError('basic index=%s cannot have slice=%s with step = 0'
% (str(key), str(slice_i)))
begin.append(slice_i.start)
end.append(slice_i.stop)
step.append(slice_i.step)
kept_axes.append(i)
else:
raise ValueError('basic_indexing does not support slicing with '
'index=%s of type=%s.' % (str(slice_i), str(type(slice_i))))
kept_axes.extend(range(i+1, len(shape)))
sliced_nd = op.slice(self, begin, end, step)
if len(kept_axes) == len(shape):
return sliced_nd
# squeeze sliced_shape to remove the axes indexed by integers
oshape = []
sliced_shape = sliced_nd.shape
for axis in kept_axes:
oshape.append(sliced_shape[axis])
# if key is a tuple of integers, still need to keep 1 dim
# while in Numpy, the output will become an value instead of an ndarray
if len(oshape) == 0:
oshape.append(1)
oshape = tuple(oshape)
assert np.prod(oshape) == np.prod(sliced_shape), 'oshape=%s has different size'\
' than sliced_shape=%s'\
% (oshape, sliced_shape)
return sliced_nd.reshape(oshape)
|
[
"def",
"_get_nd_basic_indexing",
"(",
"self",
",",
"key",
")",
":",
"shape",
"=",
"self",
".",
"shape",
"if",
"isinstance",
"(",
"key",
",",
"integer_types",
")",
":",
"if",
"key",
">",
"shape",
"[",
"0",
"]",
"-",
"1",
":",
"raise",
"IndexError",
"(",
"'index {} is out of bounds for axis 0 with size {}'",
".",
"format",
"(",
"key",
",",
"shape",
"[",
"0",
"]",
")",
")",
"return",
"self",
".",
"_at",
"(",
"key",
")",
"elif",
"isinstance",
"(",
"key",
",",
"py_slice",
")",
":",
"if",
"key",
".",
"step",
"is",
"not",
"None",
"and",
"key",
".",
"step",
"!=",
"1",
":",
"if",
"key",
".",
"step",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"\"slice step cannot be zero\"",
")",
"return",
"op",
".",
"slice",
"(",
"self",
",",
"begin",
"=",
"(",
"key",
".",
"start",
",",
")",
",",
"end",
"=",
"(",
"key",
".",
"stop",
",",
")",
",",
"step",
"=",
"(",
"key",
".",
"step",
",",
")",
")",
"elif",
"key",
".",
"start",
"is",
"not",
"None",
"or",
"key",
".",
"stop",
"is",
"not",
"None",
":",
"return",
"self",
".",
"_slice",
"(",
"key",
".",
"start",
",",
"key",
".",
"stop",
")",
"else",
":",
"return",
"self",
"if",
"not",
"isinstance",
"(",
"key",
",",
"tuple",
")",
":",
"raise",
"ValueError",
"(",
"'index=%s must be a slice, or an ineger, or a tuple'",
"' of slices and integers to use basic indexing, received type=%s'",
"%",
"(",
"str",
"(",
"key",
")",
",",
"str",
"(",
"type",
"(",
"key",
")",
")",
")",
")",
"assert",
"len",
"(",
"key",
")",
"!=",
"0",
",",
"'basic index cannot be an empty tuple'",
"begin",
"=",
"[",
"]",
"end",
"=",
"[",
"]",
"step",
"=",
"[",
"]",
"kept_axes",
"=",
"[",
"]",
"# axes where slice_i is a slice",
"i",
"=",
"-",
"1",
"for",
"i",
",",
"slice_i",
"in",
"enumerate",
"(",
"key",
")",
":",
"if",
"isinstance",
"(",
"slice_i",
",",
"integer_types",
")",
":",
"begin",
".",
"append",
"(",
"slice_i",
")",
"end",
".",
"append",
"(",
"slice_i",
"+",
"1",
"if",
"slice_i",
"!=",
"-",
"1",
"else",
"self",
".",
"shape",
"[",
"i",
"]",
")",
"step",
".",
"append",
"(",
"1",
")",
"elif",
"isinstance",
"(",
"slice_i",
",",
"py_slice",
")",
":",
"if",
"slice_i",
".",
"step",
"==",
"0",
":",
"raise",
"ValueError",
"(",
"'basic index=%s cannot have slice=%s with step = 0'",
"%",
"(",
"str",
"(",
"key",
")",
",",
"str",
"(",
"slice_i",
")",
")",
")",
"begin",
".",
"append",
"(",
"slice_i",
".",
"start",
")",
"end",
".",
"append",
"(",
"slice_i",
".",
"stop",
")",
"step",
".",
"append",
"(",
"slice_i",
".",
"step",
")",
"kept_axes",
".",
"append",
"(",
"i",
")",
"else",
":",
"raise",
"ValueError",
"(",
"'basic_indexing does not support slicing with '",
"'index=%s of type=%s.'",
"%",
"(",
"str",
"(",
"slice_i",
")",
",",
"str",
"(",
"type",
"(",
"slice_i",
")",
")",
")",
")",
"kept_axes",
".",
"extend",
"(",
"range",
"(",
"i",
"+",
"1",
",",
"len",
"(",
"shape",
")",
")",
")",
"sliced_nd",
"=",
"op",
".",
"slice",
"(",
"self",
",",
"begin",
",",
"end",
",",
"step",
")",
"if",
"len",
"(",
"kept_axes",
")",
"==",
"len",
"(",
"shape",
")",
":",
"return",
"sliced_nd",
"# squeeze sliced_shape to remove the axes indexed by integers",
"oshape",
"=",
"[",
"]",
"sliced_shape",
"=",
"sliced_nd",
".",
"shape",
"for",
"axis",
"in",
"kept_axes",
":",
"oshape",
".",
"append",
"(",
"sliced_shape",
"[",
"axis",
"]",
")",
"# if key is a tuple of integers, still need to keep 1 dim",
"# while in Numpy, the output will become an value instead of an ndarray",
"if",
"len",
"(",
"oshape",
")",
"==",
"0",
":",
"oshape",
".",
"append",
"(",
"1",
")",
"oshape",
"=",
"tuple",
"(",
"oshape",
")",
"assert",
"np",
".",
"prod",
"(",
"oshape",
")",
"==",
"np",
".",
"prod",
"(",
"sliced_shape",
")",
",",
"'oshape=%s has different size'",
"' than sliced_shape=%s'",
"%",
"(",
"oshape",
",",
"sliced_shape",
")",
"return",
"sliced_nd",
".",
"reshape",
"(",
"oshape",
")"
] |
This function is called when key is a slice, or an integer,
or a tuple of slices or integers
|
[
"This",
"function",
"is",
"called",
"when",
"key",
"is",
"a",
"slice",
"or",
"an",
"integer",
"or",
"a",
"tuple",
"of",
"slices",
"or",
"integers"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L775-L838
|
train
|
This function is called when key is a slice or an integer or a tuple of slices or integers to use basic indexing.
|
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,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0qciNl3EEEj,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(0b1101111) + chr(0b110011) + '\060' + chr(0b101011 + 0o5), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100111 + 0o17) + chr(620 - 566), 43089 - 43081), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + '\061' + chr(52) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + '\x32' + chr(0b10 + 0o64) + chr(0b100011 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7739 - 7628) + '\063' + '\062' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(53) + chr(0b1101 + 0o45), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101 + 0o54) + '\064' + chr(0b10100 + 0o42), 31181 - 31173), ehT0Px3KOsy9(chr(0b110000) + chr(5170 - 5059) + chr(49) + chr(1896 - 1848) + chr(0b110010), 14486 - 14478), ehT0Px3KOsy9('\x30' + '\157' + chr(1319 - 1268) + chr(1248 - 1200) + chr(54), 24315 - 24307), ehT0Px3KOsy9('\x30' + chr(347 - 236) + chr(49) + chr(0b110110) + chr(53), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(55) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(988 - 940) + '\157' + chr(0b110001) + chr(48) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(1713 - 1664), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(10620 - 10509) + chr(0b110011) + chr(2608 - 2555) + chr(50), 50066 - 50058), ehT0Px3KOsy9(chr(0b110000) + chr(11743 - 11632) + '\061' + chr(1129 - 1074) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(54) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + '\061' + '\x32', 39565 - 39557), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36' + chr(0b1100 + 0o46), 0o10), ehT0Px3KOsy9(chr(48) + chr(7315 - 7204) + chr(0b110001) + chr(0b110101) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001100 + 0o43) + '\x32' + chr(52) + chr(52), 55265 - 55257), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(2664 - 2610) + chr(2171 - 2120), 57985 - 57977), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\x37' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + '\x33' + chr(218 - 168) + chr(0b11101 + 0o31), 720 - 712), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(94 - 41) + chr(55), 0o10), ehT0Px3KOsy9(chr(1231 - 1183) + '\157' + chr(0b110111) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x35' + chr(0b11100 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(1805 - 1757) + chr(5891 - 5780) + '\x31' + chr(51) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001 + 0o0) + chr(525 - 475) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(319 - 269) + chr(0b110000 + 0o2) + chr(2418 - 2365), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + chr(51) + '\060' + chr(0b110000), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110010) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111101 + 0o62) + '\x33' + chr(48) + chr(0b101100 + 0o4), 8), ehT0Px3KOsy9('\x30' + chr(11893 - 11782) + '\x32' + chr(2762 - 2707) + chr(639 - 588), 0b1000), ehT0Px3KOsy9(chr(1225 - 1177) + chr(111) + chr(2152 - 2103) + '\060' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(55) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1011 + 0o46), 32491 - 32483), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x37' + chr(73 - 18), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + '\061' + chr(48) + chr(565 - 515), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b110100), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(70 - 22) + chr(11950 - 11839) + chr(0b110101) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xee'), '\144' + chr(0b1100101) + '\143' + '\x6f' + '\x64' + chr(1425 - 1324))(chr(0b1110101) + chr(9293 - 9177) + '\146' + chr(0b100011 + 0o12) + chr(834 - 778)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jYYoW_9axKdU(oVre8I6UXc3b, K3J4ZwSlE0sT):
nauYfLglTpcb = oVre8I6UXc3b.nauYfLglTpcb
if PlSM16l2KDPD(K3J4ZwSlE0sT, GakrcjanQCW1):
if K3J4ZwSlE0sT > nauYfLglTpcb[ehT0Px3KOsy9('\x30' + '\157' + chr(0b101011 + 0o5), 39344 - 39336)] - ehT0Px3KOsy9(chr(556 - 508) + chr(111) + '\x31', 8):
raise _fsda0v2_OKU(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9X\x06\xd5\xac\x8a\x1d?\xe6\x1c\ng~\x9f\t\x13eTL\xc6\x1c\rq\xb2\\\x1a\x8a5#\xb5\xa1\xab\xa9\xc8a\x0f!\xc8+8\xa8\x16\x11\xd9\xae\xcfF9\xbb'), chr(4961 - 4861) + '\145' + chr(752 - 653) + '\x6f' + chr(3589 - 3489) + chr(4666 - 4565))('\165' + chr(11868 - 11752) + '\x66' + '\055' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x96\x02\x10\xdf\x9c\xcb5q\x96\x05\x1c-'), chr(100) + chr(101) + chr(99) + '\157' + chr(3516 - 3416) + chr(101))(chr(9000 - 8883) + chr(0b1110100) + chr(0b1100110) + chr(663 - 618) + chr(0b111000)))(K3J4ZwSlE0sT, nauYfLglTpcb[ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\060', 8)]))
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9fW\x16'), chr(0b1001011 + 0o31) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\164' + '\x66' + '\055' + chr(56)))(K3J4ZwSlE0sT)
elif PlSM16l2KDPD(K3J4ZwSlE0sT, k9CegK7r1Mog):
if xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), chr(9674 - 9574) + chr(0b100001 + 0o104) + '\143' + '\157' + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1548 - 1503) + chr(0b111000))) is not None and xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), chr(100) + chr(5309 - 5208) + chr(0b111000 + 0o53) + chr(0b1100110 + 0o11) + '\144' + chr(5202 - 5101))('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(56))) != ehT0Px3KOsy9('\x30' + '\x6f' + '\061', 8):
if xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), '\x64' + chr(0b11100 + 0o111) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(0b1110100) + chr(102) + chr(200 - 155) + chr(1935 - 1879))) == ehT0Px3KOsy9('\x30' + chr(1655 - 1544) + chr(0b11 + 0o55), 8):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3Z\x0b\xd3\xb1\x8a\x156\xa3\x05Y$p\x84\x13\\~\x12\x0e\xc1S\x02z\xa4@'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1010100 + 0o33) + '\x64' + chr(9732 - 9631))(chr(0b1110101) + chr(779 - 663) + '\146' + chr(0b100001 + 0o14) + '\070'))
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3Z\x0b\xd3\xb1'), chr(8008 - 7908) + '\145' + '\143' + chr(3989 - 3878) + chr(6349 - 6249) + chr(3071 - 2970))(chr(0b1011110 + 0o27) + '\164' + chr(279 - 177) + chr(0b100010 + 0o13) + chr(0b1001 + 0o57)))(oVre8I6UXc3b, begin=(xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3B\x03\xc2\xa0'), '\144' + chr(7461 - 7360) + chr(99) + chr(111) + chr(0b111001 + 0o53) + '\145')(chr(117) + chr(116) + '\146' + '\055' + chr(1033 - 977))),), end=(xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\x00V\xc7\x86\xe56\x1b\x9e\x19H0'), chr(7987 - 7887) + '\145' + chr(0b11111 + 0o104) + chr(111) + chr(2745 - 2645) + chr(7828 - 7727))(chr(0b1011011 + 0o32) + '\164' + '\146' + chr(0b11010 + 0o23) + '\x38')),), step=(xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), chr(0b1000101 + 0o37) + '\145' + '\143' + chr(0b1101111 + 0o0) + chr(100) + chr(101))(chr(0b10010 + 0o143) + chr(0b1110100) + chr(0b100011 + 0o103) + chr(45) + '\070')),))
elif xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3B\x03\xc2\xa0'), chr(0b1100100) + '\145' + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(0b101011 + 0o112) + chr(0b1110100) + chr(102) + chr(1255 - 1210) + chr(56))) is not None or xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\x00V\xc7\x86\xe56\x1b\x9e\x19H0'), '\144' + '\145' + chr(0b10010 + 0o121) + chr(111) + '\144' + '\x65')(chr(13627 - 13510) + chr(116) + chr(0b1100 + 0o132) + chr(45) + '\070')) is not None:
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9fE\x0e\xd9\xb7\xcf'), chr(100) + '\x65' + chr(8033 - 7934) + '\157' + chr(893 - 793) + chr(0b1000001 + 0o44))(chr(10663 - 10546) + chr(116) + chr(102) + chr(1917 - 1872) + chr(0b11000 + 0o40)))(xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3B\x03\xc2\xa0'), chr(1270 - 1170) + '\x65' + chr(99) + '\x6f' + chr(7536 - 7436) + chr(0b1100101))('\x75' + '\164' + chr(2684 - 2582) + chr(45) + chr(56))), xafqLlk3kkUe(K3J4ZwSlE0sT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\x00V\xc7\x86\xe56\x1b\x9e\x19H0'), chr(0b1100100) + chr(101) + chr(0b100010 + 0o101) + chr(111) + chr(7509 - 7409) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(6260 - 6158) + '\x2d' + chr(0b100010 + 0o26))))
else:
return oVre8I6UXc3b
if not PlSM16l2KDPD(K3J4ZwSlE0sT, KNyTy8rYcwji):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9X\x06\xd5\xac\x97C1\xe6\x18\x0c4e\xca\x1fV*SL\xd7\x1f\x11|\xb3\x03\x1a\x83(q\xf4\xae\xf3\xa9\xd5$Xd\xcdnl\xafDB\xd1\xf4\xde\x132\xaa\x10Y(w\xca\x0e_cQ\t\xd7S\x19q\xb2\x0fS\x82.4\xf2\xa5\xa1\xb3\x9b5P!\xca1)\xe0T\x03\xc3\xbd\xc9F+\xa8\x11\x1c?x\x84\x1a\x1f*@\t\xc7\x16\x11i\xb3K\x1a\x98#!\xf0\xfd\xf6\xb3'), '\144' + chr(9429 - 9328) + '\x63' + chr(1875 - 1764) + '\x64' + chr(2152 - 2051))('\x75' + '\164' + chr(9746 - 9644) + chr(0b101101) + '\x38') % (M8_cKLkHVB2V(K3J4ZwSlE0sT), M8_cKLkHVB2V(wmQmyeWBmUpv(K3J4ZwSlE0sT))))
assert c2A0yzQpDQB3(K3J4ZwSlE0sT) != ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + chr(0b10 + 0o56), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2W\x11\xd9\xb7\x8a\x0f,\xa2\x10\x01gr\x8b\x13]eFL\xc6\x16X~\xb8\x0f_\x81*%\xec\xe0\xa7\xb5\xcb-Z'), chr(100) + chr(7163 - 7062) + '\x63' + '\x6f' + '\x64' + chr(6923 - 6822))(chr(117) + chr(0b1110100) + chr(5713 - 5611) + chr(0b101011 + 0o2) + chr(56))
_UO0diKSmKME = []
whWDZq5_lP01 = []
kDuFsAhEatcU = []
qoFoMR4SHrs3 = []
WVxHKyX45z_L = -ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + '\x31', 8)
for (WVxHKyX45z_L, PPi48P5Xo9YJ) in YlkZvXL8qwsX(K3J4ZwSlE0sT):
if PlSM16l2KDPD(PPi48P5Xo9YJ, GakrcjanQCW1):
xafqLlk3kkUe(_UO0diKSmKME, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + '\x64' + chr(0b1000010 + 0o43))(chr(117) + '\164' + chr(0b1100110) + '\055' + chr(0b111 + 0o61)))(PPi48P5Xo9YJ)
xafqLlk3kkUe(whWDZq5_lP01, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(9541 - 9441) + chr(6818 - 6717) + chr(99) + '\x6f' + chr(100) + '\145')('\x75' + '\x74' + '\146' + chr(0b100011 + 0o12) + chr(0b111000)))(PPi48P5Xo9YJ + ehT0Px3KOsy9('\x30' + chr(0b1101101 + 0o2) + '\x31', 8) if PPi48P5Xo9YJ != -ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + '\061', 8) else xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaeW\x17\xe9\xb2\xe6\x01.\x92\x05\x1a%'), chr(5299 - 5199) + '\x65' + chr(99) + chr(11355 - 11244) + chr(100) + chr(101))(chr(0b111101 + 0o70) + chr(0b1110100) + chr(6610 - 6508) + '\x2d' + '\x38'))[WVxHKyX45z_L])
xafqLlk3kkUe(kDuFsAhEatcU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b101101 + 0o67) + chr(0b111101 + 0o50) + '\143' + chr(0b1101111) + chr(0b100011 + 0o101) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + '\x38'))(ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b110001), 8))
elif PlSM16l2KDPD(PPi48P5Xo9YJ, k9CegK7r1Mog):
if xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), chr(0b1100100) + '\145' + '\x63' + chr(0b1011101 + 0o22) + chr(0b101001 + 0o73) + '\145')(chr(0b1010 + 0o153) + chr(5095 - 4979) + chr(102) + chr(965 - 920) + chr(1867 - 1811))) == ehT0Px3KOsy9(chr(48) + chr(0b100101 + 0o112) + '\x30', 8):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2W\x11\xd9\xb7\x8a\x0f,\xa2\x10\x01z4\x99]Pk\\\x02\xcb\x07Xw\xb7Y_\xcc)=\xfc\xa3\xb6\xfd\x9e2\x1fv\xd66$\xe0E\x16\xd5\xa4\x8a[b\xf6'), '\x64' + chr(0b1101 + 0o130) + chr(99) + chr(9214 - 9103) + chr(1342 - 1242) + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(918 - 873) + chr(0b11110 + 0o32)) % (M8_cKLkHVB2V(K3J4ZwSlE0sT), M8_cKLkHVB2V(PPi48P5Xo9YJ)))
xafqLlk3kkUe(_UO0diKSmKME, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(4249 - 4149) + '\x65' + chr(0b1100001 + 0o2) + '\x6f' + '\x64' + chr(4824 - 4723))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3B\x03\xc2\xa0'), chr(0b111100 + 0o50) + chr(101) + chr(0b110111 + 0o54) + '\157' + chr(0b1100001 + 0o3) + chr(101))(chr(117) + chr(0b1110100) + '\146' + '\x2d' + chr(56))))
xafqLlk3kkUe(whWDZq5_lP01, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b1011101 + 0o7) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(1964 - 1919) + chr(849 - 793)))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\x00V\xc7\x86\xe56\x1b\x9e\x19H0'), chr(0b1011 + 0o131) + '\145' + chr(6281 - 6182) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1001101 + 0o50) + chr(0b1011001 + 0o33) + chr(0b1011011 + 0o13) + chr(0b101010 + 0o3) + chr(56))))
xafqLlk3kkUe(kDuFsAhEatcU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b1100100) + chr(0b1100101) + chr(9343 - 9244) + chr(602 - 491) + chr(0b1110 + 0o126) + chr(8135 - 8034))(chr(0b1011100 + 0o31) + '\x74' + chr(6104 - 6002) + chr(1094 - 1049) + chr(56)))(xafqLlk3kkUe(PPi48P5Xo9YJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xabr\x17\xf6\xa7\xeb\x0e\x07\xa7\x01\x1a\x12'), '\x64' + chr(101) + chr(3527 - 3428) + chr(8557 - 8446) + chr(4862 - 4762) + chr(101))(chr(0b1110001 + 0o4) + chr(116) + '\x66' + chr(0b101101) + '\x38')))
xafqLlk3kkUe(qoFoMR4SHrs3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b1100100) + '\145' + chr(9321 - 9222) + chr(111) + '\144' + chr(101))('\x75' + '\164' + '\x66' + '\x2d' + chr(366 - 310)))(WVxHKyX45z_L)
else:
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2W\x11\xd9\xb7\xf5\x0f,\xa2\x10\x01.\x7f\x8d]WeW\x1f\x84\x1d\x17k\xf6\\O\x9c*>\xe7\xb4\xf3\xb3\xd7(\\h\xd1%l\xb7_\x16\xd8\xf4\xc3\x08&\xa3\rDbb\xca\x12U*F\x15\xd4\x16E:\xa5\x01'), '\144' + chr(0b1100101) + chr(99) + chr(0b101100 + 0o103) + chr(100) + '\x65')('\x75' + chr(2082 - 1966) + '\146' + chr(0b1100 + 0o41) + chr(0b10100 + 0o44)) % (M8_cKLkHVB2V(PPi48P5Xo9YJ), M8_cKLkHVB2V(wmQmyeWBmUpv(PPi48P5Xo9YJ))))
xafqLlk3kkUe(qoFoMR4SHrs3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5N\x16\xd5\xba\xce'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(2838 - 2782)))(vQr8gNKaIaWE(WVxHKyX45z_L + ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101111 + 0o2), 8), c2A0yzQpDQB3(nauYfLglTpcb)))
F9jrBE2U2FV7 = C8dAr6Ujq2Tn.slice(oVre8I6UXc3b, _UO0diKSmKME, whWDZq5_lP01, kDuFsAhEatcU)
if c2A0yzQpDQB3(qoFoMR4SHrs3) == c2A0yzQpDQB3(nauYfLglTpcb):
return F9jrBE2U2FV7
_m4UjCHQFpqB = []
E_DewOSWjAca = F9jrBE2U2FV7.nauYfLglTpcb
for cRTh61qyvi24 in qoFoMR4SHrs3:
xafqLlk3kkUe(_m4UjCHQFpqB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), chr(0b11111 + 0o105) + chr(0b1010110 + 0o17) + chr(99) + chr(6552 - 6441) + '\x64' + '\x65')(chr(117) + '\164' + chr(0b1100110) + chr(311 - 266) + chr(0b111000)))(E_DewOSWjAca[cRTh61qyvi24])
if c2A0yzQpDQB3(_m4UjCHQFpqB) == ehT0Px3KOsy9(chr(48) + chr(2352 - 2241) + '\x30', 8):
xafqLlk3kkUe(_m4UjCHQFpqB, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1F\x12\xd5\xba\xce'), '\144' + '\x65' + chr(99) + chr(1968 - 1857) + chr(0b11000 + 0o114) + '\145')(chr(0b110010 + 0o103) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000)))(ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 8))
_m4UjCHQFpqB = KNyTy8rYcwji(_m4UjCHQFpqB)
assert xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xact;\xdb\xe3\x93\nv\x88\x1eA/'), chr(0b110111 + 0o55) + '\x65' + chr(0b1001101 + 0o26) + chr(0b10001 + 0o136) + '\144' + chr(0b1100101))(chr(10987 - 10870) + chr(116) + chr(0b1100110) + chr(620 - 575) + '\070'))(_m4UjCHQFpqB) == xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xact;\xdb\xe3\x93\nv\x88\x1eA/'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b10001 + 0o136) + chr(0b101000 + 0o74) + chr(0b1000011 + 0o42))(chr(1046 - 929) + chr(0b1011110 + 0o26) + chr(102) + '\x2d' + chr(56)))(E_DewOSWjAca), xafqLlk3kkUe(SXOLrMavuUCe(b"\xafE\n\xd1\xa4\xcf[g\xb5U\x11&b\xca\x19ZlT\t\xd6\x16\x16k\xf6\\S\x96?q\xe1\xa8\xb2\xae\x9b2Sh\xdc'(\x9fE\n\xd1\xa4\xcf[g\xb5"), chr(0b1011 + 0o131) + '\145' + chr(0b100001 + 0o102) + chr(1598 - 1487) + chr(0b1011000 + 0o14) + '\145')(chr(13031 - 12914) + chr(0b1110100) + chr(0b10101 + 0o121) + '\x2d' + '\070') % (_m4UjCHQFpqB, E_DewOSWjAca)
return xafqLlk3kkUe(F9jrBE2U2FV7, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2S\x11\xd8\xb5\xda\x03'), chr(0b1100100) + '\145' + chr(0b111100 + 0o47) + chr(580 - 469) + '\144' + chr(7085 - 6984))(chr(0b1110101) + chr(8297 - 8181) + chr(102) + chr(1123 - 1078) + '\x38'))(_m4UjCHQFpqB)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._sync_copyfrom
|
def _sync_copyfrom(self, source_array):
"""Performs a synchronized copy from the `source_array` to the current array.
This is called through ``x[:] = source_array``, where the `source_array`
is a `numpy.ndarray` or array-like object.
This function blocks until all the pending read/write operations with respect
to the current `NDArray` are finished and carry out the copy operation to the
current NDArray.
Parameters
----------
source_array : array_like
The data source we would like to copy from.
Example
-------
>>> a = mx.nd.array([1, 2])
>>> a.asnumpy()
array([ 1., 2.], dtype=float32)
>>> a[:] = np.array([3, 4])
>> a.asnumpy()
array([ 3., 4.], dtype=float32)
"""
if not isinstance(source_array, np.ndarray):
try:
source_array = np.array(source_array, dtype=self.dtype)
except:
raise TypeError('array must consist of array-like data,' +
'type %s is not supported' % str(type(array)))
source_array = np.asarray(source_array, dtype=self.dtype, order='C')
if source_array.shape != self.shape:
raise ValueError('Shape inconsistent: expected %s vs got %s'%(
str(source_array.shape), str(self.shape)))
check_call(_LIB.MXNDArraySyncCopyFromCPU(
self.handle,
source_array.ctypes.data_as(ctypes.c_void_p),
ctypes.c_size_t(source_array.size)))
|
python
|
def _sync_copyfrom(self, source_array):
"""Performs a synchronized copy from the `source_array` to the current array.
This is called through ``x[:] = source_array``, where the `source_array`
is a `numpy.ndarray` or array-like object.
This function blocks until all the pending read/write operations with respect
to the current `NDArray` are finished and carry out the copy operation to the
current NDArray.
Parameters
----------
source_array : array_like
The data source we would like to copy from.
Example
-------
>>> a = mx.nd.array([1, 2])
>>> a.asnumpy()
array([ 1., 2.], dtype=float32)
>>> a[:] = np.array([3, 4])
>> a.asnumpy()
array([ 3., 4.], dtype=float32)
"""
if not isinstance(source_array, np.ndarray):
try:
source_array = np.array(source_array, dtype=self.dtype)
except:
raise TypeError('array must consist of array-like data,' +
'type %s is not supported' % str(type(array)))
source_array = np.asarray(source_array, dtype=self.dtype, order='C')
if source_array.shape != self.shape:
raise ValueError('Shape inconsistent: expected %s vs got %s'%(
str(source_array.shape), str(self.shape)))
check_call(_LIB.MXNDArraySyncCopyFromCPU(
self.handle,
source_array.ctypes.data_as(ctypes.c_void_p),
ctypes.c_size_t(source_array.size)))
|
[
"def",
"_sync_copyfrom",
"(",
"self",
",",
"source_array",
")",
":",
"if",
"not",
"isinstance",
"(",
"source_array",
",",
"np",
".",
"ndarray",
")",
":",
"try",
":",
"source_array",
"=",
"np",
".",
"array",
"(",
"source_array",
",",
"dtype",
"=",
"self",
".",
"dtype",
")",
"except",
":",
"raise",
"TypeError",
"(",
"'array must consist of array-like data,'",
"+",
"'type %s is not supported'",
"%",
"str",
"(",
"type",
"(",
"array",
")",
")",
")",
"source_array",
"=",
"np",
".",
"asarray",
"(",
"source_array",
",",
"dtype",
"=",
"self",
".",
"dtype",
",",
"order",
"=",
"'C'",
")",
"if",
"source_array",
".",
"shape",
"!=",
"self",
".",
"shape",
":",
"raise",
"ValueError",
"(",
"'Shape inconsistent: expected %s vs got %s'",
"%",
"(",
"str",
"(",
"source_array",
".",
"shape",
")",
",",
"str",
"(",
"self",
".",
"shape",
")",
")",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArraySyncCopyFromCPU",
"(",
"self",
".",
"handle",
",",
"source_array",
".",
"ctypes",
".",
"data_as",
"(",
"ctypes",
".",
"c_void_p",
")",
",",
"ctypes",
".",
"c_size_t",
"(",
"source_array",
".",
"size",
")",
")",
")"
] |
Performs a synchronized copy from the `source_array` to the current array.
This is called through ``x[:] = source_array``, where the `source_array`
is a `numpy.ndarray` or array-like object.
This function blocks until all the pending read/write operations with respect
to the current `NDArray` are finished and carry out the copy operation to the
current NDArray.
Parameters
----------
source_array : array_like
The data source we would like to copy from.
Example
-------
>>> a = mx.nd.array([1, 2])
>>> a.asnumpy()
array([ 1., 2.], dtype=float32)
>>> a[:] = np.array([3, 4])
>> a.asnumpy()
array([ 3., 4.], dtype=float32)
|
[
"Performs",
"a",
"synchronized",
"copy",
"from",
"the",
"source_array",
"to",
"the",
"current",
"array",
".",
"This",
"is",
"called",
"through",
"x",
"[",
":",
"]",
"=",
"source_array",
"where",
"the",
"source_array",
"is",
"a",
"numpy",
".",
"ndarray",
"or",
"array",
"-",
"like",
"object",
".",
"This",
"function",
"blocks",
"until",
"all",
"the",
"pending",
"read",
"/",
"write",
"operations",
"with",
"respect",
"to",
"the",
"current",
"NDArray",
"are",
"finished",
"and",
"carry",
"out",
"the",
"copy",
"operation",
"to",
"the",
"current",
"NDArray",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L845-L880
|
train
|
Performs a synchronized copy from the source_array to the current array.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJ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yh,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) + chr(111) + '\x37' + chr(0b1001 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11100 + 0o27) + '\x32' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5833 - 5722) + chr(0b110010) + '\x36' + chr(1200 - 1152), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x32' + chr(0b10111 + 0o37), 0b1000), ehT0Px3KOsy9(chr(895 - 847) + chr(0b1101111) + chr(49) + '\063' + chr(0b1011 + 0o47), 31993 - 31985), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + '\x32' + chr(2352 - 2303) + chr(105 - 55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(12057 - 11946) + chr(0b10101 + 0o40) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(9678 - 9567) + chr(0b110100) + '\x31', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\066' + chr(0b110001), 49903 - 49895), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11011 + 0o31) + chr(0b110010), 39515 - 39507), ehT0Px3KOsy9(chr(1471 - 1423) + chr(0b1101111) + chr(0b110011) + chr(49) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(743 - 632) + '\x31' + chr(0b11110 + 0o25) + chr(2405 - 2355), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x36' + chr(0b10111 + 0o35), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(1882 - 1771) + '\x33' + chr(51) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + '\x36' + '\061', 3039 - 3031), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(0b101 + 0o55) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(0b110011), 48746 - 48738), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\x36' + '\x34', 21308 - 21300), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1883 - 1833) + '\x35' + '\x34', 26197 - 26189), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x33' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b110100) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(48) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110100) + '\062', 8), ehT0Px3KOsy9(chr(1034 - 986) + chr(111) + '\x32' + chr(0b1111 + 0o43) + chr(0b110100), 53649 - 53641), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(0b10 + 0o60) + chr(2155 - 2101) + '\x36', 53921 - 53913), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\064' + chr(0b1111 + 0o44), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10110 + 0o35) + chr(0b10110 + 0o32) + chr(688 - 636), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b11011 + 0o33) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b11011 + 0o124) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(54) + '\063', 47019 - 47011), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(5170 - 5059) + chr(0b10101 + 0o34) + '\063' + '\x32', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(51) + chr(233 - 178), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7216 - 7105) + chr(0b10 + 0o63) + chr(390 - 340), 31951 - 31943), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x37' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x37' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + chr(0b1010 + 0o53) + chr(0b111 + 0o56), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(152 - 104) + '\x34', 50856 - 50848), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10110 + 0o33) + chr(0b100111 + 0o12) + chr(49), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x12'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\157' + '\x64' + '\x65')(chr(117) + chr(116) + chr(0b1010000 + 0o26) + chr(0b101101) + chr(339 - 283)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def AwZKb5TR0qmR(oVre8I6UXc3b, RYfxCklHRUIZ):
if not PlSM16l2KDPD(RYfxCklHRUIZ, xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb3\xd1\xe4(\xebP'), '\144' + chr(6288 - 6187) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))('\x75' + '\x74' + '\146' + '\055' + chr(0b11110 + 0o32)))):
try:
RYfxCklHRUIZ = WqUC3KWvYVup.B0ePDhpqxN5n(RYfxCklHRUIZ, dtype=oVre8I6UXc3b.jSV9IKnemH7K)
except ZVWAAMjVVHHl:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b']\xa5\xc2\xf7#\xaaDT\x82V\xef9~Z\xa9X\xe3G\xd4\xc3\xfa\xc0 P\xe6\xd7\xda\xe9\x1bo\xd8?\xbfNb\x88\x1c\x01'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(12061 - 11945) + '\x66' + chr(880 - 835) + chr(0b1011 + 0o55)) + xafqLlk3kkUe(SXOLrMavuUCe(b'H\xae\xc0\xf3z\xafZ\x01\x98Q\xef4~@\xfaB\xe5C\x84\xc3\xee\x94$F'), chr(2464 - 2364) + chr(0b1100101) + chr(0b1010000 + 0o23) + '\x6f' + chr(4567 - 4467) + chr(0b1100101))(chr(0b101 + 0o160) + chr(3875 - 3759) + chr(0b1100110) + chr(411 - 366) + chr(0b111000)) % M8_cKLkHVB2V(wmQmyeWBmUpv(B0ePDhpqxN5n)))
RYfxCklHRUIZ = WqUC3KWvYVup.asarray(RYfxCklHRUIZ, dtype=oVre8I6UXc3b.jSV9IKnemH7K, order=xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f'), chr(100) + '\x65' + chr(0b11010 + 0o111) + '\x6f' + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b110110 + 0o60) + chr(0b11100 + 0o21) + chr(0b111000)))
if xafqLlk3kkUe(RYfxCklHRUIZ, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb6\xc5\xcf<\xc6NM\xa5R\xac8'), '\144' + chr(434 - 333) + chr(0b1100011) + chr(111) + '\x64' + chr(101))('\165' + chr(0b101000 + 0o114) + '\146' + chr(45) + chr(0b0 + 0o70))) != xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb6\xc5\xcf<\xc6NM\xa5R\xac8'), chr(100) + '\x65' + chr(99) + chr(0b11110 + 0o121) + chr(5836 - 5736) + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(0b101101) + chr(0b111000))):
raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'o\xbf\xd1\xe6?\xaa@O\x92M\xa1)xG\xaeT\xfeG\xce\x8c\xf9\x981G\xf7\xc2\xc6\xa0W#\xc0z\xe9Y#\x9b\x12YdlO'), chr(0b1100100) + chr(0b1100101) + chr(0b1010 + 0o131) + chr(111) + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(102) + chr(1905 - 1860) + '\x38') % (M8_cKLkHVB2V(xafqLlk3kkUe(RYfxCklHRUIZ, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb6\xc5\xcf<\xc6NM\xa5R\xac8'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1100000 + 0o17) + '\144' + chr(8259 - 8158))(chr(13106 - 12989) + chr(116) + chr(102) + chr(1099 - 1054) + chr(881 - 825)))), M8_cKLkHVB2V(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb6\xc5\xcf<\xc6NM\xa5R\xac8'), chr(4406 - 4306) + chr(0b101011 + 0o72) + '\143' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b111010 + 0o72) + chr(4368 - 4266) + '\055' + chr(0b100000 + 0o30))))))
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'q\x8f\xfe\xd2\x1b\xf8[@\x88q\xb64rw\xb5A\xe9u\x86\xc3\xf1\xa3\x11w'), chr(3354 - 3254) + chr(101) + chr(0b1100011) + '\x6f' + chr(1462 - 1362) + chr(0b111001 + 0o54))(chr(13429 - 13312) + chr(116) + chr(0b10011 + 0o123) + chr(45) + chr(56)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'o\xaf\xe4\xe3\x17\xfbo{\x95X\x95"'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1011011 + 0o11) + '\x65')(chr(4000 - 3883) + '\x74' + chr(102) + chr(1360 - 1315) + chr(56))), xafqLlk3kkUe(RYfxCklHRUIZ.ctypes, xafqLlk3kkUe(SXOLrMavuUCe(b'X\xb6\xc4\xf7\x05\xebZ'), '\x64' + chr(0b1100101) + chr(0b1010001 + 0o22) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(497 - 452) + chr(56)))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'_\x88\xc6\xf93\xeevQ'), chr(100) + chr(0b1011111 + 0o6) + chr(0b101110 + 0o65) + '\157' + chr(5691 - 5591) + '\x65')(chr(13441 - 13324) + '\x74' + '\146' + chr(45) + '\x38'))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'_\x88\xc3\xff \xefvU'), '\x64' + chr(101) + chr(0b1011111 + 0o4) + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(4142 - 4026) + chr(102) + chr(0b1111 + 0o36) + chr(0b111000)))(xafqLlk3kkUe(RYfxCklHRUIZ, xafqLlk3kkUe(SXOLrMavuUCe(b'r\x9b\xd3\xf5i\xc8jk\x9fs\xa4;'), chr(6521 - 6421) + chr(101) + chr(587 - 488) + chr(3927 - 3816) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + chr(155 - 99))))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._slice
|
def _slice(self, start, stop):
"""Returns a sliced NDArray that shares memory with the current one.
This is called through ``x[start:stop]``.
Parameters
----------
start : int
Starting inclusive index of slice in the first dim.
stop : int
Finishing exclusive index of slice in the first dim.
Returns
-------
`NDArray` sharing the memory with the current one sliced from
start to stop in the first dim.
Examples:
>>> a = mx.nd.array([[1,2], [3, 4], [5, 6], [7, 8]])
>>> a[1:2].asnumpy()
array([[ 3., 4.]], dtype=float32)
>>> a[1:1].asnumpy()
array([], shape=(0, 2), dtype=float32)
"""
handle = NDArrayHandle()
start, stop, _ = _get_index_range(start, stop, self.shape[0])
check_call(_LIB.MXNDArraySlice(
self.handle, mx_uint(start), mx_uint(stop), ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
python
|
def _slice(self, start, stop):
"""Returns a sliced NDArray that shares memory with the current one.
This is called through ``x[start:stop]``.
Parameters
----------
start : int
Starting inclusive index of slice in the first dim.
stop : int
Finishing exclusive index of slice in the first dim.
Returns
-------
`NDArray` sharing the memory with the current one sliced from
start to stop in the first dim.
Examples:
>>> a = mx.nd.array([[1,2], [3, 4], [5, 6], [7, 8]])
>>> a[1:2].asnumpy()
array([[ 3., 4.]], dtype=float32)
>>> a[1:1].asnumpy()
array([], shape=(0, 2), dtype=float32)
"""
handle = NDArrayHandle()
start, stop, _ = _get_index_range(start, stop, self.shape[0])
check_call(_LIB.MXNDArraySlice(
self.handle, mx_uint(start), mx_uint(stop), ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
[
"def",
"_slice",
"(",
"self",
",",
"start",
",",
"stop",
")",
":",
"handle",
"=",
"NDArrayHandle",
"(",
")",
"start",
",",
"stop",
",",
"_",
"=",
"_get_index_range",
"(",
"start",
",",
"stop",
",",
"self",
".",
"shape",
"[",
"0",
"]",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArraySlice",
"(",
"self",
".",
"handle",
",",
"mx_uint",
"(",
"start",
")",
",",
"mx_uint",
"(",
"stop",
")",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
")",
"return",
"NDArray",
"(",
"handle",
"=",
"handle",
",",
"writable",
"=",
"self",
".",
"writable",
")"
] |
Returns a sliced NDArray that shares memory with the current one.
This is called through ``x[start:stop]``.
Parameters
----------
start : int
Starting inclusive index of slice in the first dim.
stop : int
Finishing exclusive index of slice in the first dim.
Returns
-------
`NDArray` sharing the memory with the current one sliced from
start to stop in the first dim.
Examples:
>>> a = mx.nd.array([[1,2], [3, 4], [5, 6], [7, 8]])
>>> a[1:2].asnumpy()
array([[ 3., 4.]], dtype=float32)
>>> a[1:1].asnumpy()
array([], shape=(0, 2), dtype=float32)
|
[
"Returns",
"a",
"sliced",
"NDArray",
"that",
"shares",
"memory",
"with",
"the",
"current",
"one",
".",
"This",
"is",
"called",
"through",
"x",
"[",
"start",
":",
"stop",
"]",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L882-L910
|
train
|
Returns a new NDArray that shares the current one.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0S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iu2kLpS8s,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' + '\x6f' + chr(52) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b111001 + 0o66) + chr(50) + '\067' + chr(0b101011 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\x32' + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(49) + chr(0b110010), 18923 - 18915), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b110011) + '\060', 0b1000), ehT0Px3KOsy9(chr(187 - 139) + chr(111) + chr(0b110011) + chr(0b100000 + 0o23) + chr(49), 50266 - 50258), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(381 - 333), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\063' + chr(0b11000 + 0o31), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x30' + chr(54), 60188 - 60180), ehT0Px3KOsy9(chr(689 - 641) + chr(0b101100 + 0o103) + '\x33' + chr(49) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + '\061' + '\063', 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + '\x33' + chr(54) + chr(1831 - 1783), 0b1000), ehT0Px3KOsy9('\x30' + chr(4520 - 4409) + chr(0b10000 + 0o43) + chr(0b0 + 0o62) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10000 + 0o43) + chr(0b110111) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\x34' + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\x33', 25122 - 25114), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + '\062' + chr(0b101001 + 0o13) + chr(2553 - 2502), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b110000 + 0o77) + chr(314 - 263) + chr(0b110001) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(230 - 181) + '\x32' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(50) + '\x31' + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1618 - 1567) + chr(1196 - 1148), 0b1000), ehT0Px3KOsy9('\060' + chr(1502 - 1391) + chr(0b101010 + 0o10) + chr(0b110110) + chr(50), 38057 - 38049), ehT0Px3KOsy9('\x30' + chr(0b1101010 + 0o5) + '\063' + chr(0b110100) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4476 - 4365) + chr(49) + chr(0b11010 + 0o35) + chr(1047 - 997), 38720 - 38712), ehT0Px3KOsy9('\x30' + '\x6f' + chr(55) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(242 - 190), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1192 - 1142) + chr(0b100100 + 0o22) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(591 - 543) + chr(9230 - 9119) + chr(1536 - 1486), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(2006 - 1957) + chr(0b101001 + 0o11), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(692 - 581) + '\x31' + chr(54) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1951 - 1903) + chr(0b1100101 + 0o12) + chr(0b110010) + chr(0b10010 + 0o44) + chr(0b11101 + 0o24), 8), ehT0Px3KOsy9('\060' + chr(9745 - 9634) + '\x31' + chr(50) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(48) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b110101) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(0b110001) + chr(0b110000) + chr(0b101010 + 0o6), 0o10), ehT0Px3KOsy9(chr(1180 - 1132) + chr(111) + chr(50) + chr(0b101111 + 0o7) + '\061', 8), ehT0Px3KOsy9(chr(1108 - 1060) + '\x6f' + chr(0b1110 + 0o45) + chr(0b11111 + 0o30) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\067' + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(3109 - 2998) + '\x32' + chr(0b110011 + 0o4) + chr(48), 33331 - 33323), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100011 + 0o17) + chr(0b100011 + 0o22) + '\067', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(10358 - 10247) + chr(521 - 468) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(105 - 5) + '\145')(chr(442 - 325) + '\164' + chr(0b1010010 + 0o24) + '\x2d' + chr(0b100 + 0o64)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def FDoqZUQiGlUo(oVre8I6UXc3b, avRbFsnfJxQj, i64wROPYXl1w):
SxTuMqFZdzZx = v4apgis0SrXp()
(avRbFsnfJxQj, i64wROPYXl1w, VNGQdHSFPrso) = tB08RW78ckHp(avRbFsnfJxQj, i64wROPYXl1w, oVre8I6UXc3b.nauYfLglTpcb[ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8)])
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'h\xe7\x18\x0e\x99\xabr\xb8\xff\x9cg\x99\xb5\x99'), '\144' + '\145' + '\143' + chr(0b10110 + 0o131) + chr(646 - 546) + chr(930 - 829))('\x75' + chr(116) + chr(0b1100110) + chr(1273 - 1228) + chr(1976 - 1920)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'v\xc7\x02?\x95\xa8F\x83\xe2\xb5Q\x88'), chr(0b1100100) + chr(8651 - 8550) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(6569 - 6468))('\165' + chr(2276 - 2160) + '\146' + '\x2d' + chr(0b111000))), RSEUJ_H3k51M(avRbFsnfJxQj), RSEUJ_H3k51M(i64wROPYXl1w), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'G\xc6$/\xbe'), chr(0b111001 + 0o53) + '\145' + chr(9002 - 8903) + chr(0b1101001 + 0o6) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1402 - 1357) + '\x38'))(SxTuMqFZdzZx)))
return GdqFjMbtKL7s(handle=SxTuMqFZdzZx, writable=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'R\xcd?>\xb9\xbbl\xbc'), chr(0b100110 + 0o76) + '\145' + chr(5717 - 5618) + chr(111) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._at
|
def _at(self, idx):
"""Returns a view of the array sliced at `idx` in the first dim.
This is called through ``x[idx]``.
Parameters
----------
idx : int
index for slicing the `NDArray` in the first dim.
Returns
-------
NDArray
`NDArray` sharing the memory with the current one sliced at `idx` in the first dim.
Examples
--------
>>> a = mx.nd.array([[1,2], [3, 4]])
>>> a[1].asnumpy()
array([ 3., 4.], dtype=float32)
>>> b = mx.nd.array([1, 2, 3, 4])
>>> b[0].asnumpy()
array([ 1.], dtype=float32)
"""
handle = NDArrayHandle()
if idx < 0:
length = self.shape[0]
idx += length
if idx < 0:
raise IndexError('index %d is out of bounds for axis 0 with size %d'
% (idx-length, length))
check_call(_LIB.MXNDArrayAt(
self.handle, mx_uint(idx), ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
python
|
def _at(self, idx):
"""Returns a view of the array sliced at `idx` in the first dim.
This is called through ``x[idx]``.
Parameters
----------
idx : int
index for slicing the `NDArray` in the first dim.
Returns
-------
NDArray
`NDArray` sharing the memory with the current one sliced at `idx` in the first dim.
Examples
--------
>>> a = mx.nd.array([[1,2], [3, 4]])
>>> a[1].asnumpy()
array([ 3., 4.], dtype=float32)
>>> b = mx.nd.array([1, 2, 3, 4])
>>> b[0].asnumpy()
array([ 1.], dtype=float32)
"""
handle = NDArrayHandle()
if idx < 0:
length = self.shape[0]
idx += length
if idx < 0:
raise IndexError('index %d is out of bounds for axis 0 with size %d'
% (idx-length, length))
check_call(_LIB.MXNDArrayAt(
self.handle, mx_uint(idx), ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
[
"def",
"_at",
"(",
"self",
",",
"idx",
")",
":",
"handle",
"=",
"NDArrayHandle",
"(",
")",
"if",
"idx",
"<",
"0",
":",
"length",
"=",
"self",
".",
"shape",
"[",
"0",
"]",
"idx",
"+=",
"length",
"if",
"idx",
"<",
"0",
":",
"raise",
"IndexError",
"(",
"'index %d is out of bounds for axis 0 with size %d'",
"%",
"(",
"idx",
"-",
"length",
",",
"length",
")",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayAt",
"(",
"self",
".",
"handle",
",",
"mx_uint",
"(",
"idx",
")",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
")",
"return",
"NDArray",
"(",
"handle",
"=",
"handle",
",",
"writable",
"=",
"self",
".",
"writable",
")"
] |
Returns a view of the array sliced at `idx` in the first dim.
This is called through ``x[idx]``.
Parameters
----------
idx : int
index for slicing the `NDArray` in the first dim.
Returns
-------
NDArray
`NDArray` sharing the memory with the current one sliced at `idx` in the first dim.
Examples
--------
>>> a = mx.nd.array([[1,2], [3, 4]])
>>> a[1].asnumpy()
array([ 3., 4.], dtype=float32)
>>> b = mx.nd.array([1, 2, 3, 4])
>>> b[0].asnumpy()
array([ 1.], dtype=float32)
|
[
"Returns",
"a",
"view",
"of",
"the",
"array",
"sliced",
"at",
"idx",
"in",
"the",
"first",
"dim",
".",
"This",
"is",
"called",
"through",
"x",
"[",
"idx",
"]",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1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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(543 - 495) + chr(8874 - 8763) + chr(0b100 + 0o57) + chr(0b101 + 0o53) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(1107 - 1059) + chr(0b1101111) + chr(2222 - 2173) + chr(0b110111) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(827 - 774) + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(0b101110 + 0o6) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(878 - 830) + chr(0b11010 + 0o125) + chr(0b110001) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101011 + 0o10) + chr(1718 - 1670) + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(1180 - 1127), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + '\063' + chr(187 - 139) + chr(52), 28283 - 28275), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\x32' + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x30' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1467 - 1419) + chr(11380 - 11269) + '\061' + chr(0b101110 + 0o3) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\x33' + chr(0b10000 + 0o42), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(529 - 479) + '\062' + chr(51), 0o10), ehT0Px3KOsy9(chr(897 - 849) + '\x6f' + chr(0b110001) + chr(0b110111 + 0o0) + chr(0b11110 + 0o25), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b110101) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x33' + chr(1694 - 1645), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100010 + 0o17) + chr(1047 - 993) + '\067', 34978 - 34970), ehT0Px3KOsy9(chr(71 - 23) + chr(11916 - 11805) + chr(955 - 903) + '\x36', 0b1000), ehT0Px3KOsy9(chr(256 - 208) + chr(0b10001 + 0o136) + '\061' + '\065' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7294 - 7183) + '\061' + chr(0b1101 + 0o44) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(0b100100 + 0o16) + chr(52) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x31' + chr(0b11011 + 0o27) + chr(457 - 402), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1463 - 1415) + chr(111) + chr(328 - 278) + chr(50) + '\061', 60306 - 60298), ehT0Px3KOsy9('\x30' + '\157' + chr(0b0 + 0o64) + chr(54), 8), ehT0Px3KOsy9(chr(101 - 53) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\x36' + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x34', 53838 - 53830), ehT0Px3KOsy9(chr(1355 - 1307) + chr(0b1000 + 0o147) + chr(2653 - 2599) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\061' + '\061', 5223 - 5215), ehT0Px3KOsy9('\060' + chr(0b1001100 + 0o43) + '\x33' + chr(2557 - 2503) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110000) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1118 - 1070) + '\x6f' + chr(0b110010) + '\x35' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\061' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(55) + chr(173 - 123), 14044 - 14036), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1101 + 0o46) + '\061' + chr(257 - 208), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1314 - 1265) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1157 - 1046) + '\061' + chr(50) + chr(2102 - 2051), 0b1000), ehT0Px3KOsy9(chr(795 - 747) + chr(0b111111 + 0o60) + chr(0b110010) + chr(52) + chr(1446 - 1396), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + chr(804 - 751) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xec'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def thwmTBXTfDmI(oVre8I6UXc3b, YlqusYB6InkM):
SxTuMqFZdzZx = v4apgis0SrXp()
if YlqusYB6InkM < ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b101001 + 0o106) + chr(0b101100 + 0o4), 0o10):
CHAOgk5VCHH_ = oVre8I6UXc3b.nauYfLglTpcb[ehT0Px3KOsy9('\x30' + '\157' + chr(0b110000), 8)]
YlqusYB6InkM += CHAOgk5VCHH_
if YlqusYB6InkM < ehT0Px3KOsy9('\x30' + chr(0b1010000 + 0o37) + chr(2089 - 2041), 8):
raise _fsda0v2_OKU(xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\x12\xc9\x07w#\xe7I\xe4<\xf2h\xf5\xe6\x0f\x8e\xb6\x11\x06\x0c%\xd69\xef\xe2\x06\xa1_v\x11(\x8a\xaf\xdb\xec\n\xe9|:\xd6\xaa\\\xde\x0buf\xe2\x08\xa0'), '\144' + chr(0b1001100 + 0o31) + chr(7170 - 7071) + '\157' + chr(100) + chr(0b110 + 0o137))('\x75' + '\164' + chr(8453 - 8351) + chr(0b101101) + '\x38') % (YlqusYB6InkM - CHAOgk5VCHH_, CHAOgk5VCHH_))
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f$\xe3&Nq\xb0L\xbd\x14\xf5'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(116) + chr(0b111010 + 0o54) + chr(0b110 + 0o47) + chr(0b111000)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\x04\xf9\x17Br\x84w\xa0/\xdb0'), chr(2875 - 2775) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38')), RSEUJ_H3k51M(YlqusYB6InkM), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\x05\xdf\x07i'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(0b1100000 + 0o4) + chr(0b1100101))('\165' + chr(0b1100001 + 0o23) + '\146' + chr(999 - 954) + '\070'))(SxTuMqFZdzZx)))
return GdqFjMbtKL7s(handle=SxTuMqFZdzZx, writable=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\x0e\xc4\x16na\xaeH'), chr(100) + chr(0b110011 + 0o62) + chr(0b1100011) + '\157' + chr(100) + chr(325 - 224))(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.reshape
|
def reshape(self, *shape, **kwargs):
"""Returns a **view** of this array with a new shape without altering any data.
Parameters
----------
shape : tuple of int, or n ints
The new shape should not change the array size, namely
``np.prod(new_shape)`` should be equal to ``np.prod(self.shape)``.
Some dimensions of the shape can take special values from the set {0, -1, -2, -3, -4}.
The significance of each is explained below:
- ``0`` copy this dimension from the input to the output shape.
Example::
- input shape = (2,3,4), shape = (4,0,2), output shape = (4,3,2)
- input shape = (2,3,4), shape = (2,0,0), output shape = (2,3,4)
- ``-1`` infers the dimension of the output shape by using the remainder of the
input dimensions keeping the size of the new array same as that of the input array.
At most one dimension of shape can be -1.
Example::
- input shape = (2,3,4), shape = (6,1,-1), output shape = (6,1,4)
- input shape = (2,3,4), shape = (3,-1,8), output shape = (3,1,8)
- input shape = (2,3,4), shape=(-1,), output shape = (24,)
- ``-2`` copy all/remainder of the input dimensions to the output shape.
Example::
- input shape = (2,3,4), shape = (-2,), output shape = (2,3,4)
- input shape = (2,3,4), shape = (2,-2), output shape = (2,3,4)
- input shape = (2,3,4), shape = (-2,1,1), output shape = (2,3,4,1,1)
- ``-3`` use the product of two consecutive dimensions of the input shape as the
output dimension.
Example::
- input shape = (2,3,4), shape = (-3,4), output shape = (6,4)
- input shape = (2,3,4,5), shape = (-3,-3), output shape = (6,20)
- input shape = (2,3,4), shape = (0,-3), output shape = (2,12)
- input shape = (2,3,4), shape = (-3,-2), output shape = (6,4)
- ``-4`` split one dimension of the input into two dimensions passed subsequent to
-4 in shape (can contain -1).
Example::
- input shape = (2,3,4), shape = (-4,1,2,-2), output shape =(1,2,3,4)
- input shape = (2,3,4), shape = (2,-4,-1,3,-2), output shape = (2,1,3,4)
- If the argument `reverse` is set to 1, then the special values are inferred from right
to left.
Example::
- without reverse=1, for input shape = (10,5,4), shape = (-1,0), output shape would be \
(40,5).
- with reverse=1, output shape will be (50,4).
reverse : bool, default False
If true then the special values are inferred from right to left. Only supported as
keyword argument.
Returns
-------
NDArray
An array with desired shape that shares data with this array.
Examples
--------
>>> x = mx.nd.arange(0,6).reshape(2,3)
>>> x.asnumpy()
array([[ 0., 1., 2.],
[ 3., 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,-1)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(-3)
>>> y.asnumpy()
array([ 0. 1. 2. 3. 4. 5.], dtype=float32)
>>> y[:] = -1
>>> x.asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
"""
if len(shape) == 1 and isinstance(shape[0], (list, tuple)):
shape = shape[0]
elif not shape:
shape = kwargs.get('shape')
assert shape, "Shape must be provided."
if not all(k in ['shape', 'reverse'] for k in kwargs):
raise TypeError(
"Got unknown keywords in reshape: {}. " \
"Accepted keyword arguments are 'shape' and 'reverse'.".format(
', '.join([k for k in kwargs if k not in ['shape', 'reverse']])))
reverse = kwargs.get('reverse', False)
handle = NDArrayHandle()
# Actual reshape
check_call(_LIB.MXNDArrayReshape64(self.handle,
len(shape),
c_array(ctypes.c_int64, shape),
reverse,
ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
python
|
def reshape(self, *shape, **kwargs):
"""Returns a **view** of this array with a new shape without altering any data.
Parameters
----------
shape : tuple of int, or n ints
The new shape should not change the array size, namely
``np.prod(new_shape)`` should be equal to ``np.prod(self.shape)``.
Some dimensions of the shape can take special values from the set {0, -1, -2, -3, -4}.
The significance of each is explained below:
- ``0`` copy this dimension from the input to the output shape.
Example::
- input shape = (2,3,4), shape = (4,0,2), output shape = (4,3,2)
- input shape = (2,3,4), shape = (2,0,0), output shape = (2,3,4)
- ``-1`` infers the dimension of the output shape by using the remainder of the
input dimensions keeping the size of the new array same as that of the input array.
At most one dimension of shape can be -1.
Example::
- input shape = (2,3,4), shape = (6,1,-1), output shape = (6,1,4)
- input shape = (2,3,4), shape = (3,-1,8), output shape = (3,1,8)
- input shape = (2,3,4), shape=(-1,), output shape = (24,)
- ``-2`` copy all/remainder of the input dimensions to the output shape.
Example::
- input shape = (2,3,4), shape = (-2,), output shape = (2,3,4)
- input shape = (2,3,4), shape = (2,-2), output shape = (2,3,4)
- input shape = (2,3,4), shape = (-2,1,1), output shape = (2,3,4,1,1)
- ``-3`` use the product of two consecutive dimensions of the input shape as the
output dimension.
Example::
- input shape = (2,3,4), shape = (-3,4), output shape = (6,4)
- input shape = (2,3,4,5), shape = (-3,-3), output shape = (6,20)
- input shape = (2,3,4), shape = (0,-3), output shape = (2,12)
- input shape = (2,3,4), shape = (-3,-2), output shape = (6,4)
- ``-4`` split one dimension of the input into two dimensions passed subsequent to
-4 in shape (can contain -1).
Example::
- input shape = (2,3,4), shape = (-4,1,2,-2), output shape =(1,2,3,4)
- input shape = (2,3,4), shape = (2,-4,-1,3,-2), output shape = (2,1,3,4)
- If the argument `reverse` is set to 1, then the special values are inferred from right
to left.
Example::
- without reverse=1, for input shape = (10,5,4), shape = (-1,0), output shape would be \
(40,5).
- with reverse=1, output shape will be (50,4).
reverse : bool, default False
If true then the special values are inferred from right to left. Only supported as
keyword argument.
Returns
-------
NDArray
An array with desired shape that shares data with this array.
Examples
--------
>>> x = mx.nd.arange(0,6).reshape(2,3)
>>> x.asnumpy()
array([[ 0., 1., 2.],
[ 3., 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,-1)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(-3)
>>> y.asnumpy()
array([ 0. 1. 2. 3. 4. 5.], dtype=float32)
>>> y[:] = -1
>>> x.asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
"""
if len(shape) == 1 and isinstance(shape[0], (list, tuple)):
shape = shape[0]
elif not shape:
shape = kwargs.get('shape')
assert shape, "Shape must be provided."
if not all(k in ['shape', 'reverse'] for k in kwargs):
raise TypeError(
"Got unknown keywords in reshape: {}. " \
"Accepted keyword arguments are 'shape' and 'reverse'.".format(
', '.join([k for k in kwargs if k not in ['shape', 'reverse']])))
reverse = kwargs.get('reverse', False)
handle = NDArrayHandle()
# Actual reshape
check_call(_LIB.MXNDArrayReshape64(self.handle,
len(shape),
c_array(ctypes.c_int64, shape),
reverse,
ctypes.byref(handle)))
return NDArray(handle=handle, writable=self.writable)
|
[
"def",
"reshape",
"(",
"self",
",",
"*",
"shape",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"len",
"(",
"shape",
")",
"==",
"1",
"and",
"isinstance",
"(",
"shape",
"[",
"0",
"]",
",",
"(",
"list",
",",
"tuple",
")",
")",
":",
"shape",
"=",
"shape",
"[",
"0",
"]",
"elif",
"not",
"shape",
":",
"shape",
"=",
"kwargs",
".",
"get",
"(",
"'shape'",
")",
"assert",
"shape",
",",
"\"Shape must be provided.\"",
"if",
"not",
"all",
"(",
"k",
"in",
"[",
"'shape'",
",",
"'reverse'",
"]",
"for",
"k",
"in",
"kwargs",
")",
":",
"raise",
"TypeError",
"(",
"\"Got unknown keywords in reshape: {}. \"",
"\"Accepted keyword arguments are 'shape' and 'reverse'.\"",
".",
"format",
"(",
"', '",
".",
"join",
"(",
"[",
"k",
"for",
"k",
"in",
"kwargs",
"if",
"k",
"not",
"in",
"[",
"'shape'",
",",
"'reverse'",
"]",
"]",
")",
")",
")",
"reverse",
"=",
"kwargs",
".",
"get",
"(",
"'reverse'",
",",
"False",
")",
"handle",
"=",
"NDArrayHandle",
"(",
")",
"# Actual reshape",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayReshape64",
"(",
"self",
".",
"handle",
",",
"len",
"(",
"shape",
")",
",",
"c_array",
"(",
"ctypes",
".",
"c_int64",
",",
"shape",
")",
",",
"reverse",
",",
"ctypes",
".",
"byref",
"(",
"handle",
")",
")",
")",
"return",
"NDArray",
"(",
"handle",
"=",
"handle",
",",
"writable",
"=",
"self",
".",
"writable",
")"
] |
Returns a **view** of this array with a new shape without altering any data.
Parameters
----------
shape : tuple of int, or n ints
The new shape should not change the array size, namely
``np.prod(new_shape)`` should be equal to ``np.prod(self.shape)``.
Some dimensions of the shape can take special values from the set {0, -1, -2, -3, -4}.
The significance of each is explained below:
- ``0`` copy this dimension from the input to the output shape.
Example::
- input shape = (2,3,4), shape = (4,0,2), output shape = (4,3,2)
- input shape = (2,3,4), shape = (2,0,0), output shape = (2,3,4)
- ``-1`` infers the dimension of the output shape by using the remainder of the
input dimensions keeping the size of the new array same as that of the input array.
At most one dimension of shape can be -1.
Example::
- input shape = (2,3,4), shape = (6,1,-1), output shape = (6,1,4)
- input shape = (2,3,4), shape = (3,-1,8), output shape = (3,1,8)
- input shape = (2,3,4), shape=(-1,), output shape = (24,)
- ``-2`` copy all/remainder of the input dimensions to the output shape.
Example::
- input shape = (2,3,4), shape = (-2,), output shape = (2,3,4)
- input shape = (2,3,4), shape = (2,-2), output shape = (2,3,4)
- input shape = (2,3,4), shape = (-2,1,1), output shape = (2,3,4,1,1)
- ``-3`` use the product of two consecutive dimensions of the input shape as the
output dimension.
Example::
- input shape = (2,3,4), shape = (-3,4), output shape = (6,4)
- input shape = (2,3,4,5), shape = (-3,-3), output shape = (6,20)
- input shape = (2,3,4), shape = (0,-3), output shape = (2,12)
- input shape = (2,3,4), shape = (-3,-2), output shape = (6,4)
- ``-4`` split one dimension of the input into two dimensions passed subsequent to
-4 in shape (can contain -1).
Example::
- input shape = (2,3,4), shape = (-4,1,2,-2), output shape =(1,2,3,4)
- input shape = (2,3,4), shape = (2,-4,-1,3,-2), output shape = (2,1,3,4)
- If the argument `reverse` is set to 1, then the special values are inferred from right
to left.
Example::
- without reverse=1, for input shape = (10,5,4), shape = (-1,0), output shape would be \
(40,5).
- with reverse=1, output shape will be (50,4).
reverse : bool, default False
If true then the special values are inferred from right to left. Only supported as
keyword argument.
Returns
-------
NDArray
An array with desired shape that shares data with this array.
Examples
--------
>>> x = mx.nd.arange(0,6).reshape(2,3)
>>> x.asnumpy()
array([[ 0., 1., 2.],
[ 3., 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,-1)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(3,2)
>>> y.asnumpy()
array([[ 0., 1.],
[ 2., 3.],
[ 4., 5.]], dtype=float32)
>>> y = x.reshape(-3)
>>> y.asnumpy()
array([ 0. 1. 2. 3. 4. 5.], dtype=float32)
>>> y[:] = -1
>>> x.asnumpy()
array([[-1., -1., -1.],
[-1., -1., -1.]], dtype=float32)
|
[
"Returns",
"a",
"**",
"view",
"**",
"of",
"this",
"array",
"with",
"a",
"new",
"shape",
"without",
"altering",
"any",
"data",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L946-L1067
|
train
|
Returns a ** view ** of this array with a new shape without altering any data.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZz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FWzvg0Vq,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(1595 - 1547) + '\157' + chr(351 - 301) + '\063' + chr(0b11001 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\x34' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + chr(0b100110 + 0o15) + '\067' + chr(0b101100 + 0o13), 63745 - 63737), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(50) + chr(2135 - 2080), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\067' + chr(264 - 212), 0b1000), ehT0Px3KOsy9(chr(1703 - 1655) + chr(111) + chr(0b110111) + chr(0b10100 + 0o35), 44840 - 44832), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(4119 - 4008) + '\062' + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b100111 + 0o110) + chr(0b11100 + 0o27) + '\065' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(2117 - 2069) + chr(111) + '\x33' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(649 - 538) + chr(0b111 + 0o53) + '\067' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x34' + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b10100 + 0o36) + chr(0b101100 + 0o13), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100101 + 0o15) + chr(2416 - 2364) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101001 + 0o10) + '\067' + chr(2161 - 2111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(49) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(93 - 45) + chr(0b1101111) + chr(427 - 377) + chr(0b110011) + '\062', 3686 - 3678), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100111 + 0o12) + chr(1508 - 1454) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(49) + chr(52) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(735 - 682) + chr(0b1000 + 0o55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100100 + 0o17) + '\061' + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(1514 - 1403) + chr(50) + '\062' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(0b1000 + 0o52) + chr(0b110111), 8), ehT0Px3KOsy9(chr(681 - 633) + chr(4066 - 3955) + '\063' + chr(52) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9970 - 9859) + chr(0b110001) + chr(53) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101101 + 0o11) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(5910 - 5799) + chr(0b110101) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + chr(51) + chr(0b110011) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(405 - 357) + '\x6f' + '\063' + '\x30' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + chr(0b1110 + 0o43) + chr(0b110110) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b11001 + 0o34) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(0b11000 + 0o36) + chr(1630 - 1581), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100010 + 0o115) + '\x31' + chr(50) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(51) + '\x32' + chr(0b111 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b11110 + 0o26) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(675 - 626) + chr(0b110110), 16246 - 16238), ehT0Px3KOsy9(chr(2059 - 2011) + '\x6f' + '\063' + '\x37' + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(1772 - 1717) + '\x37', 8), ehT0Px3KOsy9(chr(218 - 170) + '\157' + chr(49) + chr(0b1000 + 0o53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(54 - 4) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(1899 - 1788) + chr(0b101110 + 0o3), 10744 - 10736)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(9451 - 9340) + '\065' + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2'), '\x64' + chr(5672 - 5571) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(116) + '\146' + chr(45) + chr(792 - 736)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CZESqVmz1gYg(oVre8I6UXc3b, *nauYfLglTpcb, **M8EIoTs2GJXE):
if c2A0yzQpDQB3(nauYfLglTpcb) == ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1423 - 1374), 8) and PlSM16l2KDPD(nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(0b101 + 0o152) + chr(0b111 + 0o51), ord("\x08"))], (YyaZ4tpXu4lf, KNyTy8rYcwji)):
nauYfLglTpcb = nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(5339 - 5228) + chr(0b11100 + 0o24), 8)]
elif not nauYfLglTpcb:
nauYfLglTpcb = M8EIoTs2GJXE.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xca\x9e\xe7\x99'), chr(0b1100100) + chr(3180 - 3079) + '\x63' + chr(0b11110 + 0o121) + '\x64' + chr(0b1100101))(chr(0b10101 + 0o140) + chr(116) + '\146' + '\x2d' + chr(0b10010 + 0o46)))
assert nauYfLglTpcb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xca\x9e\xe7\x99\x19z\x99h\xcf\xc4\xf5\xc0Z=\xe8\x18\x17D\xad\xf5s\xce'), chr(0b110001 + 0o63) + chr(101) + chr(2723 - 2624) + '\x6f' + chr(100) + chr(4814 - 4713))(chr(0b1000010 + 0o63) + chr(8939 - 8823) + '\x66' + '\055' + chr(1427 - 1371))
if not Dl48nj1rbi23((OolUPRJhRaJd in [xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xca\x9e\xe7\x99'), chr(0b1100100) + chr(0b10101 + 0o120) + chr(0b100100 + 0o77) + chr(0b101000 + 0o107) + chr(100) + '\x65')(chr(11914 - 11797) + chr(0b1110100) + '\146' + chr(0b100000 + 0o15) + chr(1952 - 1896)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\xc7\x89\xf2\x8eJr'), '\144' + chr(5869 - 5768) + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1225 - 1180) + chr(2369 - 2313))] for OolUPRJhRaJd in M8EIoTs2GJXE)):
raise sznFqDbNBHlx(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\xcd\x8b\xb7\x89W|\x82t\xcc\x8a\xb7\xce\x1f4\xed\x18\x13I\xba\xb0~\x8eODJ\xac\xab\x16\x99\x14m\xf2\xdb\xb3\xd4\xdf\x19ub\xf9\xd2\x8b\xf2\x98\x19|\x89b\xcc\x8b\xe5\xc1Z,\xe8\x10\x14@\xac\xfec\x93OW]\xba\xe3P\x9a\x196\xa2\xc5\xe9\xda\x9e6r!\xbb\xd0\x9a\xe1\x99Kd\x89<\x95'), chr(0b1001101 + 0o27) + '\x65' + chr(1908 - 1809) + chr(6267 - 6156) + chr(9299 - 9199) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x96\x8d\xf8\xb4XD\xdfK\xcb\x81\xfd'), '\144' + chr(101) + chr(99) + chr(11836 - 11725) + '\144' + '\145')('\x75' + chr(1250 - 1134) + chr(0b1100110) + chr(0b101101) + '\070'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\x82'), '\x64' + '\145' + '\x63' + chr(0b11111 + 0o120) + chr(2992 - 2892) + chr(1764 - 1663))(chr(0b1000000 + 0o65) + '\164' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(3034 - 2978)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3\xcd\xa8\xcf\x86MA\xa2u\xca\xac\xd1'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(320 - 275) + chr(481 - 425)))([OolUPRJhRaJd for OolUPRJhRaJd in M8EIoTs2GJXE if OolUPRJhRaJd not in [xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xca\x9e\xe7\x99'), '\144' + chr(0b101011 + 0o72) + '\143' + '\x6f' + chr(9049 - 8949) + chr(2638 - 2537))(chr(166 - 49) + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\xc7\x89\xf2\x8eJr'), '\x64' + chr(101) + '\x63' + chr(11389 - 11278) + chr(4903 - 4803) + '\x65')(chr(0b1100100 + 0o21) + chr(0b1110010 + 0o2) + '\x66' + '\x2d' + chr(0b100010 + 0o26))]])))
jPHyoIWAxyI_ = M8EIoTs2GJXE.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\xc7\x89\xf2\x8eJr'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(9325 - 9225) + chr(9188 - 9087))('\165' + chr(319 - 203) + '\146' + chr(0b11101 + 0o20) + chr(0b111000)), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 8))
SxTuMqFZdzZx = v4apgis0SrXp()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1\xfa\xb1\xd3\xbdKe\x8db\xe9\x81\xe4\xcd\x1b=\xffAU'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(101))(chr(117) + chr(11090 - 10974) + '\146' + '\x2d' + chr(2892 - 2836)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xda\xab\xe2\xb1HQ\xb6\x7f\xc1\xbe\xef'), chr(539 - 439) + chr(7427 - 7326) + chr(0b1100011) + '\157' + '\x64' + '\x65')('\165' + '\x74' + chr(0b1011100 + 0o12) + chr(45) + chr(56))), c2A0yzQpDQB3(nauYfLglTpcb), eGLcYYYr5Dni(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xfd\x96\xf9\x88\x0f#'), chr(0b101111 + 0o65) + chr(3775 - 3674) + chr(99) + chr(6273 - 6162) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + '\x2d' + chr(2585 - 2529))), nauYfLglTpcb), jPHyoIWAxyI_, xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xdb\x8d\xf2\x9a'), '\x64' + '\145' + '\x63' + '\157' + chr(284 - 184) + '\145')(chr(0b1110101) + chr(9459 - 9343) + chr(0b11 + 0o143) + chr(0b101101) + chr(0b10000 + 0o50)))(SxTuMqFZdzZx)))
return GdqFjMbtKL7s(handle=SxTuMqFZdzZx, writable=xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xd0\x96\xe3\x9d[{\x89'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100 + 0o0) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b101010 + 0o74) + chr(45) + chr(0b111000))))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.broadcast_to
|
def broadcast_to(self, shape):
"""Broadcasts the input array to a new shape.
Broadcasting is only allowed on axes with size 1. The new shape cannot change
the number of dimensions.
For example, you could broadcast from shape (2, 1) to (2, 3), but not from
shape (2, 3) to (2, 3, 3).
Parameters
----------
shape : tuple of int
The shape of the desired array.
Returns
-------
NDArray
A NDArray with the desired shape that is not sharing data with this
array, even if the new shape is the same as ``self.shape``.
Examples
--------
>>> x = mx.nd.arange(0,3).reshape((1,3,1))
>>> x.asnumpy()
array([[[ 0.],
[ 1.],
[ 2.]]], dtype=float32)
>>> y = x.broadcast_to((2,3,3))
>>> y.asnumpy()
array([[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]],
<BLANKLINE>
[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]]], dtype=float32)
"""
cur_shape = self.shape
err_str = 'operands could not be broadcast together with remapped shapes' \
'[original->remapped]: {} and requested shape {}'.format(cur_shape, shape)
if len(shape) < len(cur_shape):
raise ValueError(err_str)
cur_shape = (1,) * (len(shape) - len(cur_shape)) + cur_shape
cur_shape_arr = np.array(cur_shape)
broadcasting_axes = np.nonzero(cur_shape_arr != np.array(shape))
if (cur_shape_arr[broadcasting_axes] != 1).any():
raise ValueError(err_str)
if cur_shape != self.shape:
return op.broadcast_to(self.reshape(cur_shape), shape=shape)
else:
return op.broadcast_to(self, shape=tuple(shape))
|
python
|
def broadcast_to(self, shape):
"""Broadcasts the input array to a new shape.
Broadcasting is only allowed on axes with size 1. The new shape cannot change
the number of dimensions.
For example, you could broadcast from shape (2, 1) to (2, 3), but not from
shape (2, 3) to (2, 3, 3).
Parameters
----------
shape : tuple of int
The shape of the desired array.
Returns
-------
NDArray
A NDArray with the desired shape that is not sharing data with this
array, even if the new shape is the same as ``self.shape``.
Examples
--------
>>> x = mx.nd.arange(0,3).reshape((1,3,1))
>>> x.asnumpy()
array([[[ 0.],
[ 1.],
[ 2.]]], dtype=float32)
>>> y = x.broadcast_to((2,3,3))
>>> y.asnumpy()
array([[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]],
<BLANKLINE>
[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]]], dtype=float32)
"""
cur_shape = self.shape
err_str = 'operands could not be broadcast together with remapped shapes' \
'[original->remapped]: {} and requested shape {}'.format(cur_shape, shape)
if len(shape) < len(cur_shape):
raise ValueError(err_str)
cur_shape = (1,) * (len(shape) - len(cur_shape)) + cur_shape
cur_shape_arr = np.array(cur_shape)
broadcasting_axes = np.nonzero(cur_shape_arr != np.array(shape))
if (cur_shape_arr[broadcasting_axes] != 1).any():
raise ValueError(err_str)
if cur_shape != self.shape:
return op.broadcast_to(self.reshape(cur_shape), shape=shape)
else:
return op.broadcast_to(self, shape=tuple(shape))
|
[
"def",
"broadcast_to",
"(",
"self",
",",
"shape",
")",
":",
"cur_shape",
"=",
"self",
".",
"shape",
"err_str",
"=",
"'operands could not be broadcast together with remapped shapes'",
"'[original->remapped]: {} and requested shape {}'",
".",
"format",
"(",
"cur_shape",
",",
"shape",
")",
"if",
"len",
"(",
"shape",
")",
"<",
"len",
"(",
"cur_shape",
")",
":",
"raise",
"ValueError",
"(",
"err_str",
")",
"cur_shape",
"=",
"(",
"1",
",",
")",
"*",
"(",
"len",
"(",
"shape",
")",
"-",
"len",
"(",
"cur_shape",
")",
")",
"+",
"cur_shape",
"cur_shape_arr",
"=",
"np",
".",
"array",
"(",
"cur_shape",
")",
"broadcasting_axes",
"=",
"np",
".",
"nonzero",
"(",
"cur_shape_arr",
"!=",
"np",
".",
"array",
"(",
"shape",
")",
")",
"if",
"(",
"cur_shape_arr",
"[",
"broadcasting_axes",
"]",
"!=",
"1",
")",
".",
"any",
"(",
")",
":",
"raise",
"ValueError",
"(",
"err_str",
")",
"if",
"cur_shape",
"!=",
"self",
".",
"shape",
":",
"return",
"op",
".",
"broadcast_to",
"(",
"self",
".",
"reshape",
"(",
"cur_shape",
")",
",",
"shape",
"=",
"shape",
")",
"else",
":",
"return",
"op",
".",
"broadcast_to",
"(",
"self",
",",
"shape",
"=",
"tuple",
"(",
"shape",
")",
")"
] |
Broadcasts the input array to a new shape.
Broadcasting is only allowed on axes with size 1. The new shape cannot change
the number of dimensions.
For example, you could broadcast from shape (2, 1) to (2, 3), but not from
shape (2, 3) to (2, 3, 3).
Parameters
----------
shape : tuple of int
The shape of the desired array.
Returns
-------
NDArray
A NDArray with the desired shape that is not sharing data with this
array, even if the new shape is the same as ``self.shape``.
Examples
--------
>>> x = mx.nd.arange(0,3).reshape((1,3,1))
>>> x.asnumpy()
array([[[ 0.],
[ 1.],
[ 2.]]], dtype=float32)
>>> y = x.broadcast_to((2,3,3))
>>> y.asnumpy()
array([[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]],
<BLANKLINE>
[[ 0., 0., 0.],
[ 1., 1., 1.],
[ 2., 2., 2.]]], dtype=float32)
|
[
"Broadcasts",
"the",
"input",
"array",
"to",
"a",
"new",
"shape",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1710-L1759
|
train
|
Broadcasts the input array to a new shape.
|
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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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(1536 - 1488) + chr(10110 - 9999) + chr(0b110001) + chr(0b110011) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + chr(0b10011 + 0o37) + chr(0b110100) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(361 - 313) + '\157' + chr(455 - 406) + chr(1664 - 1612) + chr(0b110010 + 0o1), 64840 - 64832), ehT0Px3KOsy9(chr(0b110000) + chr(2815 - 2704) + chr(50) + chr(52), 8017 - 8009), ehT0Px3KOsy9(chr(314 - 266) + chr(111) + chr(49) + chr(0b11010 + 0o32) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1028 - 978) + chr(49) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110100) + chr(2376 - 2323), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1100101 + 0o12) + chr(1240 - 1189) + '\064' + chr(1672 - 1623), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + chr(0b110001) + '\062' + '\x37', 59234 - 59226), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x32' + chr(0b110111 + 0o0), 0o10), ehT0Px3KOsy9('\060' + chr(8690 - 8579) + '\x33' + chr(2805 - 2751) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + '\061' + chr(0b10101 + 0o36) + chr(1913 - 1863), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b110000) + chr(0b1 + 0o63), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(1343 - 1295) + chr(1104 - 1053), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(10544 - 10433) + chr(0b110001) + chr(0b110000) + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\065' + chr(2020 - 1971), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + '\067', 27132 - 27124), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(2336 - 2282), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3276 - 3165) + chr(59 - 9) + '\061' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\x33' + chr(608 - 555), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(0b100011 + 0o22), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(1323 - 1271) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(6431 - 6320) + chr(2109 - 2058) + '\067' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(11658 - 11547) + chr(0b11111 + 0o24) + '\x37' + chr(0b100011 + 0o15), 24821 - 24813), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(2095 - 1984) + '\061' + chr(55) + chr(0b100011 + 0o21), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + chr(0b110001) + chr(0b100010 + 0o23) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10011 + 0o36) + chr(0b110000 + 0o5) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(55) + chr(50), 25838 - 25830), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b11111 + 0o26) + chr(2140 - 2091), 8), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + '\x31' + '\067' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1777 - 1726) + '\x37' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(0b110100) + '\063', 8), ehT0Px3KOsy9('\060' + chr(10262 - 10151) + chr(51) + chr(55) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\062' + '\062' + chr(0b110101), 59185 - 59177), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(49) + chr(0b11100 + 0o24), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(48) + '\060', 45168 - 45160), ehT0Px3KOsy9(chr(529 - 481) + chr(0b100001 + 0o116) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2065 - 1954) + '\061' + chr(48) + chr(0b110110), 3576 - 3568)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + chr(654 - 606), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'u'), chr(0b1010011 + 0o21) + '\145' + chr(2190 - 2091) + chr(0b1011100 + 0o23) + chr(0b11110 + 0o106) + chr(5372 - 5271))(chr(9590 - 9473) + '\x74' + chr(0b1001 + 0o135) + chr(0b100111 + 0o6) + chr(0b1100 + 0o54)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def K9nsHEva6cAR(oVre8I6UXc3b, nauYfLglTpcb):
ok72FAgMhqwH = oVre8I6UXc3b.nauYfLglTpcb
OyFE_HVWONDE = xafqLlk3kkUe(SXOLrMavuUCe(b'4\xd3\x06f\x05\xe0q\x16\xc14\xb8\x836 c+F[.\xee8=\xc2\x8e\x97\x1d\x0e\r\x1bZ\x0f\xd9\x17\x92\xf2-V\xa8`4{\xd4\n`\x0c\xaeg\x00\x8c6\xa7\x86? c6AN~\xe9.F\xcf\x8e\x91\x1b\x03\x00\x1bEV\xc7\x11\x98\xf8)R\xb0`"\x06\x99Co\x19\xaet\x0b\x85w\xa5\x93+1&6]Jj\xac.u\xc1\x8c\x9d\\\x11\x13'), chr(0b1111 + 0o125) + chr(8219 - 8118) + chr(0b1100011) + chr(0b11010 + 0o125) + '\144' + '\145')(chr(0b1001010 + 0o53) + '\x74' + '\146' + '\055' + chr(0b110010 + 0o6)).V4roHaS3Ppej(ok72FAgMhqwH, nauYfLglTpcb)
if c2A0yzQpDQB3(nauYfLglTpcb) < c2A0yzQpDQB3(ok72FAgMhqwH):
raise q1QCh3W88sgk(OyFE_HVWONDE)
ok72FAgMhqwH = (ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(2288 - 2239), 25597 - 25589),) * (c2A0yzQpDQB3(nauYfLglTpcb) - c2A0yzQpDQB3(ok72FAgMhqwH)) + ok72FAgMhqwH
BSLmbcnOmw3P = WqUC3KWvYVup.B0ePDhpqxN5n(ok72FAgMhqwH)
ZrvHUKm7TtSX = WqUC3KWvYVup.R2iTLCDMqtpu(BSLmbcnOmw3P != WqUC3KWvYVup.B0ePDhpqxN5n(nauYfLglTpcb))
if xafqLlk3kkUe(BSLmbcnOmw3P[ZrvHUKm7TtSX] != ehT0Px3KOsy9('\x30' + '\157' + chr(1639 - 1590), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xf50}P\xd6BR\x84\x15\x9e\xbb'), chr(3189 - 3089) + chr(0b1100101) + chr(0b1100011) + chr(149 - 38) + chr(0b1100100) + chr(4225 - 4124))('\165' + chr(0b1110100) + '\x66' + chr(128 - 83) + chr(337 - 281)))():
raise q1QCh3W88sgk(OyFE_HVWONDE)
if ok72FAgMhqwH != xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b"5\xc2\x16M\x02\xc2r\t\xb5'\xb4\x94"), chr(0b100010 + 0o102) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000))):
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'9\xd1\x0cu\x00\xedt\x16\x95\x08\xa3\x99'), chr(100) + chr(2683 - 2582) + chr(0b1100011) + '\x6f' + chr(3887 - 3787) + '\145')('\x75' + '\164' + chr(0b11101 + 0o111) + chr(0b101101) + chr(2105 - 2049)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b')\xc6\x10|\x05\xfep'), '\x64' + chr(101) + chr(6551 - 6452) + chr(6531 - 6420) + chr(2051 - 1951) + chr(101))(chr(0b1110101) + chr(116) + chr(466 - 364) + '\x2d' + '\070'))(ok72FAgMhqwH), shape=nauYfLglTpcb)
else:
return xafqLlk3kkUe(C8dAr6Ujq2Tn, xafqLlk3kkUe(SXOLrMavuUCe(b'9\xd1\x0cu\x00\xedt\x16\x95\x08\xa3\x99'), chr(100) + chr(0b10000 + 0o125) + chr(7631 - 7532) + '\x6f' + chr(0b10000 + 0o124) + chr(101))('\x75' + '\164' + chr(0b100010 + 0o104) + chr(0b101101) + chr(56)))(oVre8I6UXc3b, shape=KNyTy8rYcwji(nauYfLglTpcb))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.shape
|
def shape(self):
"""Tuple of array dimensions.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.shape
(4L,)
>>> y = mx.nd.zeros((2, 3, 4))
>>> y.shape
(2L, 3L, 4L)
"""
ndim = mx_int()
pdata = ctypes.POINTER(mx_int)()
check_call(_LIB.MXNDArrayGetShapeEx(
self.handle, ctypes.byref(ndim), ctypes.byref(pdata)))
if ndim.value == -1:
return None
else:
return tuple(pdata[:ndim.value])
|
python
|
def shape(self):
"""Tuple of array dimensions.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.shape
(4L,)
>>> y = mx.nd.zeros((2, 3, 4))
>>> y.shape
(2L, 3L, 4L)
"""
ndim = mx_int()
pdata = ctypes.POINTER(mx_int)()
check_call(_LIB.MXNDArrayGetShapeEx(
self.handle, ctypes.byref(ndim), ctypes.byref(pdata)))
if ndim.value == -1:
return None
else:
return tuple(pdata[:ndim.value])
|
[
"def",
"shape",
"(",
"self",
")",
":",
"ndim",
"=",
"mx_int",
"(",
")",
"pdata",
"=",
"ctypes",
".",
"POINTER",
"(",
"mx_int",
")",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetShapeEx",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"ndim",
")",
",",
"ctypes",
".",
"byref",
"(",
"pdata",
")",
")",
")",
"if",
"ndim",
".",
"value",
"==",
"-",
"1",
":",
"return",
"None",
"else",
":",
"return",
"tuple",
"(",
"pdata",
"[",
":",
"ndim",
".",
"value",
"]",
")"
] |
Tuple of array dimensions.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.shape
(4L,)
>>> y = mx.nd.zeros((2, 3, 4))
>>> y.shape
(2L, 3L, 4L)
|
[
"Tuple",
"of",
"array",
"dimensions",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1836-L1855
|
train
|
T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33u,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(0b100010 + 0o16) + chr(0b1111 + 0o140) + chr(1562 - 1513) + chr(1656 - 1604) + chr(2411 - 2359), 25678 - 25670), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(51) + chr(0b110110) + chr(1236 - 1182), 51738 - 51730), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b101111 + 0o100) + chr(0b110010) + '\x30' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(1118 - 1068) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(2104 - 2054) + chr(2568 - 2513) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1850 - 1802) + chr(0b10101 + 0o132) + chr(54) + chr(0b101100 + 0o7), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110 + 0o54) + chr(1795 - 1743) + chr(0b10011 + 0o41), 0o10), ehT0Px3KOsy9(chr(1027 - 979) + chr(111) + chr(0b11101 + 0o26) + chr(0b10000 + 0o46) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1949 - 1901) + '\x6f' + chr(0b110011) + '\064' + chr(142 - 92), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(12019 - 11908) + chr(0b110011) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\063' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(0b10110 + 0o33) + chr(0b100111 + 0o20) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(364 - 316) + '\157' + chr(50) + '\066' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(53) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(52) + '\065', 0o10), ehT0Px3KOsy9(chr(1429 - 1381) + '\157' + chr(0b1 + 0o61) + chr(0b110000 + 0o0) + chr(1922 - 1873), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1100000 + 0o17) + chr(49) + '\066' + '\x31', 44942 - 44934), ehT0Px3KOsy9('\060' + chr(11763 - 11652) + chr(49) + chr(0b110001) + chr(1762 - 1714), 40743 - 40735), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(0b10100 + 0o37) + chr(1779 - 1725) + '\x34', 20779 - 20771), ehT0Px3KOsy9(chr(426 - 378) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(0b110011) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + '\067' + chr(0b101100 + 0o6), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101110 + 0o4) + chr(0b101010 + 0o15) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(947 - 897) + '\060' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1494 - 1446) + '\157' + '\061' + '\060' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(912 - 801) + chr(647 - 594) + '\065', 32892 - 32884), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b0 + 0o62) + chr(55) + '\062', 39765 - 39757), ehT0Px3KOsy9('\x30' + '\157' + chr(2180 - 2131) + chr(0b110100) + chr(52), 8), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b10010 + 0o135) + chr(0b100100 + 0o15) + chr(0b110100) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(53) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(2147 - 2099) + chr(7811 - 7700) + chr(846 - 796) + '\x30' + chr(0b0 + 0o66), 8), ehT0Px3KOsy9(chr(501 - 453) + '\x6f' + chr(731 - 682) + chr(48) + chr(50), 38989 - 38981), ehT0Px3KOsy9(chr(0b110000) + chr(10643 - 10532) + chr(2123 - 2072) + chr(0b10110 + 0o41) + chr(201 - 152), ord("\x08")), ehT0Px3KOsy9(chr(2045 - 1997) + chr(0b10101 + 0o132) + chr(51) + chr(54) + chr(0b101100 + 0o11), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x34' + chr(0b110101), 24890 - 24882), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(562 - 514) + '\064', 0b1000), ehT0Px3KOsy9(chr(1622 - 1574) + chr(0b100011 + 0o114) + chr(0b1101 + 0o45) + '\064' + '\065', 31119 - 31111), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(49) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(2000 - 1952) + '\x6f' + chr(0b110001 + 0o5) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(994 - 946) + chr(11627 - 11516) + '\063' + '\066' + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1053 - 1002) + chr(0b110011) + chr(0b110001), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(53) + chr(81 - 33), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'J'), chr(0b111100 + 0o50) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(4156 - 4056) + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(2012 - 1967) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nauYfLglTpcb(oVre8I6UXc3b):
gompHBiTsfJT = RURiEcSdHmz7()
SEkA_nzcYx9S = RyQ4N1viUrfz.POINTER(RURiEcSdHmz7)()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b')\xae\xc8\x12\xffA\xd6\x90\x9b[\xbb\r\xe1\xc3\x84\xf1\x14\r\x8c'), chr(1198 - 1098) + chr(0b11 + 0o142) + chr(99) + chr(0b1101111) + chr(7630 - 7530) + '\x65')('\165' + chr(0b1110100) + '\146' + '\055' + chr(56)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'7\x8e\xd2#\xf3B\xe2\xab\x86f\x84\x01'), chr(100) + '\x65' + '\143' + chr(111) + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\x8f\xf43\xd8'), chr(6299 - 6199) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + '\164' + chr(0b111000 + 0o56) + '\x2d' + '\x38'))(gompHBiTsfJT), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\x8f\xf43\xd8'), chr(100) + chr(0b110011 + 0o62) + '\143' + chr(0b1101111) + chr(0b100111 + 0o75) + chr(0b1011001 + 0o14))(chr(0b1110101) + '\164' + '\x66' + chr(0b101101) + '\070'))(SEkA_nzcYx9S)))
if xafqLlk3kkUe(gompHBiTsfJT, xafqLlk3kkUe(SXOLrMavuUCe(b'5\x9b\xeb1\xe9f\xe6\xc0\xd1J\x9d3'), chr(7401 - 7301) + chr(0b10101 + 0o120) + '\143' + chr(111) + '\144' + chr(846 - 745))('\x75' + '\x74' + chr(2533 - 2431) + chr(0b101101) + chr(0b110100 + 0o4))) == -ehT0Px3KOsy9(chr(48) + chr(111) + chr(180 - 131), 0b1000):
return None
else:
return KNyTy8rYcwji(SEkA_nzcYx9S[:xafqLlk3kkUe(gompHBiTsfJT, xafqLlk3kkUe(SXOLrMavuUCe(b'5\x9b\xeb1\xe9f\xe6\xc0\xd1J\x9d3'), chr(0b1100100) + chr(10142 - 10041) + chr(0b100011 + 0o100) + chr(0b1101111) + chr(8426 - 8326) + chr(101))(chr(0b1110101) + chr(0b1011 + 0o151) + '\146' + '\x2d' + '\x38'))])
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.context
|
def context(self):
"""Device context of the array.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.context
cpu(0)
>>> type(x.context)
<class 'mxnet.context.Context'>
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> y.context
gpu(0)
"""
dev_typeid = ctypes.c_int()
dev_id = ctypes.c_int()
check_call(_LIB.MXNDArrayGetContext(
self.handle, ctypes.byref(dev_typeid), ctypes.byref(dev_id)))
return Context(Context.devtype2str[dev_typeid.value], dev_id.value)
|
python
|
def context(self):
"""Device context of the array.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.context
cpu(0)
>>> type(x.context)
<class 'mxnet.context.Context'>
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> y.context
gpu(0)
"""
dev_typeid = ctypes.c_int()
dev_id = ctypes.c_int()
check_call(_LIB.MXNDArrayGetContext(
self.handle, ctypes.byref(dev_typeid), ctypes.byref(dev_id)))
return Context(Context.devtype2str[dev_typeid.value], dev_id.value)
|
[
"def",
"context",
"(",
"self",
")",
":",
"dev_typeid",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"dev_id",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetContext",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"dev_typeid",
")",
",",
"ctypes",
".",
"byref",
"(",
"dev_id",
")",
")",
")",
"return",
"Context",
"(",
"Context",
".",
"devtype2str",
"[",
"dev_typeid",
".",
"value",
"]",
",",
"dev_id",
".",
"value",
")"
] |
Device context of the array.
Examples
--------
>>> x = mx.nd.array([1, 2, 3, 4])
>>> x.context
cpu(0)
>>> type(x.context)
<class 'mxnet.context.Context'>
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> y.context
gpu(0)
|
[
"Device",
"context",
"of",
"the",
"array",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1879-L1897
|
train
|
Return the device context of the 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,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(1715 - 1667) + chr(111) + '\x31' + chr(0b110100) + chr(281 - 229), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + '\x34', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100 + 0o55) + '\x34' + chr(235 - 181), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001 + 0o1) + '\x33' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(54) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(771 - 723) + chr(111) + '\063' + chr(0b111 + 0o57) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(12053 - 11942) + chr(0b110111) + chr(436 - 383), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o10) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4896 - 4785) + chr(0b110011) + '\060' + chr(2194 - 2142), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(312 - 263) + '\x33' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(2077 - 2028) + chr(0b10111 + 0o36) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2018 - 1967) + chr(0b110010) + chr(387 - 336), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(50) + chr(2328 - 2276), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1804 - 1753) + '\062' + chr(206 - 154), 8), ehT0Px3KOsy9(chr(195 - 147) + '\x6f' + '\x32' + chr(50) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(55) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\x33' + '\x37' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(5304 - 5193) + chr(0b110011) + chr(52) + '\x33', 0o10), ehT0Px3KOsy9(chr(2152 - 2104) + chr(0b1101111) + chr(51) + chr(52), 0b1000), ehT0Px3KOsy9(chr(630 - 582) + chr(111) + chr(0b110011) + chr(51), 0b1000), ehT0Px3KOsy9(chr(919 - 871) + chr(0b1101111) + chr(338 - 289) + '\060' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x35' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(578 - 467) + chr(51) + chr(0b101000 + 0o15) + chr(0b110110), 4048 - 4040), ehT0Px3KOsy9(chr(1091 - 1043) + chr(8018 - 7907) + chr(0b110001) + chr(0b111 + 0o51) + chr(0b10010 + 0o37), 12202 - 12194), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(0b100 + 0o55) + '\x34' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(0b110011 + 0o0) + chr(0b1011 + 0o53) + chr(0b1100 + 0o45), 0o10), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b110001) + '\x37' + chr(793 - 741), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(1422 - 1373) + chr(1411 - 1356), 65248 - 65240), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110 + 0o54) + chr(0b110000) + chr(0b1001 + 0o47), 33812 - 33804), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(52) + '\066', 61476 - 61468), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + '\061', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10110 + 0o33) + '\062' + chr(117 - 64), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110011) + '\060' + chr(1376 - 1321), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(50) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x34' + '\x34', 25788 - 25780), ehT0Px3KOsy9(chr(612 - 564) + chr(4843 - 4732) + chr(0b11101 + 0o26) + chr(0b110100) + '\066', 0b1000), ehT0Px3KOsy9(chr(2298 - 2250) + chr(0b10001 + 0o136) + chr(0b101010 + 0o11) + chr(0b1110 + 0o42) + '\x33', 29244 - 29236), ehT0Px3KOsy9(chr(369 - 321) + '\x6f' + '\062' + '\067' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(8730 - 8619) + '\063' + chr(0b110110) + chr(0b101110 + 0o6), 5390 - 5382)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(53) + '\060', 3025 - 3017)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'J'), chr(1348 - 1248) + chr(0b100001 + 0o104) + '\x63' + chr(0b110 + 0o151) + chr(2074 - 1974) + chr(101))(chr(2979 - 2862) + chr(0b1001000 + 0o54) + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def vUUG4_3aIqQC(oVre8I6UXc3b):
okr9DWaFbUlJ = RyQ4N1viUrfz.c_int()
bqUe9IDNDJ7v = RyQ4N1viUrfz.c_int()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b')<(\xdd\xf5\x84O[\xbd\x19{\x1d\x90\xbb\xba\xe4\x9c\x86\x97'), chr(0b1100100) + chr(3291 - 3190) + '\x63' + chr(0b110111 + 0o70) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b101010 + 0o112) + chr(0b1000110 + 0o40) + chr(45) + '\x38'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'7\x1c2\xec\xf9\x87{`\xa0$D\x11'), '\144' + chr(7233 - 7132) + chr(211 - 112) + chr(0b1101111) + chr(0b1100100) + chr(3795 - 3694))(chr(0b1110101) + chr(116) + '\x66' + chr(0b11 + 0o52) + '\x38')), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\x1d\x14\xfc\xd2'), '\x64' + chr(0b1000 + 0o135) + chr(0b1100011) + chr(0b111 + 0o150) + chr(4517 - 4417) + chr(0b1100101))('\x75' + '\164' + chr(102) + '\x2d' + '\x38'))(okr9DWaFbUlJ), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\x1d\x14\xfc\xd2'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(7518 - 7418) + '\x65')('\165' + chr(7113 - 6997) + chr(102) + chr(45) + '\070'))(bqUe9IDNDJ7v)))
return OQ5n2iUDAxKy(xafqLlk3kkUe(OQ5n2iUDAxKy, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\x01\x10\xed\xcd\x86X\x08\xb7*l'), '\x64' + '\145' + chr(2833 - 2734) + chr(0b1001100 + 0o43) + '\x64' + chr(6748 - 6647))(chr(0b1110101) + chr(0b1110100) + chr(0b100 + 0o142) + chr(254 - 209) + '\070'))[xafqLlk3kkUe(okr9DWaFbUlJ, xafqLlk3kkUe(SXOLrMavuUCe(b'5\t\x0b\xfe\xe3\xa3\x7f\x0b\xf7\x08]#'), chr(0b1100100) + chr(4932 - 4831) + '\143' + chr(111) + chr(2703 - 2603) + chr(0b1011101 + 0o10))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(0b101101 + 0o13)))], xafqLlk3kkUe(bqUe9IDNDJ7v, xafqLlk3kkUe(SXOLrMavuUCe(b'5\t\x0b\xfe\xe3\xa3\x7f\x0b\xf7\x08]#'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(3533 - 3431) + chr(1848 - 1803) + '\x38')))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.dtype
|
def dtype(self):
"""Data-type of the array's elements.
Returns
-------
numpy.dtype
This NDArray's data type.
Examples
--------
>>> x = mx.nd.zeros((2,3))
>>> x.dtype
<type 'numpy.float32'>
>>> y = mx.nd.zeros((2,3), dtype='int32')
>>> y.dtype
<type 'numpy.int32'>
"""
mx_dtype = ctypes.c_int()
check_call(_LIB.MXNDArrayGetDType(
self.handle, ctypes.byref(mx_dtype)))
return _DTYPE_MX_TO_NP[mx_dtype.value]
|
python
|
def dtype(self):
"""Data-type of the array's elements.
Returns
-------
numpy.dtype
This NDArray's data type.
Examples
--------
>>> x = mx.nd.zeros((2,3))
>>> x.dtype
<type 'numpy.float32'>
>>> y = mx.nd.zeros((2,3), dtype='int32')
>>> y.dtype
<type 'numpy.int32'>
"""
mx_dtype = ctypes.c_int()
check_call(_LIB.MXNDArrayGetDType(
self.handle, ctypes.byref(mx_dtype)))
return _DTYPE_MX_TO_NP[mx_dtype.value]
|
[
"def",
"dtype",
"(",
"self",
")",
":",
"mx_dtype",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetDType",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"mx_dtype",
")",
")",
")",
"return",
"_DTYPE_MX_TO_NP",
"[",
"mx_dtype",
".",
"value",
"]"
] |
Data-type of the array's elements.
Returns
-------
numpy.dtype
This NDArray's data type.
Examples
--------
>>> x = mx.nd.zeros((2,3))
>>> x.dtype
<type 'numpy.float32'>
>>> y = mx.nd.zeros((2,3), dtype='int32')
>>> y.dtype
<type 'numpy.int32'>
|
[
"Data",
"-",
"type",
"of",
"the",
"array",
"s",
"elements",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1900-L1920
|
train
|
Data - type of the array s elements.
|
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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KLkHVB2V,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(1520 - 1409) + chr(895 - 845) + chr(50) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b110011 + 0o74) + '\062' + '\x33' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(0b100001 + 0o116) + chr(1331 - 1281) + chr(0b10110 + 0o34) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b101010 + 0o6) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + '\062' + '\062' + '\064', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b111 + 0o52) + '\x36' + '\063', 116 - 108), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b10011 + 0o40) + '\061' + chr(0b11111 + 0o23), 12421 - 12413), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(55) + chr(2029 - 1975), 0o10), ehT0Px3KOsy9(chr(1537 - 1489) + chr(111) + '\061' + chr(0b110001) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(793 - 682) + '\066', 25089 - 25081), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(1497 - 1445) + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(300 - 251) + chr(2091 - 2039) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b110111) + chr(0b1 + 0o62), 15215 - 15207), ehT0Px3KOsy9(chr(93 - 45) + '\157' + chr(0b10001 + 0o41) + '\061' + '\065', 26805 - 26797), ehT0Px3KOsy9(chr(1887 - 1839) + '\157' + '\061' + chr(0b110000) + chr(0b100100 + 0o20), 32013 - 32005), ehT0Px3KOsy9(chr(0b110000) + chr(1989 - 1878) + chr(49) + chr(0b110101) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\061' + chr(0b11111 + 0o27) + chr(981 - 928), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1111 + 0o140) + chr(1363 - 1313) + '\x33' + '\x37', 15208 - 15200), ehT0Px3KOsy9('\060' + chr(6511 - 6400) + chr(0b110100), 59532 - 59524), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\065' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b1101 + 0o44) + chr(1652 - 1602), 0o10), ehT0Px3KOsy9('\060' + chr(7806 - 7695) + '\x31' + chr(0b100010 + 0o21) + chr(2521 - 2467), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(53) + chr(285 - 232), 37370 - 37362), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110111) + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(51) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(2275 - 2226) + chr(1554 - 1499) + chr(1217 - 1167), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + chr(2073 - 2021) + '\067', 0o10), ehT0Px3KOsy9(chr(1914 - 1866) + chr(111) + chr(0b110011) + chr(0b110010) + '\066', 57882 - 57874), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b110010 + 0o3) + chr(0b110101), 62903 - 62895), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(50) + chr(0b110101) + chr(2580 - 2529), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1111 + 0o43) + '\x35' + chr(0b110101), 8), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(0b101100 + 0o6) + chr(2449 - 2394), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b1101 + 0o45) + '\062' + chr(625 - 573), 8), ehT0Px3KOsy9('\060' + chr(10680 - 10569) + '\061' + chr(687 - 634) + chr(51), 8), ehT0Px3KOsy9(chr(1503 - 1455) + chr(0b1101111) + '\x31' + chr(0b110001) + chr(380 - 325), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3323 - 3212) + chr(51) + '\x35' + chr(785 - 732), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + chr(330 - 281) + chr(48) + chr(0b10110 + 0o36), 8), ehT0Px3KOsy9(chr(750 - 702) + chr(0b1100010 + 0o15) + chr(0b110011) + chr(0b101 + 0o56) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(447 - 396), 64278 - 64270)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\x30', 41822 - 41814)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xba'), chr(100) + chr(0b1100101) + chr(99) + chr(111) + chr(100) + '\x65')(chr(0b10011 + 0o142) + chr(116) + chr(0b100101 + 0o101) + chr(0b1001 + 0o44) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def jSV9IKnemH7K(oVre8I6UXc3b):
d2aABhqiplpf = RyQ4N1viUrfz.c_int()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9\xc0\xdbV\x06\xe6\x01\xab\x87\x0ec\x95#/\xf44\x0e'), chr(100) + chr(0b110 + 0o137) + '\143' + chr(0b1101111) + chr(0b110101 + 0o57) + '\145')(chr(0b1110101) + '\164' + chr(4278 - 4176) + chr(0b101001 + 0o4) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\xe0\xc1g\n\xe55\x90\x9a3\\\x99'), '\144' + chr(3307 - 3206) + '\143' + chr(0b1101111) + '\x64' + '\x65')(chr(117) + '\x74' + chr(0b111000 + 0o56) + chr(1338 - 1293) + chr(56))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xe1\xe7w!'), chr(100) + chr(8175 - 8074) + chr(6150 - 6051) + '\x6f' + chr(2470 - 2370) + '\145')(chr(0b1110101) + chr(6744 - 6628) + chr(7644 - 7542) + chr(0b1010 + 0o43) + chr(0b111000)))(d2aABhqiplpf)))
return hN8jxjkWuKLh[xafqLlk3kkUe(d2aABhqiplpf, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xf5\xf8u\x10\xc11\xfb\xcd\x1fE\xab'), chr(0b1011101 + 0o7) + '\x65' + chr(0b1100011) + '\x6f' + chr(3768 - 3668) + chr(101))('\165' + chr(116) + chr(102) + chr(1701 - 1656) + chr(0b110100 + 0o4)))]
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray._fresh_grad
|
def _fresh_grad(self):
"""Whether this array's corresponding gradient array
(registered via `autograd.mark_variables`) has been
updated by `autograd.backward` since last reset.
`_fresh_grad` need to be manually set to False
after consuming gradient (usually after updating this
array).
"""
out = ctypes.c_int()
check_call(_LIB.MXNDArrayGetGradState(self.handle, ctypes.byref(out)))
return out.value
|
python
|
def _fresh_grad(self):
"""Whether this array's corresponding gradient array
(registered via `autograd.mark_variables`) has been
updated by `autograd.backward` since last reset.
`_fresh_grad` need to be manually set to False
after consuming gradient (usually after updating this
array).
"""
out = ctypes.c_int()
check_call(_LIB.MXNDArrayGetGradState(self.handle, ctypes.byref(out)))
return out.value
|
[
"def",
"_fresh_grad",
"(",
"self",
")",
":",
"out",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArrayGetGradState",
"(",
"self",
".",
"handle",
",",
"ctypes",
".",
"byref",
"(",
"out",
")",
")",
")",
"return",
"out",
".",
"value"
] |
Whether this array's corresponding gradient array
(registered via `autograd.mark_variables`) has been
updated by `autograd.backward` since last reset.
`_fresh_grad` need to be manually set to False
after consuming gradient (usually after updating this
array).
|
[
"Whether",
"this",
"array",
"s",
"corresponding",
"gradient",
"array",
"(",
"registered",
"via",
"autograd",
".",
"mark_variables",
")",
"has",
"been",
"updated",
"by",
"autograd",
".",
"backward",
"since",
"last",
"reset",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1957-L1968
|
train
|
Whether this array has corresponding gradient array
updated by Autograd. backward.
|
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,N5Ee6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pDQB3,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' + chr(49) + '\x36' + chr(2262 - 2209), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\067' + chr(0b10101 + 0o34), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(499 - 448) + chr(1033 - 983) + chr(0b11101 + 0o31), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6955 - 6844) + '\x32' + chr(0b101100 + 0o6) + chr(52), 13413 - 13405), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110001) + '\064' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(442 - 388) + '\x30', 5306 - 5298), ehT0Px3KOsy9(chr(473 - 425) + chr(111) + chr(181 - 131) + chr(0b100101 + 0o15) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(9527 - 9416) + chr(0b100111 + 0o12) + '\064' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(150 - 99) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110010) + chr(0b101111 + 0o6), 0o10), ehT0Px3KOsy9('\x30' + chr(11664 - 11553) + chr(1204 - 1155) + '\x33' + chr(0b10100 + 0o41), 37510 - 37502), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x31' + chr(793 - 742), 15724 - 15716), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1101 + 0o47) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110 + 0o57), 0o10), ehT0Px3KOsy9(chr(2052 - 2004) + chr(6429 - 6318) + '\x32' + '\063' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(52) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(50), 0o10), ehT0Px3KOsy9(chr(2304 - 2256) + chr(0b1101111) + chr(821 - 770) + chr(1471 - 1416) + chr(0b11100 + 0o31), 0o10), ehT0Px3KOsy9(chr(48) + chr(4221 - 4110) + chr(0b110010) + '\060' + chr(50), 28187 - 28179), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(2003 - 1952) + chr(0b110100) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(0b110111) + chr(48), 0o10), ehT0Px3KOsy9(chr(155 - 107) + '\x6f' + '\x32' + '\x35' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10 + 0o57) + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(322 - 273) + chr(2175 - 2123) + chr(1516 - 1467), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b111 + 0o53) + chr(0b110111) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(5593 - 5482) + chr(0b100101 + 0o15) + chr(55) + '\065', 8), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + chr(522 - 470), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(505 - 454) + '\x36' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + '\062' + chr(0b110001) + chr(628 - 575), 0b1000), ehT0Px3KOsy9(chr(1666 - 1618) + '\157' + '\x31' + chr(0b110101) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10907 - 10796) + '\062' + '\x30' + '\x32', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111 + 0o150) + chr(0b110011) + chr(52) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010100 + 0o33) + chr(0b11011 + 0o27) + chr(0b101 + 0o55) + chr(0b100100 + 0o20), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(687 - 636), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101010 + 0o5) + chr(0b101010 + 0o10) + '\x34' + chr(0b11100 + 0o32), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2196 - 2147) + chr(1124 - 1073) + chr(325 - 271), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(0b110011) + chr(0b10111 + 0o36) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(831 - 783) + chr(10671 - 10560) + '\x33' + '\065' + '\064', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o50) + chr(0b1 + 0o57), 15537 - 15529)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'['), chr(100) + chr(101) + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(0b11110 + 0o106) + '\145')('\x75' + '\x74' + '\x66' + '\055' + chr(557 - 501)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nS2u0XjPjnNL(oVre8I6UXc3b):
UkrMp_I0RDmo = RyQ4N1viUrfz.c_int()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'8\xe1\x98\xd0"\x82\xe4\x05#\x128\xfffw\xfeC\xd9\x89\xe3\x95]'), '\144' + '\x65' + '\143' + chr(0b1101001 + 0o6) + chr(0b1100100) + chr(0b1100010 + 0o3))('\x75' + chr(116) + chr(0b1100110) + chr(1667 - 1622) + '\x38'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'&\xc1\x82\xe1.\x81\xd0>>/\x07\xf3'), chr(0b1100100) + chr(0b1100101) + chr(5156 - 5057) + '\x6f' + chr(7356 - 7256) + chr(0b1000110 + 0o37))(chr(0b1100101 + 0o20) + '\164' + '\x66' + chr(0b1111 + 0o36) + chr(0b11000 + 0o40))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xc0\xa4\xf1\x05'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1011001 + 0o26) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1001101 + 0o31) + '\x2d' + '\070'))(UkrMp_I0RDmo)))
return xafqLlk3kkUe(UkrMp_I0RDmo, xafqLlk3kkUe(SXOLrMavuUCe(b'$\xd4\xbb\xf34\xa5\xd4Ui\x03\x1e\xc1'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + chr(0b1000000 + 0o45))(chr(0b1110101) + chr(116) + chr(102) + '\055' + '\070'))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.asnumpy
|
def asnumpy(self):
"""Returns a ``numpy.ndarray`` object with value copied from this array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.asnumpy()
>>> type(y)
<type 'numpy.ndarray'>
>>> y
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> z = mx.nd.ones((2,3), dtype='int32')
>>> z.asnumpy()
array([[1, 1, 1],
[1, 1, 1]], dtype=int32)
"""
data = np.empty(self.shape, dtype=self.dtype)
check_call(_LIB.MXNDArraySyncCopyToCPU(
self.handle,
data.ctypes.data_as(ctypes.c_void_p),
ctypes.c_size_t(data.size)))
return data
|
python
|
def asnumpy(self):
"""Returns a ``numpy.ndarray`` object with value copied from this array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.asnumpy()
>>> type(y)
<type 'numpy.ndarray'>
>>> y
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> z = mx.nd.ones((2,3), dtype='int32')
>>> z.asnumpy()
array([[1, 1, 1],
[1, 1, 1]], dtype=int32)
"""
data = np.empty(self.shape, dtype=self.dtype)
check_call(_LIB.MXNDArraySyncCopyToCPU(
self.handle,
data.ctypes.data_as(ctypes.c_void_p),
ctypes.c_size_t(data.size)))
return data
|
[
"def",
"asnumpy",
"(",
"self",
")",
":",
"data",
"=",
"np",
".",
"empty",
"(",
"self",
".",
"shape",
",",
"dtype",
"=",
"self",
".",
"dtype",
")",
"check_call",
"(",
"_LIB",
".",
"MXNDArraySyncCopyToCPU",
"(",
"self",
".",
"handle",
",",
"data",
".",
"ctypes",
".",
"data_as",
"(",
"ctypes",
".",
"c_void_p",
")",
",",
"ctypes",
".",
"c_size_t",
"(",
"data",
".",
"size",
")",
")",
")",
"return",
"data"
] |
Returns a ``numpy.ndarray`` object with value copied from this array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.asnumpy()
>>> type(y)
<type 'numpy.ndarray'>
>>> y
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> z = mx.nd.ones((2,3), dtype='int32')
>>> z.asnumpy()
array([[1, 1, 1],
[1, 1, 1]], dtype=int32)
|
[
"Returns",
"a",
"numpy",
".",
"ndarray",
"object",
"with",
"value",
"copied",
"from",
"this",
"array",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L1974-L1996
|
train
|
Returns a numpy. ndarray 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,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ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,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(802 - 752) + chr(55) + chr(51), 20781 - 20773), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062', 63274 - 63266), ehT0Px3KOsy9(chr(48) + chr(111) + chr(52) + '\x35', 59096 - 59088), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b100000 + 0o27) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x36' + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + chr(1860 - 1809) + chr(53) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11101 + 0o26) + chr(0b110000 + 0o3) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101000 + 0o12) + chr(0b11101 + 0o23) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(1736 - 1688), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(1773 - 1725) + chr(0b101101 + 0o6), 11787 - 11779), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b110101) + chr(0b10 + 0o62), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111 + 0o150) + chr(1530 - 1478) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(299 - 249) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(0b100110 + 0o15) + chr(2584 - 2533) + '\065', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + '\067' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\064' + chr(51), 0b1000), ehT0Px3KOsy9(chr(1859 - 1811) + chr(0b1101111) + chr(0b110000 + 0o1) + chr(53) + chr(0b1010 + 0o52), 8), ehT0Px3KOsy9('\x30' + chr(0b1001010 + 0o45) + chr(2011 - 1962) + chr(0b110100) + chr(488 - 434), 65249 - 65241), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(666 - 615) + '\061' + '\067', 12512 - 12504), ehT0Px3KOsy9(chr(0b110000) + chr(1145 - 1034) + chr(0b11100 + 0o26) + '\x30' + chr(1074 - 1025), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + '\x37' + chr(0b10011 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x30' + chr(0b10111 + 0o32), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(827 - 772) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1695 - 1646) + chr(48) + '\061', 8), ehT0Px3KOsy9(chr(1679 - 1631) + chr(111) + chr(0b110100 + 0o2) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(7334 - 7223) + '\062' + chr(51) + '\x36', 0b1000), ehT0Px3KOsy9(chr(2272 - 2224) + chr(0b10110 + 0o131) + chr(0b101100 + 0o11) + chr(0b10 + 0o56), 1478 - 1470), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110001) + '\067', 48394 - 48386), ehT0Px3KOsy9(chr(55 - 7) + '\157' + '\062' + '\065' + chr(0b101000 + 0o12), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o45) + chr(0b110001 + 0o3), 8), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b110010) + '\062' + chr(0b101110 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b1110 + 0o46) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\063' + '\x34', 8), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + chr(0b110010) + chr(48) + '\063', 13598 - 13590), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\067' + chr(0b11000 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + '\062' + chr(0b110011), 58720 - 58712), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b110101) + chr(0b110110), 25087 - 25079), ehT0Px3KOsy9(chr(1820 - 1772) + '\157' + '\x36' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + chr(0b11011 + 0o30), 47645 - 47637)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(714 - 661) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x95'), chr(0b1100100) + chr(3648 - 3547) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(0b111010 + 0o73) + chr(0b1110100) + '\x66' + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def GhqNvTXIBSYk(oVre8I6UXc3b):
ULnjp6D6efFH = WqUC3KWvYVup.empty(oVre8I6UXc3b.nauYfLglTpcb, dtype=oVre8I6UXc3b.jSV9IKnemH7K)
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6Zk\xb8\xf5\x9a\xae\xe4q\x90\x15J\xb4\x9e\x16\xd3\x152\xa0\xc2h\x14'), '\x64' + chr(0b1011 + 0o132) + chr(99) + chr(0b1101111) + chr(0b1110 + 0o126) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(45) + '\070'))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8zq\x89\xf9\x99\x9a\xdfl\xb96\\'), '\144' + '\145' + chr(3498 - 3399) + chr(111) + chr(0b110001 + 0o63) + chr(0b101111 + 0o66))('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56))), xafqLlk3kkUe(ULnjp6D6efFH.ctypes, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfcQ\x9d\xeb\x89\xaf'), '\x64' + chr(9595 - 9494) + '\143' + chr(111) + chr(0b11111 + 0o105) + chr(101))(chr(9583 - 9466) + chr(0b1101 + 0o147) + chr(8476 - 8374) + chr(0b101101) + chr(723 - 667)))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8]S\x93\xdd\x8c\x83\xf5'), chr(0b1100100) + chr(0b1000111 + 0o36) + '\x63' + '\157' + chr(7448 - 7348) + '\x65')(chr(2672 - 2555) + '\x74' + chr(102) + chr(45) + chr(0b111000)))), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8]V\x95\xce\x8d\x83\xf1'), chr(350 - 250) + chr(0b100110 + 0o77) + chr(99) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1101000 + 0o15) + chr(0b1010101 + 0o37) + chr(0b1100110) + chr(0b11100 + 0o21) + chr(0b100110 + 0o22)))(xafqLlk3kkUe(ULnjp6D6efFH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5NF\x9f\x87\xaa\x9f\xcff\x92\x07E'), chr(0b1100100) + '\x65' + chr(99) + '\x6f' + chr(4974 - 4874) + '\145')(chr(0b1110101) + chr(0b10111 + 0o135) + '\146' + '\055' + chr(2895 - 2839))))))
return ULnjp6D6efFH
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.astype
|
def astype(self, dtype, copy=True):
"""Returns 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.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array after casting to the specified type, or
the same array if copy=False and dtype is the same as the input
array.
Examples
--------
>>> x = mx.nd.zeros((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 = empty(self.shape, ctx=self.context, dtype=dtype)
self.copyto(res)
return res
|
python
|
def astype(self, dtype, copy=True):
"""Returns 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.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array after casting to the specified type, or
the same array if copy=False and dtype is the same as the input
array.
Examples
--------
>>> x = mx.nd.zeros((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 = empty(self.shape, ctx=self.context, dtype=dtype)
self.copyto(res)
return res
|
[
"def",
"astype",
"(",
"self",
",",
"dtype",
",",
"copy",
"=",
"True",
")",
":",
"if",
"not",
"copy",
"and",
"np",
".",
"dtype",
"(",
"dtype",
")",
"==",
"self",
".",
"dtype",
":",
"return",
"self",
"res",
"=",
"empty",
"(",
"self",
".",
"shape",
",",
"ctx",
"=",
"self",
".",
"context",
",",
"dtype",
"=",
"dtype",
")",
"self",
".",
"copyto",
"(",
"res",
")",
"return",
"res"
] |
Returns 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.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array after casting to the specified type, or
the same array if copy=False and dtype is the same as the input
array.
Examples
--------
>>> x = mx.nd.zeros((2,3), dtype='float32')
>>> y = x.astype('int32')
>>> y.dtype
<type 'numpy.int32'>
|
[
"Returns",
"a",
"copy",
"of",
"the",
"array",
"after",
"casting",
"to",
"a",
"specified",
"type",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2015-L2048
|
train
|
Returns 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,OTstrxJf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4lf,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(1279 - 1231) + chr(0b1101 + 0o142) + chr(51 - 2) + chr(0b1 + 0o63) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(53) + '\063', 13836 - 13828), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + '\062' + '\067' + chr(1659 - 1605), 0b1000), ehT0Px3KOsy9(chr(1292 - 1244) + chr(9200 - 9089) + chr(2182 - 2130) + chr(446 - 396), 0b1000), ehT0Px3KOsy9(chr(2148 - 2100) + chr(111) + chr(49) + chr(53), 0b1000), ehT0Px3KOsy9(chr(1795 - 1747) + chr(0b1101111) + '\x33' + '\x30' + '\067', 0o10), ehT0Px3KOsy9(chr(1508 - 1460) + chr(0b1001111 + 0o40) + '\063' + chr(0b110100), 7124 - 7116), ehT0Px3KOsy9('\x30' + chr(111) + chr(1839 - 1788) + chr(857 - 806) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + chr(0b110011) + '\065' + chr(0b100111 + 0o11), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11011 + 0o31) + chr(54), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110 + 0o53) + '\067' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x36' + chr(203 - 148), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100100 + 0o113) + chr(51) + chr(54) + chr(0b101010 + 0o6), 0o10), ehT0Px3KOsy9(chr(374 - 326) + '\x6f' + '\x32' + '\x33' + '\067', 14583 - 14575), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o20) + chr(0b110100), 65322 - 65314), ehT0Px3KOsy9('\060' + chr(7490 - 7379) + chr(0b110001) + chr(0b10000 + 0o40) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2426 - 2376) + chr(0b1011 + 0o54) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110000 + 0o2) + chr(0b110101) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(9445 - 9334) + '\063' + '\066', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110010) + chr(0b11011 + 0o33) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + chr(1577 - 1528) + chr(0b110001) + chr(0b101111 + 0o5), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(53) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + chr(1202 - 1152) + chr(0b101000 + 0o14), 0b1000), ehT0Px3KOsy9(chr(422 - 374) + '\x6f' + chr(51) + chr(53) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(497 - 446) + chr(51), 4234 - 4226), ehT0Px3KOsy9(chr(581 - 533) + '\157' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + chr(0b110101) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + chr(51) + '\x30', 11520 - 11512), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(11618 - 11507) + chr(49) + chr(1862 - 1809) + chr(0b110000), 41546 - 41538), ehT0Px3KOsy9(chr(0b110000) + chr(3249 - 3138) + chr(51) + chr(50) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1419 - 1371) + chr(4803 - 4692) + chr(0b110010) + '\064' + chr(0b110000), 46061 - 46053), ehT0Px3KOsy9(chr(2089 - 2041) + '\157' + '\x36' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x30' + chr(0b10001 + 0o40), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\066' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b110010) + '\x36', 0b1000), ehT0Px3KOsy9(chr(1700 - 1652) + chr(0b1101111) + chr(1990 - 1940) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(0b101 + 0o53) + chr(0b11000 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + '\063' + chr(0b11010 + 0o34) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b11111 + 0o27) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\x32' + chr(53), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1190 - 1142) + chr(111) + chr(0b110101) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'J'), chr(0b1010111 + 0o15) + chr(101) + '\143' + chr(111) + chr(100) + chr(0b1101 + 0o130))(chr(0b110011 + 0o102) + chr(0b1110100) + '\146' + '\x2d' + chr(600 - 544)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def XF6WakKHWOo5(oVre8I6UXc3b, jSV9IKnemH7K, igThHS4jwVsa=ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061', ord("\x08"))):
if not igThHS4jwVsa and xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e8\xe8\x1bD\x8cr\xbc\x85nO|'), chr(0b1100100) + '\x65' + chr(0b111000 + 0o53) + chr(111) + chr(9750 - 9650) + chr(0b1001010 + 0o33))(chr(117) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(712 - 656)))(jSV9IKnemH7K) == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e8\xe8\x1bD\x8cr\xbc\x85nO|'), '\x64' + chr(3334 - 3233) + '\143' + chr(10366 - 10255) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(424 - 379) + chr(56))):
return oVre8I6UXc3b
MsbwfslwLjRO = QxT4AUiPWdm4(oVre8I6UXc3b.nauYfLglTpcb, ctx=oVre8I6UXc3b.context, dtype=jSV9IKnemH7K)
xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\x04\xce[y\xa8'), chr(166 - 66) + '\145' + chr(0b111000 + 0o53) + chr(111) + chr(100) + chr(105 - 4))('\165' + chr(0b111 + 0o155) + chr(0b111010 + 0o54) + '\055' + '\x38'))(MsbwfslwLjRO)
return MsbwfslwLjRO
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.copyto
|
def copyto(self, other):
"""Copies the value of this array to another array.
If ``other`` is a ``NDArray`` 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 ``NDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or Context
The destination array or context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray``, then the return value
and ``other`` will point to the same ``NDArray``.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> z = x.copyto(y)
>>> z is y
True
>>> y.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.copyto(mx.gpu(0))
<NDArray 2x3 @gpu(0)>
"""
if isinstance(other, NDArray):
if other.handle is self.handle:
warnings.warn('You are attempting to copy an array to itself', RuntimeWarning)
return False
return _internal._copyto(self, out=other)
elif isinstance(other, Context):
hret = NDArray(_new_alloc_handle(self.shape, other, True, self.dtype))
return _internal._copyto(self, out=hret)
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`` 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 ``NDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or Context
The destination array or context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray``, then the return value
and ``other`` will point to the same ``NDArray``.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> z = x.copyto(y)
>>> z is y
True
>>> y.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.copyto(mx.gpu(0))
<NDArray 2x3 @gpu(0)>
"""
if isinstance(other, NDArray):
if other.handle is self.handle:
warnings.warn('You are attempting to copy an array to itself', RuntimeWarning)
return False
return _internal._copyto(self, out=other)
elif isinstance(other, Context):
hret = NDArray(_new_alloc_handle(self.shape, other, True, self.dtype))
return _internal._copyto(self, out=hret)
else:
raise TypeError('copyto does not support type ' + str(type(other)))
|
[
"def",
"copyto",
"(",
"self",
",",
"other",
")",
":",
"if",
"isinstance",
"(",
"other",
",",
"NDArray",
")",
":",
"if",
"other",
".",
"handle",
"is",
"self",
".",
"handle",
":",
"warnings",
".",
"warn",
"(",
"'You are attempting to copy an array to itself'",
",",
"RuntimeWarning",
")",
"return",
"False",
"return",
"_internal",
".",
"_copyto",
"(",
"self",
",",
"out",
"=",
"other",
")",
"elif",
"isinstance",
"(",
"other",
",",
"Context",
")",
":",
"hret",
"=",
"NDArray",
"(",
"_new_alloc_handle",
"(",
"self",
".",
"shape",
",",
"other",
",",
"True",
",",
"self",
".",
"dtype",
")",
")",
"return",
"_internal",
".",
"_copyto",
"(",
"self",
",",
"out",
"=",
"hret",
")",
"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`` 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 ``NDArray`` will be first created on
the target context, and the value of ``self`` is copied.
Parameters
----------
other : NDArray or Context
The destination array or context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The copied array. If ``other`` is an ``NDArray``, then the return value
and ``other`` will point to the same ``NDArray``.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = mx.nd.zeros((2,3), mx.gpu(0))
>>> z = x.copyto(y)
>>> z is y
True
>>> y.asnumpy()
array([[ 1., 1., 1.],
[ 1., 1., 1.]], dtype=float32)
>>> y.copyto(mx.gpu(0))
<NDArray 2x3 @gpu(0)>
|
[
"Copies",
"the",
"value",
"of",
"this",
"array",
"to",
"another",
"array",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2050-L2094
|
train
|
Copies the value of this array to another array.
|
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('\060' + '\157' + chr(50) + chr(0b110100) + chr(0b1101 + 0o51), 49334 - 49326), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\x33' + chr(2105 - 2053), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(71 - 21) + chr(0b110110) + chr(1360 - 1310), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b110110), 22934 - 22926), ehT0Px3KOsy9(chr(1308 - 1260) + '\157' + '\061' + chr(2505 - 2450) + chr(403 - 348), 18101 - 18093), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101111 + 0o4) + chr(0b11011 + 0o25) + chr(1621 - 1570), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111 + 0o0) + chr(1308 - 1258) + chr(0b110100 + 0o2), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b101111 + 0o2) + chr(0b110101) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(4738 - 4627) + chr(1859 - 1810) + chr(50) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1 + 0o61) + chr(0b110000) + chr(2784 - 2731), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2230 - 2181) + chr(0b10100 + 0o36) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\064' + chr(50), 32071 - 32063), ehT0Px3KOsy9(chr(1155 - 1107) + '\157' + chr(0b110111) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x37' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(545 - 434) + chr(50) + '\x37' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(1256 - 1206) + '\x31' + chr(48), 48658 - 48650), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\066' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010101 + 0o32) + '\061' + chr(0b11 + 0o57) + chr(542 - 487), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(1245 - 1195) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + chr(0b10001 + 0o41) + chr(49) + chr(0b110011), 46402 - 46394), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1072 - 1023) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + '\x33' + chr(293 - 241) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1000 + 0o53) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x34', 62164 - 62156), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110110) + '\066', 14070 - 14062), ehT0Px3KOsy9(chr(1443 - 1395) + '\x6f' + '\x37' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2275 - 2224) + chr(49), 13674 - 13666), ehT0Px3KOsy9(chr(1636 - 1588) + chr(0b1101111) + '\063' + '\067' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9253 - 9142) + '\061' + '\x36' + '\x31', 52191 - 52183), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(776 - 723) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4526 - 4415) + chr(0b110100) + chr(2986 - 2931), 63637 - 63629), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(52) + chr(0b11100 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(51) + chr(0b11010 + 0o32) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(4503 - 4392) + '\x31' + chr(890 - 841) + '\x37', 0o10), ehT0Px3KOsy9(chr(278 - 230) + chr(0b1101111) + '\x33' + chr(0b110011) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001011 + 0o44) + chr(0b110001) + '\062' + '\064', 0o10), ehT0Px3KOsy9(chr(665 - 617) + chr(11032 - 10921) + chr(2200 - 2150) + chr(54) + chr(0b101001 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10683 - 10572) + chr(55) + '\x35', 58116 - 58108), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b110101) + chr(48), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + chr(53) + chr(1885 - 1837), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x88'), chr(8750 - 8650) + '\145' + chr(0b1100011) + chr(0b1000001 + 0o56) + chr(100) + chr(0b1100101))(chr(0b1010101 + 0o40) + '\164' + chr(102) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CwJbtgNJtD2J(oVre8I6UXc3b, KK0ERS7DqYrY):
if PlSM16l2KDPD(KK0ERS7DqYrY, GdqFjMbtKL7s):
if xafqLlk3kkUe(KK0ERS7DqYrY, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xe4\xe6c2\xb2P71\xff\t\x9a'), chr(0b1100100) + chr(5264 - 5163) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(0b1010011 + 0o23) + '\055' + chr(0b1001 + 0o57))) is xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xe4\xe6c2\xb2P71\xff\t\x9a'), chr(0b101011 + 0o71) + chr(7731 - 7630) + '\x63' + chr(0b1011 + 0o144) + '\144' + chr(6878 - 6777))(chr(0b1010000 + 0o45) + '\x74' + '\x66' + chr(0b100 + 0o51) + chr(71 - 15))):
xafqLlk3kkUe(fJoTPf8D_opC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8\xd8\xf7x1\x81w\x0f\x13\xcb\x18\x8f'), chr(3087 - 2987) + chr(101) + chr(3289 - 3190) + chr(111) + chr(0b1100100) + chr(1033 - 932))(chr(0b1110101) + chr(0b1110001 + 0o3) + chr(102) + chr(0b10011 + 0o32) + chr(1385 - 1329)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xff\xf3\xc76\x1e\xb1sM4\xf1'\x87S\xce\xcc\xe1\x1d0\xf0\xff\xe3\xc3}{\x06A9\x9e]QIU\x13\x866\xf8 \xdb\x1dA\xd2\xef\xd7z\x19"), '\x64' + '\145' + chr(0b1010110 + 0o15) + chr(0b110010 + 0o75) + chr(2559 - 2459) + chr(0b100110 + 0o77))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + chr(0b111000)), eh4BeXwijHpf)
return ehT0Px3KOsy9('\x30' + '\157' + chr(48), ord("\x08"))
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xff\xddf\x06\xb7y'), chr(100) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(102) + chr(300 - 255) + chr(56)))(oVre8I6UXc3b, out=KK0ERS7DqYrY)
elif PlSM16l2KDPD(KK0ERS7DqYrY, OQ5n2iUDAxKy):
kw3o0ELEsEUJ = GdqFjMbtKL7s(dH4mZSHhFjwi(oVre8I6UXc3b.nauYfLglTpcb, KK0ERS7DqYrY, ehT0Px3KOsy9('\060' + chr(111) + chr(749 - 700), 48983 - 48975), oVre8I6UXc3b.jSV9IKnemH7K))
return xafqLlk3kkUe(oAHvnwj9EBu3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xff\xddf\x06\xb7y'), chr(0b1100100) + chr(8965 - 8864) + '\x63' + '\x6f' + chr(0b10001 + 0o123) + chr(101))('\165' + chr(0b111100 + 0o70) + '\146' + chr(0b101101) + chr(56)))(oVre8I6UXc3b, out=kw3o0ELEsEUJ)
else:
raise sznFqDbNBHlx(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xf3\xc2o\x0b\xac6\t:\xe0 \xc2P\xd1\xcc\xa8\x00"\xa0\xfb\xe3\x91j4\x02Ai\x9a\x13'), chr(100) + chr(4011 - 3910) + chr(7811 - 7712) + chr(0b1101111) + chr(0b1100100) + chr(9076 - 8975))(chr(10616 - 10499) + chr(5180 - 5064) + chr(0b1010111 + 0o17) + chr(604 - 559) + '\070') + M8_cKLkHVB2V(wmQmyeWBmUpv(KK0ERS7DqYrY)))
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.as_in_context
|
def as_in_context(self, context):
"""Returns an array on the target device with the same value as this array.
If the target context is the same as ``self.context``, then ``self`` is
returned. Otherwise, a copy is made.
Parameters
----------
context : Context
The target context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The target array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.as_in_context(mx.cpu())
>>> y is x
True
>>> z = x.as_in_context(mx.gpu(0))
>>> z is x
False
"""
if self.context == context:
return self
return self.copyto(context)
|
python
|
def as_in_context(self, context):
"""Returns an array on the target device with the same value as this array.
If the target context is the same as ``self.context``, then ``self`` is
returned. Otherwise, a copy is made.
Parameters
----------
context : Context
The target context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The target array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.as_in_context(mx.cpu())
>>> y is x
True
>>> z = x.as_in_context(mx.gpu(0))
>>> z is x
False
"""
if self.context == context:
return self
return self.copyto(context)
|
[
"def",
"as_in_context",
"(",
"self",
",",
"context",
")",
":",
"if",
"self",
".",
"context",
"==",
"context",
":",
"return",
"self",
"return",
"self",
".",
"copyto",
"(",
"context",
")"
] |
Returns an array on the target device with the same value as this array.
If the target context is the same as ``self.context``, then ``self`` is
returned. Otherwise, a copy is made.
Parameters
----------
context : Context
The target context.
Returns
-------
NDArray, CSRNDArray or RowSparseNDArray
The target array.
Examples
--------
>>> x = mx.nd.ones((2,3))
>>> y = x.as_in_context(mx.cpu())
>>> y is x
True
>>> z = x.as_in_context(mx.gpu(0))
>>> z is x
False
|
[
"Returns",
"an",
"array",
"on",
"the",
"target",
"device",
"with",
"the",
"same",
"value",
"as",
"this",
"array",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2114-L2143
|
train
|
Returns an array on the target device with the same value as 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,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPv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9Ie6,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(1433 - 1383) + '\064' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b11101 + 0o30) + '\060', 59932 - 59924), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(238 - 189) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110110) + chr(54), 29890 - 29882), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\060' + chr(0b100101 + 0o20), 34180 - 34172), ehT0Px3KOsy9(chr(0b110000) + chr(4820 - 4709) + chr(55) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(49) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x31' + chr(50), 48866 - 48858), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(5015 - 4904) + chr(705 - 655) + '\x32' + chr(242 - 192), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(474 - 424) + chr(49) + chr(917 - 868), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(2080 - 2030) + '\066' + chr(0b110011), 62101 - 62093), ehT0Px3KOsy9(chr(1942 - 1894) + '\157' + chr(50) + chr(50) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1617 - 1569) + '\x6f' + chr(50) + '\x30' + chr(0b110000), 1486 - 1478), ehT0Px3KOsy9(chr(1141 - 1093) + '\157' + '\x33' + '\067' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(1367 - 1319), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b100011 + 0o24) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(594 - 544) + chr(0b110101 + 0o2) + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(53) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b10001 + 0o40) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b110011) + chr(50) + chr(0b110111), 27864 - 27856), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101100 + 0o103) + chr(0b100010 + 0o24) + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(50), 36234 - 36226), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + chr(49) + chr(49) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1697 - 1648) + chr(0b11100 + 0o26) + '\064', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110001 + 0o0) + '\x30', 8), ehT0Px3KOsy9(chr(403 - 355) + chr(0b1101111) + '\061' + chr(52) + chr(1428 - 1380), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1111 + 0o43) + chr(397 - 348) + chr(855 - 807), 51331 - 51323), ehT0Px3KOsy9(chr(632 - 584) + chr(0b1001111 + 0o40) + chr(0b110001) + chr(52) + chr(2136 - 2085), 60282 - 60274), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b110110) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\x37' + chr(54), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\064' + '\x31', 39202 - 39194), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x33' + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(54) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3626 - 3515) + chr(49) + chr(0b101011 + 0o10) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(3201 - 3090) + chr(49) + chr(0b110010) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b11001 + 0o35) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b110001) + '\064' + chr(0b101111 + 0o4), 8), ehT0Px3KOsy9('\060' + chr(2851 - 2740) + chr(0b1 + 0o60) + '\067' + chr(0b110010), 29192 - 29184), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b110011) + chr(0b110011), 31600 - 31592)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\065' + chr(1510 - 1462), 42294 - 42286)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d'), chr(100) + '\x65' + chr(0b111 + 0o134) + chr(0b1101111) + chr(6222 - 6122) + chr(0b1100101))(chr(0b101110 + 0o107) + chr(116) + chr(9997 - 9895) + chr(1638 - 1593) + chr(0b11010 + 0o36)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def He1zAzNl5YrU(oVre8I6UXc3b, vUUG4_3aIqQC):
if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\x07 B C\xfd'), '\x64' + chr(0b1100101) + chr(9569 - 9470) + chr(10595 - 10484) + '\x64' + chr(0b1100101))(chr(117) + chr(0b110110 + 0o76) + chr(102) + '\x2d' + chr(0b111000))) == vUUG4_3aIqQC:
return oVre8I6UXc3b
return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\x07>O1T'), '\144' + chr(0b1001011 + 0o32) + chr(0b1010110 + 0o15) + chr(111) + '\x64' + chr(101))('\165' + chr(116) + chr(102) + chr(0b101101) + '\070'))(vUUG4_3aIqQC)
|
apache/incubator-mxnet
|
python/mxnet/ndarray/ndarray.py
|
NDArray.backward
|
def backward(self, out_grad=None, retain_graph=False, train_mode=True):
"""Compute the gradients of this NDArray w.r.t variables.
Parameters
----------
out_grad : NDArray, optional
Gradient with respect to head.
retain_graph : bool, optional
Whether to retain the computaion graph for another backward
pass on the same graph. By default the computaion history
is cleared.
train_mode : bool, optional
Whether to compute gradient for training or inference.
"""
if out_grad is None:
ograd_handles = [NDArrayHandle(0)]
else:
ograd_handles = [out_grad.handle]
check_call(_LIB.MXAutogradBackwardEx(
1, c_handle_array([self]),
c_array(NDArrayHandle, ograd_handles),
0,
ctypes.c_void_p(0),
ctypes.c_int(retain_graph),
ctypes.c_int(0),
ctypes.c_int(train_mode),
ctypes.c_void_p(0),
ctypes.c_void_p(0)))
|
python
|
def backward(self, out_grad=None, retain_graph=False, train_mode=True):
"""Compute the gradients of this NDArray w.r.t variables.
Parameters
----------
out_grad : NDArray, optional
Gradient with respect to head.
retain_graph : bool, optional
Whether to retain the computaion graph for another backward
pass on the same graph. By default the computaion history
is cleared.
train_mode : bool, optional
Whether to compute gradient for training or inference.
"""
if out_grad is None:
ograd_handles = [NDArrayHandle(0)]
else:
ograd_handles = [out_grad.handle]
check_call(_LIB.MXAutogradBackwardEx(
1, c_handle_array([self]),
c_array(NDArrayHandle, ograd_handles),
0,
ctypes.c_void_p(0),
ctypes.c_int(retain_graph),
ctypes.c_int(0),
ctypes.c_int(train_mode),
ctypes.c_void_p(0),
ctypes.c_void_p(0)))
|
[
"def",
"backward",
"(",
"self",
",",
"out_grad",
"=",
"None",
",",
"retain_graph",
"=",
"False",
",",
"train_mode",
"=",
"True",
")",
":",
"if",
"out_grad",
"is",
"None",
":",
"ograd_handles",
"=",
"[",
"NDArrayHandle",
"(",
"0",
")",
"]",
"else",
":",
"ograd_handles",
"=",
"[",
"out_grad",
".",
"handle",
"]",
"check_call",
"(",
"_LIB",
".",
"MXAutogradBackwardEx",
"(",
"1",
",",
"c_handle_array",
"(",
"[",
"self",
"]",
")",
",",
"c_array",
"(",
"NDArrayHandle",
",",
"ograd_handles",
")",
",",
"0",
",",
"ctypes",
".",
"c_void_p",
"(",
"0",
")",
",",
"ctypes",
".",
"c_int",
"(",
"retain_graph",
")",
",",
"ctypes",
".",
"c_int",
"(",
"0",
")",
",",
"ctypes",
".",
"c_int",
"(",
"train_mode",
")",
",",
"ctypes",
".",
"c_void_p",
"(",
"0",
")",
",",
"ctypes",
".",
"c_void_p",
"(",
"0",
")",
")",
")"
] |
Compute the gradients of this NDArray w.r.t variables.
Parameters
----------
out_grad : NDArray, optional
Gradient with respect to head.
retain_graph : bool, optional
Whether to retain the computaion graph for another backward
pass on the same graph. By default the computaion history
is cleared.
train_mode : bool, optional
Whether to compute gradient for training or inference.
|
[
"Compute",
"the",
"gradients",
"of",
"this",
"NDArray",
"w",
".",
"r",
".",
"t",
"variables",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/ndarray/ndarray.py#L2187-L2215
|
train
|
Compute the gradients of this NDArray w. r. t variables.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsT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ssyYhLtLC,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(0b11100 + 0o24) + '\157' + chr(0b10011 + 0o37) + chr(55) + chr(0b10011 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(0b110010) + '\065', 20999 - 20991), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001001 + 0o46) + chr(284 - 235) + '\x35' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\063' + '\x33', 56413 - 56405), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1939 - 1891), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(0b110001) + chr(0b10000 + 0o44) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\062' + chr(1656 - 1602), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101001 + 0o6) + '\062' + '\060' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(804 - 693) + '\x31' + '\062' + chr(1737 - 1688), 19421 - 19413), ehT0Px3KOsy9(chr(2066 - 2018) + chr(6054 - 5943) + chr(0b110011) + '\x32' + chr(54), 0b1000), ehT0Px3KOsy9(chr(1768 - 1720) + chr(11648 - 11537) + chr(0b110011) + chr(0b10111 + 0o32) + '\x30', 62571 - 62563), ehT0Px3KOsy9(chr(48) + chr(1315 - 1204) + '\x32' + '\x30' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100100 + 0o15) + chr(50) + chr(0b0 + 0o66), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(456 - 405) + '\066' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(53) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b1101 + 0o52) + chr(0b110110), 31269 - 31261), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b11110 + 0o26) + chr(2071 - 2021), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x36' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011111 + 0o20) + '\x37' + '\x32', 35456 - 35448), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1113 - 1062) + '\064' + chr(828 - 780), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b110110) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + '\062' + chr(54) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(562 - 513) + chr(50) + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + '\x31' + chr(0b110111) + chr(2445 - 2392), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10001 + 0o42) + '\061' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\x6f' + chr(1732 - 1682) + '\065' + chr(55), 34838 - 34830), ehT0Px3KOsy9(chr(1633 - 1585) + '\x6f' + chr(0b1001 + 0o52) + chr(48) + '\x34', 1565 - 1557), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110010) + '\064', 39064 - 39056), ehT0Px3KOsy9('\060' + chr(111) + chr(1610 - 1559) + chr(50) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4836 - 4725) + '\063' + chr(50) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1175 - 1127) + '\x6f' + '\x31' + '\x35' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1345 - 1234) + chr(0b110010) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1010 + 0o47) + '\066' + chr(658 - 609), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1762 - 1712) + chr(0b110011) + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(162 - 110), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110 + 0o60) + '\064', 59544 - 59536), ehT0Px3KOsy9('\x30' + '\x6f' + chr(667 - 616) + '\061' + chr(0b110011), 19097 - 19089), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(51) + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10010 + 0o37) + chr(0b11010 + 0o31) + '\x31', 301 - 293)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + '\x35' + chr(733 - 685), 60912 - 60904)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x97'), '\144' + '\x65' + '\x63' + '\x6f' + '\144' + chr(3883 - 3782))(chr(0b0 + 0o165) + chr(116) + '\x66' + '\x2d' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def NkF4FoEFSIEn(oVre8I6UXc3b, nFqzwPi_aLY5=None, ippj9U3j8a7A=ehT0Px3KOsy9(chr(999 - 951) + chr(0b11100 + 0o123) + '\x30', 8), X7qmli_1P6i0=ehT0Px3KOsy9(chr(142 - 94) + chr(111) + chr(49), 0b1000)):
if nFqzwPi_aLY5 is None:
M1Vam7vmMEcy = [v4apgis0SrXp(ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1153 - 1105), 8))]
else:
M1Vam7vmMEcy = [nFqzwPi_aLY5.SxTuMqFZdzZx]
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4MR\x1a/o\x07d\xe25\x94\xa9\xe1=\x85\x0e\xcc\x86uB'), chr(0b110100 + 0o60) + '\145' + '\x63' + '\x6f' + chr(7150 - 7050) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(45) + '\x38'))(ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10111 + 0o32), 8), a5DvL4JgWdMi([oVre8I6UXc3b]), eGLcYYYr5Dni(v4apgis0SrXp, M1Vam7vmMEcy), ehT0Px3KOsy9('\x30' + '\x6f' + '\x30', 8), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJe\x002d?f'), chr(0b1100100) + '\145' + chr(0b110000 + 0o63) + chr(0b101000 + 0o107) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + chr(947 - 902) + '\x38'))(ehT0Px3KOsy9(chr(1819 - 1771) + '\x6f' + chr(230 - 182), 8)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJz\x01/'), '\x64' + chr(5839 - 5738) + chr(0b100011 + 0o100) + chr(0b1101111) + chr(0b1100100) + chr(0b111011 + 0o52))(chr(0b110010 + 0o103) + chr(0b1011101 + 0o27) + chr(8971 - 8869) + '\x2d' + '\070'))(ippj9U3j8a7A), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJz\x01/'), chr(9444 - 9344) + chr(0b10 + 0o143) + chr(3400 - 3301) + '\157' + chr(9966 - 9866) + chr(0b101010 + 0o73))('\165' + chr(6294 - 6178) + chr(0b1100110) + '\x2d' + chr(56)))(ehT0Px3KOsy9(chr(1149 - 1101) + '\157' + chr(0b110000), 8)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJz\x01/'), '\x64' + chr(101) + chr(0b1000000 + 0o43) + '\157' + chr(8733 - 8633) + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(1297 - 1241)))(X7qmli_1P6i0), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJe\x002d?f'), chr(0b10000 + 0o124) + chr(7945 - 7844) + chr(99) + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(389 - 344) + chr(0b1 + 0o67)))(ehT0Px3KOsy9('\x30' + chr(4158 - 4047) + chr(48), 8)), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaJe\x002d?f'), chr(0b0 + 0o144) + '\145' + '\143' + '\157' + chr(100) + '\x65')(chr(117) + chr(116) + chr(0b1011110 + 0o10) + chr(45) + '\x38'))(ehT0Px3KOsy9(chr(1482 - 1434) + chr(0b1101111) + '\x30', 8))))
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/align.py
|
Align.build
|
def build(self, align_path):
"""
Build the align array
"""
file = open(align_path, 'r')
lines = file.readlines()
file.close()
# words: list([op, ed, word])
words = []
for line in lines:
_op, _ed, word = line.strip().split(' ')
if word not in Align.skip_list:
words.append((int(_op), int(_ed), word))
self.words = words
self.n_words = len(words)
self.sentence_str = " ".join([w[2] for w in self.words])
self.sentence_length = len(self.sentence_str)
|
python
|
def build(self, align_path):
"""
Build the align array
"""
file = open(align_path, 'r')
lines = file.readlines()
file.close()
# words: list([op, ed, word])
words = []
for line in lines:
_op, _ed, word = line.strip().split(' ')
if word not in Align.skip_list:
words.append((int(_op), int(_ed), word))
self.words = words
self.n_words = len(words)
self.sentence_str = " ".join([w[2] for w in self.words])
self.sentence_length = len(self.sentence_str)
|
[
"def",
"build",
"(",
"self",
",",
"align_path",
")",
":",
"file",
"=",
"open",
"(",
"align_path",
",",
"'r'",
")",
"lines",
"=",
"file",
".",
"readlines",
"(",
")",
"file",
".",
"close",
"(",
")",
"# words: list([op, ed, word])",
"words",
"=",
"[",
"]",
"for",
"line",
"in",
"lines",
":",
"_op",
",",
"_ed",
",",
"word",
"=",
"line",
".",
"strip",
"(",
")",
".",
"split",
"(",
"' '",
")",
"if",
"word",
"not",
"in",
"Align",
".",
"skip_list",
":",
"words",
".",
"append",
"(",
"(",
"int",
"(",
"_op",
")",
",",
"int",
"(",
"_ed",
")",
",",
"word",
")",
")",
"self",
".",
"words",
"=",
"words",
"self",
".",
"n_words",
"=",
"len",
"(",
"words",
")",
"self",
".",
"sentence_str",
"=",
"\" \"",
".",
"join",
"(",
"[",
"w",
"[",
"2",
"]",
"for",
"w",
"in",
"self",
".",
"words",
"]",
")",
"self",
".",
"sentence_length",
"=",
"len",
"(",
"self",
".",
"sentence_str",
")"
] |
Build the align array
|
[
"Build",
"the",
"align",
"array"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.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5VS3dE_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(0b10111 + 0o34) + chr(0b110011) + chr(0b11100 + 0o31), 36054 - 36046), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001010 + 0o45) + chr(1831 - 1782) + chr(0b111 + 0o51) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + chr(50) + chr(0b110001) + chr(53), 48426 - 48418), ehT0Px3KOsy9('\060' + chr(111) + '\064' + chr(0b101 + 0o60), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1111 + 0o42) + '\x35' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1000100 + 0o53) + chr(0b11000 + 0o33) + '\x31' + chr(53), 15207 - 15199), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11111 + 0o120) + '\x32' + chr(528 - 474) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(2160 - 2107), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + '\065', 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + '\062' + chr(0b101111 + 0o5) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b110111 + 0o0) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1564 - 1516) + chr(111) + chr(2492 - 2442), 64485 - 64477), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\066' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(2160 - 2049) + '\x32' + '\x32' + chr(0b110010), 15972 - 15964), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + '\062' + chr(409 - 355) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + '\x31' + '\x32' + chr(0b10111 + 0o40), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100001 + 0o116) + chr(1010 - 961) + '\x34' + chr(0b10001 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(2543 - 2490) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b10010 + 0o135) + chr(0b110001) + '\x34' + chr(0b1110 + 0o44), 8), ehT0Px3KOsy9('\x30' + chr(0b1000011 + 0o54) + '\x33' + chr(0b10000 + 0o46) + chr(0b100101 + 0o21), 0b1000), ehT0Px3KOsy9(chr(1815 - 1767) + '\157' + chr(0b110011) + chr(562 - 508) + chr(406 - 355), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b10101 + 0o132) + chr(0b110001) + '\066' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(3337 - 3226) + chr(0b100011 + 0o20) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10358 - 10247) + chr(666 - 617) + chr(0b110101) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(55), 58138 - 58130), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110000) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b110000 + 0o77) + chr(53) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + chr(51) + '\x36' + chr(0b100000 + 0o27), 56638 - 56630), ehT0Px3KOsy9('\060' + chr(3174 - 3063) + '\063' + '\x37' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110101) + chr(0b11100 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101001 + 0o12) + chr(0b110010) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\061' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(4487 - 4376) + '\062' + chr(0b110110 + 0o0) + chr(0b1111 + 0o43), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(51) + chr(48) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + '\065' + chr(935 - 885), 0b1000), ehT0Px3KOsy9(chr(48) + chr(3940 - 3829) + chr(0b11100 + 0o26) + chr(53) + '\x34', 39867 - 39859), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b1 + 0o60), 65136 - 65128), ehT0Px3KOsy9(chr(0b110000) + chr(3722 - 3611) + chr(49) + '\064' + chr(51), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(53) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3'), chr(0b1100100) + chr(0b111001 + 0o54) + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')(chr(0b1101010 + 0o13) + chr(0b1110100) + chr(0b1 + 0o145) + chr(0b1101 + 0o40) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def TQHveekdSVRw(oVre8I6UXc3b, Nepp250kpsX1):
sHThYHEt4PLu = _fwkIVCGgtAN(Nepp250kpsX1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf'), chr(4661 - 4561) + chr(0b11100 + 0o111) + chr(0b1001101 + 0o26) + '\157' + chr(100) + chr(101))(chr(8674 - 8557) + chr(116) + chr(102) + chr(0b101101) + '\070'))
izUh4XSf7tJY = sHThYHEt4PLu.readlines()
xafqLlk3kkUe(sHThYHEt4PLu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe,\xe2V\x0f'), chr(0b110000 + 0o64) + chr(2823 - 2722) + chr(2298 - 2199) + '\157' + chr(100) + chr(3358 - 3257))(chr(0b1110101) + chr(116) + chr(0b1001001 + 0o35) + chr(1582 - 1537) + '\x38'))()
o34DiSJcu6N2 = []
for LycYkDpyelF6 in izUh4XSf7tJY:
(zZzp1mCPvBEm, SUofL7EGHaOE, CWnx52wJLqEN) = LycYkDpyelF6.strip().split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), '\144' + chr(0b1011101 + 0o10) + chr(7366 - 7267) + '\157' + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(102) + chr(45) + chr(56)))
if CWnx52wJLqEN not in xafqLlk3kkUe(GDSRke8e7aw5, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae+\xe4U5\xa1m\xc6q'), chr(100) + '\x65' + chr(6053 - 5954) + chr(0b11000 + 0o127) + chr(0b0 + 0o144) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56))):
xafqLlk3kkUe(o34DiSJcu6N2, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc0\xfd@\x04\xa9'), '\x64' + '\x65' + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b1010 + 0o153) + chr(11791 - 11675) + chr(0b1100110) + chr(0b101101) + chr(0b110011 + 0o5)))((ehT0Px3KOsy9(zZzp1mCPvBEm), ehT0Px3KOsy9(SUofL7EGHaOE), CWnx52wJLqEN))
oVre8I6UXc3b.o34DiSJcu6N2 = o34DiSJcu6N2
oVre8I6UXc3b.IZR1yrPq2sjb = c2A0yzQpDQB3(o34DiSJcu6N2)
oVre8I6UXc3b.dMKAsa9zwjeQ = xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(100) + chr(0b10011 + 0o122))(chr(117) + chr(116) + chr(102) + chr(75 - 30) + chr(56))._oWXztVNnqHF([AOfzRywRzEXp[ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100101 + 0o15), 8)] for AOfzRywRzEXp in oVre8I6UXc3b.o34DiSJcu6N2])
oVre8I6UXc3b.eSMIwHgBdyED = c2A0yzQpDQB3(oVre8I6UXc3b.dMKAsa9zwjeQ)
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/align.py
|
Align.sentence
|
def sentence(self, padding=75):
"""
Get sentence
"""
vec = word_to_vector(self.sentence_str)
vec += [-1] * (padding - self.sentence_length)
return np.array(vec, dtype=np.int32)
|
python
|
def sentence(self, padding=75):
"""
Get sentence
"""
vec = word_to_vector(self.sentence_str)
vec += [-1] * (padding - self.sentence_length)
return np.array(vec, dtype=np.int32)
|
[
"def",
"sentence",
"(",
"self",
",",
"padding",
"=",
"75",
")",
":",
"vec",
"=",
"word_to_vector",
"(",
"self",
".",
"sentence_str",
")",
"vec",
"+=",
"[",
"-",
"1",
"]",
"*",
"(",
"padding",
"-",
"self",
".",
"sentence_length",
")",
"return",
"np",
".",
"array",
"(",
"vec",
",",
"dtype",
"=",
"np",
".",
"int32",
")"
] |
Get sentence
|
[
"Get",
"sentence"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/utils/align.py#L54-L60
|
train
|
Get the sentence of the log entry
|
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,h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4ccExqw4,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(1898 - 1850) + chr(0b1101110 + 0o1) + '\061' + '\064' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(55) + '\060', 0b1000), ehT0Px3KOsy9(chr(862 - 814) + chr(0b1101111) + chr(51) + '\x33' + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + '\x32' + chr(51) + chr(0b10010 + 0o45), 0o10), ehT0Px3KOsy9(chr(614 - 566) + chr(0b1101111) + chr(51) + '\067' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + chr(0b11000 + 0o36), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100100 + 0o15) + chr(0b1001 + 0o55) + chr(181 - 131), ord("\x08")), ehT0Px3KOsy9(chr(1439 - 1391) + '\157' + chr(51) + chr(0b110001) + chr(0b100101 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1010100 + 0o33) + chr(0b101111 + 0o6) + chr(1321 - 1272), ord("\x08")), ehT0Px3KOsy9(chr(1592 - 1544) + chr(0b1101111) + chr(436 - 385) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(1763 - 1715) + chr(0b100000 + 0o117) + '\x33' + chr(0b110000) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + '\063' + chr(0b110110) + chr(0b11101 + 0o30), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b10101 + 0o42), 0o10), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + '\x35' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2140 - 2089) + chr(0b110100) + chr(189 - 141), 54995 - 54987), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000 + 0o1) + chr(0b101010 + 0o12) + chr(0b101101 + 0o7), 0b1000), ehT0Px3KOsy9(chr(515 - 467) + '\157' + chr(0b110110 + 0o1) + '\066', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b110001 + 0o4), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(701 - 650) + chr(0b10111 + 0o34) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(861 - 812) + '\067', 0b1000), ehT0Px3KOsy9(chr(1769 - 1721) + chr(0b1101111) + chr(51) + chr(0b110100) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + chr(1142 - 1088) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b11000 + 0o127) + chr(51) + chr(48) + '\x34', 29157 - 29149), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110110) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(55) + chr(0b110100 + 0o0), 0o10), ehT0Px3KOsy9(chr(206 - 158) + chr(111) + chr(0b110001) + chr(0b110101) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + chr(1948 - 1899) + chr(0b10101 + 0o33) + chr(0b110101), 25802 - 25794), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\060' + '\064', 0b1000), ehT0Px3KOsy9(chr(540 - 492) + chr(10111 - 10000) + '\x37' + chr(0b110100), 8), ehT0Px3KOsy9(chr(963 - 915) + chr(111) + chr(2623 - 2570) + '\x33', 46653 - 46645), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(1019 - 971) + chr(49), 56316 - 56308), ehT0Px3KOsy9(chr(0b110000) + chr(7035 - 6924) + chr(52) + chr(1102 - 1050), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(5931 - 5820) + chr(1041 - 992) + '\065' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1562 - 1514) + '\157' + '\063' + '\x33' + '\064', 0o10), ehT0Px3KOsy9(chr(265 - 217) + chr(0b1101111) + chr(0b110011) + '\x32' + '\066', 33795 - 33787), ehT0Px3KOsy9('\x30' + '\157' + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(678 - 629), 5870 - 5862)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35' + chr(1150 - 1102), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'N'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(0b1000011 + 0o61) + chr(102) + chr(0b101101) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def pamQPTGoym5v(oVre8I6UXc3b, TFLseEYASEKG=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b10001 + 0o40) + chr(0b110011), ord("\x08"))):
mct9TEZJu9be = PuoVCsBey1Cl(oVre8I6UXc3b.dMKAsa9zwjeQ)
mct9TEZJu9be += [-ehT0Px3KOsy9(chr(852 - 804) + '\x6f' + chr(1314 - 1265), 55706 - 55698)] * (TFLseEYASEKG - oVre8I6UXc3b.eSMIwHgBdyED)
return xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'"\x11c\xa8\x9d\xf7\x8cO\n\x87\x1cs'), chr(6302 - 6202) + chr(5274 - 5173) + '\143' + '\x6f' + chr(0b100001 + 0o103) + '\145')(chr(12011 - 11894) + chr(116) + chr(8394 - 8292) + chr(45) + chr(56)))(mct9TEZJu9be, dtype=xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\tOr\xcb\xeb'), '\144' + chr(0b1100101) + chr(4493 - 4394) + chr(111) + chr(0b1100100) + '\145')(chr(2933 - 2816) + chr(0b1110010 + 0o2) + chr(3963 - 3861) + chr(0b101101) + '\070')))
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/align.py
|
Align.word
|
def word(self, _id, padding=75):
"""
Get words
"""
word = self.words[_id][2]
vec = word_to_vector(word)
vec += [-1] * (padding - len(vec))
return np.array(vec, dtype=np.int32)
|
python
|
def word(self, _id, padding=75):
"""
Get words
"""
word = self.words[_id][2]
vec = word_to_vector(word)
vec += [-1] * (padding - len(vec))
return np.array(vec, dtype=np.int32)
|
[
"def",
"word",
"(",
"self",
",",
"_id",
",",
"padding",
"=",
"75",
")",
":",
"word",
"=",
"self",
".",
"words",
"[",
"_id",
"]",
"[",
"2",
"]",
"vec",
"=",
"word_to_vector",
"(",
"word",
")",
"vec",
"+=",
"[",
"-",
"1",
"]",
"*",
"(",
"padding",
"-",
"len",
"(",
"vec",
")",
")",
"return",
"np",
".",
"array",
"(",
"vec",
",",
"dtype",
"=",
"np",
".",
"int32",
")"
] |
Get words
|
[
"Get",
"words"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/utils/align.py#L62-L69
|
train
|
Get the word vector for a given ID
|
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,Z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_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(0b1101111) + chr(0b110001) + chr(55) + chr(1178 - 1127), 0b1000), ehT0Px3KOsy9('\060' + chr(4822 - 4711) + '\066' + '\065', 41235 - 41227), ehT0Px3KOsy9(chr(1430 - 1382) + chr(0b1010100 + 0o33) + chr(230 - 179) + '\066' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(6001 - 5890) + '\062' + chr(0b110000) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + '\061' + '\x36' + chr(0b10010 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(52) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(2033 - 1978) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1100 + 0o45) + '\065' + '\063', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1101 + 0o45) + chr(0b10111 + 0o32) + chr(0b11000 + 0o31), 0o10), ehT0Px3KOsy9(chr(1208 - 1160) + '\157' + chr(50) + '\067' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + '\061' + chr(0b110000) + chr(0b101011 + 0o7), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x34' + chr(50), 28535 - 28527), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b110110 + 0o71) + chr(0b101001 + 0o11) + chr(54) + chr(54), 50993 - 50985), ehT0Px3KOsy9(chr(1481 - 1433) + '\157' + '\064' + '\062', 8), ehT0Px3KOsy9(chr(1543 - 1495) + '\157' + '\062', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b10101 + 0o40) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(418 - 370) + '\157' + '\061' + chr(0b110001) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5738 - 5627) + chr(0b110011) + chr(561 - 506) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1692 - 1643) + chr(0b100 + 0o60) + '\060', 44545 - 44537), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\x36' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(306 - 258) + '\x6f' + '\x31' + chr(350 - 299) + chr(0b1 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11321 - 11210) + chr(0b11111 + 0o24) + chr(0b1110 + 0o46) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1092 - 1044) + '\157' + '\x33' + '\x30' + chr(2351 - 2302), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101101 + 0o6) + '\x32' + chr(0b100100 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(2777 - 2724), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(144 - 94) + chr(0b110101) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + chr(2574 - 2523) + chr(0b100011 + 0o20) + chr(2081 - 2029), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x35', 17501 - 17493), ehT0Px3KOsy9('\060' + '\x6f' + chr(330 - 280) + '\x34' + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1297 - 1242) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + chr(0b101001 + 0o12) + '\062' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b110010) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(577 - 529) + chr(3177 - 3066) + chr(1259 - 1208) + '\066' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(0b110001) + '\061' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1 + 0o61) + chr(243 - 195) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b110001) + chr(54), 20050 - 20042), ehT0Px3KOsy9('\060' + '\157' + chr(333 - 282) + '\061' + chr(1596 - 1547), 28293 - 28285), ehT0Px3KOsy9(chr(2067 - 2019) + chr(0b1101111) + '\x32' + chr(1637 - 1588) + '\x36', 49191 - 49183), ehT0Px3KOsy9('\x30' + chr(8302 - 8191) + chr(50) + chr(0b100100 + 0o21) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(996 - 947) + '\060' + chr(53), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'U'), '\x64' + '\x65' + '\143' + chr(111) + '\x64' + '\x65')('\165' + '\x74' + chr(102) + chr(95 - 50) + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def CWnx52wJLqEN(oVre8I6UXc3b, f764fJsVhH8T, TFLseEYASEKG=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2365 - 2316) + chr(49) + '\063', 50792 - 50784)):
CWnx52wJLqEN = oVre8I6UXc3b.o34DiSJcu6N2[f764fJsVhH8T][ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(5577 - 5466) + '\x32', 8)]
mct9TEZJu9be = PuoVCsBey1Cl(CWnx52wJLqEN)
mct9TEZJu9be += [-ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b11010 + 0o125) + '\x31', 0b1000)] * (TFLseEYASEKG - c2A0yzQpDQB3(mct9TEZJu9be))
return xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'9\x05\x94\xd71\xc8\x88\x1a\xf1\xf2wL'), '\x64' + chr(0b1100101) + chr(6519 - 6420) + '\x6f' + '\x64' + '\x65')(chr(0b1111 + 0o146) + '\164' + '\146' + chr(1284 - 1239) + '\x38'))(mct9TEZJu9be, dtype=xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12[\x85\xb4G'), chr(100) + chr(101) + chr(99) + chr(0b1100011 + 0o14) + chr(100) + '\x65')(chr(117) + chr(8804 - 8688) + chr(102) + '\055' + chr(0b10 + 0o66))))
|
apache/incubator-mxnet
|
example/gluon/lipnet/utils/align.py
|
Align.word_frame_pos
|
def word_frame_pos(self, _id):
"""
Get the position of words
"""
left = int(self.words[_id][0]/1000)
right = max(left+1, int(self.words[_id][1]/1000))
return (left, right)
|
python
|
def word_frame_pos(self, _id):
"""
Get the position of words
"""
left = int(self.words[_id][0]/1000)
right = max(left+1, int(self.words[_id][1]/1000))
return (left, right)
|
[
"def",
"word_frame_pos",
"(",
"self",
",",
"_id",
")",
":",
"left",
"=",
"int",
"(",
"self",
".",
"words",
"[",
"_id",
"]",
"[",
"0",
"]",
"/",
"1000",
")",
"right",
"=",
"max",
"(",
"left",
"+",
"1",
",",
"int",
"(",
"self",
".",
"words",
"[",
"_id",
"]",
"[",
"1",
"]",
"/",
"1000",
")",
")",
"return",
"(",
"left",
",",
"right",
")"
] |
Get the position of words
|
[
"Get",
"the",
"position",
"of",
"words"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/gluon/lipnet/utils/align.py#L77-L83
|
train
|
Get the position of the word frame in the words 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,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmlu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,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(0b100100 + 0o14) + '\157' + '\x33' + chr(0b100100 + 0o16) + chr(781 - 731), 0o10), ehT0Px3KOsy9(chr(1447 - 1399) + '\157' + chr(0b110011) + chr(0b110001 + 0o0) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\x30' + chr(1089 - 1034), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1676 - 1626) + '\065' + chr(2847 - 2793), 24655 - 24647), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x34' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + '\x31' + chr(0b1101 + 0o43) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11011 + 0o124) + chr(0b110010) + chr(53) + chr(51), 46556 - 46548), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(1356 - 1304) + '\x36', 61779 - 61771), ehT0Px3KOsy9(chr(0b110000) + chr(8785 - 8674) + '\x33' + chr(53) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b0 + 0o157) + '\x33' + chr(0b1101 + 0o44) + chr(0b11010 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(10813 - 10702) + chr(0b10000 + 0o47) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\067' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(49) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\065', 22922 - 22914), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110011) + '\063', 64859 - 64851), ehT0Px3KOsy9('\x30' + chr(5599 - 5488) + chr(1350 - 1299) + chr(855 - 802) + chr(0b110101), 28218 - 28210), ehT0Px3KOsy9('\x30' + chr(4492 - 4381) + '\063' + '\063' + chr(0b110100), 57781 - 57773), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(51) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(48) + chr(52), 52008 - 52000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x31' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(524 - 475) + chr(53) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9967 - 9856) + chr(54) + chr(87 - 34), 62756 - 62748), ehT0Px3KOsy9(chr(1932 - 1884) + chr(427 - 316) + '\x32' + chr(0b110100) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1396 - 1345) + '\061' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(235 - 187) + '\x6f' + chr(0b11011 + 0o27) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(222 - 174) + chr(0b100111 + 0o110) + chr(0b110010) + '\x34' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(0b101110 + 0o5) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(49) + chr(0b110101) + chr(0b10001 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b1000 + 0o53) + chr(48) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(0b110001) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(3995 - 3884) + chr(1111 - 1060) + '\061' + chr(0b101010 + 0o13), 8), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(1758 - 1708) + chr(685 - 636) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110111) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(1099 - 1050) + '\x35', 8), ehT0Px3KOsy9(chr(1394 - 1346) + chr(3215 - 3104) + '\063' + '\x33' + chr(2501 - 2447), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\064', 0b1000), ehT0Px3KOsy9(chr(156 - 108) + chr(407 - 296) + chr(50) + chr(0b110101), 4998 - 4990)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(12166 - 12055) + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), '\144' + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(0b1011101 + 0o10))(chr(6629 - 6512) + '\x74' + chr(5603 - 5501) + '\055' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def LsZTna9AZIXX(oVre8I6UXc3b, f764fJsVhH8T):
mtX6HPOlWiYu = ehT0Px3KOsy9(oVre8I6UXc3b.o34DiSJcu6N2[f764fJsVhH8T][ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b111 + 0o51), 0o10)] / ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110001 + 0o6) + chr(0b10101 + 0o40) + '\060', 25162 - 25154))
isOYmsUx1jxa = tsdjvlgh9gDP(mtX6HPOlWiYu + ehT0Px3KOsy9('\x30' + '\157' + '\x31', 0o10), ehT0Px3KOsy9(oVre8I6UXc3b.o34DiSJcu6N2[f764fJsVhH8T][ehT0Px3KOsy9(chr(160 - 112) + chr(0b10101 + 0o132) + '\061', 8)] / ehT0Px3KOsy9('\060' + chr(7195 - 7084) + '\x31' + '\067' + chr(0b101000 + 0o15) + '\x30', 8)))
return (mtX6HPOlWiYu, isOYmsUx1jxa)
|
apache/incubator-mxnet
|
example/rnn/large_word_lm/custom_module.py
|
CustomModule.prepare_sparse_params
|
def prepare_sparse_params(self, param_rowids):
'''Prepares the module for processing a data batch by pulling row_sparse
parameters from kvstore to all devices based on rowids.
Parameters
----------
param_rowids : dict of str to NDArray of list of NDArrays
'''
if not self._kvstore:
return
assert(isinstance(param_rowids, dict))
for param_name, rowids in param_rowids.items():
if isinstance(rowids, (tuple, list)):
rowids_1d = []
for r in rowids:
rowids_1d.append(r.reshape((-1,)).astype(np.int64))
rowid = mx.nd.concat(*rowids_1d, dim=0)
else:
rowid = rowids
param_idx = self._exec_group.param_names.index(param_name)
param_val = self._exec_group.param_arrays[param_idx]
self._kvstore.row_sparse_pull(param_name, param_val, row_ids=rowid,
priority=-param_idx)
|
python
|
def prepare_sparse_params(self, param_rowids):
'''Prepares the module for processing a data batch by pulling row_sparse
parameters from kvstore to all devices based on rowids.
Parameters
----------
param_rowids : dict of str to NDArray of list of NDArrays
'''
if not self._kvstore:
return
assert(isinstance(param_rowids, dict))
for param_name, rowids in param_rowids.items():
if isinstance(rowids, (tuple, list)):
rowids_1d = []
for r in rowids:
rowids_1d.append(r.reshape((-1,)).astype(np.int64))
rowid = mx.nd.concat(*rowids_1d, dim=0)
else:
rowid = rowids
param_idx = self._exec_group.param_names.index(param_name)
param_val = self._exec_group.param_arrays[param_idx]
self._kvstore.row_sparse_pull(param_name, param_val, row_ids=rowid,
priority=-param_idx)
|
[
"def",
"prepare_sparse_params",
"(",
"self",
",",
"param_rowids",
")",
":",
"if",
"not",
"self",
".",
"_kvstore",
":",
"return",
"assert",
"(",
"isinstance",
"(",
"param_rowids",
",",
"dict",
")",
")",
"for",
"param_name",
",",
"rowids",
"in",
"param_rowids",
".",
"items",
"(",
")",
":",
"if",
"isinstance",
"(",
"rowids",
",",
"(",
"tuple",
",",
"list",
")",
")",
":",
"rowids_1d",
"=",
"[",
"]",
"for",
"r",
"in",
"rowids",
":",
"rowids_1d",
".",
"append",
"(",
"r",
".",
"reshape",
"(",
"(",
"-",
"1",
",",
")",
")",
".",
"astype",
"(",
"np",
".",
"int64",
")",
")",
"rowid",
"=",
"mx",
".",
"nd",
".",
"concat",
"(",
"*",
"rowids_1d",
",",
"dim",
"=",
"0",
")",
"else",
":",
"rowid",
"=",
"rowids",
"param_idx",
"=",
"self",
".",
"_exec_group",
".",
"param_names",
".",
"index",
"(",
"param_name",
")",
"param_val",
"=",
"self",
".",
"_exec_group",
".",
"param_arrays",
"[",
"param_idx",
"]",
"self",
".",
"_kvstore",
".",
"row_sparse_pull",
"(",
"param_name",
",",
"param_val",
",",
"row_ids",
"=",
"rowid",
",",
"priority",
"=",
"-",
"param_idx",
")"
] |
Prepares the module for processing a data batch by pulling row_sparse
parameters from kvstore to all devices based on rowids.
Parameters
----------
param_rowids : dict of str to NDArray of list of NDArrays
|
[
"Prepares",
"the",
"module",
"for",
"processing",
"a",
"data",
"batch",
"by",
"pulling",
"row_sparse",
"parameters",
"from",
"kvstore",
"to",
"all",
"devices",
"based",
"on",
"rowids",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/large_word_lm/custom_module.py#L38-L60
|
train
|
Prepares the module for processing a data batch by pulling row_sparse
parameters from kvstore to all devices based on rowids.
|
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7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AZlkZOtyh,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(0b100001 + 0o17) + chr(0b1101011 + 0o4) + chr(235 - 186) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + '\063' + chr(0b110101) + chr(2082 - 2034), 64234 - 64226), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(1046 - 996) + '\067' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(0b100000 + 0o23) + '\x32' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4380 - 4269) + chr(50) + chr(0b101011 + 0o5) + chr(0b110101), 32420 - 32412), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b110001) + '\066' + chr(49), 51919 - 51911), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(8200 - 8089) + chr(50) + chr(55) + '\063', 61985 - 61977), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\063' + chr(0b110 + 0o52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(242 - 191) + '\x34' + chr(570 - 521), 0b1000), ehT0Px3KOsy9(chr(987 - 939) + '\x6f' + chr(2293 - 2244) + chr(0b1010 + 0o53) + chr(0b100010 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110101) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(976 - 928) + chr(4546 - 4435) + chr(0b11100 + 0o27) + chr(0b110011) + '\x31', 0o10), ehT0Px3KOsy9(chr(615 - 567) + '\157' + chr(50) + chr(0b10110 + 0o35) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + '\063' + chr(54) + chr(51), 53694 - 53686), ehT0Px3KOsy9(chr(995 - 947) + chr(0b11111 + 0o120) + '\062' + chr(0b110001) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6047 - 5936) + chr(0b10010 + 0o37) + chr(0b110000) + '\060', 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + '\x35' + '\063', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\067', 438 - 430), ehT0Px3KOsy9('\x30' + '\x6f' + '\x34' + chr(0b1000 + 0o55), 23545 - 23537), ehT0Px3KOsy9(chr(0b110000) + chr(1392 - 1281) + '\063' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b11001 + 0o32) + '\x34' + '\061', 8), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(4802 - 4691) + '\x33' + chr(52) + chr(0b10001 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9755 - 9644) + chr(2343 - 2292) + '\060' + chr(52), 1557 - 1549), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011 + 0o0) + '\065' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10447 - 10336) + '\x33' + chr(1628 - 1573) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\x34' + '\x31', 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1000011 + 0o54) + chr(0b101 + 0o54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11223 - 11112) + chr(51) + chr(55) + chr(0b101111 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(1958 - 1910) + chr(111) + '\x32' + chr(0b110111) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\064' + chr(2949 - 2894), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(846 - 797) + chr(49) + chr(0b10000 + 0o44), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(1868 - 1819) + chr(0b110101), 34826 - 34818), ehT0Px3KOsy9(chr(903 - 855) + '\157' + '\x32' + '\061' + '\x36', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101100 + 0o7) + '\x36' + chr(323 - 269), 0o10), ehT0Px3KOsy9(chr(1864 - 1816) + chr(1508 - 1397) + '\x35' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + chr(659 - 609) + chr(191 - 138) + chr(0b101111 + 0o7), 64210 - 64202), ehT0Px3KOsy9(chr(1867 - 1819) + '\x6f' + chr(49) + '\064' + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(0b101100 + 0o7), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(0b101111 + 0o1), 40095 - 40087)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'#'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(157 - 57) + chr(0b1100101))('\165' + chr(0b10 + 0o162) + '\146' + '\055' + chr(0b11110 + 0o32)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def uMHEgKozvmyE(oVre8I6UXc3b, mVQt71yaVOd_):
if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b't\xaa\xed\xd6\xe6\xe3\x1d\x8b=\x80\r\xca'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b10100 + 0o120) + chr(101))(chr(0b1110101) + chr(116) + chr(0b1011001 + 0o15) + chr(0b11110 + 0o17) + chr(0b111000))):
return
assert PlSM16l2KDPD(mVQt71yaVOd_, wLqBDw8l0eIm)
for (LwwoV1LmMhGU, I55JrTX1htDQ) in xafqLlk3kkUe(mVQt71yaVOd_, xafqLlk3kkUe(SXOLrMavuUCe(b'C\x92\xc8\x86\x99\xdfB\xf24\xb2$\x85'), '\144' + chr(0b10101 + 0o120) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(56)))():
if PlSM16l2KDPD(I55JrTX1htDQ, (KNyTy8rYcwji, YyaZ4tpXu4lf)):
O5ywXpCOkb4m = []
for JWG5qApaeJkp in I55JrTX1htDQ:
xafqLlk3kkUe(O5ywXpCOkb4m, xafqLlk3kkUe(SXOLrMavuUCe(b'l\x98\xce\x86\xbe\xe1'), '\144' + chr(0b1011011 + 0o12) + chr(0b11111 + 0o104) + chr(111) + chr(104 - 4) + chr(0b1100101))(chr(117) + chr(116) + chr(0b1011000 + 0o16) + chr(0b100010 + 0o13) + chr(0b111000 + 0o0)))(xafqLlk3kkUe(JWG5qApaeJkp.reshape((-ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100001 + 0o20), 8),)), xafqLlk3kkUe(SXOLrMavuUCe(b'l\x9b\xca\x9a\xa0\xe0'), chr(8694 - 8594) + chr(10024 - 9923) + '\143' + chr(111) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(0b1000001 + 0o45) + chr(337 - 292) + chr(0b100001 + 0o27)))(xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'd\x86\xca\xd5\xe4'), '\x64' + chr(8652 - 8551) + '\143' + chr(0b1101111) + '\144' + chr(101))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(1173 - 1117)))))
V_IerFLYF4YU = CIVheOt0RKQX.nd.concat(*O5ywXpCOkb4m, dim=ehT0Px3KOsy9(chr(0b110000) + '\157' + '\060', 0o10))
else:
V_IerFLYF4YU = I55JrTX1htDQ
_JRzN51LVVUs = oVre8I6UXc3b._exec_group.param_names.XdowRbJKZWL9(LwwoV1LmMhGU)
tTj8L3SyvdbF = oVre8I6UXc3b._exec_group.IFj0xeHCaGrO[_JRzN51LVVUs]
xafqLlk3kkUe(oVre8I6UXc3b._kvstore, xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f\x87\xc9\xbc\xa3\xf5\x10\xc9+\x843\xccY\xb5\xf3'), chr(0b11000 + 0o114) + '\x65' + chr(2079 - 1980) + '\157' + chr(0b1100100) + '\145')(chr(6309 - 6192) + chr(0b111 + 0o155) + '\x66' + '\055' + '\x38'))(LwwoV1LmMhGU, tTj8L3SyvdbF, row_ids=V_IerFLYF4YU, priority=-_JRzN51LVVUs)
|
apache/incubator-mxnet
|
example/rnn/large_word_lm/custom_module.py
|
CustomModule.save_params
|
def save_params(self, fname):
"""Saves model parameters to file.
Parameters
----------
fname : str
Path to output param file.
Examples
--------
>>> # An example of saving module parameters.
>>> mod.save_params('myfile')
"""
arg_params, aux_params = self.get_params_from_kv(self._arg_params, self._aux_params)
save_dict = {('arg:%s' % k) : v.as_in_context(mx.cpu()) for k, v in arg_params.items()}
save_dict.update({('aux:%s' % k) : v.as_in_context(mx.cpu()) for k, v in aux_params.items()})
mx.nd.save(fname, save_dict)
|
python
|
def save_params(self, fname):
"""Saves model parameters to file.
Parameters
----------
fname : str
Path to output param file.
Examples
--------
>>> # An example of saving module parameters.
>>> mod.save_params('myfile')
"""
arg_params, aux_params = self.get_params_from_kv(self._arg_params, self._aux_params)
save_dict = {('arg:%s' % k) : v.as_in_context(mx.cpu()) for k, v in arg_params.items()}
save_dict.update({('aux:%s' % k) : v.as_in_context(mx.cpu()) for k, v in aux_params.items()})
mx.nd.save(fname, save_dict)
|
[
"def",
"save_params",
"(",
"self",
",",
"fname",
")",
":",
"arg_params",
",",
"aux_params",
"=",
"self",
".",
"get_params_from_kv",
"(",
"self",
".",
"_arg_params",
",",
"self",
".",
"_aux_params",
")",
"save_dict",
"=",
"{",
"(",
"'arg:%s'",
"%",
"k",
")",
":",
"v",
".",
"as_in_context",
"(",
"mx",
".",
"cpu",
"(",
")",
")",
"for",
"k",
",",
"v",
"in",
"arg_params",
".",
"items",
"(",
")",
"}",
"save_dict",
".",
"update",
"(",
"{",
"(",
"'aux:%s'",
"%",
"k",
")",
":",
"v",
".",
"as_in_context",
"(",
"mx",
".",
"cpu",
"(",
")",
")",
"for",
"k",
",",
"v",
"in",
"aux_params",
".",
"items",
"(",
")",
"}",
")",
"mx",
".",
"nd",
".",
"save",
"(",
"fname",
",",
"save_dict",
")"
] |
Saves model parameters to file.
Parameters
----------
fname : str
Path to output param file.
Examples
--------
>>> # An example of saving module parameters.
>>> mod.save_params('myfile')
|
[
"Saves",
"model",
"parameters",
"to",
"file",
".",
"Parameters",
"----------",
"fname",
":",
"str",
"Path",
"to",
"output",
"param",
"file",
".",
"Examples",
"--------",
">>>",
"#",
"An",
"example",
"of",
"saving",
"module",
"parameters",
".",
">>>",
"mod",
".",
"save_params",
"(",
"myfile",
")"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/large_word_lm/custom_module.py#L102-L116
|
train
|
Saves model parameters to 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,BX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SmUoxlR9h,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(0b110010) + chr(705 - 655) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10110 + 0o34) + '\x31', 29877 - 29869), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b110100) + chr(0b100010 + 0o16), 5052 - 5044), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x35' + chr(49), 0b1000), ehT0Px3KOsy9(chr(1103 - 1055) + '\x6f' + chr(0b11100 + 0o27) + chr(2113 - 2058) + '\063', 33850 - 33842), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1001001 + 0o46) + chr(0b110001) + chr(49) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101111 + 0o3) + chr(0b110110) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b101001 + 0o11) + chr(1173 - 1119) + '\x35', 553 - 545), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + '\x33' + chr(0b110100) + chr(55), 27963 - 27955), ehT0Px3KOsy9(chr(1057 - 1009) + '\x6f' + chr(1587 - 1538) + chr(0b10 + 0o65) + '\x34', 0b1000), ehT0Px3KOsy9(chr(2056 - 2008) + chr(4704 - 4593) + chr(0b110010) + chr(0b110101) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(2588 - 2533) + '\x37', 0o10), ehT0Px3KOsy9(chr(451 - 403) + chr(0b1101111) + chr(0b10101 + 0o35) + chr(0b110001) + chr(0b1110 + 0o46), 0b1000), ehT0Px3KOsy9(chr(1091 - 1043) + chr(0b1101111) + chr(0b0 + 0o64) + chr(0b101111 + 0o1), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1001101 + 0o42) + chr(1995 - 1944) + chr(53) + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\064' + chr(0b101100 + 0o5), 20616 - 20608), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11101 + 0o25) + '\064' + chr(0b11100 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(2202 - 2152) + chr(55), 0b1000), ehT0Px3KOsy9(chr(1886 - 1838) + chr(111) + chr(0b101110 + 0o4) + '\x35' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\066' + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101111 + 0o2) + chr(0b101101 + 0o4) + chr(0b110100 + 0o3), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101010 + 0o7) + '\062' + chr(0b101110 + 0o11), 0b1000), ehT0Px3KOsy9(chr(2183 - 2135) + chr(0b1101111) + chr(0b110011) + chr(49) + chr(0b101011 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b110010) + chr(0b11010 + 0o34) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1010110 + 0o31) + chr(0b10100 + 0o36) + chr(52) + chr(49), 53688 - 53680), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2088 - 2038) + '\060' + chr(49), 46816 - 46808), ehT0Px3KOsy9(chr(1897 - 1849) + chr(111) + chr(443 - 388) + chr(1127 - 1076), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x35' + chr(50), 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b110101) + chr(1204 - 1153), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(1367 - 1318) + '\x30' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(2185 - 2137) + '\157' + chr(50) + chr(0b110011), 6858 - 6850), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + chr(1069 - 1020) + chr(0b101101 + 0o12) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\063' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7275 - 7164) + chr(0b110010) + chr(0b110 + 0o53) + chr(111 - 56), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9843 - 9732) + chr(0b10111 + 0o32) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(0b101101 + 0o4) + chr(48) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + chr(2309 - 2260) + chr(1092 - 1041) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110101) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + '\064', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(55 - 2) + chr(1701 - 1653), 14636 - 14628)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b101101 + 0o67) + chr(101))(chr(0b11110 + 0o127) + '\x74' + '\x66' + chr(0b1110 + 0o37) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def Iia6sOad_vfB(oVre8I6UXc3b, t3WbF0Ae42Pu):
(GroVdzCONmWS, p9GVyAqRTTRh) = oVre8I6UXc3b.get_params_from_kv(oVre8I6UXc3b.lfFets4_IScP, oVre8I6UXc3b.S860daUn0a8R)
HiRQ2kkvQ_TV = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7c\xc7\x13\xde:'), chr(5895 - 5795) + chr(3300 - 3199) + '\x63' + chr(5671 - 5560) + chr(0b1100100) + '\x65')(chr(3196 - 3079) + chr(1713 - 1597) + chr(102) + '\055' + chr(0b11000 + 0o40)) % OolUPRJhRaJd: cMbll0QYhULo.as_in_context(CIVheOt0RKQX.cpu()) for (OolUPRJhRaJd, cMbll0QYhULo) in GroVdzCONmWS.NzveIZ3IlSH9()}
xafqLlk3kkUe(HiRQ2kkvQ_TV, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcce\xe1l\x92\x07\xfc\xdb\x9eH\xcb\x8f'), chr(0b1001 + 0o133) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(0b111110 + 0o67) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b11000 + 0o40)))({xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7d\xd8\x13\xde:'), '\144' + '\x65' + chr(0b1100011) + chr(2533 - 2422) + '\144' + chr(0b101 + 0o140))(chr(0b1110101) + chr(2062 - 1946) + '\x66' + '\x2d' + chr(239 - 183)) % OolUPRJhRaJd: xafqLlk3kkUe(cMbll0QYhULo, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7b\xff@\x95\x16\xd5\xda\x89\x08\xcb\xc7\xf8'), chr(0b1100100) + chr(0b1010110 + 0o17) + chr(0b100111 + 0o74) + chr(111) + chr(169 - 69) + '\x65')('\165' + chr(5216 - 5100) + '\x66' + chr(1772 - 1727) + chr(0b10010 + 0o46)))(xafqLlk3kkUe(CIVheOt0RKQX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5a\xd5'), '\x64' + chr(9433 - 9332) + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(56)))()) for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(p9GVyAqRTTRh, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8k\xd6L\xb2\x13\x85\xfc\x8b/\xe6\x86'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(2573 - 2472))(chr(0b1110101) + chr(0b100101 + 0o117) + chr(6745 - 6643) + chr(0b101101) + '\070'))()})
xafqLlk3kkUe(CIVheOt0RKQX.nd, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5p\xd6L'), chr(0b111010 + 0o52) + chr(4964 - 4863) + '\x63' + chr(0b1001001 + 0o46) + '\x64' + '\145')(chr(3476 - 3359) + chr(116) + chr(102) + '\055' + '\070'))(t3WbF0Ae42Pu, HiRQ2kkvQ_TV)
|
apache/incubator-mxnet
|
example/rnn/large_word_lm/custom_module.py
|
CustomModule.get_params_from_kv
|
def get_params_from_kv(self, arg_params, aux_params):
""" Copy data from kvstore to `arg_params` and `aux_params`.
Parameters
----------
arg_params : list of NDArray
Target parameter arrays.
aux_params : list of NDArray
Target aux arrays.
Notes
-----
- This function will inplace update the NDArrays in arg_params and aux_params.
"""
assert(self._kvstore is not None)
for name, block in zip(self._exec_group.param_names, self._exec_group.param_arrays):
assert(isinstance(block, list))
if block[0].stype == 'row_sparse':
row_ids = mx.nd.arange(start=0, stop=block[0].shape[0], dtype='int64')
self._kvstore.row_sparse_pull(name, arg_params[name], row_ids=row_ids)
else:
assert(block[0].stype == 'default')
self._kvstore.pull(name, out=arg_params[name])
if len(aux_params) > 0:
raise NotImplementedError()
return arg_params, aux_params
|
python
|
def get_params_from_kv(self, arg_params, aux_params):
""" Copy data from kvstore to `arg_params` and `aux_params`.
Parameters
----------
arg_params : list of NDArray
Target parameter arrays.
aux_params : list of NDArray
Target aux arrays.
Notes
-----
- This function will inplace update the NDArrays in arg_params and aux_params.
"""
assert(self._kvstore is not None)
for name, block in zip(self._exec_group.param_names, self._exec_group.param_arrays):
assert(isinstance(block, list))
if block[0].stype == 'row_sparse':
row_ids = mx.nd.arange(start=0, stop=block[0].shape[0], dtype='int64')
self._kvstore.row_sparse_pull(name, arg_params[name], row_ids=row_ids)
else:
assert(block[0].stype == 'default')
self._kvstore.pull(name, out=arg_params[name])
if len(aux_params) > 0:
raise NotImplementedError()
return arg_params, aux_params
|
[
"def",
"get_params_from_kv",
"(",
"self",
",",
"arg_params",
",",
"aux_params",
")",
":",
"assert",
"(",
"self",
".",
"_kvstore",
"is",
"not",
"None",
")",
"for",
"name",
",",
"block",
"in",
"zip",
"(",
"self",
".",
"_exec_group",
".",
"param_names",
",",
"self",
".",
"_exec_group",
".",
"param_arrays",
")",
":",
"assert",
"(",
"isinstance",
"(",
"block",
",",
"list",
")",
")",
"if",
"block",
"[",
"0",
"]",
".",
"stype",
"==",
"'row_sparse'",
":",
"row_ids",
"=",
"mx",
".",
"nd",
".",
"arange",
"(",
"start",
"=",
"0",
",",
"stop",
"=",
"block",
"[",
"0",
"]",
".",
"shape",
"[",
"0",
"]",
",",
"dtype",
"=",
"'int64'",
")",
"self",
".",
"_kvstore",
".",
"row_sparse_pull",
"(",
"name",
",",
"arg_params",
"[",
"name",
"]",
",",
"row_ids",
"=",
"row_ids",
")",
"else",
":",
"assert",
"(",
"block",
"[",
"0",
"]",
".",
"stype",
"==",
"'default'",
")",
"self",
".",
"_kvstore",
".",
"pull",
"(",
"name",
",",
"out",
"=",
"arg_params",
"[",
"name",
"]",
")",
"if",
"len",
"(",
"aux_params",
")",
">",
"0",
":",
"raise",
"NotImplementedError",
"(",
")",
"return",
"arg_params",
",",
"aux_params"
] |
Copy data from kvstore to `arg_params` and `aux_params`.
Parameters
----------
arg_params : list of NDArray
Target parameter arrays.
aux_params : list of NDArray
Target aux arrays.
Notes
-----
- This function will inplace update the NDArrays in arg_params and aux_params.
|
[
"Copy",
"data",
"from",
"kvstore",
"to",
"arg_params",
"and",
"aux_params",
".",
"Parameters",
"----------",
"arg_params",
":",
"list",
"of",
"NDArray",
"Target",
"parameter",
"arrays",
".",
"aux_params",
":",
"list",
"of",
"NDArray",
"Target",
"aux",
"arrays",
".",
"Notes",
"-----",
"-",
"This",
"function",
"will",
"inplace",
"update",
"the",
"NDArrays",
"in",
"arg_params",
"and",
"aux_params",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/large_word_lm/custom_module.py#L118-L141
|
train
|
Copy data from kvstore to arg_params and aux_params.
|
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,ZMHESMWYy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bh,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) + chr(49) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(4338 - 4227) + '\x36' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(258 - 210) + chr(0b1101111) + chr(608 - 558) + chr(54) + chr(0b101110 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + '\063' + chr(0b110101) + chr(864 - 814), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101011 + 0o6), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(52) + chr(0b10100 + 0o40), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011101 + 0o22) + chr(50) + '\062' + chr(680 - 626), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + '\060' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10010 + 0o40) + '\065' + '\066', 24255 - 24247), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(0b110010) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + chr(0b100110 + 0o14) + '\x32' + chr(48), 53264 - 53256), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + chr(293 - 239), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + '\064' + '\067', 0b1000), ehT0Px3KOsy9(chr(465 - 417) + chr(9553 - 9442) + chr(0b110001) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(496 - 445) + '\x32' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(653 - 602) + chr(0b11 + 0o64) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1011 + 0o46) + chr(0b110100) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + chr(0b110011) + chr(978 - 930), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101110 + 0o10) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(54) + chr(2202 - 2151), 8), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + chr(680 - 629) + chr(0b110011) + chr(0b110100), 58614 - 58606), ehT0Px3KOsy9(chr(48) + '\157' + chr(389 - 340) + chr(49) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(429 - 381), 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b111100 + 0o63) + chr(0b110001) + '\066' + chr(0b110010), 50663 - 50655), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110000) + chr(593 - 544), ord("\x08")), ehT0Px3KOsy9(chr(1028 - 980) + chr(8621 - 8510) + '\x31' + chr(0b11001 + 0o30) + chr(0b1010 + 0o55), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110111) + chr(0b110100), 63458 - 63450), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1610 - 1561) + '\062' + '\x34', 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1000100 + 0o53) + chr(55) + '\060', 720 - 712), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x31' + '\063', 32012 - 32004), ehT0Px3KOsy9(chr(1737 - 1689) + '\x6f' + chr(0b101111 + 0o2) + chr(0b11100 + 0o31) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + chr(0b11111 + 0o22) + '\066' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(49) + chr(1917 - 1867) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(2341 - 2292) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b101000 + 0o16) + '\062', 8), ehT0Px3KOsy9(chr(1967 - 1919) + chr(0b1001111 + 0o40) + chr(0b1 + 0o60) + chr(1975 - 1923) + chr(0b100001 + 0o20), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110100) + '\x30', 59129 - 59121), ehT0Px3KOsy9(chr(48) + chr(0b1100110 + 0o11) + chr(1070 - 1021) + '\060' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + '\x31' + chr(0b100000 + 0o26) + '\x37', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(0b100001 + 0o24) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7'), chr(0b1100100) + chr(0b1010111 + 0o16) + '\x63' + chr(111) + chr(100) + chr(101))(chr(0b1110101) + chr(0b1100100 + 0o20) + chr(102) + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def iw8mGZeXKimF(oVre8I6UXc3b, GroVdzCONmWS, p9GVyAqRTTRh):
assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0p\xe0\xdf>g\xc8\xa6\xa4\xcf5\xe6'), chr(2801 - 2701) + chr(101) + '\143' + '\157' + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(0b11000 + 0o25) + chr(0b111000))) is not None
for (AIvJRzLdDfgF, cid3MTmW5yAA) in pZ0NK2y6HRbn(xafqLlk3kkUe(oVre8I6UXc3b._exec_group, xafqLlk3kkUe(SXOLrMavuUCe(b"\xf9S\xc1\x8be^\xca\xf7\xac\xcb'"), '\144' + chr(7409 - 7308) + chr(8548 - 8449) + chr(111) + chr(100) + '\145')(chr(117) + chr(0b1001111 + 0o45) + chr(9930 - 9828) + chr(0b101101) + '\070')), xafqLlk3kkUe(oVre8I6UXc3b._exec_group, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0t\xd9\xdapd\xec\xd5\xa0\xe9&\xdf'), chr(100) + chr(0b100110 + 0o77) + chr(99) + chr(111) + chr(3366 - 3266) + '\x65')('\x75' + chr(4040 - 3924) + chr(102) + chr(213 - 168) + '\x38'))):
assert PlSM16l2KDPD(cid3MTmW5yAA, YyaZ4tpXu4lf)
if xafqLlk3kkUe(cid3MTmW5yAA[ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(1043 - 995), ord("\x08"))], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfaF\xca\x9am'), chr(100) + chr(0b100011 + 0o102) + chr(9096 - 8997) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(710 - 665) + chr(0b110110 + 0o2))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb]\xc4\xb5{q\xc5\xe4\xb2\xcb'), chr(0b11000 + 0o114) + '\145' + '\143' + chr(0b100000 + 0o117) + chr(0b1100100) + chr(101))('\165' + chr(8784 - 8668) + chr(9991 - 9889) + '\x2d' + chr(0b101111 + 0o11)):
dnz_kPmWveA4 = CIVheOt0RKQX.nd.arange(start=ehT0Px3KOsy9('\x30' + chr(4606 - 4495) + chr(48), 8), stop=cid3MTmW5yAA[ehT0Px3KOsy9('\x30' + '\x6f' + '\060', 8)].nauYfLglTpcb[ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(0b0 + 0o60), 8)], dtype=xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\\\xc7\xdc<'), chr(0b100100 + 0o100) + chr(0b1100101) + chr(0b1001111 + 0o24) + '\157' + '\144' + chr(0b11100 + 0o111))('\x75' + chr(116) + '\x66' + chr(439 - 394) + chr(1468 - 1412)))
xafqLlk3kkUe(oVre8I6UXc3b._kvstore, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb]\xc4\xb5{q\xc5\xe4\xb2\xcb\x0b\xe0[Ke'), chr(100) + '\145' + chr(0b1100011) + chr(10869 - 10758) + '\x64' + chr(101))('\165' + chr(116) + chr(677 - 575) + chr(0b1 + 0o54) + chr(56)))(AIvJRzLdDfgF, GroVdzCONmWS[AIvJRzLdDfgF], row_ids=dnz_kPmWveA4)
else:
assert xafqLlk3kkUe(cid3MTmW5yAA[ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(0b110000), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xfaF\xca\x9am'), chr(0b1100100) + chr(101) + chr(0b10011 + 0o120) + '\x6f' + '\x64' + '\145')('\x75' + chr(116) + chr(102) + chr(0b11000 + 0o25) + chr(2606 - 2550))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xedW\xd5\x8b}m\xd0'), '\144' + chr(8801 - 8700) + '\143' + chr(0b1000000 + 0o57) + chr(0b101101 + 0o67) + chr(0b1100101))('\165' + chr(0b110101 + 0o77) + '\146' + '\055' + chr(0b100100 + 0o24))
xafqLlk3kkUe(oVre8I6UXc3b._kvstore, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9G\xdf\x86'), chr(0b101100 + 0o70) + chr(0b1001111 + 0o26) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + chr(0b1101010 + 0o12) + chr(6857 - 6755) + chr(597 - 552) + '\x38'))(AIvJRzLdDfgF, out=GroVdzCONmWS[AIvJRzLdDfgF])
if c2A0yzQpDQB3(p9GVyAqRTTRh) > ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b111100 + 0o63) + chr(0b110000), 8):
raise _zJ24Vce7wp0()
return (GroVdzCONmWS, p9GVyAqRTTRh)
|
apache/incubator-mxnet
|
example/rnn/large_word_lm/custom_module.py
|
CustomModule.clip_by_global_norm_per_ctx
|
def clip_by_global_norm_per_ctx(self, max_norm=1.0, param_names=None):
"""Clips gradient norm.
The norm is computed over all gradients together, as if they were
concatenated into a single vector. Gradients are modified in-place.
The method is first used in
`[ICML2013] On the difficulty of training recurrent neural networks`
Note that the gradients are concatenated per context in this implementation.
Examples
--------
An example of using clip_grad_norm to clip the gradient before updating the parameters::
>>> #Get the gradient via back-propagation
>>> net.forward_backward(data_batch=data_batch)
>>> norm_val = net.clip_by_global_norm(max_norm=2.0, param_names='w0')
>>> net.update()
"""
assert self.binded and self.params_initialized and self.optimizer_initialized
num_ctx = len(self._exec_group.grad_arrays[0])
grad_array_per_ctx = [[] for i in range(num_ctx)]
assert(param_names is not None)
for param_name in param_names:
param_idx = self._exec_group.param_names.index(param_name)
grad_val = self._exec_group.grad_arrays[param_idx]
assert(len(grad_val) == num_ctx)
for i in range(num_ctx):
grad_array_per_ctx[i].append(grad_val[i])
norm_vals = []
for i in range(num_ctx):
mx.gluon.utils.clip_global_norm(grad_array_per_ctx[i], max_norm)
|
python
|
def clip_by_global_norm_per_ctx(self, max_norm=1.0, param_names=None):
"""Clips gradient norm.
The norm is computed over all gradients together, as if they were
concatenated into a single vector. Gradients are modified in-place.
The method is first used in
`[ICML2013] On the difficulty of training recurrent neural networks`
Note that the gradients are concatenated per context in this implementation.
Examples
--------
An example of using clip_grad_norm to clip the gradient before updating the parameters::
>>> #Get the gradient via back-propagation
>>> net.forward_backward(data_batch=data_batch)
>>> norm_val = net.clip_by_global_norm(max_norm=2.0, param_names='w0')
>>> net.update()
"""
assert self.binded and self.params_initialized and self.optimizer_initialized
num_ctx = len(self._exec_group.grad_arrays[0])
grad_array_per_ctx = [[] for i in range(num_ctx)]
assert(param_names is not None)
for param_name in param_names:
param_idx = self._exec_group.param_names.index(param_name)
grad_val = self._exec_group.grad_arrays[param_idx]
assert(len(grad_val) == num_ctx)
for i in range(num_ctx):
grad_array_per_ctx[i].append(grad_val[i])
norm_vals = []
for i in range(num_ctx):
mx.gluon.utils.clip_global_norm(grad_array_per_ctx[i], max_norm)
|
[
"def",
"clip_by_global_norm_per_ctx",
"(",
"self",
",",
"max_norm",
"=",
"1.0",
",",
"param_names",
"=",
"None",
")",
":",
"assert",
"self",
".",
"binded",
"and",
"self",
".",
"params_initialized",
"and",
"self",
".",
"optimizer_initialized",
"num_ctx",
"=",
"len",
"(",
"self",
".",
"_exec_group",
".",
"grad_arrays",
"[",
"0",
"]",
")",
"grad_array_per_ctx",
"=",
"[",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"num_ctx",
")",
"]",
"assert",
"(",
"param_names",
"is",
"not",
"None",
")",
"for",
"param_name",
"in",
"param_names",
":",
"param_idx",
"=",
"self",
".",
"_exec_group",
".",
"param_names",
".",
"index",
"(",
"param_name",
")",
"grad_val",
"=",
"self",
".",
"_exec_group",
".",
"grad_arrays",
"[",
"param_idx",
"]",
"assert",
"(",
"len",
"(",
"grad_val",
")",
"==",
"num_ctx",
")",
"for",
"i",
"in",
"range",
"(",
"num_ctx",
")",
":",
"grad_array_per_ctx",
"[",
"i",
"]",
".",
"append",
"(",
"grad_val",
"[",
"i",
"]",
")",
"norm_vals",
"=",
"[",
"]",
"for",
"i",
"in",
"range",
"(",
"num_ctx",
")",
":",
"mx",
".",
"gluon",
".",
"utils",
".",
"clip_global_norm",
"(",
"grad_array_per_ctx",
"[",
"i",
"]",
",",
"max_norm",
")"
] |
Clips gradient norm.
The norm is computed over all gradients together, as if they were
concatenated into a single vector. Gradients are modified in-place.
The method is first used in
`[ICML2013] On the difficulty of training recurrent neural networks`
Note that the gradients are concatenated per context in this implementation.
Examples
--------
An example of using clip_grad_norm to clip the gradient before updating the parameters::
>>> #Get the gradient via back-propagation
>>> net.forward_backward(data_batch=data_batch)
>>> norm_val = net.clip_by_global_norm(max_norm=2.0, param_names='w0')
>>> net.update()
|
[
"Clips",
"gradient",
"norm",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/large_word_lm/custom_module.py#L143-L174
|
train
|
Clips gradient norm by max_norm per context.
|
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,h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V2riMOClNT,_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(0b1101011 + 0o4) + '\x33' + chr(54) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(1018 - 907) + chr(0b110010) + chr(2259 - 2208) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(1713 - 1664) + chr(0b110110) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10001 + 0o42) + chr(1650 - 1597) + chr(0b10 + 0o60), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(55) + chr(0b1010 + 0o46), ord("\x08")), ehT0Px3KOsy9(chr(1392 - 1344) + chr(6789 - 6678) + chr(0b110011 + 0o3) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(53) + chr(0b110111), 43194 - 43186), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b10110 + 0o33) + '\065' + '\063', 6999 - 6991), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(53) + chr(0b11110 + 0o22), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x36' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11101 + 0o26) + chr(0b111 + 0o53) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6162 - 6051) + chr(0b1011 + 0o50) + '\x34' + chr(0b1001 + 0o56), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\064' + chr(50), 0o10), ehT0Px3KOsy9(chr(1062 - 1014) + chr(111) + chr(0b100000 + 0o23) + chr(2149 - 2101) + '\064', 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\x37' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + chr(0b110011) + chr(0b110011 + 0o3) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b101100 + 0o10) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11053 - 10942) + chr(49) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1246 - 1197) + chr(0b100110 + 0o14) + chr(0b110100), 8977 - 8969), ehT0Px3KOsy9('\060' + chr(3144 - 3033) + chr(49) + chr(750 - 702) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(708 - 653) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(5537 - 5426) + '\062' + '\067' + chr(55), 23646 - 23638), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b10111 + 0o32) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1314 - 1266) + chr(0b1101111) + chr(1258 - 1209) + chr(1173 - 1123), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b1001 + 0o52) + '\060', 0o10), ehT0Px3KOsy9(chr(1756 - 1708) + chr(0b1101 + 0o142) + chr(1868 - 1819) + chr(55) + chr(50), 3009 - 3001), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b100100 + 0o17) + '\x33' + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(145 - 97) + chr(111) + '\061' + chr(0b110100) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(1113 - 1063), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\067' + chr(0b110011 + 0o2), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1771 - 1722) + '\x33' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1454 - 1343) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + chr(0b101011 + 0o7) + chr(53) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(6955 - 6844) + chr(0b110001) + '\x31' + chr(1291 - 1236), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(50) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(422 - 374) + chr(0b1011111 + 0o20) + chr(0b110011) + '\062' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(55) + '\x37', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(8766 - 8655) + chr(0b111 + 0o56) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9'), '\x64' + chr(0b1011011 + 0o12) + chr(0b1001010 + 0o31) + '\x6f' + '\x64' + chr(7221 - 7120))('\165' + chr(8005 - 7889) + '\146' + chr(524 - 479) + chr(555 - 499)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def D5u4jwJGXKGZ(oVre8I6UXc3b, LB9bc9dHt6aX=1.0, FDgTD8rHpSh6=None):
assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81\xcf%\x9b\xb4C\x1a(`\x99\xa6\xa6'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + chr(56))) and xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\xa2\x0c\x90\x88dg.\x19\xe7\x8b\xbb'), '\144' + chr(0b1100101) + '\x63' + chr(1143 - 1032) + chr(100) + chr(0b111100 + 0o51))(chr(12306 - 12189) + '\x74' + chr(7289 - 7187) + chr(0b101101) + chr(0b111000))) and xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\xee\x00\xdc\xba\x0cm^e\x9f\xc8\xbb'), chr(0b1100100) + chr(0b1100101) + chr(8742 - 8643) + chr(5595 - 5484) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(1162 - 1117) + '\070'))
UEaheNP6PS4k = c2A0yzQpDQB3(oVre8I6UXc3b._exec_group._ffNipEkE2UF[ehT0Px3KOsy9('\x30' + chr(0b101110 + 0o101) + '\x30', 8)])
s9h0CB_bunKC = [[] for WVxHKyX45z_L in vQr8gNKaIaWE(UEaheNP6PS4k)]
assert FDgTD8rHpSh6 is not None
for LwwoV1LmMhGU in FDgTD8rHpSh6:
_JRzN51LVVUs = oVre8I6UXc3b._exec_group.param_names.XdowRbJKZWL9(LwwoV1LmMhGU)
GWG5wCgZB1pi = oVre8I6UXc3b._exec_group._ffNipEkE2UF[_JRzN51LVVUs]
assert c2A0yzQpDQB3(GWG5wCgZB1pi) == UEaheNP6PS4k
for WVxHKyX45z_L in vQr8gNKaIaWE(UEaheNP6PS4k):
xafqLlk3kkUe(s9h0CB_bunKC[WVxHKyX45z_L], xafqLlk3kkUe(SXOLrMavuUCe(b'\x96\xea\x06\x8f\x96Q'), '\x64' + chr(0b1100101) + chr(0b1011010 + 0o11) + chr(0b110010 + 0o75) + '\x64' + chr(0b1001101 + 0o30))(chr(0b1110101) + '\x74' + '\x66' + chr(0b10110 + 0o27) + '\x38'))(GWG5wCgZB1pi[WVxHKyX45z_L])
qaqv2exqM_B_ = []
for WVxHKyX45z_L in vQr8gNKaIaWE(UEaheNP6PS4k):
xafqLlk3kkUe(CIVheOt0RKQX.gluon.utils, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\xf6\x1f\x9a\xa7RC\x04O\xc9\x9d\x89\x89\r\xb6R'), chr(0b110110 + 0o56) + chr(101) + chr(0b101010 + 0o71) + chr(111) + chr(0b1001010 + 0o32) + '\x65')('\x75' + chr(116) + chr(102) + chr(0b101101) + chr(56)))(s9h0CB_bunKC[WVxHKyX45z_L], LB9bc9dHt6aX)
|
apache/incubator-mxnet
|
example/rnn/large_word_lm/custom_module.py
|
CustomModule.rescale_grad
|
def rescale_grad(self, scale=None, param_name=None):
""" Rescale the gradient of provided parameters by a certain scale """
if scale is None or param_name is None:
return
param_idx = self._exec_group.param_names.index(param_name)
grad_vals = self._exec_group.grad_arrays[param_idx]
for grad in grad_vals:
grad[:] *= scale
|
python
|
def rescale_grad(self, scale=None, param_name=None):
""" Rescale the gradient of provided parameters by a certain scale """
if scale is None or param_name is None:
return
param_idx = self._exec_group.param_names.index(param_name)
grad_vals = self._exec_group.grad_arrays[param_idx]
for grad in grad_vals:
grad[:] *= scale
|
[
"def",
"rescale_grad",
"(",
"self",
",",
"scale",
"=",
"None",
",",
"param_name",
"=",
"None",
")",
":",
"if",
"scale",
"is",
"None",
"or",
"param_name",
"is",
"None",
":",
"return",
"param_idx",
"=",
"self",
".",
"_exec_group",
".",
"param_names",
".",
"index",
"(",
"param_name",
")",
"grad_vals",
"=",
"self",
".",
"_exec_group",
".",
"grad_arrays",
"[",
"param_idx",
"]",
"for",
"grad",
"in",
"grad_vals",
":",
"grad",
"[",
":",
"]",
"*=",
"scale"
] |
Rescale the gradient of provided parameters by a certain scale
|
[
"Rescale",
"the",
"gradient",
"of",
"provided",
"parameters",
"by",
"a",
"certain",
"scale"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/large_word_lm/custom_module.py#L176-L183
|
train
|
Rescales the gradient of the parameters of the specified parameters by a certain scale.
|
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,KOH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6CxlvR,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(0b100001 + 0o17) + chr(0b1101111) + chr(50) + chr(53) + chr(49), 34686 - 34678), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010001 + 0o36) + '\061' + '\062' + chr(0b100 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(52) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\061' + chr(0b100111 + 0o14), 47936 - 47928), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b111 + 0o54) + chr(55) + chr(1938 - 1886), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\066' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + '\x35' + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061', 17616 - 17608), ehT0Px3KOsy9(chr(153 - 105) + '\157' + '\062' + chr(55) + chr(49), 44743 - 44735), ehT0Px3KOsy9(chr(1761 - 1713) + '\157' + '\x31' + chr(0b110000) + chr(2041 - 1989), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\066' + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(48) + chr(52), 0b1000), ehT0Px3KOsy9(chr(313 - 265) + '\x6f' + chr(0b10111 + 0o33) + '\066' + chr(1414 - 1359), 31191 - 31183), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110110) + chr(1229 - 1176), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(51) + chr(48) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(1622 - 1574) + '\157' + chr(51) + chr(51) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\065' + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1011 + 0o46) + chr(920 - 869) + chr(0b11 + 0o60), 51947 - 51939), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(683 - 632) + chr(49) + chr(1819 - 1771), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1613 - 1563) + chr(0b110101) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\063' + chr(0b110010 + 0o3) + chr(1280 - 1227), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(0b11110 + 0o22) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\065' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000 + 0o3) + '\x32' + chr(0b1110 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2148 - 2095) + chr(0b110110), 20947 - 20939), ehT0Px3KOsy9(chr(1252 - 1204) + chr(0b1100 + 0o143) + '\x31' + '\x35' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(113 - 2) + chr(0b10111 + 0o32) + chr(2130 - 2082) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b101000 + 0o11) + chr(762 - 711) + chr(0b1010 + 0o50), 9182 - 9174), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(53) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(2205 - 2151) + '\066', 3170 - 3162), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\x33' + chr(2774 - 2721) + chr(0b11 + 0o63), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + '\x31' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + '\x31' + '\x32' + chr(55), 25966 - 25958), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b100 + 0o57) + chr(48), 15938 - 15930), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b100011 + 0o24) + chr(50), 63746 - 63738), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b100 + 0o56) + '\x33' + chr(0b11101 + 0o31), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(428 - 378) + '\067' + chr(0b110011 + 0o4), 54857 - 54849), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1769 - 1719) + chr(0b1010 + 0o55) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(11566 - 11455) + '\x31' + chr(1687 - 1638) + chr(0b1011 + 0o52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(410 - 360) + chr(52) + chr(48), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + chr(0b10 + 0o56), 16174 - 16166)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x87'), chr(0b1100001 + 0o3) + chr(0b1001000 + 0o35) + '\x63' + chr(0b1100 + 0o143) + chr(100) + chr(4374 - 4273))(chr(0b1110101) + '\164' + chr(6089 - 5987) + '\x2d' + chr(1031 - 975)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def YSz6oP1ujznD(oVre8I6UXc3b, xjPLimsZRgb9=None, LwwoV1LmMhGU=None):
if xjPLimsZRgb9 is None or LwwoV1LmMhGU is None:
return
_JRzN51LVVUs = oVre8I6UXc3b._exec_group.param_names.XdowRbJKZWL9(LwwoV1LmMhGU)
ztXNSTswF3DO = oVre8I6UXc3b._exec_group._ffNipEkE2UF[_JRzN51LVVUs]
for RF_2NucJiY7o in ztXNSTswF3DO:
RF_2NucJiY7o[:] *= xjPLimsZRgb9
|
apache/incubator-mxnet
|
example/sparse/factorization_machine/model.py
|
factorization_machine_model
|
def factorization_machine_model(factor_size, num_features,
lr_mult_config, wd_mult_config, init_config):
""" builds factorization machine network with proper formulation:
y = w_0 \sum(x_i w_i) + 0.5(\sum\sum<v_i,v_j>x_ix_j - \sum<v_iv_i>x_i^2)
"""
x = mx.symbol.Variable("data", stype='csr')
# factor, linear and bias terms
v = mx.symbol.Variable("v", shape=(num_features, factor_size), stype='row_sparse',
init=init_config['v'], lr_mult=lr_mult_config['v'],
wd_mult=wd_mult_config['v'])
w = mx.symbol.Variable('w', shape=(num_features, 1), stype='row_sparse',
init=init_config['w'], lr_mult=lr_mult_config['w'],
wd_mult=wd_mult_config['w'])
w0 = mx.symbol.Variable('w0', shape=(1,), init=init_config['w0'],
lr_mult=lr_mult_config['w0'], wd_mult=wd_mult_config['w0'])
w1 = mx.symbol.broadcast_add(mx.symbol.dot(x, w), w0)
# squared terms for subtracting self interactions
v_s = mx.symbol._internal._square_sum(data=v, axis=1, keepdims=True)
x_s = x.square()
bd_sum = mx.sym.dot(x_s, v_s)
# interactions
w2 = mx.symbol.dot(x, v)
w2_squared = 0.5 * mx.symbol.square(data=w2)
# putting everything together
w_all = mx.symbol.Concat(w1, w2_squared, dim=1)
sum1 = w_all.sum(axis=1, keepdims=True)
sum2 = -0.5 * bd_sum
model = sum1 + sum2
y = mx.symbol.Variable("softmax_label")
model = mx.symbol.LogisticRegressionOutput(data=model, label=y)
return model
|
python
|
def factorization_machine_model(factor_size, num_features,
lr_mult_config, wd_mult_config, init_config):
""" builds factorization machine network with proper formulation:
y = w_0 \sum(x_i w_i) + 0.5(\sum\sum<v_i,v_j>x_ix_j - \sum<v_iv_i>x_i^2)
"""
x = mx.symbol.Variable("data", stype='csr')
# factor, linear and bias terms
v = mx.symbol.Variable("v", shape=(num_features, factor_size), stype='row_sparse',
init=init_config['v'], lr_mult=lr_mult_config['v'],
wd_mult=wd_mult_config['v'])
w = mx.symbol.Variable('w', shape=(num_features, 1), stype='row_sparse',
init=init_config['w'], lr_mult=lr_mult_config['w'],
wd_mult=wd_mult_config['w'])
w0 = mx.symbol.Variable('w0', shape=(1,), init=init_config['w0'],
lr_mult=lr_mult_config['w0'], wd_mult=wd_mult_config['w0'])
w1 = mx.symbol.broadcast_add(mx.symbol.dot(x, w), w0)
# squared terms for subtracting self interactions
v_s = mx.symbol._internal._square_sum(data=v, axis=1, keepdims=True)
x_s = x.square()
bd_sum = mx.sym.dot(x_s, v_s)
# interactions
w2 = mx.symbol.dot(x, v)
w2_squared = 0.5 * mx.symbol.square(data=w2)
# putting everything together
w_all = mx.symbol.Concat(w1, w2_squared, dim=1)
sum1 = w_all.sum(axis=1, keepdims=True)
sum2 = -0.5 * bd_sum
model = sum1 + sum2
y = mx.symbol.Variable("softmax_label")
model = mx.symbol.LogisticRegressionOutput(data=model, label=y)
return model
|
[
"def",
"factorization_machine_model",
"(",
"factor_size",
",",
"num_features",
",",
"lr_mult_config",
",",
"wd_mult_config",
",",
"init_config",
")",
":",
"x",
"=",
"mx",
".",
"symbol",
".",
"Variable",
"(",
"\"data\"",
",",
"stype",
"=",
"'csr'",
")",
"# factor, linear and bias terms",
"v",
"=",
"mx",
".",
"symbol",
".",
"Variable",
"(",
"\"v\"",
",",
"shape",
"=",
"(",
"num_features",
",",
"factor_size",
")",
",",
"stype",
"=",
"'row_sparse'",
",",
"init",
"=",
"init_config",
"[",
"'v'",
"]",
",",
"lr_mult",
"=",
"lr_mult_config",
"[",
"'v'",
"]",
",",
"wd_mult",
"=",
"wd_mult_config",
"[",
"'v'",
"]",
")",
"w",
"=",
"mx",
".",
"symbol",
".",
"Variable",
"(",
"'w'",
",",
"shape",
"=",
"(",
"num_features",
",",
"1",
")",
",",
"stype",
"=",
"'row_sparse'",
",",
"init",
"=",
"init_config",
"[",
"'w'",
"]",
",",
"lr_mult",
"=",
"lr_mult_config",
"[",
"'w'",
"]",
",",
"wd_mult",
"=",
"wd_mult_config",
"[",
"'w'",
"]",
")",
"w0",
"=",
"mx",
".",
"symbol",
".",
"Variable",
"(",
"'w0'",
",",
"shape",
"=",
"(",
"1",
",",
")",
",",
"init",
"=",
"init_config",
"[",
"'w0'",
"]",
",",
"lr_mult",
"=",
"lr_mult_config",
"[",
"'w0'",
"]",
",",
"wd_mult",
"=",
"wd_mult_config",
"[",
"'w0'",
"]",
")",
"w1",
"=",
"mx",
".",
"symbol",
".",
"broadcast_add",
"(",
"mx",
".",
"symbol",
".",
"dot",
"(",
"x",
",",
"w",
")",
",",
"w0",
")",
"# squared terms for subtracting self interactions",
"v_s",
"=",
"mx",
".",
"symbol",
".",
"_internal",
".",
"_square_sum",
"(",
"data",
"=",
"v",
",",
"axis",
"=",
"1",
",",
"keepdims",
"=",
"True",
")",
"x_s",
"=",
"x",
".",
"square",
"(",
")",
"bd_sum",
"=",
"mx",
".",
"sym",
".",
"dot",
"(",
"x_s",
",",
"v_s",
")",
"# interactions",
"w2",
"=",
"mx",
".",
"symbol",
".",
"dot",
"(",
"x",
",",
"v",
")",
"w2_squared",
"=",
"0.5",
"*",
"mx",
".",
"symbol",
".",
"square",
"(",
"data",
"=",
"w2",
")",
"# putting everything together",
"w_all",
"=",
"mx",
".",
"symbol",
".",
"Concat",
"(",
"w1",
",",
"w2_squared",
",",
"dim",
"=",
"1",
")",
"sum1",
"=",
"w_all",
".",
"sum",
"(",
"axis",
"=",
"1",
",",
"keepdims",
"=",
"True",
")",
"sum2",
"=",
"-",
"0.5",
"*",
"bd_sum",
"model",
"=",
"sum1",
"+",
"sum2",
"y",
"=",
"mx",
".",
"symbol",
".",
"Variable",
"(",
"\"softmax_label\"",
")",
"model",
"=",
"mx",
".",
"symbol",
".",
"LogisticRegressionOutput",
"(",
"data",
"=",
"model",
",",
"label",
"=",
"y",
")",
"return",
"model"
] |
builds factorization machine network with proper formulation:
y = w_0 \sum(x_i w_i) + 0.5(\sum\sum<v_i,v_j>x_ix_j - \sum<v_iv_i>x_i^2)
|
[
"builds",
"factorization",
"machine",
"network",
"with",
"proper",
"formulation",
":",
"y",
"=",
"w_0",
"\\",
"sum",
"(",
"x_i",
"w_i",
")",
"+",
"0",
".",
"5",
"(",
"\\",
"sum",
"\\",
"sum<v_i",
"v_j",
">",
"x_ix_j",
"-",
"\\",
"sum<v_iv_i",
">",
"x_i^2",
")"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/sparse/factorization_machine/model.py#L20-L54
|
train
|
Builds a factorization machine network with proper formulation.
|
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,eh4BeXw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4cxI,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(2251 - 2203) + chr(0b110011 + 0o74) + chr(0b110001) + '\067' + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(53) + chr(1423 - 1368), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x33' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(4434 - 4323) + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(2271 - 2220), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\064' + chr(1888 - 1836), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100101 + 0o12) + '\067' + chr(0b100 + 0o54), 27849 - 27841), ehT0Px3KOsy9(chr(48) + chr(10997 - 10886) + chr(805 - 755) + chr(1153 - 1104) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(207 - 158) + '\060' + chr(979 - 924), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b110 + 0o53) + chr(689 - 641), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110100) + chr(55), 0b1000), ehT0Px3KOsy9(chr(422 - 374) + '\157' + chr(0b110011) + chr(55) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11677 - 11566) + chr(0b110011) + chr(2054 - 2000) + '\064', 27702 - 27694), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011000 + 0o27) + chr(0b110011) + '\060', 14622 - 14614), ehT0Px3KOsy9('\x30' + chr(2715 - 2604) + '\x33' + chr(295 - 242) + '\x31', 58706 - 58698), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b110001) + '\x31', 23577 - 23569), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1110 + 0o43) + chr(0b110101) + chr(0b10 + 0o65), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(890 - 839) + chr(1011 - 959) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(2909 - 2798) + chr(642 - 592) + '\065' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + '\063' + chr(0b110110) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b0 + 0o67) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b100011 + 0o20) + '\067', 30107 - 30099), ehT0Px3KOsy9(chr(1864 - 1816) + chr(0b1101111) + chr(51) + '\x35' + '\x31', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101100 + 0o3) + chr(0b110110) + chr(0b110111), 41870 - 41862), ehT0Px3KOsy9('\060' + '\157' + '\x32' + '\x34' + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11001 + 0o31) + '\x30', 57059 - 57051), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1822 - 1773) + chr(511 - 461) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(54) + chr(428 - 374), 0o10), ehT0Px3KOsy9('\060' + chr(2887 - 2776) + chr(2338 - 2287) + '\x30' + chr(190 - 142), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110110) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\x32' + chr(177 - 122) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(55) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6620 - 6509) + '\066' + chr(1465 - 1411), 31273 - 31265), ehT0Px3KOsy9(chr(1960 - 1912) + chr(111) + chr(0b101000 + 0o12) + '\x34' + chr(1635 - 1580), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b10101 + 0o40) + chr(51), 4805 - 4797), ehT0Px3KOsy9('\060' + chr(3240 - 3129) + chr(0b110011) + '\064' + '\x34', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10101 + 0o34) + chr(50) + chr(0b100111 + 0o11), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\067' + chr(1925 - 1873), ord("\x08")), ehT0Px3KOsy9(chr(2136 - 2088) + chr(111) + chr(51) + chr(1882 - 1832), 28480 - 28472)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + '\065' + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'U'), chr(100) + chr(0b1100 + 0o131) + chr(0b1100011) + chr(7754 - 7643) + chr(100) + chr(0b1010100 + 0o21))(chr(0b1110101) + chr(0b1100100 + 0o20) + '\x66' + chr(0b101100 + 0o1) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def rosZIjz_4yJQ(fZZRXPoCdvCE, I84MecrwE9bg, hY3xxXn4zI2h, Crc7HmsihYFT, VEaUOz8spat_):
OeWW0F1dBPRQ = CIVheOt0RKQX.symbol.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1f\xce\xefT'), chr(100) + chr(101) + '\143' + chr(10426 - 10315) + chr(0b10001 + 0o123) + chr(0b1001000 + 0o35))(chr(370 - 253) + chr(116) + chr(0b1100110) + chr(0b101010 + 0o3) + chr(2117 - 2061)), stype=xafqLlk3kkUe(SXOLrMavuUCe(b'\x18\xdc\xe9'), chr(0b1100100) + chr(101) + chr(9455 - 9356) + chr(0b10101 + 0o132) + '\x64' + chr(101))(chr(117) + chr(7887 - 7771) + chr(0b1001000 + 0o36) + chr(0b0 + 0o55) + chr(0b111000)))
cMbll0QYhULo = CIVheOt0RKQX.symbol.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(11513 - 11402) + chr(0b10001 + 0o123) + '\x65')(chr(0b1010110 + 0o37) + '\164' + '\146' + '\055' + '\070'), shape=(I84MecrwE9bg, fZZRXPoCdvCE), stype=xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xc0\xecjX\x94Y\xf8l"'), chr(0b1110 + 0o126) + chr(0b1101 + 0o130) + '\x63' + chr(111) + '\144' + '\x65')(chr(11600 - 11483) + chr(10168 - 10052) + chr(0b1100010 + 0o4) + chr(45) + '\070'), init=VEaUOz8spat_[xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), chr(4706 - 4606) + chr(0b1100101) + chr(0b11101 + 0o106) + chr(7153 - 7042) + '\x64' + chr(0b1100101))(chr(4951 - 4834) + '\x74' + chr(0b1100110) + chr(0b10010 + 0o33) + chr(0b1001 + 0o57))], lr_mult=hY3xxXn4zI2h[xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), '\144' + chr(666 - 565) + '\x63' + chr(0b1101111) + chr(0b1100011 + 0o1) + chr(8873 - 8772))('\x75' + chr(0b1011001 + 0o33) + chr(0b1100110) + chr(0b1 + 0o54) + '\070')], wd_mult=Crc7HmsihYFT[xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(111) + '\x64' + chr(0b1100101))('\165' + chr(4556 - 4440) + '\146' + chr(45) + chr(56))])
AOfzRywRzEXp = CIVheOt0RKQX.symbol.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(100) + chr(9468 - 9367) + chr(0b1100011) + '\x6f' + '\x64' + chr(4121 - 4020))('\165' + '\164' + chr(0b11101 + 0o111) + chr(0b100 + 0o51) + chr(0b1001 + 0o57)), shape=(I84MecrwE9bg, ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31', 0b1000)), stype=xafqLlk3kkUe(SXOLrMavuUCe(b'\t\xc0\xecjX\x94Y\xf8l"'), chr(0b1100100) + chr(678 - 577) + '\x63' + chr(4182 - 4071) + chr(1026 - 926) + '\145')(chr(117) + chr(116) + chr(0b1011100 + 0o12) + chr(0b1101 + 0o40) + '\070'), init=VEaUOz8spat_[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(0b1100100) + chr(0b1001001 + 0o34) + chr(0b110001 + 0o62) + chr(0b1101111) + chr(0b1000100 + 0o40) + '\145')('\x75' + chr(2376 - 2260) + chr(0b1100110) + '\x2d' + chr(0b101101 + 0o13))], lr_mult=hY3xxXn4zI2h[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(0b101110 + 0o66) + chr(498 - 397) + '\143' + '\x6f' + chr(100) + chr(338 - 237))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(1879 - 1834) + chr(0b1011 + 0o55))], wd_mult=Crc7HmsihYFT[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(100) + chr(6260 - 6159) + '\143' + chr(7313 - 7202) + chr(7460 - 7360) + chr(6905 - 6804))(chr(0b111110 + 0o67) + '\x74' + chr(102) + '\055' + chr(56))])
svejelXpW6MN = CIVheOt0RKQX.symbol.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\x9f'), chr(0b1100100) + chr(0b1100101) + chr(6538 - 6439) + chr(0b101 + 0o152) + chr(100) + chr(0b1001011 + 0o32))(chr(9862 - 9745) + chr(116) + '\146' + chr(919 - 874) + chr(0b1100 + 0o54)), shape=(ehT0Px3KOsy9(chr(0b110000) + chr(5220 - 5109) + chr(1090 - 1041), 8),), init=VEaUOz8spat_[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\x9f'), '\x64' + chr(0b1100101) + '\x63' + chr(0b110011 + 0o74) + chr(2790 - 2690) + '\145')('\165' + chr(0b1110100) + chr(5124 - 5022) + chr(45) + chr(56))], lr_mult=hY3xxXn4zI2h[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\x9f'), '\144' + chr(999 - 898) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(1216 - 1171) + chr(56))], wd_mult=Crc7HmsihYFT[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\x9f'), chr(0b1011001 + 0o13) + '\x65' + chr(99) + chr(0b100101 + 0o112) + chr(0b1100100) + chr(101))('\x75' + chr(3971 - 3855) + '\146' + '\055' + '\070')])
_M6EYgFcfTYt = CIVheOt0RKQX.symbol.broadcast_add(CIVheOt0RKQX.symbol.dot(OeWW0F1dBPRQ, AOfzRywRzEXp), svejelXpW6MN)
xZ902rkBdfdn = CIVheOt0RKQX.symbol._internal._square_sum(data=cMbll0QYhULo, axis=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1909 - 1860), 8), keepdims=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001), 8))
VmhgIeMraiP3 = OeWW0F1dBPRQ.square()
XZP1pmmzKfnW = CIVheOt0RKQX.sym.dot(VmhgIeMraiP3, xZ902rkBdfdn)
onjde2tYsPdq = CIVheOt0RKQX.symbol.dot(OeWW0F1dBPRQ, cMbll0QYhULo)
mbAF_botG1GZ = 0.5 * CIVheOt0RKQX.symbol.square(data=onjde2tYsPdq)
RQhhmqGL3hph = CIVheOt0RKQX.symbol.Concat(_M6EYgFcfTYt, mbAF_botG1GZ, dim=ehT0Px3KOsy9('\060' + '\157' + chr(0b110001), 8))
R2L1mPj1YumK = RQhhmqGL3hph.xkxBmo49x2An(axis=ehT0Px3KOsy9('\x30' + chr(4132 - 4021) + chr(0b110001), 8), keepdims=ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101100 + 0o5), 8))
AcAHVyrryx4P = -0.5 * XZP1pmmzKfnW
FK0vqzZ5gPN6 = R2L1mPj1YumK + AcAHVyrryx4P
SqiSOtYOqOJH = CIVheOt0RKQX.symbol.Variable(xafqLlk3kkUe(SXOLrMavuUCe(b'\x08\xc0\xfdAF\x85@\xd5s&\xea\xc2\x95'), chr(100) + '\145' + chr(99) + chr(111) + '\144' + chr(0b1100101))('\165' + '\164' + chr(0b110000 + 0o66) + chr(45) + chr(56)))
FK0vqzZ5gPN6 = CIVheOt0RKQX.symbol.LogisticRegressionOutput(data=FK0vqzZ5gPN6, label=SqiSOtYOqOJH)
return FK0vqzZ5gPN6
|
apache/incubator-mxnet
|
example/rnn/word_lm/data.py
|
batchify
|
def batchify(data, batch_size):
"""Reshape data into (num_example, batch_size)"""
nbatch = data.shape[0] // batch_size
data = data[:nbatch * batch_size]
data = data.reshape((batch_size, nbatch)).T
return data
|
python
|
def batchify(data, batch_size):
"""Reshape data into (num_example, batch_size)"""
nbatch = data.shape[0] // batch_size
data = data[:nbatch * batch_size]
data = data.reshape((batch_size, nbatch)).T
return data
|
[
"def",
"batchify",
"(",
"data",
",",
"batch_size",
")",
":",
"nbatch",
"=",
"data",
".",
"shape",
"[",
"0",
"]",
"//",
"batch_size",
"data",
"=",
"data",
"[",
":",
"nbatch",
"*",
"batch_size",
"]",
"data",
"=",
"data",
".",
"reshape",
"(",
"(",
"batch_size",
",",
"nbatch",
")",
")",
".",
"T",
"return",
"data"
] |
Reshape data into (num_example, batch_size)
|
[
"Reshape",
"data",
"into",
"(",
"num_example",
"batch_size",
")"
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com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G5VS3dE_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) + chr(0b110011) + chr(48) + chr(2650 - 2597), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100100 + 0o17) + '\065', 35617 - 35609), ehT0Px3KOsy9(chr(2268 - 2220) + chr(111) + chr(50) + chr(1948 - 1898) + chr(0b110010), 47206 - 47198), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(50) + chr(50), 24341 - 24333), ehT0Px3KOsy9(chr(48) + chr(12270 - 12159) + chr(2214 - 2164) + chr(0b110110) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8411 - 8300) + chr(54) + '\063', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101101 + 0o4) + chr(55) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(675 - 620) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x37' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + chr(1589 - 1539) + chr(51) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(10135 - 10024) + chr(51) + '\x30', 33361 - 33353), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(154 - 105), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + chr(0b11000 + 0o35) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(579 - 526) + '\x35', 0b1000), ehT0Px3KOsy9(chr(2186 - 2138) + chr(0b1101111) + chr(55) + chr(0b0 + 0o65), 8), ehT0Px3KOsy9(chr(923 - 875) + chr(0b1101111) + '\063' + chr(55) + chr(0b110001), 14940 - 14932), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\064' + chr(288 - 239), 61931 - 61923), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(3401 - 3290) + '\x32' + chr(0b1001 + 0o51) + chr(0b101001 + 0o14), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(1892 - 1837) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(2136 - 2025) + chr(0b110111) + '\060', 31606 - 31598), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\065', 8), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\x37' + chr(0b110011), 62900 - 62892), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100010 + 0o25) + chr(0b1011 + 0o47), 27188 - 27180), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(8778 - 8667) + chr(968 - 917) + chr(143 - 88) + '\062', 0o10), ehT0Px3KOsy9(chr(261 - 213) + chr(7311 - 7200) + '\x32' + '\060' + chr(0b101101 + 0o3), 0b1000), ehT0Px3KOsy9(chr(1961 - 1913) + chr(0b1101111) + chr(389 - 338) + chr(1172 - 1124) + '\x31', 12032 - 12024), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1546 - 1495) + chr(0b11 + 0o63) + chr(210 - 155), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(49) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110000 + 0o1) + chr(0b110101) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(944 - 893) + chr(50) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x34' + chr(0b110010), 3716 - 3708), ehT0Px3KOsy9(chr(467 - 419) + chr(824 - 713) + '\064' + chr(55), 0o10), ehT0Px3KOsy9(chr(1761 - 1713) + '\x6f' + chr(1542 - 1491) + '\061' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3947 - 3836) + chr(0b110010) + chr(0b110111) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o23) + chr(49) + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(54) + chr(48), 0o10), ehT0Px3KOsy9(chr(1458 - 1410) + '\157' + chr(0b101010 + 0o7) + '\064' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + '\x36' + chr(522 - 473), 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(11184 - 11073) + '\061' + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(872 - 824) + chr(111) + '\x32' + chr(48) + chr(0b110111), 51327 - 51319)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + '\x35' + chr(1094 - 1046), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb'), chr(100) + chr(624 - 523) + '\143' + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(116) + chr(102) + chr(0b11110 + 0o17) + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def aYIswmPnxv1d(ULnjp6D6efFH, ix9dZyeAmUxY):
JCGDCYWPlTCn = ULnjp6D6efFH.nauYfLglTpcb[ehT0Px3KOsy9(chr(2142 - 2094) + '\x6f' + chr(0b110000), 0b1000)] // ix9dZyeAmUxY
ULnjp6D6efFH = ULnjp6D6efFH[:JCGDCYWPlTCn * ix9dZyeAmUxY]
ULnjp6D6efFH = ULnjp6D6efFH.reshape((ix9dZyeAmUxY, JCGDCYWPlTCn)).T
return ULnjp6D6efFH
|
apache/incubator-mxnet
|
example/rnn/word_lm/data.py
|
Corpus.tokenize
|
def tokenize(self, path):
"""Tokenizes a text file."""
assert os.path.exists(path)
# Add words to the dictionary
with open(path, 'r') as f:
tokens = 0
for line in f:
words = line.split() + ['<eos>']
tokens += len(words)
for word in words:
self.dictionary.add_word(word)
# Tokenize file content
with open(path, 'r') as f:
ids = np.zeros((tokens,), dtype='int32')
token = 0
for line in f:
words = line.split() + ['<eos>']
for word in words:
ids[token] = self.dictionary.word2idx[word]
token += 1
return mx.nd.array(ids, dtype='int32')
|
python
|
def tokenize(self, path):
"""Tokenizes a text file."""
assert os.path.exists(path)
# Add words to the dictionary
with open(path, 'r') as f:
tokens = 0
for line in f:
words = line.split() + ['<eos>']
tokens += len(words)
for word in words:
self.dictionary.add_word(word)
# Tokenize file content
with open(path, 'r') as f:
ids = np.zeros((tokens,), dtype='int32')
token = 0
for line in f:
words = line.split() + ['<eos>']
for word in words:
ids[token] = self.dictionary.word2idx[word]
token += 1
return mx.nd.array(ids, dtype='int32')
|
[
"def",
"tokenize",
"(",
"self",
",",
"path",
")",
":",
"assert",
"os",
".",
"path",
".",
"exists",
"(",
"path",
")",
"# Add words to the dictionary",
"with",
"open",
"(",
"path",
",",
"'r'",
")",
"as",
"f",
":",
"tokens",
"=",
"0",
"for",
"line",
"in",
"f",
":",
"words",
"=",
"line",
".",
"split",
"(",
")",
"+",
"[",
"'<eos>'",
"]",
"tokens",
"+=",
"len",
"(",
"words",
")",
"for",
"word",
"in",
"words",
":",
"self",
".",
"dictionary",
".",
"add_word",
"(",
"word",
")",
"# Tokenize file content",
"with",
"open",
"(",
"path",
",",
"'r'",
")",
"as",
"f",
":",
"ids",
"=",
"np",
".",
"zeros",
"(",
"(",
"tokens",
",",
")",
",",
"dtype",
"=",
"'int32'",
")",
"token",
"=",
"0",
"for",
"line",
"in",
"f",
":",
"words",
"=",
"line",
".",
"split",
"(",
")",
"+",
"[",
"'<eos>'",
"]",
"for",
"word",
"in",
"words",
":",
"ids",
"[",
"token",
"]",
"=",
"self",
".",
"dictionary",
".",
"word2idx",
"[",
"word",
"]",
"token",
"+=",
"1",
"return",
"mx",
".",
"nd",
".",
"array",
"(",
"ids",
",",
"dtype",
"=",
"'int32'",
")"
] |
Tokenizes a text file.
|
[
"Tokenizes",
"a",
"text",
"file",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/example/rnn/word_lm/data.py#L48-L70
|
train
|
Tokenizes a text 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,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRj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aRMa,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(0b1110 + 0o42) + chr(111) + chr(0b1110 + 0o44) + '\067' + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8874 - 8763) + '\x31' + chr(49) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011000 + 0o27) + chr(51) + chr(800 - 749) + chr(48), 0o10), ehT0Px3KOsy9(chr(202 - 154) + chr(2306 - 2195) + '\x31' + chr(0b110001) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(2021 - 1971) + chr(2116 - 2064), 18726 - 18718), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1464 - 1411) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011010 + 0o25) + chr(1881 - 1829) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + '\061' + chr(2769 - 2716), 5046 - 5038), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11011 + 0o26) + '\x30' + '\065', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b100001 + 0o20) + chr(0b110001) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1010000 + 0o37) + '\061' + chr(0b110101) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b110111) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(1597 - 1546) + chr(1980 - 1930) + '\x30', 28254 - 28246), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o41) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o12) + '\065' + '\060', 49939 - 49931), ehT0Px3KOsy9(chr(1811 - 1763) + chr(0b1001100 + 0o43) + chr(0b111 + 0o54) + chr(0b110001) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(49) + chr(0b10001 + 0o45) + chr(0b11010 + 0o34), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110000 + 0o1) + chr(569 - 517) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b101101 + 0o4) + chr(0b110110) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(0b110010) + '\063' + chr(0b101000 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(247 - 199) + '\x6f' + chr(0b101000 + 0o11) + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x36' + chr(2359 - 2305), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101111 + 0o3) + chr(51) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b101100 + 0o4) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(55) + chr(0b1110 + 0o46), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(0b10001 + 0o37), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(7692 - 7581) + chr(0b110011) + chr(2111 - 2057) + chr(2154 - 2100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11729 - 11618) + chr(0b110010) + chr(936 - 888) + chr(48), 0o10), ehT0Px3KOsy9(chr(1042 - 994) + chr(0b1101100 + 0o3) + '\061' + chr(97 - 49) + chr(631 - 583), 6358 - 6350), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x30' + chr(2356 - 2307), 0b1000), ehT0Px3KOsy9('\060' + chr(7339 - 7228) + chr(51) + chr(0b1001 + 0o55) + '\066', 8), ehT0Px3KOsy9('\x30' + chr(8275 - 8164) + chr(0b110001) + chr(53) + chr(0b101010 + 0o7), 0o10), ehT0Px3KOsy9(chr(963 - 915) + chr(5910 - 5799) + chr(0b110010) + chr(0b110110), 12439 - 12431), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + '\063' + '\061' + chr(0b101011 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(1123 - 1072) + chr(0b110010) + '\x33', 7446 - 7438), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(1851 - 1802) + chr(0b110011) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10000 + 0o41) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(4898 - 4787) + '\062' + chr(0b110001) + chr(0b110010 + 0o0), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b10 + 0o56) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + '\x36' + '\064', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(1265 - 1217), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x92'), chr(0b1100100) + '\145' + chr(0b1011111 + 0o4) + chr(5498 - 5387) + chr(3187 - 3087) + chr(5491 - 5390))(chr(117) + chr(0b1110100) + '\146' + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def W_IaWYV4a22j(oVre8I6UXc3b, EaCjyhZptSer):
assert xafqLlk3kkUe(oqhJDdMJfuwx.path, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd93\xb1>\xe0^'), chr(0b1010111 + 0o15) + chr(0b1100101) + '\x63' + chr(0b1101000 + 0o7) + chr(0b11010 + 0o112) + chr(1893 - 1792))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(2563 - 2507)))(EaCjyhZptSer)
with _fwkIVCGgtAN(EaCjyhZptSer, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), chr(100) + chr(0b1111 + 0o126) + '\143' + chr(0b1100 + 0o143) + chr(0b1100100) + chr(0b110 + 0o137))(chr(7627 - 7510) + chr(0b10011 + 0o141) + chr(7067 - 6965) + chr(0b101001 + 0o4) + '\070')) as EGyt1xfPT1P6:
Sz7tXxaCGqJ1 = ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 41996 - 41988)
for LycYkDpyelF6 in EGyt1xfPT1P6:
o34DiSJcu6N2 = LycYkDpyelF6.split() + [xafqLlk3kkUe(SXOLrMavuUCe(b'\x80.\xb7>\xaa'), '\x64' + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1000001 + 0o44))(chr(117) + chr(116) + '\146' + chr(292 - 247) + chr(2658 - 2602))]
Sz7tXxaCGqJ1 += c2A0yzQpDQB3(o34DiSJcu6N2)
for CWnx52wJLqEN in o34DiSJcu6N2:
xafqLlk3kkUe(oVre8I6UXc3b.dictionary, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd/\xbc\x12\xe3BSi'), '\144' + '\x65' + chr(9745 - 9646) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1100001 + 0o24) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070'))(CWnx52wJLqEN)
with _fwkIVCGgtAN(EaCjyhZptSer, xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), chr(0b1100100) + chr(1624 - 1523) + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(458 - 402))) as EGyt1xfPT1P6:
zdjj2pRemk_P = WqUC3KWvYVup.zeros((Sz7tXxaCGqJ1,), dtype=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5%\xac~\xa6'), chr(4742 - 4642) + chr(0b111101 + 0o50) + chr(99) + chr(0b1101111) + chr(100) + '\145')('\165' + chr(0b1010011 + 0o41) + chr(0b1100110) + chr(1479 - 1434) + '\070'))
mTy3fac_AqJ5 = ehT0Px3KOsy9(chr(1998 - 1950) + '\x6f' + chr(0b111 + 0o51), 8)
for LycYkDpyelF6 in EGyt1xfPT1P6:
o34DiSJcu6N2 = LycYkDpyelF6.split() + [xafqLlk3kkUe(SXOLrMavuUCe(b'\x80.\xb7>\xaa'), '\144' + chr(101) + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(9247 - 9145) + chr(0b1010 + 0o43) + chr(56))]
for CWnx52wJLqEN in o34DiSJcu6N2:
zdjj2pRemk_P[mTy3fac_AqJ5] = oVre8I6UXc3b.dictionary.word2idx[CWnx52wJLqEN]
mTy3fac_AqJ5 += ehT0Px3KOsy9(chr(48) + '\157' + '\061', ord("\x08"))
return xafqLlk3kkUe(CIVheOt0RKQX.nd, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe{\xbd\x1d\xd0EQ|=\x02Z\xd3'), '\x64' + chr(101) + chr(6307 - 6208) + chr(0b1101111) + '\144' + '\145')('\165' + '\164' + chr(8367 - 8265) + '\x2d' + chr(56)))(zdjj2pRemk_P, dtype=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5%\xac~\xa6'), chr(0b100110 + 0o76) + chr(8242 - 8141) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1010101 + 0o20))('\165' + chr(0b1110100) + '\x66' + chr(0b111 + 0o46) + chr(0b111000)))
|
apache/incubator-mxnet
|
python/mxnet/symbol_doc.py
|
_build_doc
|
def _build_doc(func_name,
desc,
arg_names,
arg_types,
arg_desc,
key_var_num_args=None,
ret_type=None):
"""Build docstring for symbolic functions."""
param_str = _build_param_doc(arg_names, arg_types, arg_desc)
if key_var_num_args:
desc += '\nThis function support variable length of positional input.'
doc_str = ('%s\n\n' +
'%s\n' +
'name : string, optional.\n' +
' Name of the resulting symbol.\n\n' +
'Returns\n' +
'-------\n' +
'Symbol\n' +
' The result symbol.')
doc_str = doc_str % (desc, param_str)
extra_doc = "\n" + '\n'.join([x.__doc__ for x in type.__subclasses__(SymbolDoc)
if x.__name__ == '%sDoc' % func_name])
doc_str += _re.sub(_re.compile(" "), "", extra_doc)
doc_str = _re.sub('NDArray-or-Symbol', 'Symbol', doc_str)
return doc_str
|
python
|
def _build_doc(func_name,
desc,
arg_names,
arg_types,
arg_desc,
key_var_num_args=None,
ret_type=None):
"""Build docstring for symbolic functions."""
param_str = _build_param_doc(arg_names, arg_types, arg_desc)
if key_var_num_args:
desc += '\nThis function support variable length of positional input.'
doc_str = ('%s\n\n' +
'%s\n' +
'name : string, optional.\n' +
' Name of the resulting symbol.\n\n' +
'Returns\n' +
'-------\n' +
'Symbol\n' +
' The result symbol.')
doc_str = doc_str % (desc, param_str)
extra_doc = "\n" + '\n'.join([x.__doc__ for x in type.__subclasses__(SymbolDoc)
if x.__name__ == '%sDoc' % func_name])
doc_str += _re.sub(_re.compile(" "), "", extra_doc)
doc_str = _re.sub('NDArray-or-Symbol', 'Symbol', doc_str)
return doc_str
|
[
"def",
"_build_doc",
"(",
"func_name",
",",
"desc",
",",
"arg_names",
",",
"arg_types",
",",
"arg_desc",
",",
"key_var_num_args",
"=",
"None",
",",
"ret_type",
"=",
"None",
")",
":",
"param_str",
"=",
"_build_param_doc",
"(",
"arg_names",
",",
"arg_types",
",",
"arg_desc",
")",
"if",
"key_var_num_args",
":",
"desc",
"+=",
"'\\nThis function support variable length of positional input.'",
"doc_str",
"=",
"(",
"'%s\\n\\n'",
"+",
"'%s\\n'",
"+",
"'name : string, optional.\\n'",
"+",
"' Name of the resulting symbol.\\n\\n'",
"+",
"'Returns\\n'",
"+",
"'-------\\n'",
"+",
"'Symbol\\n'",
"+",
"' The result symbol.'",
")",
"doc_str",
"=",
"doc_str",
"%",
"(",
"desc",
",",
"param_str",
")",
"extra_doc",
"=",
"\"\\n\"",
"+",
"'\\n'",
".",
"join",
"(",
"[",
"x",
".",
"__doc__",
"for",
"x",
"in",
"type",
".",
"__subclasses__",
"(",
"SymbolDoc",
")",
"if",
"x",
".",
"__name__",
"==",
"'%sDoc'",
"%",
"func_name",
"]",
")",
"doc_str",
"+=",
"_re",
".",
"sub",
"(",
"_re",
".",
"compile",
"(",
"\" \"",
")",
",",
"\"\"",
",",
"extra_doc",
")",
"doc_str",
"=",
"_re",
".",
"sub",
"(",
"'NDArray-or-Symbol'",
",",
"'Symbol'",
",",
"doc_str",
")",
"return",
"doc_str"
] |
Build docstring for symbolic functions.
|
[
"Build",
"docstring",
"for",
"symbolic",
"functions",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/symbol_doc.py#L212-L236
|
train
|
Build docstring for symbolic functions.
|
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,N5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yzQpDQB3,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(0b1101111) + chr(1624 - 1572), 21528 - 21520), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(0b110001) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1425 - 1377) + chr(0b110 + 0o151) + '\061' + '\061' + chr(0b10000 + 0o47), 0o10), ehT0Px3KOsy9(chr(926 - 878) + chr(111) + chr(50) + chr(0b1010 + 0o51) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(55) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1001 + 0o50) + '\065' + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(659 - 607), 8), ehT0Px3KOsy9(chr(48) + chr(4994 - 4883) + '\x32' + chr(951 - 900) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b101110 + 0o2), 0o10), ehT0Px3KOsy9(chr(1803 - 1755) + chr(111) + chr(0b110001) + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1589 - 1478) + chr(0b110011) + chr(0b110110) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(307 - 258) + chr(2743 - 2689) + chr(0b101001 + 0o10), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x37' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101010 + 0o10), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(1959 - 1905) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(2230 - 2182) + '\157' + '\x32' + chr(0b110001) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b101101 + 0o6) + '\064', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1413 - 1363) + chr(0b110101) + chr(51), 0o10), ehT0Px3KOsy9(chr(2249 - 2201) + '\x6f' + chr(0b110001) + chr(0b110 + 0o54) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(0b110001) + '\065' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x36' + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(1413 - 1365) + chr(5468 - 5357) + chr(51) + chr(2947 - 2892) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1888 - 1837) + chr(52) + '\065', 58428 - 58420), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(0b110001) + '\062' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b10000 + 0o43) + chr(0b110000), 8), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b101001 + 0o16) + '\060', 34251 - 34243), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(54), 314 - 306), ehT0Px3KOsy9(chr(0b110000) + chr(11851 - 11740) + chr(873 - 824) + chr(334 - 285) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010000 + 0o37) + chr(1127 - 1078) + chr(0b100101 + 0o14) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(50) + chr(0b10010 + 0o45) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x31' + chr(0b11011 + 0o32), 38738 - 38730), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110001) + chr(54) + chr(0b110010 + 0o4), 0o10), ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + '\062' + chr(0b100101 + 0o20) + chr(1405 - 1356), 0b1000), ehT0Px3KOsy9('\060' + chr(418 - 307) + '\062' + '\064' + '\x31', 25776 - 25768), ehT0Px3KOsy9(chr(2195 - 2147) + chr(6907 - 6796) + chr(0b100010 + 0o21) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(129 - 79) + '\x31', 51926 - 51918), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(1645 - 1596) + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110000) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10000 + 0o41) + '\x34' + chr(0b110110), 62353 - 62345)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(416 - 363) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(3288 - 3188) + chr(0b1011111 + 0o6) + '\x63' + chr(0b1101111) + chr(0b1001111 + 0o25) + '\x65')(chr(0b1110101) + chr(0b1100000 + 0o24) + chr(9180 - 9078) + '\055' + '\070') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def nooHDAginguv(iyGI9pmJHTiU, XQWhGt09O88Z, YjuRZH4bY1wk, WLkCKxcteYqC, INZZLFxgQpmW, D7JAfgys9yLN=None, CN8B4259V4R0=None):
Ltj0rQfQzbjZ = GgCeUBpYjfIV(YjuRZH4bY1wk, WLkCKxcteYqC, INZZLFxgQpmW)
if D7JAfgys9yLN:
XQWhGt09O88Z += xafqLlk3kkUe(SXOLrMavuUCe(b"\x0e\x9c'\xf5\rLb\xecv\x07\x80\x18Pl\x97\xfd\xe9\xdb&G\x19\x84\xd9\x931jQw,$\xdd\xad\x1a\xcc\xcfx\xe5'\xe6\tb\xe8?\xf3\r\x05p\xf0w\n\x95\x1d\x1fk\xd9\xfe\xe9\xdfx"), '\144' + chr(8711 - 8610) + chr(0b1100011) + chr(1461 - 1350) + chr(0b1000001 + 0o43) + chr(0b1100101))('\165' + chr(116) + '\146' + chr(45) + chr(0b111000))
X7woN5pHuPHy = xafqLlk3kkUe(SXOLrMavuUCe(b'!\xbbE\x96'), '\144' + chr(0b110 + 0o137) + '\143' + chr(111) + '\144' + '\x65')(chr(117) + chr(0b1110 + 0o146) + '\146' + chr(45) + chr(56)) + xafqLlk3kkUe(SXOLrMavuUCe(b'!\xbbE'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(8914 - 8814) + chr(0b1000101 + 0o40))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + '\070') + xafqLlk3kkUe(SXOLrMavuUCe(b'j\xa9"\xf9^V$\xeal\x16\x9d\x1fX.\x97\xe1\xec\xdf?G\x05\x91\x95\xcbZ'), chr(100) + '\x65' + '\x63' + chr(0b1101111) + chr(3428 - 3328) + chr(0b1100101))(chr(13271 - 13154) + chr(0b1110100) + chr(0b1100110) + chr(0b10101 + 0o30) + '\x38') + xafqLlk3kkUe(SXOLrMavuUCe(b'$\xe8o\xbc0\ri\xfc8\x0b\x92QKj\xd2\xae\xee\xce%]\x07\x84\x90\x8b78Ko#*\xd7\xe1X\xa3\xab'), '\x64' + '\x65' + '\x63' + chr(6050 - 5939) + '\x64' + chr(0b1011001 + 0o14))(chr(117) + chr(4000 - 3884) + chr(992 - 890) + chr(1197 - 1152) + chr(0b111000)) + xafqLlk3kkUe(SXOLrMavuUCe(b'V\xad;\xe9\x0c\x02w\x93'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100 + 0o131))(chr(0b10 + 0o163) + chr(10315 - 10199) + '\146' + '\x2d' + chr(0b111000)) + xafqLlk3kkUe(SXOLrMavuUCe(b')\xe5b\xb1SA)\x93'), chr(0b101001 + 0o73) + '\x65' + chr(0b1100011) + '\157' + '\x64' + '\x65')(chr(0b1101 + 0o150) + '\x74' + chr(0b1100110) + chr(0b10010 + 0o33) + '\070') + xafqLlk3kkUe(SXOLrMavuUCe(b'W\xb1"\xfe\x11\x00\x0e'), chr(100) + chr(0b1100101) + chr(4187 - 4088) + '\157' + '\x64' + '\145')('\x75' + chr(116) + chr(0b100011 + 0o103) + chr(45) + chr(56)) + xafqLlk3kkUe(SXOLrMavuUCe(b'$\xe8o\xbc*\x04a\xb9j\x01\x87\x04Sv\x97\xfd\xe5\xc64G\x07\xde'), '\144' + chr(0b11011 + 0o112) + chr(0b11110 + 0o105) + '\157' + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(0b10101 + 0o121) + chr(1294 - 1249) + chr(565 - 509))
X7woN5pHuPHy = X7woN5pHuPHy % (XQWhGt09O88Z, Ltj0rQfQzbjZ)
VOi32E6xl76w = xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e'), '\x64' + chr(101) + chr(4684 - 4585) + chr(111) + chr(0b1100100) + chr(0b1001001 + 0o34))(chr(10497 - 10380) + chr(116) + chr(8134 - 8032) + chr(0b100110 + 0o7) + '\070') + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\144' + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(238 - 193) + chr(823 - 767))._oWXztVNnqHF([OeWW0F1dBPRQ.OZYzwAeSQh7N for OeWW0F1dBPRQ in wmQmyeWBmUpv.__subclasses__(V3Na3zeCSJwm) if OeWW0F1dBPRQ.Gbej4oZqKLA6 == xafqLlk3kkUe(SXOLrMavuUCe(b'!\xbb\x0b\xf3\x1d'), '\144' + chr(5183 - 5082) + chr(99) + chr(0b111 + 0o150) + chr(8850 - 8750) + chr(8252 - 8151))(chr(117) + chr(4320 - 4204) + chr(102) + '\x2d' + '\070') % iyGI9pmJHTiU])
X7woN5pHuPHy += AQ9o1Vgb5B04.sub(AQ9o1Vgb5B04.compile(xafqLlk3kkUe(SXOLrMavuUCe(b'$\xe8o\xbc'), '\144' + chr(0b1010 + 0o133) + '\143' + chr(11198 - 11087) + chr(0b1100100) + chr(8068 - 7967))('\x75' + '\164' + chr(8142 - 8040) + '\055' + chr(0b111000))), xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(0b10000 + 0o124) + '\x65')(chr(0b1001111 + 0o46) + chr(0b111000 + 0o74) + chr(2508 - 2406) + chr(0b101010 + 0o3) + chr(667 - 611)), VOi32E6xl76w)
X7woN5pHuPHy = AQ9o1Vgb5B04.sub(xafqLlk3kkUe(SXOLrMavuUCe(b'J\x8c\x0e\xee\x0c\r}\xb4w\x16\xd9"Fo\xd5\xe1\xf0'), '\144' + chr(953 - 852) + '\x63' + '\x6f' + chr(0b10000 + 0o124) + '\x65')(chr(11380 - 11263) + '\x74' + chr(102) + '\055' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'W\xb1"\xfe\x11\x00'), '\x64' + chr(0b1100101) + chr(2707 - 2608) + chr(0b1011010 + 0o25) + '\x64' + '\145')(chr(943 - 826) + chr(0b1010111 + 0o35) + chr(1621 - 1519) + chr(0b1 + 0o54) + '\070'), X7woN5pHuPHy)
return X7woN5pHuPHy
|
apache/incubator-mxnet
|
python/mxnet/symbol_doc.py
|
SymbolDoc.get_output_shape
|
def get_output_shape(sym, **input_shapes):
"""Get user friendly information of the output shapes."""
_, s_outputs, _ = sym.infer_shape(**input_shapes)
return dict(zip(sym.list_outputs(), s_outputs))
|
python
|
def get_output_shape(sym, **input_shapes):
"""Get user friendly information of the output shapes."""
_, s_outputs, _ = sym.infer_shape(**input_shapes)
return dict(zip(sym.list_outputs(), s_outputs))
|
[
"def",
"get_output_shape",
"(",
"sym",
",",
"*",
"*",
"input_shapes",
")",
":",
"_",
",",
"s_outputs",
",",
"_",
"=",
"sym",
".",
"infer_shape",
"(",
"*",
"*",
"input_shapes",
")",
"return",
"dict",
"(",
"zip",
"(",
"sym",
".",
"list_outputs",
"(",
")",
",",
"s_outputs",
")",
")"
] |
Get user friendly information of the output shapes.
|
[
"Get",
"user",
"friendly",
"information",
"of",
"the",
"output",
"shapes",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/symbol_doc.py#L56-L59
|
train
|
Get user friendly information of the output shapes.
|
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,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yiPkCViZiX,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(0b100111 + 0o11) + chr(111) + '\x33' + '\x32' + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(1496 - 1446) + '\067' + chr(644 - 591), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(54) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\x31' + chr(0b101010 + 0o6) + chr(51), 11677 - 11669), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(744 - 689) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10010 + 0o41) + chr(623 - 570) + chr(0b101010 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b100100 + 0o17) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2535 - 2424) + chr(0b11110 + 0o26) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001 + 0o2) + '\x31' + chr(0b11001 + 0o31), 2091 - 2083), ehT0Px3KOsy9(chr(1275 - 1227) + '\x6f' + '\063' + '\x32' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(0b1000 + 0o57) + chr(53), 45922 - 45914), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(0b110 + 0o53) + chr(0b110100) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(52) + '\x33', 59746 - 59738), ehT0Px3KOsy9(chr(681 - 633) + chr(0b1101111) + chr(49) + chr(0b11101 + 0o25) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(0b110011) + chr(2343 - 2289) + '\064', 29355 - 29347), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\065' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(9965 - 9854) + chr(0b110101) + chr(2264 - 2214), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001110 + 0o41) + chr(1948 - 1896) + chr(0b10001 + 0o43), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b100000 + 0o26) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(4947 - 4836) + chr(49) + chr(0b100000 + 0o21) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(230 - 182) + '\157' + '\x32' + '\063' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(49) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(48) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010111 + 0o30) + chr(167 - 117) + chr(0b110010) + chr(1900 - 1852), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(12125 - 12014) + chr(0b110000 + 0o2) + '\064' + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + chr(0b110010) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(1616 - 1565) + chr(1536 - 1486) + chr(50), 14512 - 14504), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001 + 0o1) + chr(0b1010 + 0o54) + '\x36', 35243 - 35235), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10110 + 0o34) + chr(51) + chr(1059 - 1006), 58354 - 58346), ehT0Px3KOsy9(chr(2168 - 2120) + chr(111) + chr(2304 - 2254) + '\x36' + '\x35', 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x33' + chr(55) + chr(0b11111 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(0b10111 + 0o32) + chr(294 - 245) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b11101 + 0o23) + '\x30', 0o10), ehT0Px3KOsy9(chr(1673 - 1625) + chr(0b1101111) + '\x32' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1011011 + 0o24) + '\063' + chr(50) + chr(0b100 + 0o63), 52307 - 52299), ehT0Px3KOsy9(chr(0b110000) + chr(6154 - 6043) + '\x32' + chr(50) + chr(0b1100 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(749 - 701) + chr(111) + chr(0b110001) + '\061' + chr(0b110010), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\063' + chr(0b101001 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2605 - 2552) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(0b101000 + 0o12) + chr(0b110000), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(755 - 707) + chr(0b110011 + 0o74) + '\x35' + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe'), '\144' + chr(656 - 555) + chr(0b1000100 + 0o37) + chr(8396 - 8285) + chr(0b1100100) + chr(0b1001100 + 0o31))(chr(0b1000011 + 0o62) + '\x74' + chr(487 - 385) + chr(0b101101) + chr(145 - 89)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def OyLB6fyMwmTq(I7QF3KlS7cYz, **MUaMiwsTdGeu):
(VNGQdHSFPrso, I0Z4N8tX4dMI, VNGQdHSFPrso) = I7QF3KlS7cYz.infer_shape(**MUaMiwsTdGeu)
return wLqBDw8l0eIm(pZ0NK2y6HRbn(xafqLlk3kkUe(I7QF3KlS7cYz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xd4\xc67\xa5\x84\xa9T\xba\xa4\t\x12'), chr(0b111001 + 0o53) + '\x65' + '\143' + chr(0b1100 + 0o143) + chr(5269 - 5169) + chr(101))(chr(4222 - 4105) + chr(1057 - 941) + chr(0b1100110) + chr(45) + '\x38'))(), I0Z4N8tX4dMI))
|
apache/incubator-mxnet
|
python/mxnet/context.py
|
num_gpus
|
def num_gpus():
"""Query CUDA for the number of GPUs present.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
count : int
The number of GPUs.
"""
count = ctypes.c_int()
check_call(_LIB.MXGetGPUCount(ctypes.byref(count)))
return count.value
|
python
|
def num_gpus():
"""Query CUDA for the number of GPUs present.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
count : int
The number of GPUs.
"""
count = ctypes.c_int()
check_call(_LIB.MXGetGPUCount(ctypes.byref(count)))
return count.value
|
[
"def",
"num_gpus",
"(",
")",
":",
"count",
"=",
"ctypes",
".",
"c_int",
"(",
")",
"check_call",
"(",
"_LIB",
".",
"MXGetGPUCount",
"(",
"ctypes",
".",
"byref",
"(",
"count",
")",
")",
")",
"return",
"count",
".",
"value"
] |
Query CUDA for the number of GPUs present.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
count : int
The number of GPUs.
|
[
"Query",
"CUDA",
"for",
"the",
"number",
"of",
"GPUs",
"present",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/context.py#L244-L259
|
train
|
Query CUDA for the number of GPUs present.
|
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,NL8dtWOp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,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(768 - 720) + '\x6f' + chr(49) + '\x35' + chr(0b101000 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2316 - 2265) + chr(2058 - 2009) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(298 - 249) + '\x34', 0b1000), ehT0Px3KOsy9(chr(303 - 255) + chr(563 - 452) + chr(0b1100 + 0o47) + '\x33' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11581 - 11470) + chr(2103 - 2054) + '\061' + '\067', 61795 - 61787), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(50) + chr(0b110001), 40052 - 40044), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(49) + chr(50), 43697 - 43689), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(844 - 793) + chr(0b110011) + chr(1038 - 987), 38528 - 38520), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110000) + chr(52), 21621 - 21613), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x32' + chr(1779 - 1726) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(282 - 230) + chr(1720 - 1667), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\061' + chr(0b100101 + 0o15), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x34' + chr(2333 - 2281), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(48) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + '\062' + '\x37' + chr(371 - 320), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110111) + chr(0b100010 + 0o23), 56101 - 56093), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(440 - 386) + chr(0b110111), 3403 - 3395), ehT0Px3KOsy9(chr(1656 - 1608) + chr(0b1101 + 0o142) + chr(49) + '\064' + chr(693 - 645), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(1452 - 1400) + '\062', 14959 - 14951), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110100) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(1181 - 1132) + chr(54) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(1905 - 1794) + chr(1670 - 1620) + chr(48) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10000 + 0o42) + '\065' + chr(51), 0b1000), ehT0Px3KOsy9(chr(2246 - 2198) + chr(0b10000 + 0o137) + '\x31' + chr(1389 - 1341) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11001 + 0o32) + '\x30' + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(50) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\066' + chr(0b10001 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10340 - 10229) + '\063' + '\063' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8727 - 8616) + chr(51) + chr(0b110111) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4167 - 4056) + chr(0b110001) + chr(0b10 + 0o56) + chr(0b101 + 0o61), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b0 + 0o157) + '\063' + chr(0b100010 + 0o25) + chr(0b110000), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\067' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100101 + 0o12) + chr(0b100001 + 0o23) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\x30' + chr(0b110110), 8), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(5519 - 5408) + chr(0b110011) + chr(0b101100 + 0o4) + chr(120 - 65), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(52) + '\064', 2176 - 2168), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(612 - 558) + chr(1060 - 1008), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(2061 - 1950) + chr(1058 - 1005) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'@'), '\144' + '\145' + chr(1668 - 1569) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b110010 + 0o64) + chr(0b10111 + 0o26) + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def zcNH1ym8cZBx():
ualWdDeXJEGO = RyQ4N1viUrfz.c_int()
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'#\x96K\xbf;\x16\xda\x8e\x87m\xd8\x0b>'), '\144' + chr(101) + chr(6210 - 6111) + '\x6f' + '\x64' + '\145')('\165' + chr(0b101010 + 0o112) + '\x66' + chr(0b110 + 0o47) + '\x38'))(xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xb7~\xbf)'), chr(0b1100100) + chr(0b10 + 0o143) + chr(99) + '\x6f' + '\x64' + '\145')(chr(0b1101011 + 0o12) + chr(3195 - 3079) + chr(5103 - 5001) + chr(45) + chr(56)))(ualWdDeXJEGO)))
return xafqLlk3kkUe(ualWdDeXJEGO, xafqLlk3kkUe(SXOLrMavuUCe(b'?\xa3a\xbd\x18\x04\xc8\xea\xf7T\xee/'), '\144' + chr(101) + chr(2519 - 2420) + '\157' + chr(5629 - 5529) + chr(9357 - 9256))('\165' + chr(116) + chr(10175 - 10073) + '\055' + '\070'))
|
apache/incubator-mxnet
|
python/mxnet/context.py
|
gpu_memory_info
|
def gpu_memory_info(device_id=0):
"""Query CUDA for the free and total bytes of GPU global memory.
Parameters
----------
device_id : int, optional
The device id of the GPU device.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
(free, total) : (int, int)
The number of GPUs.
"""
free = ctypes.c_uint64()
total = ctypes.c_uint64()
dev_id = ctypes.c_int(device_id)
check_call(_LIB.MXGetGPUMemoryInformation64(dev_id, ctypes.byref(free), ctypes.byref(total)))
return (free.value, total.value)
|
python
|
def gpu_memory_info(device_id=0):
"""Query CUDA for the free and total bytes of GPU global memory.
Parameters
----------
device_id : int, optional
The device id of the GPU device.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
(free, total) : (int, int)
The number of GPUs.
"""
free = ctypes.c_uint64()
total = ctypes.c_uint64()
dev_id = ctypes.c_int(device_id)
check_call(_LIB.MXGetGPUMemoryInformation64(dev_id, ctypes.byref(free), ctypes.byref(total)))
return (free.value, total.value)
|
[
"def",
"gpu_memory_info",
"(",
"device_id",
"=",
"0",
")",
":",
"free",
"=",
"ctypes",
".",
"c_uint64",
"(",
")",
"total",
"=",
"ctypes",
".",
"c_uint64",
"(",
")",
"dev_id",
"=",
"ctypes",
".",
"c_int",
"(",
"device_id",
")",
"check_call",
"(",
"_LIB",
".",
"MXGetGPUMemoryInformation64",
"(",
"dev_id",
",",
"ctypes",
".",
"byref",
"(",
"free",
")",
",",
"ctypes",
".",
"byref",
"(",
"total",
")",
")",
")",
"return",
"(",
"free",
".",
"value",
",",
"total",
".",
"value",
")"
] |
Query CUDA for the free and total bytes of GPU global memory.
Parameters
----------
device_id : int, optional
The device id of the GPU device.
Raises
------
Will raise an exception on any CUDA error.
Returns
-------
(free, total) : (int, int)
The number of GPUs.
|
[
"Query",
"CUDA",
"for",
"the",
"free",
"and",
"total",
"bytes",
"of",
"GPU",
"global",
"memory",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/context.py#L261-L283
|
train
|
Query CUDA for the free and total bytes of GPU global memory.
|
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,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HmS9durw_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(0b1001 + 0o47) + chr(111) + chr(0b110010) + chr(0b110111) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10010 + 0o37) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b1000 + 0o52) + '\x33', 12146 - 12138), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(1613 - 1502) + chr(0b111 + 0o60) + chr(1128 - 1077), 0b1000), ehT0Px3KOsy9(chr(717 - 669) + chr(0b1101111) + chr(1091 - 1041) + chr(1083 - 1028) + chr(55), 12747 - 12739), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x37' + chr(0b10110 + 0o35), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b11010 + 0o35), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8864 - 8753) + '\x31' + chr(195 - 142), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(53) + chr(0b1111 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(1601 - 1553) + chr(6669 - 6558) + '\060', 8), ehT0Px3KOsy9(chr(1255 - 1207) + '\x6f' + chr(0b11011 + 0o30) + '\065' + '\x32', 57700 - 57692), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110011) + '\060', 3120 - 3112), ehT0Px3KOsy9(chr(2142 - 2094) + chr(111) + chr(0b110011) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6927 - 6816) + '\x31' + '\067' + chr(2544 - 2492), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(237 - 182) + '\x33', 8), ehT0Px3KOsy9(chr(1514 - 1466) + chr(1378 - 1267) + chr(0b110000 + 0o1), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10101 + 0o36) + '\060' + chr(905 - 853), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + chr(2441 - 2390) + chr(859 - 810) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + chr(0b11 + 0o57) + '\064' + chr(2758 - 2703), 24286 - 24278), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(2314 - 2259) + '\060', 0o10), ehT0Px3KOsy9(chr(2148 - 2100) + chr(111) + '\x33' + '\x31' + chr(1964 - 1914), 9298 - 9290), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101101 + 0o4) + '\066' + chr(0b101110 + 0o4), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010101 + 0o32) + '\x32' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(729 - 679) + '\x34' + chr(849 - 797), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x33' + chr(647 - 599) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(54) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1010101 + 0o32) + chr(0b11011 + 0o30) + chr(0b110101) + chr(2000 - 1948), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + chr(781 - 732) + '\x36' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\064' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(2258 - 2210) + '\157' + chr(0b100100 + 0o15) + chr(255 - 205), 59808 - 59800), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(196 - 85) + chr(0b110110) + chr(53), 15230 - 15222), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\061' + chr(1650 - 1597), 8), ehT0Px3KOsy9(chr(48) + chr(1352 - 1241) + '\063' + chr(0b110110) + chr(0b11100 + 0o33), 8346 - 8338), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100 + 0o55) + '\x31' + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b110100 + 0o73) + '\x32' + '\064' + chr(2173 - 2124), 26502 - 26494), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b0 + 0o63) + '\067', 8), ehT0Px3KOsy9(chr(1882 - 1834) + chr(0b111010 + 0o65) + '\x33' + '\062' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(55) + chr(0b11010 + 0o30), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(1948 - 1837) + chr(0b110101) + chr(0b110000), 6577 - 6569)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x90'), '\144' + '\x65' + '\x63' + '\157' + chr(0b111101 + 0o47) + '\145')('\x75' + '\164' + '\x66' + '\x2d' + '\x38') + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def M_WDiriaHjkp(kzTkm1D8Hk40=ehT0Px3KOsy9(chr(1406 - 1358) + chr(0b1010 + 0o145) + '\060', 8)):
RgAtzrKx80YI = RyQ4N1viUrfz.c_uint64()
K6dkrI1oAm5b = RyQ4N1viUrfz.c_uint64()
bqUe9IDNDJ7v = RyQ4N1viUrfz.c_int(kzTkm1D8Hk40)
VQ8g4dauNDMW(xafqLlk3kkUe(Wotx5x7oxVzK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3V\x14^\xcb\xbcPJ@yCo\x98!T\x12\x9dn\xb6\xa1\xc6\x0c\xa3\x1dy\x92\xf5'), chr(100) + chr(9126 - 9025) + chr(126 - 27) + chr(0b101101 + 0o102) + chr(100) + chr(101))(chr(2831 - 2714) + chr(12479 - 12363) + chr(2983 - 2881) + '\x2d' + chr(56)))(bqUe9IDNDJ7v, xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcw!^\xd9'), chr(0b1100100) + '\145' + chr(7986 - 7887) + chr(0b1101111) + chr(0b1100100) + chr(0b1 + 0o144))(chr(117) + '\164' + chr(8697 - 8595) + '\x2d' + '\x38'))(RgAtzrKx80YI), xafqLlk3kkUe(RyQ4N1viUrfz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcw!^\xd9'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(9361 - 9261) + '\x65')(chr(0b1110101) + chr(10845 - 10729) + chr(102) + chr(902 - 857) + chr(56)))(K6dkrI1oAm5b)))
return (xafqLlk3kkUe(RgAtzrKx80YI, xafqLlk3kkUe(SXOLrMavuUCe(b'\xefc>\\\xe8\xaeB.>JmJ'), chr(100) + chr(10162 - 10061) + chr(99) + chr(0b1111 + 0o140) + chr(0b1000 + 0o134) + '\145')('\x75' + '\164' + '\x66' + '\x2d' + chr(56))), xafqLlk3kkUe(K6dkrI1oAm5b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xefc>\\\xe8\xaeB.>JmJ'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(12151 - 12035) + chr(328 - 226) + chr(45) + chr(56))))
|
apache/incubator-mxnet
|
python/mxnet/context.py
|
current_context
|
def current_context():
"""Returns the current context.
By default, `mx.cpu()` is used for all the computations
and it can be overridden by using `with mx.Context(x)` statement where
x can be cpu(device_id) or gpu(device_id).
Examples
-------
>>> mx.current_context()
cpu(0)
>>> with mx.Context('gpu', 1): # Context changed in `with` block.
... mx.current_context() # Computation done here will be on gpu(1).
...
gpu(1)
>>> mx.current_context() # Back to default context.
cpu(0)
Returns
-------
default_ctx : Context
"""
if not hasattr(Context._default_ctx, "value"):
Context._default_ctx.value = Context('cpu', 0)
return Context._default_ctx.value
|
python
|
def current_context():
"""Returns the current context.
By default, `mx.cpu()` is used for all the computations
and it can be overridden by using `with mx.Context(x)` statement where
x can be cpu(device_id) or gpu(device_id).
Examples
-------
>>> mx.current_context()
cpu(0)
>>> with mx.Context('gpu', 1): # Context changed in `with` block.
... mx.current_context() # Computation done here will be on gpu(1).
...
gpu(1)
>>> mx.current_context() # Back to default context.
cpu(0)
Returns
-------
default_ctx : Context
"""
if not hasattr(Context._default_ctx, "value"):
Context._default_ctx.value = Context('cpu', 0)
return Context._default_ctx.value
|
[
"def",
"current_context",
"(",
")",
":",
"if",
"not",
"hasattr",
"(",
"Context",
".",
"_default_ctx",
",",
"\"value\"",
")",
":",
"Context",
".",
"_default_ctx",
".",
"value",
"=",
"Context",
"(",
"'cpu'",
",",
"0",
")",
"return",
"Context",
".",
"_default_ctx",
".",
"value"
] |
Returns the current context.
By default, `mx.cpu()` is used for all the computations
and it can be overridden by using `with mx.Context(x)` statement where
x can be cpu(device_id) or gpu(device_id).
Examples
-------
>>> mx.current_context()
cpu(0)
>>> with mx.Context('gpu', 1): # Context changed in `with` block.
... mx.current_context() # Computation done here will be on gpu(1).
...
gpu(1)
>>> mx.current_context() # Back to default context.
cpu(0)
Returns
-------
default_ctx : Context
|
[
"Returns",
"the",
"current",
"context",
"."
] |
1af29e9c060a4c7d60eeaacba32afdb9a7775ba7
|
https://github.com/apache/incubator-mxnet/blob/1af29e9c060a4c7d60eeaacba32afdb9a7775ba7/python/mxnet/context.py#L285-L309
|
train
|
Returns the current context.
|
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_zs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,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) + chr(2191 - 2141) + chr(0b101100 + 0o10) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(580 - 530) + chr(0b100000 + 0o22) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(0b1001 + 0o55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\x33' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + '\x37' + chr(1991 - 1937), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(221 - 110) + '\x31' + '\x36' + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(4153 - 4042) + chr(0b110010) + chr(1103 - 1048) + '\x33', 25822 - 25814), ehT0Px3KOsy9(chr(370 - 322) + '\157' + '\x32' + chr(0b10 + 0o60) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(11067 - 10956) + chr(0b110010) + chr(0b11010 + 0o35) + '\x36', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100100 + 0o21) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101110 + 0o1) + '\061' + chr(0b110011) + '\064', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\062' + '\x35' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(232 - 184) + chr(0b1101111) + '\x33' + chr(0b1110 + 0o50) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(52) + chr(1136 - 1083), 5767 - 5759), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111 + 0o0) + chr(51) + chr(2261 - 2210) + '\064', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + chr(811 - 761) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1001011 + 0o44) + chr(0b100010 + 0o17) + chr(0b110001) + chr(0b11111 + 0o30), 41403 - 41395), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1011 + 0o50) + chr(51) + chr(54), 14979 - 14971), ehT0Px3KOsy9('\x30' + chr(0b100001 + 0o116) + '\063' + chr(0b110100) + chr(0b10 + 0o56), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(12226 - 12115) + chr(0b110000 + 0o3) + '\x36' + chr(52), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11 + 0o60) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1110 + 0o43) + '\x37' + chr(826 - 774), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010 + 0o1) + '\x32' + '\x34', 0b1000), ehT0Px3KOsy9(chr(467 - 419) + '\157' + chr(50) + '\x35' + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(1861 - 1807) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(50) + chr(0b110001) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\060' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(1931 - 1883) + '\157' + chr(0b11100 + 0o26) + '\061' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + '\061' + chr(2432 - 2380) + chr(709 - 654), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110011) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2662 - 2551) + chr(49) + chr(0b110110) + chr(1962 - 1908), 0b1000), ehT0Px3KOsy9(chr(1650 - 1602) + '\x6f' + chr(580 - 530) + '\060', 25882 - 25874), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(56 - 6) + chr(0b1110 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(1465 - 1417) + chr(0b1101111) + chr(0b0 + 0o61) + chr(0b110101) + chr(178 - 130), ord("\x08")), ehT0Px3KOsy9(chr(452 - 404) + chr(111) + chr(51) + chr(0b110110) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\x37' + chr(0b1100 + 0o44), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + '\x32' + '\x34' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(1300 - 1251) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\062' + chr(0b100100 + 0o20), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + chr(0b110001) + chr(308 - 254), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(6414 - 6303) + '\065' + chr(0b110000), 61891 - 61883)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)])
def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh):
try:
return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f'), chr(3228 - 3128) + chr(101) + chr(0b1010100 + 0o17) + chr(0b0 + 0o157) + chr(0b1100100) + chr(0b1100101))(chr(0b11000 + 0o135) + chr(0b1110100) + chr(1423 - 1321) + '\055' + chr(56)) + _CF03Rifpmdh)
except yROw0HWBk0Qc:
return jFWsnpHpAUWz(RqocVGOryNPv)
def XCj8K5DCp8y0():
if not lot1PSoAwYhj(xafqLlk3kkUe(OQ5n2iUDAxKy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe\xf1C\xbd\xdf\x01\xd7\xe4\xe1O(\xd1'), '\144' + chr(1183 - 1082) + chr(0b1100011) + chr(0b1101111) + chr(0b111101 + 0o47) + chr(0b1000 + 0o135))(chr(117) + chr(5573 - 5457) + '\x66' + chr(0b101101) + chr(358 - 302))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\xf4J\xae\xdb'), chr(9738 - 9638) + '\145' + '\x63' + chr(0b1101111) + chr(8220 - 8120) + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(56))):
OQ5n2iUDAxKy._default_ctx.QmmgWUB13VCJ = OQ5n2iUDAxKy(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xe5S'), '\x64' + chr(0b1100101) + chr(6676 - 6577) + chr(0b1101111) + chr(100) + '\x65')('\x75' + '\x74' + chr(102) + chr(0b11100 + 0o21) + chr(1818 - 1762)), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b0 + 0o60), 43003 - 42995))
return xafqLlk3kkUe(OQ5n2iUDAxKy._default_ctx, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xf8K\xbc\xe9!\xf9\xa1\x8dz\x1f\xe3'), '\x64' + chr(0b1100101) + chr(0b100000 + 0o103) + chr(0b1011011 + 0o24) + '\x64' + '\x65')(chr(5858 - 5741) + chr(0b1101 + 0o147) + chr(0b1000101 + 0o41) + '\x2d' + chr(0b111000)))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.