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
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_long_stochastic_discrete_25steps
def rlmb_long_stochastic_discrete_25steps(): """Long setting with stochastic discrete model, changed ppo steps.""" hparams = rlmb_long_stochastic_discrete() hparams.ppo_epoch_length = 25 hparams.simulated_rollout_length = 25 hparams.simulated_batch_size = 32 return hparams
python
def rlmb_long_stochastic_discrete_25steps(): """Long setting with stochastic discrete model, changed ppo steps.""" hparams = rlmb_long_stochastic_discrete() hparams.ppo_epoch_length = 25 hparams.simulated_rollout_length = 25 hparams.simulated_batch_size = 32 return hparams
[ "def", "rlmb_long_stochastic_discrete_25steps", "(", ")", ":", "hparams", "=", "rlmb_long_stochastic_discrete", "(", ")", "hparams", ".", "ppo_epoch_length", "=", "25", "hparams", ".", "simulated_rollout_length", "=", "25", "hparams", ".", "simulated_batch_size", "=", "32", "return", "hparams" ]
Long setting with stochastic discrete model, changed ppo steps.
[ "Long", "setting", "with", "stochastic", "discrete", "model", "changed", "ppo", "steps", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L423-L429
train
Long setting with stochastic discrete model changed ppo steps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmd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rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(653 - 605) + '\x6f' + '\062' + chr(0b110100) + '\062', 1406 - 1398), ehT0Px3KOsy9('\x30' + '\x6f' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b110010) + chr(2163 - 2115) + chr(0b1001 + 0o53), 26321 - 26313), ehT0Px3KOsy9(chr(2116 - 2068) + chr(7341 - 7230) + chr(51) + chr(0b10110 + 0o33) + chr(49), 57466 - 57458), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(0b101 + 0o60) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(399 - 351) + '\157' + chr(2396 - 2346) + '\062' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x32' + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101 + 0o152) + chr(1052 - 1003) + chr(48) + '\064', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110011) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(48) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(52) + '\060', 0b1000), ehT0Px3KOsy9(chr(499 - 451) + chr(0b1101111) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b101111 + 0o4) + '\x37' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(973 - 925) + '\x6f' + '\x31' + chr(0b101110 + 0o11), 57421 - 57413), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(161 - 112) + '\x31' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(1560 - 1505) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(1092 - 981) + chr(49) + '\x33' + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(2397 - 2347) + chr(0b110010) + chr(455 - 405), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + chr(49) + chr(0b110011) + '\x37', 50130 - 50122), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b101011 + 0o10) + chr(2293 - 2245) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(50) + '\064' + chr(0b1001 + 0o53), 37465 - 37457), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + chr(0b110011 + 0o2) + chr(0b11101 + 0o23), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x35' + chr(51), 0b1000), ehT0Px3KOsy9(chr(1855 - 1807) + chr(0b1101000 + 0o7) + '\x33' + chr(0b110111) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(871 - 823) + '\x6f' + chr(1010 - 960) + '\066' + '\060', 433 - 425), ehT0Px3KOsy9('\x30' + chr(7219 - 7108) + chr(0b110001) + '\060' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1311 - 1260) + chr(324 - 270) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b110000) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + '\x37' + chr(2089 - 2039), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(51) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111 + 0o0) + chr(1143 - 1088) + chr(0b101010 + 0o6), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b10100 + 0o40) + chr(50), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b100100 + 0o16) + chr(0b11000 + 0o32), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010 + 0o0) + chr(1470 - 1419) + chr(2301 - 2251), 53404 - 53396), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11 + 0o60) + chr(0b110000 + 0o1), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1626 - 1576) + '\064' + chr(1372 - 1322), 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b11010 + 0o125) + '\x32' + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(5163 - 5052) + chr(0b110010) + chr(51) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(911 - 863) + chr(111) + chr(0b101101 + 0o4) + chr(0b110011) + '\062', 41059 - 41051)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x02'), chr(660 - 560) + chr(0b1011101 + 0o10) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(0b1110100) + chr(102) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def bjMQjxsle08C(): n4ljua2gi1Pr = cPklOFeEAYc1() n4ljua2gi1Pr.BYTlP2WTHA9T = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110001), 8) n4ljua2gi1Pr.Zz7z6jACoNio = ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(1486 - 1437), 8) n4ljua2gi1Pr.PBpnkLjxkvnI = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101 + 0o57) + chr(1810 - 1762), 5907 - 5899) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_base_stochastic_discrete_noresize
def rlmb_base_stochastic_discrete_noresize(): """Base setting with stochastic discrete model.""" hparams = rlmb_base() hparams.generative_model = "next_frame_basic_stochastic_discrete" hparams.generative_model_params = "next_frame_basic_stochastic_discrete" hparams.resize_height_factor = 1 hparams.resize_width_factor = 1 return hparams
python
def rlmb_base_stochastic_discrete_noresize(): """Base setting with stochastic discrete model.""" hparams = rlmb_base() hparams.generative_model = "next_frame_basic_stochastic_discrete" hparams.generative_model_params = "next_frame_basic_stochastic_discrete" hparams.resize_height_factor = 1 hparams.resize_width_factor = 1 return hparams
[ "def", "rlmb_base_stochastic_discrete_noresize", "(", ")", ":", "hparams", "=", "rlmb_base", "(", ")", "hparams", ".", "generative_model", "=", "\"next_frame_basic_stochastic_discrete\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_stochastic_discrete\"", "hparams", ".", "resize_height_factor", "=", "1", "hparams", ".", "resize_width_factor", "=", "1", "return", "hparams" ]
Base setting with stochastic discrete model.
[ "Base", "setting", "with", "stochastic", "discrete", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L476-L483
train
Base setting with stochastic discrete model.
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,hr2Q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MOClNT,_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(0b100110 + 0o14) + chr(0b110100) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\061' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10001 + 0o40) + chr(49) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + '\x35', 16967 - 16959), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b110011 + 0o4) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9118 - 9007) + '\063' + chr(269 - 220) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\066' + chr(53), 0b1000), ehT0Px3KOsy9(chr(684 - 636) + chr(0b101101 + 0o102) + chr(0b110001) + chr(0b110100) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3806 - 3695) + chr(1098 - 1048) + chr(53) + '\x31', 48412 - 48404), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x32' + chr(0b110000), 55085 - 55077), ehT0Px3KOsy9(chr(0b110000) + chr(11525 - 11414) + '\x35' + chr(0b101101 + 0o6), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + '\063' + '\066' + '\x31', 47375 - 47367), ehT0Px3KOsy9('\x30' + '\157' + chr(725 - 676) + chr(0b110100), 23522 - 23514), ehT0Px3KOsy9('\x30' + chr(11288 - 11177) + '\x33' + chr(0b1011 + 0o54) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(1839 - 1728) + chr(51) + chr(0b1100 + 0o53) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(52) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(2233 - 2185) + '\x6f' + chr(1060 - 1009) + chr(0b101110 + 0o4) + chr(0b100 + 0o63), 15429 - 15421), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2315 - 2265) + '\x36' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(239 - 191) + chr(111) + chr(2523 - 2472) + chr(0b110100) + chr(532 - 478), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110010) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b110111) + chr(0b110011), 13748 - 13740), ehT0Px3KOsy9(chr(48) + chr(0b1001010 + 0o45) + chr(0b110010) + chr(640 - 591) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101010 + 0o11) + chr(2306 - 2254) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(261 - 212) + chr(858 - 804), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1000 + 0o52) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(1693 - 1644) + chr(54) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(2243 - 2195) + chr(4357 - 4246) + chr(2488 - 2435) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(55) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3466 - 3355) + chr(2445 - 2395) + '\060', 2699 - 2691), ehT0Px3KOsy9('\x30' + chr(0b11001 + 0o126) + chr(0b110011) + '\x31' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1794 - 1746) + chr(2523 - 2412) + chr(49) + '\x34' + chr(0b10010 + 0o40), 0b1000), ehT0Px3KOsy9(chr(231 - 183) + chr(8500 - 8389) + chr(0b100100 + 0o15) + chr(1415 - 1365) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + '\x31' + '\x34' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11111 + 0o23) + '\063' + '\064', 26737 - 26729), ehT0Px3KOsy9(chr(261 - 213) + '\157' + '\063' + '\060' + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b100010 + 0o17) + chr(470 - 421), 0o10), ehT0Px3KOsy9(chr(1545 - 1497) + chr(652 - 541) + chr(50) + '\064' + chr(830 - 782), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(11179 - 11068) + chr(53) + chr(0b110000), 32173 - 32165)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a'), chr(0b1100100) + chr(0b1100101) + chr(0b111001 + 0o52) + chr(5440 - 5329) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1001001 + 0o53) + chr(0b1100110) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def IyOibkFsgv7u(): n4ljua2gi1Pr = wvShKmDEuOfS() n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xe96QX\x99\xbd\x94\t\xcc\x8fIp\x82e\x9f\xa5Vl\xb8\xd3\x8e\xb0\x88\xff\x8b-L\x14G\xccs\xbf\x07"\x02'), '\144' + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(6861 - 6760))('\x75' + '\x74' + chr(0b1011110 + 0o10) + chr(0b10000 + 0o35) + chr(0b11110 + 0o32)) n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xe96QX\x99\xbd\x94\t\xcc\x8fIp\x82e\x9f\xa5Vl\xb8\xd3\x8e\xb0\x88\xff\x8b-L\x14G\xccs\xbf\x07"\x02'), chr(1721 - 1621) + chr(0b111110 + 0o47) + '\143' + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b110111 + 0o75) + chr(0b11001 + 0o115) + '\x2d' + '\x38') n4ljua2gi1Pr.HR4yzxLpriG7 = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o23), 28484 - 28476) n4ljua2gi1Pr.VhuiRt_czun8 = ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49), 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_base_sv2p
def rlmb_base_sv2p(): """Base setting with sv2p as world model.""" hparams = rlmb_base() hparams.learning_rate_bump = 1.0 hparams.generative_model = "next_frame_sv2p" hparams.generative_model_params = "next_frame_sv2p_atari" return hparams
python
def rlmb_base_sv2p(): """Base setting with sv2p as world model.""" hparams = rlmb_base() hparams.learning_rate_bump = 1.0 hparams.generative_model = "next_frame_sv2p" hparams.generative_model_params = "next_frame_sv2p_atari" return hparams
[ "def", "rlmb_base_sv2p", "(", ")", ":", "hparams", "=", "rlmb_base", "(", ")", "hparams", ".", "learning_rate_bump", "=", "1.0", "hparams", ".", "generative_model", "=", "\"next_frame_sv2p\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_sv2p_atari\"", "return", "hparams" ]
Base setting with sv2p as world model.
[ "Base", "setting", "with", "sv2p", "as", "world", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L487-L493
train
Base setting with sv2p as world model.
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,SBRjvO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Ma,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(0b101011 + 0o5) + chr(111) + chr(1742 - 1691) + chr(0b1011 + 0o53) + chr(0b110001), 41416 - 41408), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(8504 - 8393) + chr(0b100100 + 0o16) + chr(0b110000) + chr(0b11 + 0o62), 18228 - 18220), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x30' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(187 - 132) + chr(889 - 834), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1698 - 1649) + chr(54) + chr(0b1001 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(2383 - 2334) + '\067' + chr(0b1101 + 0o50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1383 - 1328) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2146 - 2096) + chr(54) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(2146 - 2098) + chr(111) + chr(1276 - 1225) + '\061' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\x31' + chr(0b110000), 32827 - 32819), ehT0Px3KOsy9(chr(1988 - 1940) + chr(111) + chr(49) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\x31' + chr(51) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(50) + chr(0b110110) + chr(0b10011 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11101 + 0o26) + chr(0b1011 + 0o51) + chr(0b110000 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b10010 + 0o135) + '\x33' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1564 - 1514) + chr(0b101010 + 0o6) + chr(0b1011 + 0o50), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1929 - 1879) + '\x36' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b11101 + 0o24) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(392 - 344) + '\157' + chr(55) + '\067', 8), ehT0Px3KOsy9(chr(2223 - 2175) + chr(0b1101111) + chr(193 - 139) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100110 + 0o15) + '\064' + chr(0b100011 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(297 - 249) + chr(0b1101111) + '\061' + chr(53) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(49) + chr(0b110110) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + '\x33' + chr(137 - 82) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10237 - 10126) + chr(0b110 + 0o53) + '\064', 38726 - 38718), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\062' + '\x34' + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\x35' + chr(625 - 571), 0o10), ehT0Px3KOsy9(chr(48) + chr(7317 - 7206) + '\x33' + chr(0b10 + 0o60), 7261 - 7253), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1057 - 1004) + chr(0b10 + 0o63), 0b1000), ehT0Px3KOsy9(chr(363 - 315) + chr(0b0 + 0o157) + '\x32' + '\065' + '\065', 0b1000), ehT0Px3KOsy9(chr(781 - 733) + chr(111) + chr(2250 - 2201) + '\x30' + chr(55), 44004 - 43996), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(50) + chr(50) + chr(50), 8921 - 8913), ehT0Px3KOsy9(chr(2050 - 2002) + chr(8716 - 8605) + chr(0b110010) + '\060' + '\060', 0b1000), ehT0Px3KOsy9(chr(2123 - 2075) + '\x6f' + '\061' + chr(0b110010) + chr(1879 - 1825), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + chr(0b11 + 0o57) + '\067' + chr(735 - 683), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7002 - 6891) + '\063' + chr(1222 - 1174) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + '\061' + chr(0b10101 + 0o41) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1919 - 1871) + chr(7438 - 7327) + chr(846 - 796) + chr(76 - 22), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b110110) + chr(61 - 8), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(193 - 140) + chr(0b110000), 57204 - 57196)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf'), '\144' + chr(4440 - 4339) + '\143' + chr(111) + '\x64' + chr(101))('\165' + '\164' + chr(102) + '\x2d' + chr(0b1001 + 0o57)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def qe4MGUp5hrRE(): n4ljua2gi1Pr = wvShKmDEuOfS() n4ljua2gi1Pr.rgYNOuacdxId = 1.0 n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xe0p\xf7`\x14\x0f\x1b\xdd\xaf\xd7\x1b-\x80\x94'), '\x64' + chr(101) + '\x63' + '\157' + '\x64' + '\145')(chr(117) + chr(0b1110100) + '\146' + chr(45) + '\070') n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xe0p\xf7`\x14\x0f\x1b\xdd\xaf\xd7\x1b-\x80\x94@\xe2\xc7\xacM['), chr(0b1100100) + chr(0b1011011 + 0o12) + chr(0b1100011) + chr(4444 - 4333) + '\x64' + chr(7512 - 7411))('\x75' + chr(0b1110100) + chr(5726 - 5624) + chr(0b0 + 0o55) + chr(56)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
_rlmb_tiny_overrides
def _rlmb_tiny_overrides(): """Parameters to override for tiny setting excluding agent-related hparams.""" return dict( epochs=1, num_real_env_frames=128, model_train_steps=2, max_num_noops=1, eval_max_num_noops=1, generative_model_params="next_frame_tiny", stop_loop_early=True, resize_height_factor=2, resize_width_factor=2, wm_eval_rollout_ratios=[1], rl_env_max_episode_steps=7, eval_rl_env_max_episode_steps=7, simulated_rollout_length=2, eval_sampling_temps=[0.0, 1.0], )
python
def _rlmb_tiny_overrides(): """Parameters to override for tiny setting excluding agent-related hparams.""" return dict( epochs=1, num_real_env_frames=128, model_train_steps=2, max_num_noops=1, eval_max_num_noops=1, generative_model_params="next_frame_tiny", stop_loop_early=True, resize_height_factor=2, resize_width_factor=2, wm_eval_rollout_ratios=[1], rl_env_max_episode_steps=7, eval_rl_env_max_episode_steps=7, simulated_rollout_length=2, eval_sampling_temps=[0.0, 1.0], )
[ "def", "_rlmb_tiny_overrides", "(", ")", ":", "return", "dict", "(", "epochs", "=", "1", ",", "num_real_env_frames", "=", "128", ",", "model_train_steps", "=", "2", ",", "max_num_noops", "=", "1", ",", "eval_max_num_noops", "=", "1", ",", "generative_model_params", "=", "\"next_frame_tiny\"", ",", "stop_loop_early", "=", "True", ",", "resize_height_factor", "=", "2", ",", "resize_width_factor", "=", "2", ",", "wm_eval_rollout_ratios", "=", "[", "1", "]", ",", "rl_env_max_episode_steps", "=", "7", ",", "eval_rl_env_max_episode_steps", "=", "7", ",", "simulated_rollout_length", "=", "2", ",", "eval_sampling_temps", "=", "[", "0.0", ",", "1.0", "]", ",", ")" ]
Parameters to override for tiny setting excluding agent-related hparams.
[ "Parameters", "to", "override", "for", "tiny", "setting", "excluding", "agent", "-", "related", "hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L537-L554
train
Parameters to override for tiny setting excluding agent - related hparams.
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(48) + chr(0b1101100 + 0o3) + chr(0b110110) + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(4758 - 4647) + '\x32' + chr(51) + chr(55), 31568 - 31560), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\066' + '\x31', 348 - 340), ehT0Px3KOsy9('\060' + chr(2127 - 2016) + chr(363 - 312) + chr(48) + chr(49), 62977 - 62969), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\x37' + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o21) + chr(0b110011) + chr(51), 0o10), ehT0Px3KOsy9(chr(1998 - 1950) + chr(0b1100111 + 0o10) + chr(2155 - 2105) + '\061' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11011 + 0o26) + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101111 + 0o2) + chr(0b10011 + 0o42) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + '\061' + chr(1122 - 1070) + chr(0b11100 + 0o30), 50498 - 50490), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + '\x31' + '\067' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110010) + chr(48) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(855 - 802) + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x37' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(960 - 905) + chr(1335 - 1286), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\063' + chr(2601 - 2549), 17098 - 17090), ehT0Px3KOsy9('\060' + chr(0b1110 + 0o141) + '\062' + chr(0b110101) + chr(328 - 276), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b100111 + 0o15) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(53) + chr(0b111 + 0o51), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1628 - 1578) + chr(145 - 93) + chr(2141 - 2092), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + chr(50) + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\060' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1010000 + 0o37) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b110101 + 0o72) + '\062' + chr(50) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001100 + 0o43) + '\063' + '\067' + chr(2084 - 2032), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\064' + chr(54), 11530 - 11522), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x31' + chr(0b110110), 26113 - 26105), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + chr(1364 - 1314) + chr(55) + chr(0b111 + 0o55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1445 - 1397), 8), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b110110) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9494 - 9383) + '\x31' + '\x36' + chr(319 - 268), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000 + 0o2) + chr(1406 - 1358) + chr(73 - 24), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11621 - 11510) + chr(0b110001) + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(2178 - 2130) + chr(5009 - 4898) + chr(0b110001) + chr(55) + chr(0b1000 + 0o57), 9275 - 9267), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110101 + 0o1), 19915 - 19907), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(0b100010 + 0o17) + '\063', 0b1000), ehT0Px3KOsy9(chr(1571 - 1523) + '\x6f' + '\061' + '\066' + chr(0b110000), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1011000 + 0o27) + '\x35' + chr(1983 - 1935), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a'), chr(0b1100100) + '\x65' + '\143' + chr(111) + chr(1065 - 965) + '\145')(chr(117) + chr(116) + chr(102) + chr(2016 - 1971) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def K0rU9dAFDZoZ(): return wLqBDw8l0eIm(epochs=ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(949 - 900), 0o10), num_real_env_frames=ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(0b11011 + 0o27) + '\060' + chr(2279 - 2231), ord("\x08")), model_train_steps=ehT0Px3KOsy9(chr(492 - 444) + chr(0b1101111) + '\062', 0o10), max_num_noops=ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b11001 + 0o30), 8), eval_max_num_noops=ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + '\x31', 8), generative_model_params=xafqLlk3kkUe(SXOLrMavuUCe(b'Z\xfa\t\xb5\xe0\xfd\xff.\x07e;\x0e\xeb\xc6\xc2'), chr(100) + chr(101) + chr(0b1100011) + chr(0b10000 + 0o137) + chr(7874 - 7774) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(775 - 730) + chr(0b111000)), stop_loop_early=ehT0Px3KOsy9(chr(2001 - 1953) + chr(0b1000001 + 0o56) + chr(420 - 371), 8), resize_height_factor=ehT0Px3KOsy9(chr(758 - 710) + chr(111) + chr(1128 - 1078), 8), resize_width_factor=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50), 8), wm_eval_rollout_ratios=[ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11110 + 0o23), 8)], rl_env_max_episode_steps=ehT0Px3KOsy9(chr(1294 - 1246) + chr(0b110110 + 0o71) + chr(0b101101 + 0o12), 0b1000), eval_rl_env_max_episode_steps=ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(7068 - 6957) + chr(2730 - 2675), 8), simulated_rollout_length=ehT0Px3KOsy9('\x30' + chr(111) + '\x32', 8), eval_sampling_temps=[0.0, 1.0])
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_ppo_tiny
def rlmb_ppo_tiny(): """Tiny set for testing.""" hparams = rlmb_ppo_base() hparams = hparams.override_from_dict(_rlmb_tiny_overrides()) update_hparams(hparams, dict( ppo_epochs_num=2, ppo_epoch_length=10, real_ppo_epoch_length=36, real_ppo_effective_num_agents=2, real_batch_size=1, eval_batch_size=1, )) return hparams
python
def rlmb_ppo_tiny(): """Tiny set for testing.""" hparams = rlmb_ppo_base() hparams = hparams.override_from_dict(_rlmb_tiny_overrides()) update_hparams(hparams, dict( ppo_epochs_num=2, ppo_epoch_length=10, real_ppo_epoch_length=36, real_ppo_effective_num_agents=2, real_batch_size=1, eval_batch_size=1, )) return hparams
[ "def", "rlmb_ppo_tiny", "(", ")", ":", "hparams", "=", "rlmb_ppo_base", "(", ")", "hparams", "=", "hparams", ".", "override_from_dict", "(", "_rlmb_tiny_overrides", "(", ")", ")", "update_hparams", "(", "hparams", ",", "dict", "(", "ppo_epochs_num", "=", "2", ",", "ppo_epoch_length", "=", "10", ",", "real_ppo_epoch_length", "=", "36", ",", "real_ppo_effective_num_agents", "=", "2", ",", "real_batch_size", "=", "1", ",", "eval_batch_size", "=", "1", ",", ")", ")", "return", "hparams" ]
Tiny set for testing.
[ "Tiny", "set", "for", "testing", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L558-L570
train
Tiny set for testing.
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,QWgp4EL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16l2KDPD,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(0b110011) + chr(0b110100) + '\x31', 46312 - 46304), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(1882 - 1831) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(2075 - 2027) + chr(1737 - 1626) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101110 + 0o101) + chr(51) + '\063' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x35' + chr(882 - 832), 22592 - 22584), ehT0Px3KOsy9('\x30' + '\157' + chr(1820 - 1769) + chr(82 - 27) + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(1534 - 1486) + chr(0b11100 + 0o33), 50656 - 50648), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(2836 - 2781) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(1154 - 1102) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b110001) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(49) + chr(0b101011 + 0o14) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110011) + chr(54), 50901 - 50893), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + '\062' + chr(2042 - 1993) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + chr(0b1001110 + 0o41) + chr(50) + chr(0b110110 + 0o1) + '\x36', 20429 - 20421), ehT0Px3KOsy9('\x30' + chr(111) + chr(1074 - 1022) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(706 - 656) + chr(2575 - 2520) + '\064', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b101111 + 0o2) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1606 - 1495) + chr(1517 - 1463) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1881 - 1830) + chr(1276 - 1227) + chr(0b100000 + 0o23), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(0b110011) + '\x31' + '\064', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1824 - 1773) + chr(48) + chr(0b0 + 0o61), 29985 - 29977), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1221 - 1168) + chr(0b110011), 45158 - 45150), ehT0Px3KOsy9(chr(0b110000) + chr(10739 - 10628) + chr(50) + '\062' + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x36' + chr(2121 - 2073), 65178 - 65170), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1101 + 0o44) + '\x32' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(1239 - 1189) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(361 - 308), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11010 + 0o30) + chr(48) + chr(1490 - 1435), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\063' + chr(0b110010) + chr(2188 - 2136), 62422 - 62414), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\062' + '\061', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\x33' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b101 + 0o54) + chr(0b10100 + 0o42), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11001 + 0o32) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(49) + '\x34' + chr(0b110111), 2535 - 2527), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110001) + chr(0b10110 + 0o41) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x37' + chr(0b110010), 14150 - 14142), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + '\x33' + chr(1812 - 1760) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(1857 - 1807) + chr(0b1000 + 0o51) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b11 + 0o55) + chr(0b1000 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b100111 + 0o20) + chr(0b110000), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(11898 - 11787) + chr(53) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf'), '\x64' + chr(101) + '\x63' + chr(0b1100001 + 0o16) + '\144' + chr(101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def CzhvV5Y6WsMO(): n4ljua2gi1Pr = QUDDCHx3gy1Q() n4ljua2gi1Pr = n4ljua2gi1Pr.override_from_dict(K0rU9dAFDZoZ()) H6TLboedUqP7(n4ljua2gi1Pr, wLqBDw8l0eIm(ppo_epochs_num=ehT0Px3KOsy9('\060' + chr(12111 - 12000) + chr(0b10100 + 0o36), 31248 - 31240), ppo_epoch_length=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x32', 0b1000), real_ppo_epoch_length=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2338 - 2286) + chr(0b110100), 0o10), real_ppo_effective_num_agents=ehT0Px3KOsy9(chr(2053 - 2005) + chr(6099 - 5988) + '\062', 8), real_batch_size=ehT0Px3KOsy9(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110001), 0b1000), eval_batch_size=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100000 + 0o21), 8))) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_dqn_tiny
def rlmb_dqn_tiny(): """Tiny set for testing.""" hparams = rlmb_dqn_base() hparams = hparams.override_from_dict(_rlmb_tiny_overrides()) update_hparams(hparams, dict( simulated_rollout_length=2, dqn_time_limit=2, dqn_num_frames=128, real_dqn_replay_buffer_replay_capacity=100, dqn_replay_buffer_replay_capacity=100, real_dqn_agent_min_replay_history=10, dqn_agent_min_replay_history=10, )) return hparams
python
def rlmb_dqn_tiny(): """Tiny set for testing.""" hparams = rlmb_dqn_base() hparams = hparams.override_from_dict(_rlmb_tiny_overrides()) update_hparams(hparams, dict( simulated_rollout_length=2, dqn_time_limit=2, dqn_num_frames=128, real_dqn_replay_buffer_replay_capacity=100, dqn_replay_buffer_replay_capacity=100, real_dqn_agent_min_replay_history=10, dqn_agent_min_replay_history=10, )) return hparams
[ "def", "rlmb_dqn_tiny", "(", ")", ":", "hparams", "=", "rlmb_dqn_base", "(", ")", "hparams", "=", "hparams", ".", "override_from_dict", "(", "_rlmb_tiny_overrides", "(", ")", ")", "update_hparams", "(", "hparams", ",", "dict", "(", "simulated_rollout_length", "=", "2", ",", "dqn_time_limit", "=", "2", ",", "dqn_num_frames", "=", "128", ",", "real_dqn_replay_buffer_replay_capacity", "=", "100", ",", "dqn_replay_buffer_replay_capacity", "=", "100", ",", "real_dqn_agent_min_replay_history", "=", "10", ",", "dqn_agent_min_replay_history", "=", "10", ",", ")", ")", "return", "hparams" ]
Tiny set for testing.
[ "Tiny", "set", "for", "testing", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L579-L592
train
Tiny set for testing.
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,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ZO3Ma9cXBb,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(0b100000 + 0o117) + '\x31' + '\x30' + chr(1134 - 1082), 25987 - 25979), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(9835 - 9724) + '\x33' + '\x32' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1336 - 1288) + chr(111) + '\061' + '\x37' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000000 + 0o57) + chr(0b110 + 0o53) + '\060' + '\062', 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(49) + chr(0b100 + 0o57), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5864 - 5753) + '\x31' + chr(1291 - 1241) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2349 - 2297) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(0b101101 + 0o3), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(53) + chr(0b1101 + 0o44), 59831 - 59823), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + chr(0b11111 + 0o23) + '\x30' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8768 - 8657) + chr(0b110010) + chr(0b10101 + 0o35) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(55) + chr(656 - 606), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + chr(0b101110 + 0o4) + '\x30' + '\x32', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x33' + chr(868 - 815), ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(3730 - 3619) + '\061' + chr(0b11101 + 0o24) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110111) + chr(51), 62234 - 62226), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(53) + chr(0b100 + 0o61), ord("\x08")), ehT0Px3KOsy9(chr(1749 - 1701) + chr(10379 - 10268) + '\x33' + '\066' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101000 + 0o7) + chr(51) + chr(54) + chr(1282 - 1231), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\066' + chr(55), 2924 - 2916), ehT0Px3KOsy9(chr(2276 - 2228) + chr(7997 - 7886) + '\061' + '\066' + '\063', 18099 - 18091), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100010 + 0o21) + '\x34' + chr(52), 28868 - 28860), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10100 + 0o35) + chr(888 - 838) + chr(0b11100 + 0o31), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10829 - 10718) + '\064' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1970 - 1920) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b10110 + 0o32) + chr(1213 - 1160), 43191 - 43183), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(0b1100 + 0o47), 57294 - 57286), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b101000 + 0o10) + chr(0b110101), 8), ehT0Px3KOsy9(chr(48) + chr(0b11110 + 0o121) + '\063' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(50) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1498 - 1450) + '\157' + chr(0b100000 + 0o23) + chr(1556 - 1505) + chr(0b101100 + 0o6), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x31' + chr(0b101100 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1699 - 1650) + chr(0b110011) + chr(0b10101 + 0o34), 6856 - 6848), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b11110 + 0o30) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7544 - 7433) + chr(0b11110 + 0o24) + '\066' + '\066', 31401 - 31393), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1011 + 0o46) + chr(52), 8), ehT0Px3KOsy9(chr(457 - 409) + '\x6f' + chr(51) + '\061', 27659 - 27651), ehT0Px3KOsy9('\060' + chr(6727 - 6616) + '\x32' + '\062' + chr(49), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110101 + 0o0) + chr(745 - 697), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'j'), '\144' + '\145' + chr(0b1100011) + chr(0b100100 + 0o113) + '\x64' + '\145')('\x75' + '\164' + chr(102) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def LbISED1HfmI7(): n4ljua2gi1Pr = Sr7H_ToNzUUj() n4ljua2gi1Pr = n4ljua2gi1Pr.override_from_dict(K0rU9dAFDZoZ()) H6TLboedUqP7(n4ljua2gi1Pr, wLqBDw8l0eIm(simulated_rollout_length=ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(2197 - 2147), 0b1000), dqn_time_limit=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062', 8), dqn_num_frames=ehT0Px3KOsy9(chr(1993 - 1945) + '\157' + '\x32' + chr(0b10101 + 0o33) + chr(0b110000), ord("\x08")), real_dqn_replay_buffer_replay_capacity=ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b110100) + '\x34', 0b1000), dqn_replay_buffer_replay_capacity=ehT0Px3KOsy9('\x30' + chr(4998 - 4887) + chr(49) + '\064' + chr(0b100011 + 0o21), 8), real_dqn_agent_min_replay_history=ehT0Px3KOsy9('\x30' + chr(4268 - 4157) + chr(49) + '\x32', 0b1000), dqn_agent_min_replay_history=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1011 + 0o46) + chr(2397 - 2347), 8))) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_tiny_stochastic
def rlmb_tiny_stochastic(): """Tiny setting with a stochastic next-frame model.""" hparams = rlmb_ppo_tiny() hparams.epochs = 1 # Too slow with 2 for regular runs. hparams.generative_model = "next_frame_basic_stochastic" hparams.generative_model_params = "next_frame_basic_stochastic" return hparams
python
def rlmb_tiny_stochastic(): """Tiny setting with a stochastic next-frame model.""" hparams = rlmb_ppo_tiny() hparams.epochs = 1 # Too slow with 2 for regular runs. hparams.generative_model = "next_frame_basic_stochastic" hparams.generative_model_params = "next_frame_basic_stochastic" return hparams
[ "def", "rlmb_tiny_stochastic", "(", ")", ":", "hparams", "=", "rlmb_ppo_tiny", "(", ")", "hparams", ".", "epochs", "=", "1", "# Too slow with 2 for regular runs.", "hparams", ".", "generative_model", "=", "\"next_frame_basic_stochastic\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_stochastic\"", "return", "hparams" ]
Tiny setting with a stochastic next-frame model.
[ "Tiny", "setting", "with", "a", "stochastic", "next", "-", "frame", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L596-L602
train
Tiny setting with a stochastic next - frame model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,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gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1735 - 1687) + '\157' + chr(49) + chr(1637 - 1587) + chr(252 - 202), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(49) + '\x31' + chr(50), 0b1000), ehT0Px3KOsy9(chr(1181 - 1133) + chr(111) + chr(0b110001) + chr(0b110110) + chr(0b110000), 19611 - 19603), ehT0Px3KOsy9('\060' + chr(0b1001011 + 0o44) + chr(1617 - 1566) + chr(0b101001 + 0o14) + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(48) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + '\064' + chr(0b1111 + 0o44), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110001) + '\x33' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(1289 - 1239) + chr(639 - 586), 0b1000), ehT0Px3KOsy9(chr(2206 - 2158) + chr(111) + chr(51) + '\x34' + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100101 + 0o14) + chr(1690 - 1636) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x33' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(0b11100 + 0o26) + '\063' + '\061', 0o10), ehT0Px3KOsy9(chr(391 - 343) + chr(11625 - 11514) + '\062' + '\065' + chr(1775 - 1724), 32895 - 32887), ehT0Px3KOsy9(chr(55 - 7) + '\157' + chr(51) + chr(0b101111 + 0o5) + chr(169 - 118), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(12286 - 12175) + '\x31' + chr(0b10101 + 0o36) + chr(0b10010 + 0o37), 0b1000), ehT0Px3KOsy9('\060' + chr(1590 - 1479) + chr(0b10110 + 0o37) + chr(0b100 + 0o63), 0b1000), ehT0Px3KOsy9(chr(501 - 453) + chr(1504 - 1393) + chr(50) + chr(0b110000) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b10010 + 0o135) + '\x31' + chr(2504 - 2453) + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\067' + chr(0b110 + 0o57), 29653 - 29645), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b100110 + 0o14), 0b1000), ehT0Px3KOsy9(chr(1633 - 1585) + chr(111) + chr(0b110010) + '\x30' + chr(1922 - 1870), 51896 - 51888), ehT0Px3KOsy9('\x30' + chr(1654 - 1543) + chr(0b110011) + chr(1609 - 1558), 53048 - 53040), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b110100) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b1110 + 0o44) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110111) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(2520 - 2468) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(55) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(1235 - 1182) + chr(0b110001), 45023 - 45015), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\062' + chr(1061 - 1013), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110000) + chr(1977 - 1927), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\067' + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + '\060', 40789 - 40781), ehT0Px3KOsy9('\060' + chr(0b101000 + 0o107) + chr(0b110011) + '\060', 54708 - 54700), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(51) + '\x35' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100011 + 0o17) + chr(1675 - 1622) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b100100 + 0o15) + chr(2434 - 2379) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(757 - 703) + '\065', 27788 - 27780), ehT0Px3KOsy9(chr(909 - 861) + '\157' + '\062' + chr(50) + chr(0b1110 + 0o45), 16443 - 16435), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(53) + '\x33', 8), ehT0Px3KOsy9(chr(1398 - 1350) + chr(0b1111 + 0o140) + '\061' + chr(0b10011 + 0o36) + '\064', 59497 - 59489)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b100101 + 0o20) + '\060', 61270 - 61262)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'|'), chr(100) + chr(3364 - 3263) + chr(0b1100011) + chr(111) + chr(0b101110 + 0o66) + chr(0b1100011 + 0o2))(chr(0b1011001 + 0o34) + chr(0b101001 + 0o113) + '\x66' + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wGEB1sJ1YHML(): n4ljua2gi1Pr = CzhvV5Y6WsMO() n4ljua2gi1Pr.xvDB7qObFSrr = ehT0Px3KOsy9(chr(1871 - 1823) + chr(111) + chr(49), 2819 - 2811) n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'</\x08\x9e\x1aE*\xb4\x8d\x11\x80\xfb\xca\x900L\xdf*\xc9m\xe7s\x80\xe2M\xce\x9b'), '\144' + '\x65' + chr(6116 - 6017) + '\157' + '\x64' + chr(101))(chr(0b1101101 + 0o10) + '\x74' + chr(0b1100110) + chr(45) + '\x38') n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'</\x08\x9e\x1aE*\xb4\x8d\x11\x80\xfb\xca\x900L\xdf*\xc9m\xe7s\x80\xe2M\xce\x9b'), chr(3473 - 3373) + chr(101) + chr(99) + chr(0b111101 + 0o62) + '\x64' + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(1060 - 1015) + chr(0b111 + 0o61)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_tiny_recurrent
def rlmb_tiny_recurrent(): """Tiny setting with a recurrent next-frame model.""" hparams = rlmb_ppo_tiny() hparams.epochs = 1 # Too slow with 2 for regular runs. hparams.generative_model = "next_frame_basic_recurrent" hparams.generative_model_params = "next_frame_basic_recurrent" return hparams
python
def rlmb_tiny_recurrent(): """Tiny setting with a recurrent next-frame model.""" hparams = rlmb_ppo_tiny() hparams.epochs = 1 # Too slow with 2 for regular runs. hparams.generative_model = "next_frame_basic_recurrent" hparams.generative_model_params = "next_frame_basic_recurrent" return hparams
[ "def", "rlmb_tiny_recurrent", "(", ")", ":", "hparams", "=", "rlmb_ppo_tiny", "(", ")", "hparams", ".", "epochs", "=", "1", "# Too slow with 2 for regular runs.", "hparams", ".", "generative_model", "=", "\"next_frame_basic_recurrent\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_recurrent\"", "return", "hparams" ]
Tiny setting with a recurrent next-frame model.
[ "Tiny", "setting", "with", "a", "recurrent", "next", "-", "frame", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L606-L612
train
Tiny setting with a recurrent next - frame model.
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,Kk1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E_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(10721 - 10610) + chr(51) + chr(55) + chr(711 - 663), 0b1000), ehT0Px3KOsy9(chr(1510 - 1462) + chr(0b1101111) + chr(0b110110) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\x33' + chr(2201 - 2150), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\x31', 42343 - 42335), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(7912 - 7801) + '\062' + '\067' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\066' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(48) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1496 - 1448) + chr(0b111001 + 0o66) + chr(2530 - 2479) + chr(52) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(8850 - 8739) + chr(50) + '\066' + chr(775 - 725), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b100110 + 0o12) + chr(0b11111 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(1352 - 1304) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(12224 - 12113) + chr(0b110001) + '\062' + chr(797 - 743), 461 - 453), ehT0Px3KOsy9(chr(1369 - 1321) + chr(3305 - 3194) + '\061' + chr(1441 - 1387), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(725 - 672) + chr(51), 19363 - 19355), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\x34' + chr(0b101100 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\061' + '\064' + chr(695 - 640), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\066' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(2554 - 2503) + chr(0b110100) + chr(2190 - 2139), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\x32' + chr(2888 - 2833), 10207 - 10199), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o14) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(0b110001) + chr(0b11010 + 0o32) + chr(2118 - 2064), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b110011) + chr(0b101011 + 0o12) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010000 + 0o37) + chr(0b101001 + 0o13) + chr(2809 - 2755), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101010 + 0o5) + chr(49) + chr(0b1 + 0o57) + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + '\063' + chr(0b11111 + 0o30), 55406 - 55398), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1010010 + 0o35) + chr(0b110011) + chr(0b110100) + chr(1964 - 1913), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1636 - 1581) + chr(0b100001 + 0o23), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(0b0 + 0o64), 0b1000), ehT0Px3KOsy9(chr(1646 - 1598) + chr(0b1000011 + 0o54) + chr(51) + chr(0b100001 + 0o25) + chr(0b100 + 0o54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b10101 + 0o35) + chr(631 - 576), 8), ehT0Px3KOsy9(chr(2112 - 2064) + chr(0b1 + 0o156) + '\062' + chr(1369 - 1316) + '\067', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(7352 - 7241) + chr(49) + chr(51) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\067' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(1898 - 1848) + chr(55), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1010 + 0o51) + chr(2269 - 2221) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(2053 - 2003) + chr(0b110010 + 0o4), 34299 - 34291), ehT0Px3KOsy9(chr(1794 - 1746) + chr(111) + chr(0b110011) + '\062' + chr(54), 8), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + chr(0b101001 + 0o10) + '\x33' + chr(1345 - 1294), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1367 - 1319) + '\x6f' + '\x35' + '\x30', 27810 - 27802)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1011100 + 0o10) + chr(0b1100101))(chr(117) + chr(116) + chr(6392 - 6290) + chr(45) + chr(0b101110 + 0o12)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ySKzDapoLnmn(): n4ljua2gi1Pr = CzhvV5Y6WsMO() n4ljua2gi1Pr.xvDB7qObFSrr = ehT0Px3KOsy9(chr(924 - 876) + chr(0b1101111) + chr(515 - 466), 0o10) n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\x96W\xe3}\xe0Q3\x80\xdf\xe6Om\xe4%gH\xfe\x15\x17\x80"\xc6\x14\x88H5'), '\x64' + chr(101) + chr(5815 - 5716) + chr(554 - 443) + '\144' + '\145')(chr(117) + chr(0b1001000 + 0o54) + '\x66' + chr(45) + chr(0b100011 + 0o25)) n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\x96W\xe3}\xe0Q3\x80\xdf\xe6Om\xe4%gH\xfe\x15\x17\x80"\xc6\x14\x88H5'), '\x64' + chr(101) + '\x63' + chr(0b1101111) + chr(100) + chr(9102 - 9001))(chr(117) + chr(0b1110100) + chr(0b1001101 + 0o31) + '\055' + chr(0b100010 + 0o26)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_tiny_sv2p
def rlmb_tiny_sv2p(): """Tiny setting with a tiny sv2p model.""" hparams = rlmb_ppo_tiny() hparams.generative_model = "next_frame_sv2p" hparams.generative_model_params = "next_frame_sv2p_tiny" hparams.grayscale = False return hparams
python
def rlmb_tiny_sv2p(): """Tiny setting with a tiny sv2p model.""" hparams = rlmb_ppo_tiny() hparams.generative_model = "next_frame_sv2p" hparams.generative_model_params = "next_frame_sv2p_tiny" hparams.grayscale = False return hparams
[ "def", "rlmb_tiny_sv2p", "(", ")", ":", "hparams", "=", "rlmb_ppo_tiny", "(", ")", "hparams", ".", "generative_model", "=", "\"next_frame_sv2p\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_sv2p_tiny\"", "hparams", ".", "grayscale", "=", "False", "return", "hparams" ]
Tiny setting with a tiny sv2p model.
[ "Tiny", "setting", "with", "a", "tiny", "sv2p", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L616-L622
train
Tiny setting with a tiny sv2p model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi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bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(2922 - 2811) + chr(649 - 598) + chr(1994 - 1943) + chr(51), 10336 - 10328), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + chr(1969 - 1919) + chr(0b10100 + 0o40) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\062' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(849 - 801) + chr(0b1011101 + 0o22) + chr(49) + '\x35' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1734 - 1686) + chr(3625 - 3514) + chr(0b110110) + chr(48), 46214 - 46206), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110011) + chr(0b110100) + '\x30', 35895 - 35887), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b1011 + 0o47) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(0b1 + 0o61) + chr(49), 0b1000), ehT0Px3KOsy9(chr(1246 - 1198) + '\x6f' + chr(0b110001) + chr(0b110011) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1853 - 1805) + '\157' + chr(1724 - 1674) + chr(0b110101) + chr(2338 - 2287), 53513 - 53505), ehT0Px3KOsy9(chr(48) + chr(0b1111 + 0o140) + chr(0b110010) + '\x35' + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b101 + 0o60) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(755 - 707) + '\157' + chr(0b1 + 0o60) + chr(0b110000) + chr(1915 - 1867), 0b1000), ehT0Px3KOsy9(chr(1800 - 1752) + chr(0b100100 + 0o113) + '\061' + chr(2254 - 2200) + '\x33', 24843 - 24835), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1010 + 0o55) + chr(1767 - 1712), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10329 - 10218) + chr(0b100010 + 0o23) + chr(0b101 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(1847 - 1799) + chr(9984 - 9873) + chr(0b101100 + 0o6) + '\062' + chr(1336 - 1284), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100010 + 0o15) + '\062' + chr(577 - 526) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(2237 - 2189) + chr(111) + chr(0b100000 + 0o22) + chr(0b101010 + 0o13) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(150 - 102) + chr(0b101000 + 0o107) + chr(0b110101) + '\x34', 60277 - 60269), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001011 + 0o44) + chr(49) + chr(0b10101 + 0o42) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1689 - 1639) + '\x34' + '\061', 2750 - 2742), ehT0Px3KOsy9('\060' + chr(0b1110 + 0o141) + chr(0b110001) + chr(0b110000) + chr(537 - 489), 8), ehT0Px3KOsy9(chr(48) + chr(7784 - 7673) + '\x36' + '\x35', 0o10), ehT0Px3KOsy9(chr(2155 - 2107) + chr(111) + chr(0b110011) + '\063' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9674 - 9563) + chr(0b11111 + 0o22) + chr(49) + chr(0b101 + 0o55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + chr(2543 - 2489), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + '\x31' + chr(51) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\060' + chr(54), 34250 - 34242), ehT0Px3KOsy9(chr(48) + chr(10679 - 10568) + chr(0b110100) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9337 - 9226) + chr(49) + chr(1125 - 1072) + chr(2286 - 2235), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + '\x34' + chr(54), 8), ehT0Px3KOsy9(chr(1874 - 1826) + '\x6f' + chr(0b110011) + '\x34' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(2241 - 2193) + chr(0b100001 + 0o116) + chr(0b110010 + 0o0) + '\062', 0o10), ehT0Px3KOsy9(chr(1565 - 1517) + chr(7669 - 7558) + chr(1332 - 1283) + chr(2049 - 2000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7828 - 7717) + chr(51) + chr(0b110 + 0o52) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\x36' + chr(801 - 749), 55191 - 55183), ehT0Px3KOsy9(chr(0b110000) + chr(11576 - 11465) + chr(0b1010 + 0o50) + '\x30' + '\061', 45695 - 45687), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(772 - 722) + chr(2462 - 2407) + chr(0b10101 + 0o42), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(1503 - 1450) + chr(0b11101 + 0o23), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5'), '\x64' + chr(101) + chr(0b1011100 + 0o7) + '\x6f' + chr(0b1100100) + '\145')(chr(2186 - 2069) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(0b100011 + 0o25)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _yAnuN5XDOhI(): n4ljua2gi1Pr = CzhvV5Y6WsMO() n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xc2\xa8\x1fo\x86\xa607\xce\xf1\x1b6AO'), '\144' + '\x65' + '\143' + chr(111) + chr(0b1010011 + 0o21) + '\145')(chr(4865 - 4748) + chr(0b1110100) + chr(5661 - 5559) + chr(45) + chr(56)) n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xc2\xa8\x1fo\x86\xa607\xce\xf1\x1b6AOu\xe0\xf6n\xd5'), chr(100) + chr(0b1011010 + 0o13) + chr(4532 - 4433) + chr(111) + chr(257 - 157) + '\145')('\x75' + chr(0b111100 + 0o70) + chr(0b1010000 + 0o26) + chr(0b11 + 0o52) + chr(56)) n4ljua2gi1Pr.iVrnJKHOeGmG = ehT0Px3KOsy9(chr(48) + '\157' + '\x30', 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_grid
def rlmb_grid(rhp): """Grid over games and frames, and 5 runs each for variance.""" rhp.set_categorical("loop.game", ["breakout", "pong", "freeway"]) base = 100000 medium = base // 2 small = medium // 2 rhp.set_discrete("loop.num_real_env_frames", [base, medium, small]) # Dummy parameter to get 5 runs for each configuration rhp.set_discrete("model.moe_loss_coef", list(range(5)))
python
def rlmb_grid(rhp): """Grid over games and frames, and 5 runs each for variance.""" rhp.set_categorical("loop.game", ["breakout", "pong", "freeway"]) base = 100000 medium = base // 2 small = medium // 2 rhp.set_discrete("loop.num_real_env_frames", [base, medium, small]) # Dummy parameter to get 5 runs for each configuration rhp.set_discrete("model.moe_loss_coef", list(range(5)))
[ "def", "rlmb_grid", "(", "rhp", ")", ":", "rhp", ".", "set_categorical", "(", "\"loop.game\"", ",", "[", "\"breakout\"", ",", "\"pong\"", ",", "\"freeway\"", "]", ")", "base", "=", "100000", "medium", "=", "base", "//", "2", "small", "=", "medium", "//", "2", "rhp", ".", "set_discrete", "(", "\"loop.num_real_env_frames\"", ",", "[", "base", ",", "medium", ",", "small", "]", ")", "# Dummy parameter to get 5 runs for each configuration", "rhp", ".", "set_discrete", "(", "\"model.moe_loss_coef\"", ",", "list", "(", "range", "(", "5", ")", ")", ")" ]
Grid over games and frames, and 5 runs each for variance.
[ "Grid", "over", "games", "and", "frames", "and", "5", "runs", "each", "for", "variance", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L638-L647
train
Grid over games and frames and 5 runs each for variance.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1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S8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(386 - 338) + chr(7908 - 7797) + chr(0b110011) + chr(0b10111 + 0o32) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9(chr(1959 - 1911) + chr(7369 - 7258) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1896 - 1845) + chr(2997 - 2942) + chr(51), 0b1000), ehT0Px3KOsy9(chr(2053 - 2005) + '\157' + chr(2261 - 2211) + chr(54) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(9932 - 9821) + '\063' + chr(86 - 33) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1971 - 1923) + chr(111) + chr(0b110011) + chr(52) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + chr(9048 - 8937) + chr(1723 - 1675), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(951 - 903) + chr(0b1101111) + chr(0b101001 + 0o16) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(1773 - 1724) + chr(50) + '\x37', 24641 - 24633), ehT0Px3KOsy9(chr(0b110000) + chr(7405 - 7294) + chr(50) + chr(0b110000) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1 + 0o156) + chr(0b110010) + chr(2045 - 1991) + '\x33', 0b1000), ehT0Px3KOsy9(chr(1102 - 1054) + chr(5162 - 5051) + '\x33' + chr(0b110010 + 0o2) + chr(0b110 + 0o52), 8), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1110 + 0o42), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110110) + chr(0b11010 + 0o27), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100011 + 0o14) + chr(0b11010 + 0o27) + '\x30' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\066' + chr(0b110 + 0o57), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110100) + chr(578 - 528), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2319 - 2269) + chr(0b110010) + '\x36', 26135 - 26127), ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + '\063' + '\x34' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(594 - 544) + chr(53) + chr(1027 - 976), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b10100 + 0o35) + chr(0b100 + 0o60), 40994 - 40986), ehT0Px3KOsy9(chr(0b110000) + chr(4237 - 4126) + chr(0b101111 + 0o3) + '\x37' + '\065', 0b1000), ehT0Px3KOsy9(chr(1033 - 985) + chr(170 - 59) + chr(0b110011) + chr(54) + chr(1520 - 1470), 0b1000), ehT0Px3KOsy9(chr(792 - 744) + chr(0b1001100 + 0o43) + chr(49) + '\062' + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(11518 - 11407) + '\x35' + chr(0b110100), 20418 - 20410), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(55) + chr(0b1010 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\062' + '\066' + chr(203 - 150), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x37' + chr(0b10111 + 0o40), 8), ehT0Px3KOsy9(chr(2117 - 2069) + chr(111) + chr(2022 - 1972) + chr(0b110000) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(1947 - 1896) + chr(50), 14043 - 14035), ehT0Px3KOsy9(chr(670 - 622) + chr(0b1101111) + chr(0b11110 + 0o23) + '\063' + chr(0b1000 + 0o57), 18643 - 18635), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x31' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(51) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(55) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101101 + 0o2) + chr(0b110011 + 0o2) + chr(0b110101), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + chr(0b101111 + 0o1), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0'), chr(0b1100100) + chr(0b101001 + 0o74) + chr(99) + chr(111) + chr(0b111010 + 0o52) + chr(101))(chr(117) + chr(116) + '\146' + chr(0b10011 + 0o32) + chr(725 - 669)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ZZ14bwJsqfRa(IwsgmEzQknPc): xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xd9u\xa4\xd3\x8f\x94emP%\xe8\xd0\x81\x7f'), chr(5605 - 5505) + '\x65' + chr(0b1100 + 0o127) + '\157' + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(8187 - 8085) + chr(0b101101) + chr(304 - 248)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xd3n\x8b\x9e\x89\x81mo'), chr(0b1010001 + 0o23) + '\145' + chr(352 - 253) + '\157' + '\144' + '\x65')(chr(3635 - 3518) + chr(0b1110100) + '\146' + chr(0b101010 + 0o3) + chr(0b111000 + 0o0)), [xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xced\x9a\xdb\x81\x95t'), chr(0b1100100) + '\145' + chr(0b100000 + 0o103) + '\x6f' + '\x64' + chr(0b101000 + 0o75))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + chr(0b10010 + 0o46)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xd3o\x9c'), chr(5483 - 5383) + chr(0b111110 + 0o47) + '\143' + chr(6788 - 6677) + chr(0b11011 + 0o111) + chr(4602 - 4501))(chr(0b1110101) + chr(4231 - 4115) + '\x66' + '\x2d' + chr(0b110100 + 0o4)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\xced\x9e\xc7\x8f\x99'), chr(100) + '\x65' + chr(0b1100011 + 0o0) + chr(0b10001 + 0o136) + chr(0b1000100 + 0o40) + '\145')('\x75' + '\164' + chr(102) + chr(657 - 612) + chr(0b111000))]) XLXqkmM_0GVx = ehT0Px3KOsy9(chr(275 - 227) + chr(0b1101111) + chr(0b10101 + 0o36) + '\060' + chr(0b110011) + chr(50) + chr(0b110100) + '\060', ord("\x08")) YGFc0y9hqMdg = XLXqkmM_0GVx // ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b111110 + 0o61) + '\x32', 24276 - 24268) F2ihed_oc2Dz = YGFc0y9hqMdg // ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + chr(0b1000 + 0o52), 8) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xd9u\xa4\xd4\x87\x93cxZ#\xe4'), chr(0b1001 + 0o133) + '\145' + chr(0b1010111 + 0o14) + '\157' + chr(5537 - 5437) + '\145')(chr(0b1110101) + '\x74' + chr(9329 - 9227) + chr(0b101101) + chr(1823 - 1767)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xd3n\x8b\x9e\x80\x95mUM2\xe0\xdf\xbfvnG\x1b\x13P\xf7\x89\xce\xbf'), chr(0b1011 + 0o131) + chr(0b1110 + 0o127) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1011100 + 0o11))(chr(0b1011101 + 0o30) + '\x74' + '\146' + '\055' + '\x38'), [XLXqkmM_0GVx, YGFc0y9hqMdg, F2ihed_oc2Dz]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xd9u\xa4\xd4\x87\x93cxZ#\xe4'), chr(3694 - 3594) + '\x65' + chr(3877 - 3778) + '\157' + chr(7981 - 7881) + chr(0b111 + 0o136))(chr(9552 - 9435) + '\164' + '\x66' + '\055' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\xd3e\x9e\xdc\xc0\x8doo`;\xee\xc0\x93Lc^!\x13'), chr(0b111100 + 0o50) + chr(6777 - 6676) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\165' + '\x74' + '\x66' + chr(0b100011 + 0o12) + chr(1270 - 1214)), YyaZ4tpXu4lf(vQr8gNKaIaWE(ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + '\x35', 0b1000))))
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
merge_unscoped_hparams
def merge_unscoped_hparams(scopes_and_hparams): """Merge multiple HParams into one with scopes.""" merged_values = {} for (scope, hparams) in scopes_and_hparams: for key, value in six.iteritems(hparams.values()): scoped_key = "%s.%s" % (scope, key) merged_values[scoped_key] = value return hparam.HParams(**merged_values)
python
def merge_unscoped_hparams(scopes_and_hparams): """Merge multiple HParams into one with scopes.""" merged_values = {} for (scope, hparams) in scopes_and_hparams: for key, value in six.iteritems(hparams.values()): scoped_key = "%s.%s" % (scope, key) merged_values[scoped_key] = value return hparam.HParams(**merged_values)
[ "def", "merge_unscoped_hparams", "(", "scopes_and_hparams", ")", ":", "merged_values", "=", "{", "}", "for", "(", "scope", ",", "hparams", ")", "in", "scopes_and_hparams", ":", "for", "key", ",", "value", "in", "six", ".", "iteritems", "(", "hparams", ".", "values", "(", ")", ")", ":", "scoped_key", "=", "\"%s.%s\"", "%", "(", "scope", ",", "key", ")", "merged_values", "[", "scoped_key", "]", "=", "value", "return", "hparam", ".", "HParams", "(", "*", "*", "merged_values", ")" ]
Merge multiple HParams into one with scopes.
[ "Merge", "multiple", "HParams", "into", "one", "with", "scopes", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb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n,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(2198 - 2150) + chr(0b1101111) + chr(50) + '\060' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1572 - 1521) + chr(0b110000) + chr(0b10111 + 0o33), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b10100 + 0o40) + chr(55), 47753 - 47745), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b110110) + chr(0b110110), 6299 - 6291), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(0b110011) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b10011 + 0o41) + chr(0b110011), 26447 - 26439), ehT0Px3KOsy9('\x30' + chr(5684 - 5573) + '\x33' + chr(0b100000 + 0o24) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b11000 + 0o127) + chr(1428 - 1378) + chr(0b100100 + 0o21) + chr(0b10110 + 0o36), 0b1000), ehT0Px3KOsy9(chr(1497 - 1449) + chr(111) + chr(49) + '\066' + chr(2174 - 2122), 46315 - 46307), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + chr(0b11101 + 0o32) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(7240 - 7129) + chr(2029 - 1979) + '\x36' + chr(740 - 689), 0b1000), ehT0Px3KOsy9(chr(287 - 239) + '\x6f' + '\061' + chr(1223 - 1174) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\062' + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(9935 - 9824) + chr(49) + '\060' + '\064', 37138 - 37130), ehT0Px3KOsy9('\x30' + chr(12275 - 12164) + '\x32' + '\x30' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(144 - 89) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b101001 + 0o106) + chr(55) + '\067', 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(2440 - 2329) + '\061' + chr(0b110100) + chr(0b1111 + 0o43), 37239 - 37231), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + chr(51) + chr(0b110011) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(404 - 355) + chr(0b110000) + chr(1977 - 1923), 0o10), ehT0Px3KOsy9(chr(48) + chr(9652 - 9541) + chr(0b110010) + chr(0b110110) + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(1686 - 1638) + '\060', 12359 - 12351), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\063' + chr(0b10010 + 0o37), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9356 - 9245) + chr(49) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + '\063' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(2524 - 2470) + chr(1843 - 1792), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(4102 - 3991) + chr(0b1001 + 0o52) + '\067' + chr(0b110000), 30579 - 30571), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + '\x32' + chr(0b1 + 0o60) + chr(307 - 256), 0o10), ehT0Px3KOsy9(chr(1830 - 1782) + chr(111) + chr(1625 - 1575) + '\x33' + chr(2041 - 1986), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\062' + '\x37', 61889 - 61881), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b101011 + 0o14) + chr(0b1111 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + chr(51) + chr(0b110100) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001101 + 0o42) + chr(51) + chr(0b110101) + chr(53), 42851 - 42843), ehT0Px3KOsy9(chr(1542 - 1494) + chr(517 - 406) + chr(0b110011) + '\x35' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b10011 + 0o36) + '\061' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(879 - 831) + chr(111) + chr(635 - 584) + chr(0b1010 + 0o50) + chr(0b110100), 16126 - 16118), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(899 - 849) + '\064' + chr(2124 - 2076), 32782 - 32774), ehT0Px3KOsy9(chr(1167 - 1119) + '\x6f' + chr(0b110011) + chr(0b110110) + chr(0b101110 + 0o3), 7930 - 7922)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(53) + '\060', 31292 - 31284)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9'), chr(0b100101 + 0o77) + '\145' + chr(0b100 + 0o137) + '\157' + chr(0b101111 + 0o65) + chr(1325 - 1224))(chr(0b1110 + 0o147) + '\x74' + chr(0b1100110) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def pjy14YAvVeEi(dCMjFP7_iNY4): nSaV3UFmak9J = {} for (CJBHNoj4zKoT, n4ljua2gi1Pr) in dCMjFP7_iNY4: for (K3J4ZwSlE0sT, QmmgWUB13VCJ) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'\xee\xb6\xc2D\xb7\xd7\x80\xc1\x07'), chr(100) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(8200 - 8099))(chr(0b1110101) + chr(3398 - 3282) + chr(0b1001001 + 0o35) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\x92\xc9u\x90\xd6\xd0\x98<\x0c\xd7*'), chr(100) + '\x65' + chr(9050 - 8951) + '\x6f' + chr(100) + chr(8017 - 7916))(chr(1648 - 1531) + chr(0b1110100) + '\146' + chr(45) + '\x38'))()): Ef1IvvylCipM = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xb1\x89\x13\xad'), '\144' + chr(1140 - 1039) + chr(99) + chr(1800 - 1689) + '\144' + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(715 - 670) + chr(0b101100 + 0o14)) % (CJBHNoj4zKoT, K3J4ZwSlE0sT) nSaV3UFmak9J[Ef1IvvylCipM] = QmmgWUB13VCJ return xafqLlk3kkUe(guRGmljwUVnc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\x92\xc6D\xbf\xce\x96'), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(99) + chr(0b1000110 + 0o51) + chr(6432 - 6332) + chr(2329 - 2228))(chr(5957 - 5840) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'))(**nSaV3UFmak9J)
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
split_scoped_hparams
def split_scoped_hparams(scopes, merged_hparams): """Split single HParams with scoped keys into multiple.""" split_values = {scope: {} for scope in scopes} merged_values = merged_hparams.values() for scoped_key, value in six.iteritems(merged_values): scope = scoped_key.split(".")[0] key = scoped_key[len(scope) + 1:] split_values[scope][key] = value return [ hparam.HParams(**split_values[scope]) for scope in scopes ]
python
def split_scoped_hparams(scopes, merged_hparams): """Split single HParams with scoped keys into multiple.""" split_values = {scope: {} for scope in scopes} merged_values = merged_hparams.values() for scoped_key, value in six.iteritems(merged_values): scope = scoped_key.split(".")[0] key = scoped_key[len(scope) + 1:] split_values[scope][key] = value return [ hparam.HParams(**split_values[scope]) for scope in scopes ]
[ "def", "split_scoped_hparams", "(", "scopes", ",", "merged_hparams", ")", ":", "split_values", "=", "{", "scope", ":", "{", "}", "for", "scope", "in", "scopes", "}", "merged_values", "=", "merged_hparams", ".", "values", "(", ")", "for", "scoped_key", ",", "value", "in", "six", ".", "iteritems", "(", "merged_values", ")", ":", "scope", "=", "scoped_key", ".", "split", "(", "\".\"", ")", "[", "0", "]", "key", "=", "scoped_key", "[", "len", "(", "scope", ")", "+", "1", ":", "]", "split_values", "[", "scope", "]", "[", "key", "]", "=", "value", "return", "[", "hparam", ".", "HParams", "(", "*", "*", "split_values", "[", "scope", "]", ")", "for", "scope", "in", "scopes", "]" ]
Split single HParams with scoped keys into multiple.
[ "Split", "single", "HParams", "with", "scoped", "keys", "into", "multiple", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L866-L877
train
Split single HParams with scoped keys into multiple.
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(chr(2269 - 2221) + '\x6f' + '\061' + chr(0b100101 + 0o14) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(461 - 413) + chr(0b1101111) + chr(0b100101 + 0o16) + '\x37' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(0b110111) + chr(2395 - 2342), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000 + 0o147) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(564 - 515) + chr(0b10 + 0o61) + chr(51), 24902 - 24894), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(0b110001) + chr(51) + chr(1435 - 1387), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\061' + chr(0b101011 + 0o7), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1146 - 1097) + chr(871 - 820) + chr(1494 - 1440), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1100101 + 0o12) + chr(0b110011) + chr(0b110000) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\x33' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(2165 - 2117) + chr(111) + chr(51) + chr(0b0 + 0o67) + '\x33', 8), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(1497 - 1386) + chr(768 - 713) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + '\061' + '\066' + chr(63 - 14), 54634 - 54626), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\061' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + chr(687 - 636) + '\x37' + chr(0b100000 + 0o20), 2344 - 2336), ehT0Px3KOsy9('\060' + chr(0b11011 + 0o124) + chr(0b110110) + chr(0b1100 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11010 + 0o125) + '\x31' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(5891 - 5780) + '\x31' + chr(0b110110) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(2165 - 2117) + chr(0b1011101 + 0o22) + chr(0b1101 + 0o46) + chr(0b101011 + 0o5) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(358 - 308) + '\064' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b11000 + 0o127) + chr(0b10101 + 0o35) + chr(0b100000 + 0o23) + chr(0b10000 + 0o44), 8), ehT0Px3KOsy9(chr(198 - 150) + chr(111) + chr(0b110010) + chr(0b101100 + 0o12) + chr(50), 50111 - 50103), ehT0Px3KOsy9(chr(614 - 566) + chr(0b1101111) + '\061' + chr(0b10100 + 0o37) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(0b110100) + chr(1525 - 1476), 0b1000), ehT0Px3KOsy9(chr(278 - 230) + chr(0b1101111) + chr(0b10000 + 0o41) + chr(0b101111 + 0o5) + '\064', 35754 - 35746), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b11000 + 0o33) + chr(2299 - 2251) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(521 - 467) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1135 - 1087) + chr(8499 - 8388) + chr(0b100111 + 0o14) + '\063' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1690 - 1642) + chr(0b1100111 + 0o10) + chr(0b1001 + 0o50) + '\067' + chr(0b110011 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o3) + '\065' + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\062' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + '\061' + chr(1631 - 1577) + chr(1882 - 1833), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b1100 + 0o51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x34' + '\x31', 0b1000), ehT0Px3KOsy9(chr(1845 - 1797) + chr(0b1101111) + chr(50) + chr(0b110011) + chr(0b11001 + 0o31), 60389 - 60381), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b100011 + 0o21) + '\066', 11210 - 11202), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + '\061' + chr(0b110011), 37559 - 37551), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(0b1011 + 0o50) + chr(50) + chr(419 - 365), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110000 + 0o1) + chr(48) + chr(52), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(161 - 113), 30397 - 30389)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'a'), '\144' + chr(0b1100101) + chr(9658 - 9559) + chr(9628 - 9517) + chr(100) + chr(0b1100101))('\x75' + chr(0b110100 + 0o100) + chr(0b1001111 + 0o27) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FCQnFfJ6b3ip(G0l07IcG0fSk, cneiI2gxD8df): kx9bhIazfZo2 = {CJBHNoj4zKoT: {} for CJBHNoj4zKoT in G0l07IcG0fSk} nSaV3UFmak9J = cneiI2gxD8df.SPnCNu54H1db() for (Ef1IvvylCipM, QmmgWUB13VCJ) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'&\x8f\xd8u2,\xaf3\xb6'), chr(100) + chr(0b100011 + 0o102) + '\143' + '\x6f' + chr(8374 - 8274) + chr(0b1100101))('\165' + '\x74' + chr(2331 - 2229) + chr(0b0 + 0o55) + chr(562 - 506)))(nSaV3UFmak9J): CJBHNoj4zKoT = Ef1IvvylCipM.split(xafqLlk3kkUe(SXOLrMavuUCe(b'a'), '\144' + '\x65' + chr(0b111010 + 0o51) + '\157' + chr(0b111011 + 0o51) + chr(0b1100101))(chr(117) + '\x74' + chr(0b10011 + 0o123) + '\055' + chr(56)))[ehT0Px3KOsy9('\060' + chr(0b1001 + 0o146) + chr(48), ord("\x08"))] K3J4ZwSlE0sT = Ef1IvvylCipM[c2A0yzQpDQB3(CJBHNoj4zKoT) + ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(465 - 416), 0b1000):] kx9bhIazfZo2[CJBHNoj4zKoT][K3J4ZwSlE0sT] = QmmgWUB13VCJ return [xafqLlk3kkUe(guRGmljwUVnc, xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xab\xdcu:5\xb9'), '\144' + chr(0b0 + 0o145) + chr(0b111011 + 0o50) + chr(0b1110 + 0o141) + chr(0b1000011 + 0o41) + chr(101))('\165' + '\164' + chr(0b11100 + 0o112) + chr(1231 - 1186) + chr(56)))(**kx9bhIazfZo2[CJBHNoj4zKoT]) for CJBHNoj4zKoT in G0l07IcG0fSk]
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
training_loop_hparams_from_scoped_overrides
def training_loop_hparams_from_scoped_overrides(scoped_overrides, trial_id): """Create HParams suitable for training loop from scoped HParams. Args: scoped_overrides: HParams, with keys all scoped by one of HP_SCOPES. These parameters are overrides for the base HParams created by create_loop_hparams. trial_id: str, trial identifier. This is used to register unique HParams names for the underlying model and ppo HParams. Returns: HParams suitable for passing to training_loop. """ trial_hp_overrides = scoped_overrides.values() # Create loop, model, and ppo base HParams loop_hp = create_loop_hparams() model_hp_name = trial_hp_overrides.get( "loop.generative_model_params", loop_hp.generative_model_params) model_hp = registry.hparams(model_hp_name).parse(FLAGS.hparams) base_algo_params_name = trial_hp_overrides.get( "loop.base_algo_params", loop_hp.base_algo_params) algo_hp = registry.hparams(base_algo_params_name) # Merge them and then override with the scoped overrides combined_hp = merge_unscoped_hparams( zip(HP_SCOPES, [loop_hp, model_hp, algo_hp])) combined_hp.override_from_dict(trial_hp_overrides) # Split out the component hparams loop_hp, model_hp, algo_hp = ( split_scoped_hparams(HP_SCOPES, combined_hp)) # Dynamic register the model hp and set the new name in loop_hp model_hp_name = "model_hp_%s" % str(trial_id) dynamic_register_hparams(model_hp_name, model_hp) loop_hp.generative_model_params = model_hp_name # Dynamic register the algo hp and set the new name in loop_hp algo_hp_name = "algo_hp_%s" % str(trial_id) dynamic_register_hparams(algo_hp_name, algo_hp) loop_hp.base_algo_params = algo_hp_name return loop_hp
python
def training_loop_hparams_from_scoped_overrides(scoped_overrides, trial_id): """Create HParams suitable for training loop from scoped HParams. Args: scoped_overrides: HParams, with keys all scoped by one of HP_SCOPES. These parameters are overrides for the base HParams created by create_loop_hparams. trial_id: str, trial identifier. This is used to register unique HParams names for the underlying model and ppo HParams. Returns: HParams suitable for passing to training_loop. """ trial_hp_overrides = scoped_overrides.values() # Create loop, model, and ppo base HParams loop_hp = create_loop_hparams() model_hp_name = trial_hp_overrides.get( "loop.generative_model_params", loop_hp.generative_model_params) model_hp = registry.hparams(model_hp_name).parse(FLAGS.hparams) base_algo_params_name = trial_hp_overrides.get( "loop.base_algo_params", loop_hp.base_algo_params) algo_hp = registry.hparams(base_algo_params_name) # Merge them and then override with the scoped overrides combined_hp = merge_unscoped_hparams( zip(HP_SCOPES, [loop_hp, model_hp, algo_hp])) combined_hp.override_from_dict(trial_hp_overrides) # Split out the component hparams loop_hp, model_hp, algo_hp = ( split_scoped_hparams(HP_SCOPES, combined_hp)) # Dynamic register the model hp and set the new name in loop_hp model_hp_name = "model_hp_%s" % str(trial_id) dynamic_register_hparams(model_hp_name, model_hp) loop_hp.generative_model_params = model_hp_name # Dynamic register the algo hp and set the new name in loop_hp algo_hp_name = "algo_hp_%s" % str(trial_id) dynamic_register_hparams(algo_hp_name, algo_hp) loop_hp.base_algo_params = algo_hp_name return loop_hp
[ "def", "training_loop_hparams_from_scoped_overrides", "(", "scoped_overrides", ",", "trial_id", ")", ":", "trial_hp_overrides", "=", "scoped_overrides", ".", "values", "(", ")", "# Create loop, model, and ppo base HParams", "loop_hp", "=", "create_loop_hparams", "(", ")", "model_hp_name", "=", "trial_hp_overrides", ".", "get", "(", "\"loop.generative_model_params\"", ",", "loop_hp", ".", "generative_model_params", ")", "model_hp", "=", "registry", ".", "hparams", "(", "model_hp_name", ")", ".", "parse", "(", "FLAGS", ".", "hparams", ")", "base_algo_params_name", "=", "trial_hp_overrides", ".", "get", "(", "\"loop.base_algo_params\"", ",", "loop_hp", ".", "base_algo_params", ")", "algo_hp", "=", "registry", ".", "hparams", "(", "base_algo_params_name", ")", "# Merge them and then override with the scoped overrides", "combined_hp", "=", "merge_unscoped_hparams", "(", "zip", "(", "HP_SCOPES", ",", "[", "loop_hp", ",", "model_hp", ",", "algo_hp", "]", ")", ")", "combined_hp", ".", "override_from_dict", "(", "trial_hp_overrides", ")", "# Split out the component hparams", "loop_hp", ",", "model_hp", ",", "algo_hp", "=", "(", "split_scoped_hparams", "(", "HP_SCOPES", ",", "combined_hp", ")", ")", "# Dynamic register the model hp and set the new name in loop_hp", "model_hp_name", "=", "\"model_hp_%s\"", "%", "str", "(", "trial_id", ")", "dynamic_register_hparams", "(", "model_hp_name", ",", "model_hp", ")", "loop_hp", ".", "generative_model_params", "=", "model_hp_name", "# Dynamic register the algo hp and set the new name in loop_hp", "algo_hp_name", "=", "\"algo_hp_%s\"", "%", "str", "(", "trial_id", ")", "dynamic_register_hparams", "(", "algo_hp_name", ",", "algo_hp", ")", "loop_hp", ".", "base_algo_params", "=", "algo_hp_name", "return", "loop_hp" ]
Create HParams suitable for training loop from scoped HParams. Args: scoped_overrides: HParams, with keys all scoped by one of HP_SCOPES. These parameters are overrides for the base HParams created by create_loop_hparams. trial_id: str, trial identifier. This is used to register unique HParams names for the underlying model and ppo HParams. Returns: HParams suitable for passing to training_loop.
[ "Create", "HParams", "suitable", "for", "training", "loop", "from", "scoped", "HParams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L880-L923
train
Create HParams suitable for training loop from scoped HParams.
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,j9rjMYnN2B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kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\x33', 0b1000), ehT0Px3KOsy9(chr(445 - 397) + '\157' + '\x32' + chr(48) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10110 + 0o33) + chr(54) + chr(0b101110 + 0o11), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(52) + '\067', 37079 - 37071), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(50) + chr(0b100011 + 0o23) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4032 - 3921) + chr(54) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(1432 - 1381) + chr(52) + chr(1014 - 966), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(2785 - 2730) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101010 + 0o7) + '\x34' + chr(0b101001 + 0o13), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x30' + chr(0b110000 + 0o1), 57504 - 57496), ehT0Px3KOsy9('\x30' + chr(0b1100011 + 0o14) + chr(51) + chr(55) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1441 - 1392) + '\x34' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(0b11001 + 0o32) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b100110 + 0o12), 0b1000), ehT0Px3KOsy9(chr(1114 - 1066) + '\157' + '\062' + chr(0b100111 + 0o11) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(50) + chr(862 - 810) + chr(841 - 791), 0o10), ehT0Px3KOsy9(chr(48) + chr(4878 - 4767) + '\x33' + '\x35', 54975 - 54967), ehT0Px3KOsy9(chr(48) + chr(10418 - 10307) + chr(49) + chr(48) + chr(781 - 731), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(176 - 125) + chr(0b110110) + '\x33', 0b1000), ehT0Px3KOsy9(chr(64 - 16) + chr(6227 - 6116) + chr(0b11000 + 0o33) + '\060' + chr(0b100011 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(50) + chr(51) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + '\x32' + '\063' + chr(0b110010), 17891 - 17883), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1297 - 1249) + '\x6f' + chr(53) + '\x33', 17470 - 17462), ehT0Px3KOsy9(chr(1210 - 1162) + chr(111) + '\x32' + '\067' + chr(1742 - 1694), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b101001 + 0o12) + chr(220 - 165) + chr(54), 8), ehT0Px3KOsy9(chr(2058 - 2010) + chr(0b1101111) + '\061' + chr(0b110101) + '\067', 0b1000), ehT0Px3KOsy9(chr(1253 - 1205) + chr(111) + chr(0b110010) + chr(0b101 + 0o53) + chr(995 - 943), 8), ehT0Px3KOsy9('\060' + chr(0b1001100 + 0o43) + chr(0b11110 + 0o23) + chr(1336 - 1287) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b10111 + 0o34) + chr(0b10010 + 0o45), 46663 - 46655), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\064' + '\x36', 53014 - 53006), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1001011 + 0o44) + chr(2198 - 2147) + chr(0b11101 + 0o25) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b1110 + 0o43) + chr(0b110011) + '\063', 2513 - 2505), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\065' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(2281 - 2233) + chr(111) + '\x32' + '\066' + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(0b0 + 0o63) + chr(0b101100 + 0o13) + '\x30', 16740 - 16732), ehT0Px3KOsy9('\x30' + chr(8816 - 8705) + chr(51) + chr(0b101010 + 0o6) + chr(51), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101000 + 0o14) + '\065', 34005 - 33997), ehT0Px3KOsy9(chr(316 - 268) + chr(0b1001011 + 0o44) + chr(1880 - 1831) + '\063' + chr(54), 61346 - 61338)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(695 - 647) + chr(11256 - 11145) + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'='), chr(0b101010 + 0o72) + chr(8627 - 8526) + '\x63' + chr(6503 - 6392) + chr(0b1100100) + chr(8425 - 8324))(chr(0b11001 + 0o134) + '\x74' + chr(102) + chr(0b101101) + chr(2994 - 2938)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _aygIkvmZqMb(E_LdwkMtPoZa, rv8CNRYETQhs): yHIn5iGyHbiR = E_LdwkMtPoZa.SPnCNu54H1db() V0d3ctIVBtTV = l46862Sd0G_9() IUJYWGwyOd3I = yHIn5iGyHbiR.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f\xeb\x18\x17\x98S\x85\x90\x01\xb3\x9a\x16p~\xe3\xfdp-\x97\xa6\xf1\xc5bJ\xca\x9f\x02\xf7'), '\x64' + chr(101) + '\x63' + chr(0b100001 + 0o116) + chr(0b101111 + 0o65) + '\145')('\x75' + chr(1458 - 1342) + '\x66' + chr(0b101101) + '\x38'), V0d3ctIVBtTV.YBEkVLgqMiCU) akoM5y_HCih_ = U24OBsRcVqkJ.hparams(IUJYWGwyOd3I).parse(vUTZFbqN0o8F.hparams) g5oPIytjX2Yj = yHIn5iGyHbiR.get(xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f\xeb\x18\x17\x98V\x81\x8d\x01\x9e\x9a\x0e~g\xd9\xd2|0\x92\xae\xee'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(117) + '\164' + chr(8897 - 8795) + chr(45) + '\x38'), V0d3ctIVBtTV.base_algo_params) xMbNeMYNdzBM = U24OBsRcVqkJ.hparams(g5oPIytjX2Yj) fG66qmDsXZ80 = pjy14YAvVeEi(pZ0NK2y6HRbn(vFDKd320dTxg, [V0d3ctIVBtTV, akoM5y_HCih_, xMbNeMYNdzBM])) xafqLlk3kkUe(fG66qmDsXZ80, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xf2\x12\x15\xc4]\x84\x9b;\xa7\x89\rtW\xe2\xcb~6'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\x64' + chr(386 - 285))('\165' + '\164' + chr(102) + chr(0b10 + 0o53) + '\x38'))(yHIn5iGyHbiR) (V0d3ctIVBtTV, akoM5y_HCih_, xMbNeMYNdzBM) = FCQnFfJ6b3ip(vFDKd320dTxg, fG66qmDsXZ80) IUJYWGwyOd3I = xafqLlk3kkUe(SXOLrMavuUCe(b'~\xeb\x13\x02\xdak\x88\x8e;\xe4\x88'), chr(0b100 + 0o140) + chr(0b101 + 0o140) + '\x63' + chr(0b11101 + 0o122) + chr(100) + chr(101))(chr(117) + chr(116) + '\146' + chr(382 - 337) + '\x38') % M8_cKLkHVB2V(rv8CNRYETQhs) Jx_nMxaAmCpG(IUJYWGwyOd3I, akoM5y_HCih_) V0d3ctIVBtTV.YBEkVLgqMiCU = IUJYWGwyOd3I VG5sN664H1ME = xafqLlk3kkUe(SXOLrMavuUCe(b'r\xe8\x10\x08\xe9\\\x90\xa1A\xb2'), '\144' + chr(6325 - 6224) + chr(4193 - 4094) + chr(0b1101111) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + '\146' + chr(1160 - 1115) + '\x38') % M8_cKLkHVB2V(rv8CNRYETQhs) Jx_nMxaAmCpG(VG5sN664H1ME, xMbNeMYNdzBM) V0d3ctIVBtTV.eNhPLh6cTW8q = VG5sN664H1ME return V0d3ctIVBtTV
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
PlayerEnv.get_keys_to_action
def get_keys_to_action(self): """Get mapping from keyboard keys to actions. Required by gym.utils.play in environment or top level wrapper. Returns: { Unicode code point for keyboard key: action (formatted for step()), ... } """ # Based on gym AtariEnv.get_keys_to_action() keyword_to_key = { "UP": ord("w"), "DOWN": ord("s"), "LEFT": ord("a"), "RIGHT": ord("d"), "FIRE": ord(" "), } keys_to_action = {} for action_id, action_meaning in enumerate(self.action_meanings): keys_tuple = tuple(sorted([ key for keyword, key in keyword_to_key.items() if keyword in action_meaning])) assert keys_tuple not in keys_to_action keys_to_action[keys_tuple] = action_id # Special actions: keys_to_action[(ord("r"),)] = self.RETURN_DONE_ACTION keys_to_action[(ord("c"),)] = self.TOGGLE_WAIT_ACTION keys_to_action[(ord("n"),)] = self.WAIT_MODE_NOOP_ACTION return keys_to_action
python
def get_keys_to_action(self): """Get mapping from keyboard keys to actions. Required by gym.utils.play in environment or top level wrapper. Returns: { Unicode code point for keyboard key: action (formatted for step()), ... } """ # Based on gym AtariEnv.get_keys_to_action() keyword_to_key = { "UP": ord("w"), "DOWN": ord("s"), "LEFT": ord("a"), "RIGHT": ord("d"), "FIRE": ord(" "), } keys_to_action = {} for action_id, action_meaning in enumerate(self.action_meanings): keys_tuple = tuple(sorted([ key for keyword, key in keyword_to_key.items() if keyword in action_meaning])) assert keys_tuple not in keys_to_action keys_to_action[keys_tuple] = action_id # Special actions: keys_to_action[(ord("r"),)] = self.RETURN_DONE_ACTION keys_to_action[(ord("c"),)] = self.TOGGLE_WAIT_ACTION keys_to_action[(ord("n"),)] = self.WAIT_MODE_NOOP_ACTION return keys_to_action
[ "def", "get_keys_to_action", "(", "self", ")", ":", "# Based on gym AtariEnv.get_keys_to_action()", "keyword_to_key", "=", "{", "\"UP\"", ":", "ord", "(", "\"w\"", ")", ",", "\"DOWN\"", ":", "ord", "(", "\"s\"", ")", ",", "\"LEFT\"", ":", "ord", "(", "\"a\"", ")", ",", "\"RIGHT\"", ":", "ord", "(", "\"d\"", ")", ",", "\"FIRE\"", ":", "ord", "(", "\" \"", ")", ",", "}", "keys_to_action", "=", "{", "}", "for", "action_id", ",", "action_meaning", "in", "enumerate", "(", "self", ".", "action_meanings", ")", ":", "keys_tuple", "=", "tuple", "(", "sorted", "(", "[", "key", "for", "keyword", ",", "key", "in", "keyword_to_key", ".", "items", "(", ")", "if", "keyword", "in", "action_meaning", "]", ")", ")", "assert", "keys_tuple", "not", "in", "keys_to_action", "keys_to_action", "[", "keys_tuple", "]", "=", "action_id", "# Special actions:", "keys_to_action", "[", "(", "ord", "(", "\"r\"", ")", ",", ")", "]", "=", "self", ".", "RETURN_DONE_ACTION", "keys_to_action", "[", "(", "ord", "(", "\"c\"", ")", ",", ")", "]", "=", "self", ".", "TOGGLE_WAIT_ACTION", "keys_to_action", "[", "(", "ord", "(", "\"n\"", ")", ",", ")", "]", "=", "self", ".", "WAIT_MODE_NOOP_ACTION", "return", "keys_to_action" ]
Get mapping from keyboard keys to actions. Required by gym.utils.play in environment or top level wrapper. Returns: { Unicode code point for keyboard key: action (formatted for step()), ... }
[ "Get", "mapping", "from", "keyboard", "keys", "to", "actions", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L157-L191
train
Get mapping from keyboard keys to actions.
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,Q6d3Qd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aC8LEDU,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) + '\x33' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\064' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\061' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(293 - 244) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b110111) + '\063', 24701 - 24693), ehT0Px3KOsy9('\060' + chr(7630 - 7519) + chr(1269 - 1220) + chr(0b110100) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(0b110010) + chr(0b110110) + chr(1736 - 1688), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\061' + chr(0b100011 + 0o24), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11477 - 11366) + chr(0b100011 + 0o17) + chr(2390 - 2340) + '\066', 1792 - 1784), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + '\065' + '\x34', 37972 - 37964), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110110) + chr(55), 12431 - 12423), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110111) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1221 - 1173) + chr(111) + chr(0b1101 + 0o44) + '\062' + chr(1173 - 1120), 51869 - 51861), ehT0Px3KOsy9(chr(1412 - 1364) + chr(111) + '\063' + chr(0b110011) + '\x32', 0b1000), ehT0Px3KOsy9(chr(304 - 256) + chr(0b1101111) + '\x32' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110111) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\060' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1 + 0o66) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1291 - 1240) + chr(0b101110 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + chr(0b10001 + 0o44) + chr(0b101111 + 0o1), 0o10), ehT0Px3KOsy9(chr(611 - 563) + chr(111) + chr(2208 - 2160), 42602 - 42594), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + '\063' + chr(0b110011 + 0o2) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b1001 + 0o52) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3247 - 3136) + chr(0b111 + 0o53) + chr(55) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + '\x36' + chr(580 - 532), 3982 - 3974), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(311 - 200) + '\x33' + chr(176 - 121) + chr(448 - 400), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(55) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(1729 - 1681) + chr(111) + '\062' + chr(634 - 585) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b11110 + 0o121) + chr(1492 - 1441) + chr(1050 - 998) + chr(0b110001 + 0o3), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b110011) + '\060', 35354 - 35346), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b1010 + 0o55) + chr(0b110101), 22068 - 22060), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1010110 + 0o31) + '\x32' + chr(2652 - 2599) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010111 + 0o30) + chr(0b100110 + 0o13) + chr(557 - 506) + chr(48), 8), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(5302 - 5191) + '\x31', 6495 - 6487), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b101001 + 0o15) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1488 - 1440) + chr(0b1011111 + 0o20) + chr(0b110011) + '\x31' + chr(1696 - 1641), 0b1000), ehT0Px3KOsy9(chr(237 - 189) + chr(0b1101111) + chr(0b101011 + 0o10) + chr(1272 - 1218), 0b1000), ehT0Px3KOsy9(chr(2241 - 2193) + chr(0b1101111) + '\x35' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10876 - 10765) + '\x33' + '\062' + chr(2244 - 2193), 0b1000), ehT0Px3KOsy9('\x30' + chr(2061 - 1950) + chr(277 - 224) + chr(52), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1861 - 1813) + '\157' + '\065' + chr(0b10001 + 0o37), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'3'), chr(0b1100100) + chr(101) + chr(99) + '\157' + chr(0b1000000 + 0o44) + chr(0b10101 + 0o120))('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Tm6CEVuwxvaL(oVre8I6UXc3b): IZjcb6cg2L4q = {xafqLlk3kkUe(SXOLrMavuUCe(b'H\xb7'), '\x64' + '\145' + '\x63' + '\157' + chr(0b1110 + 0o126) + chr(0b1001010 + 0o33))('\165' + '\x74' + chr(1596 - 1494) + '\055' + '\070'): Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'j'), chr(0b100011 + 0o101) + chr(0b1100101) + chr(0b1011011 + 0o10) + chr(2936 - 2825) + chr(0b11011 + 0o111) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(4816 - 4714) + chr(1143 - 1098) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xa8\x1aD'), chr(3514 - 3414) + '\x65' + '\x63' + '\x6f' + '\144' + '\x65')('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)): Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'n'), chr(0b1010010 + 0o22) + chr(0b1100101) + '\x63' + chr(10756 - 10645) + chr(1947 - 1847) + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(0b100001 + 0o14) + '\070')), xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xa2\x0b^'), chr(8021 - 7921) + '\x65' + chr(4053 - 3954) + chr(9459 - 9348) + chr(100) + chr(101))('\x75' + chr(10351 - 10235) + chr(8367 - 8265) + '\055' + chr(278 - 222)): Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'|'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1100110 + 0o11) + '\144' + chr(0b1000000 + 0o45))(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + chr(56))), xafqLlk3kkUe(SXOLrMavuUCe(b'O\xae\nB\xaf'), chr(1931 - 1831) + chr(529 - 428) + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(117) + chr(10450 - 10334) + chr(5935 - 5833) + chr(0b101101) + chr(56)): Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'y'), chr(3911 - 3811) + '\x65' + chr(7533 - 7434) + chr(0b1101110 + 0o1) + chr(8549 - 8449) + '\145')('\165' + chr(0b1110100) + chr(0b111111 + 0o47) + '\055' + chr(1032 - 976))), xafqLlk3kkUe(SXOLrMavuUCe(b'[\xae\x1fO'), chr(0b110011 + 0o61) + chr(3941 - 3840) + '\143' + chr(111) + '\x64' + chr(906 - 805))(chr(0b1110100 + 0o1) + '\164' + chr(10401 - 10299) + chr(0b101101) + chr(56)): Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'='), chr(100) + chr(2006 - 1905) + chr(5091 - 4992) + chr(10390 - 10279) + chr(0b1100100) + chr(0b11 + 0o142))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(1348 - 1303) + '\x38'))} yQn2_xzUY7Ze = {} for (SEruK1T4wwy9, YduEwsUSQ_wV) in YlkZvXL8qwsX(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'|\x849c\x94\x0f\xef\xe2\xf3MY\xd7;\xbdb'), chr(0b1100100) + chr(0b110 + 0o137) + chr(99) + chr(0b1101111) + '\x64' + chr(101))(chr(13686 - 13569) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))): S1GhJzhidndr = KNyTy8rYcwji(vUlqIvNSaRMa([K3J4ZwSlE0sT for (IVjkh7gJdLlE, K3J4ZwSlE0sT) in IZjcb6cg2L4q.NzveIZ3IlSH9() if IVjkh7gJdLlE in YduEwsUSQ_wV])) assert S1GhJzhidndr not in yQn2_xzUY7Ze yQn2_xzUY7Ze[S1GhJzhidndr] = SEruK1T4wwy9 yQn2_xzUY7Ze[Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'o'), chr(454 - 354) + '\x65' + chr(464 - 365) + chr(111) + '\x64' + chr(0b10111 + 0o116))(chr(13276 - 13159) + chr(0b1110100) + chr(0b1011000 + 0o16) + chr(1146 - 1101) + '\070')),] = oVre8I6UXc3b.RETURN_DONE_ACTION yQn2_xzUY7Ze[Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'~'), chr(2025 - 1925) + chr(0b1100101) + '\x63' + chr(10995 - 10884) + '\144' + '\x65')('\x75' + chr(9883 - 9767) + chr(9623 - 9521) + '\x2d' + '\x38')),] = oVre8I6UXc3b.TOGGLE_WAIT_ACTION yQn2_xzUY7Ze[Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b's'), chr(6101 - 6001) + chr(0b1001110 + 0o27) + chr(9519 - 9420) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\146' + '\055' + chr(56))),] = oVre8I6UXc3b.WAIT_MODE_NOOP_ACTION return yQn2_xzUY7Ze
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
PlayerEnv.step
def step(self, action): """Pass action to underlying environment(s) or perform special action.""" # Special codes if action in self._player_actions(): envs_step_tuples = self._player_actions()[action]() elif self._wait and action == self.name_to_action_num["NOOP"]: # Ignore no-op, do not pass to environment. envs_step_tuples = self._last_step_tuples else: # Run action on environment(s). if action == self.WAIT_MODE_NOOP_ACTION: action = self.name_to_action_num["NOOP"] # Perform action on underlying environment(s). envs_step_tuples = self._step_envs(action) self._update_statistics(envs_step_tuples) self._last_step_tuples = envs_step_tuples ob, reward, done, info = self._player_step_tuple(envs_step_tuples) return ob, reward, done, info
python
def step(self, action): """Pass action to underlying environment(s) or perform special action.""" # Special codes if action in self._player_actions(): envs_step_tuples = self._player_actions()[action]() elif self._wait and action == self.name_to_action_num["NOOP"]: # Ignore no-op, do not pass to environment. envs_step_tuples = self._last_step_tuples else: # Run action on environment(s). if action == self.WAIT_MODE_NOOP_ACTION: action = self.name_to_action_num["NOOP"] # Perform action on underlying environment(s). envs_step_tuples = self._step_envs(action) self._update_statistics(envs_step_tuples) self._last_step_tuples = envs_step_tuples ob, reward, done, info = self._player_step_tuple(envs_step_tuples) return ob, reward, done, info
[ "def", "step", "(", "self", ",", "action", ")", ":", "# Special codes", "if", "action", "in", "self", ".", "_player_actions", "(", ")", ":", "envs_step_tuples", "=", "self", ".", "_player_actions", "(", ")", "[", "action", "]", "(", ")", "elif", "self", ".", "_wait", "and", "action", "==", "self", ".", "name_to_action_num", "[", "\"NOOP\"", "]", ":", "# Ignore no-op, do not pass to environment.", "envs_step_tuples", "=", "self", ".", "_last_step_tuples", "else", ":", "# Run action on environment(s).", "if", "action", "==", "self", ".", "WAIT_MODE_NOOP_ACTION", ":", "action", "=", "self", ".", "name_to_action_num", "[", "\"NOOP\"", "]", "# Perform action on underlying environment(s).", "envs_step_tuples", "=", "self", ".", "_step_envs", "(", "action", ")", "self", ".", "_update_statistics", "(", "envs_step_tuples", ")", "self", ".", "_last_step_tuples", "=", "envs_step_tuples", "ob", ",", "reward", ",", "done", ",", "info", "=", "self", ".", "_player_step_tuple", "(", "envs_step_tuples", ")", "return", "ob", ",", "reward", ",", "done", ",", "info" ]
Pass action to underlying environment(s) or perform special action.
[ "Pass", "action", "to", "underlying", "environment", "(", "s", ")", "or", "perform", "special", "action", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L203-L221
train
Pass action to underlying environment or perform special action.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLs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0,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(0b1001111 + 0o40) + chr(0b101001 + 0o12) + chr(0b101 + 0o54) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(49) + '\x33' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b11111 + 0o27) + chr(2262 - 2211), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1008 - 957) + chr(0b110010) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111000 + 0o67) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(1996 - 1947) + '\065' + chr(1268 - 1220), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(1588 - 1539) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b110001) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110111) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(1021 - 972) + '\x31' + '\062', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + '\x31' + chr(50) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b10 + 0o155) + chr(0b110010) + chr(720 - 670) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b10000 + 0o41) + '\x36' + chr(0b101000 + 0o17), 53660 - 53652), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101110 + 0o5) + chr(1733 - 1684) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(912 - 864) + chr(111) + chr(0b110010) + chr(0b10101 + 0o42) + chr(1464 - 1410), 0b1000), ehT0Px3KOsy9(chr(1313 - 1265) + chr(111) + chr(0b101111 + 0o4) + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1926 - 1875) + '\x32' + chr(55), 64943 - 64935), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o42) + chr(0b1001 + 0o51) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + '\063' + chr(1241 - 1187) + '\061', 0o10), ehT0Px3KOsy9('\060' + chr(1834 - 1723) + chr(0b0 + 0o63) + chr(1752 - 1697) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(1129 - 1076) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b101111 + 0o4) + chr(48), 47990 - 47982), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110110) + '\060', 0o10), ehT0Px3KOsy9(chr(1231 - 1183) + chr(0b100111 + 0o110) + chr(1298 - 1248) + chr(0b1110 + 0o50) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(2018 - 1907) + '\x31' + chr(52) + '\061', 0b1000), ehT0Px3KOsy9(chr(2035 - 1987) + '\x6f' + chr(0b110101) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11110 + 0o23) + chr(1882 - 1830) + '\x36', 32505 - 32497), ehT0Px3KOsy9('\x30' + chr(0b101001 + 0o106) + chr(0b110001) + chr(0b1111 + 0o42) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(5761 - 5650) + chr(617 - 568) + chr(0b110011) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1951 - 1903) + '\157' + '\x32' + '\060' + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\060' + chr(2002 - 1947), 63480 - 63472), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(52) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b11011 + 0o124) + '\063' + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + chr(0b110010) + chr(55) + chr(53), 0o10), ehT0Px3KOsy9(chr(1719 - 1671) + chr(0b1011010 + 0o25) + chr(0b110100) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\x31' + chr(0b10 + 0o62) + chr(0b11101 + 0o27), 49554 - 49546), ehT0Px3KOsy9(chr(48) + chr(10438 - 10327) + chr(0b100000 + 0o23) + chr(0b10001 + 0o40) + chr(0b110011), 37139 - 37131), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000100 + 0o53) + chr(0b110011) + chr(50), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(101))('\165' + '\x74' + chr(4601 - 4499) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def kDuFsAhEatcU(oVre8I6UXc3b, vyskHDXig6uT): if vyskHDXig6uT in xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97B6\x92\xadg\x1a\xd2\xe8\x9e>>\xfb\x19\xbf'), chr(100) + chr(101) + chr(99) + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b11111 + 0o125) + chr(4185 - 4083) + '\x2d' + chr(739 - 683)))(): WluH4F8WrLGQ = oVre8I6UXc3b._player_actions()[vyskHDXig6uT]() elif xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97E;\x9a\xa0'), '\144' + chr(0b101101 + 0o70) + '\x63' + '\157' + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b1110 + 0o130) + chr(0b101101) + '\070')) and vyskHDXig6uT == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6S7\x96\x8bv\x07\xd2\xe8\x9e>>\xfb\x19\x93\xd0\xb7\xba'), chr(2119 - 2019) + '\x65' + chr(7634 - 7535) + chr(0b1001101 + 0o42) + chr(5729 - 5629) + chr(0b1 + 0o144))('\x75' + chr(0b1000000 + 0o64) + '\x66' + '\x2d' + chr(56)))[xafqLlk3kkUe(SXOLrMavuUCe(b'\x86}\x15\xa3'), chr(151 - 51) + '\x65' + '\143' + '\157' + '\144' + chr(0b100001 + 0o104))(chr(0b1101101 + 0o10) + chr(0b1110100) + chr(3454 - 3352) + chr(45) + '\x38')]: WluH4F8WrLGQ = oVre8I6UXc3b._last_step_tuples else: if vyskHDXig6uT == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b"\x9fs\x13\xa7\x8bO'\xc9\xcc\xa2\x04\x18\xdb'\x93\xff\x81\x83\x1e\xbe\xb2"), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(11736 - 11619) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b10100 + 0o44))): vyskHDXig6uT = oVre8I6UXc3b.name_to_action_num[xafqLlk3kkUe(SXOLrMavuUCe(b'\x86}\x15\xa3'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(111) + chr(0b10000 + 0o124) + '\145')('\165' + '\164' + chr(0b1100110) + chr(45) + chr(56))] WluH4F8WrLGQ = oVre8I6UXc3b._step_envs(vyskHDXig6uT) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x97G*\x97\xb5v\r\xd2\xfa\x89+#\xfd\x04\xb8\xd7\xa1\xa4'), chr(0b111011 + 0o51) + chr(0b1000111 + 0o36) + '\x63' + chr(0b10101 + 0o132) + '\144' + '\x65')(chr(7472 - 7355) + '\164' + '\x66' + chr(0b101101) + chr(2609 - 2553)))(WluH4F8WrLGQ) oVre8I6UXc3b.luurnoi044bB = WluH4F8WrLGQ (yS9T1jpbJOfJ, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk) = oVre8I6UXc3b._player_step_tuple(WluH4F8WrLGQ) return (yS9T1jpbJOfJ, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk)
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
PlayerEnv._augment_observation
def _augment_observation(self, ob, reward, cumulative_reward): """"Expand observation array with additional information header (top rows). Args: ob: observation reward: reward to be included in header. cumulative_reward: total cumulated reward to be included in header. Returns: Expanded observation array. """ img = PIL_Image().new("RGB", (ob.shape[1], self.HEADER_HEIGHT,)) draw = PIL_ImageDraw().Draw(img) draw.text( (1, 0), "c:{:3}, r:{:3}".format(int(cumulative_reward), int(reward)), fill=(255, 0, 0) ) draw.text( (1, 15), "fc:{:3}".format(int(self._frame_counter)), fill=(255, 0, 0) ) header = np.asarray(img) del img header.setflags(write=1) # Top row color indicates if WAIT MODE is on. if self._wait: pixel_fill = (0, 255, 0) else: pixel_fill = (255, 0, 0) header[0, :, :] = pixel_fill return np.concatenate([header, ob], axis=0)
python
def _augment_observation(self, ob, reward, cumulative_reward): """"Expand observation array with additional information header (top rows). Args: ob: observation reward: reward to be included in header. cumulative_reward: total cumulated reward to be included in header. Returns: Expanded observation array. """ img = PIL_Image().new("RGB", (ob.shape[1], self.HEADER_HEIGHT,)) draw = PIL_ImageDraw().Draw(img) draw.text( (1, 0), "c:{:3}, r:{:3}".format(int(cumulative_reward), int(reward)), fill=(255, 0, 0) ) draw.text( (1, 15), "fc:{:3}".format(int(self._frame_counter)), fill=(255, 0, 0) ) header = np.asarray(img) del img header.setflags(write=1) # Top row color indicates if WAIT MODE is on. if self._wait: pixel_fill = (0, 255, 0) else: pixel_fill = (255, 0, 0) header[0, :, :] = pixel_fill return np.concatenate([header, ob], axis=0)
[ "def", "_augment_observation", "(", "self", ",", "ob", ",", "reward", ",", "cumulative_reward", ")", ":", "img", "=", "PIL_Image", "(", ")", ".", "new", "(", "\"RGB\"", ",", "(", "ob", ".", "shape", "[", "1", "]", ",", "self", ".", "HEADER_HEIGHT", ",", ")", ")", "draw", "=", "PIL_ImageDraw", "(", ")", ".", "Draw", "(", "img", ")", "draw", ".", "text", "(", "(", "1", ",", "0", ")", ",", "\"c:{:3}, r:{:3}\"", ".", "format", "(", "int", "(", "cumulative_reward", ")", ",", "int", "(", "reward", ")", ")", ",", "fill", "=", "(", "255", ",", "0", ",", "0", ")", ")", "draw", ".", "text", "(", "(", "1", ",", "15", ")", ",", "\"fc:{:3}\"", ".", "format", "(", "int", "(", "self", ".", "_frame_counter", ")", ")", ",", "fill", "=", "(", "255", ",", "0", ",", "0", ")", ")", "header", "=", "np", ".", "asarray", "(", "img", ")", "del", "img", "header", ".", "setflags", "(", "write", "=", "1", ")", "# Top row color indicates if WAIT MODE is on.", "if", "self", ".", "_wait", ":", "pixel_fill", "=", "(", "0", ",", "255", ",", "0", ")", "else", ":", "pixel_fill", "=", "(", "255", ",", "0", ",", "0", ")", "header", "[", "0", ",", ":", ",", ":", "]", "=", "pixel_fill", "return", "np", ".", "concatenate", "(", "[", "header", ",", "ob", "]", ",", "axis", "=", "0", ")" ]
Expand observation array with additional information header (top rows). Args: ob: observation reward: reward to be included in header. cumulative_reward: total cumulated reward to be included in header. Returns: Expanded observation array.
[ "Expand", "observation", "array", "with", "additional", "information", "header", "(", "top", "rows", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L223-L254
train
Expand observation array with additional information header ( top rows.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,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MUdZtaORwo4,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(51) + chr(50) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1174 - 1123) + '\062' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101000 + 0o7) + chr(57 - 3) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\060' + '\067', 2630 - 2622), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1001 + 0o146) + '\061' + chr(49) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1493 - 1443) + chr(0b110110) + chr(51), 4302 - 4294), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(0b11 + 0o57) + '\062' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(1760 - 1710) + chr(1023 - 970) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4817 - 4706) + chr(1441 - 1391) + chr(55) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + '\063' + chr(0b110100) + chr(2826 - 2771), 0o10), ehT0Px3KOsy9(chr(302 - 254) + chr(0b11101 + 0o122) + '\x32' + chr(53) + chr(51), 0o10), ehT0Px3KOsy9(chr(405 - 357) + chr(0b1101111) + chr(0b0 + 0o63) + '\065' + chr(1680 - 1625), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + '\063' + chr(0b110101) + '\063', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(11327 - 11216) + chr(0b110010) + chr(0b110100) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x32' + chr(0b10010 + 0o44), 47336 - 47328), ehT0Px3KOsy9(chr(0b110000) + chr(2176 - 2065) + chr(55) + chr(0b11001 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(0b11111 + 0o22) + chr(0b100000 + 0o21) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(0b110001) + '\063' + chr(0b11001 + 0o33), 44411 - 44403), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(6060 - 5949) + chr(1983 - 1934) + chr(0b110 + 0o54) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(2274 - 2226) + chr(0b1101111) + chr(55) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(67 - 18) + chr(1160 - 1109) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110101) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b100101 + 0o21) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\062' + chr(1851 - 1798), 54745 - 54737), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\x33' + chr(1035 - 981) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(0b1010 + 0o51) + '\064' + '\x37', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\066' + chr(55), 0o10), ehT0Px3KOsy9(chr(228 - 180) + chr(0b1101111) + chr(50) + chr(0b110011 + 0o2) + '\062', 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + chr(0b10011 + 0o40) + chr(0b101101 + 0o12) + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111011 + 0o64) + '\x34' + chr(0b110100), 6098 - 6090), ehT0Px3KOsy9(chr(248 - 200) + chr(1553 - 1442) + chr(2249 - 2200) + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(744 - 695) + chr(0b110100) + chr(0b1011 + 0o51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(51) + '\066' + chr(0b10011 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1 + 0o62) + chr(810 - 760) + chr(535 - 481), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(958 - 904) + chr(51), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1010011 + 0o34) + chr(0b110011) + '\067' + '\065', 0b1000), ehT0Px3KOsy9(chr(1430 - 1382) + chr(12299 - 12188) + chr(0b11000 + 0o33) + chr(0b10 + 0o56) + '\x36', 0o10), ehT0Px3KOsy9(chr(953 - 905) + '\157' + chr(0b110010) + '\x36' + chr(0b100011 + 0o23), 40332 - 40324), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101010 + 0o10) + '\064' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100100 + 0o113) + '\062' + chr(0b110110) + chr(2432 - 2382), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\x35' + '\x30', 18744 - 18736)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')('\165' + chr(8123 - 8007) + chr(0b1100110) + '\x2d' + chr(708 - 652)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def cWdR3nlElTgH(oVre8I6UXc3b, yS9T1jpbJOfJ, jEXsEsgeguP4, uoNEG3fp7JPy): s63jeLEbd8fs = RHAaDRV020yY().new(xafqLlk3kkUe(SXOLrMavuUCe(b'\x81\x93u'), chr(0b1001110 + 0o26) + '\145' + '\143' + '\157' + chr(361 - 261) + chr(0b110 + 0o137))(chr(117) + '\x74' + chr(0b1100110) + chr(0b11111 + 0o16) + '\x38'), (yS9T1jpbJOfJ.nauYfLglTpcb[ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001), ord("\x08"))], oVre8I6UXc3b.HEADER_HEIGHT)) B65Iv98Ts98c = V_CZu747ewZL().Draw(s63jeLEbd8fs) xafqLlk3kkUe(B65Iv98Ts98c, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\xbc\x06\xf5\x00\xdd\xe0\xcd\x8e\xdf\xe3\x8d'), chr(0b1100100) + chr(101) + chr(3097 - 2998) + chr(0b1010100 + 0o33) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(3876 - 3774) + chr(0b101101) + '\070'))((ehT0Px3KOsy9('\060' + chr(12225 - 12114) + chr(308 - 259), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1011000 + 0o27) + chr(48), 0o10)), xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xeeL\xbdz\xce\xba\x8a\xc8\xdd\xd0\xd5\xd8\xda'), chr(100) + '\x65' + chr(0b11111 + 0o104) + chr(12045 - 11934) + chr(3328 - 3228) + chr(0b1100101))(chr(0b1001011 + 0o52) + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xe0E\xe8\x01\xd2\xc5\x99\xea\x97\xce\x85'), chr(100) + chr(0b101111 + 0o66) + '\x63' + '\157' + '\x64' + chr(2137 - 2036))('\165' + chr(6427 - 6311) + '\146' + '\055' + chr(0b111000)))(ehT0Px3KOsy9(uoNEG3fp7JPy), ehT0Px3KOsy9(jEXsEsgeguP4)), fill=(ehT0Px3KOsy9('\060' + '\157' + chr(2442 - 2391) + '\067' + chr(55), 0o10), ehT0Px3KOsy9(chr(1771 - 1723) + chr(0b1101111) + chr(48), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(979 - 931), 8))) xafqLlk3kkUe(B65Iv98Ts98c, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\xbc\x06\xf5\x00\xdd\xe0\xcd\x8e\xdf\xe3\x8d'), chr(100) + '\x65' + chr(0b1001011 + 0o30) + chr(0b110001 + 0o76) + '\144' + chr(0b111010 + 0o53))(chr(117) + '\164' + chr(0b1100110) + chr(45) + '\x38'))((ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b110111), 0b1000)), xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xb7\r\xfcs\x80\xeb'), chr(0b1100100) + chr(3433 - 3332) + '\x63' + chr(0b1100000 + 0o17) + chr(0b1001101 + 0o27) + '\145')(chr(0b1110101) + '\164' + '\146' + chr(45) + chr(0b1101 + 0o53)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xe0E\xe8\x01\xd2\xc5\x99\xea\x97\xce\x85'), chr(8715 - 8615) + '\145' + chr(5714 - 5615) + '\157' + chr(100) + '\x65')(chr(7272 - 7155) + chr(116) + chr(0b1100110) + chr(1001 - 956) + chr(0b111000)))(ehT0Px3KOsy9(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c\xb2E\xe6$\xd6\xc9\xc9\xd5\x92\xc5\x9b\x8e\xd5'), chr(0b10100 + 0o120) + '\145' + '\x63' + chr(4142 - 4031) + chr(0b1011 + 0o131) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b11111 + 0o107) + chr(0b100001 + 0o14) + chr(56))))), fill=(ehT0Px3KOsy9('\060' + '\x6f' + chr(864 - 813) + '\067' + chr(0b110111), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + chr(9290 - 9179) + chr(0b110000), 8))) ZmHK8Erhdn3m = WqUC3KWvYVup.asarray(s63jeLEbd8fs) del s63jeLEbd8fs xafqLlk3kkUe(ZmHK8Erhdn3m, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\xb1C\xe1%\xd2\xf1\xd9'), '\x64' + '\145' + chr(0b1100011) + chr(1750 - 1639) + '\144' + chr(2148 - 2047))(chr(0b1110100 + 0o1) + '\164' + '\146' + chr(0b101101) + '\070'))(write=ehT0Px3KOsy9('\060' + chr(10896 - 10785) + chr(0b10010 + 0o37), 8)) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c\xa3V\xee='), chr(100) + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(116) + chr(0b1000111 + 0o37) + '\x2d' + '\x38')): M9gWmRtFi1rH = (ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\060', 8), ehT0Px3KOsy9(chr(1229 - 1181) + '\157' + chr(0b11101 + 0o26) + chr(55) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x30', 8)) else: M9gWmRtFi1rH = (ehT0Px3KOsy9(chr(2233 - 2185) + '\157' + '\063' + chr(55) + '\067', 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + chr(48), 8)) ZmHK8Erhdn3m[ehT0Px3KOsy9(chr(1032 - 984) + chr(9015 - 8904) + chr(48), 8), :, :] = M9gWmRtFi1rH return xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xbbY\xe4(\xc7\xf3\xc4\xdb\x93\xce'), chr(0b1100100) + chr(7856 - 7755) + '\143' + '\x6f' + chr(100) + chr(0b1001101 + 0o30))(chr(0b110111 + 0o76) + '\164' + '\146' + chr(0b1101 + 0o40) + chr(0b101000 + 0o20)))([ZmHK8Erhdn3m, yS9T1jpbJOfJ], axis=ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b111001 + 0o66) + chr(48), 8))
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
SimAndRealEnvPlayer._player_step_tuple
def _player_step_tuple(self, envs_step_tuples): """Construct observation, return usual step tuple. Args: envs_step_tuples: tuples. Returns: Step tuple: ob, reward, done, info ob: concatenated images [simulated observation, real observation, difference], with additional informations in header. reward: real environment reward done: True iff. envs_step_tuples['real_env'][2] is True info: real environment info """ ob_real, reward_real, _, _ = envs_step_tuples["real_env"] ob_sim, reward_sim, _, _ = envs_step_tuples["sim_env"] ob_err = absolute_hinge_difference(ob_sim, ob_real) ob_real_aug = self._augment_observation(ob_real, reward_real, self.cumulative_real_reward) ob_sim_aug = self._augment_observation(ob_sim, reward_sim, self.cumulative_sim_reward) ob_err_aug = self._augment_observation( ob_err, reward_sim - reward_real, self.cumulative_sim_reward - self.cumulative_real_reward ) ob = np.concatenate([ob_sim_aug, ob_real_aug, ob_err_aug], axis=1) _, reward, done, info = envs_step_tuples["real_env"] return ob, reward, done, info
python
def _player_step_tuple(self, envs_step_tuples): """Construct observation, return usual step tuple. Args: envs_step_tuples: tuples. Returns: Step tuple: ob, reward, done, info ob: concatenated images [simulated observation, real observation, difference], with additional informations in header. reward: real environment reward done: True iff. envs_step_tuples['real_env'][2] is True info: real environment info """ ob_real, reward_real, _, _ = envs_step_tuples["real_env"] ob_sim, reward_sim, _, _ = envs_step_tuples["sim_env"] ob_err = absolute_hinge_difference(ob_sim, ob_real) ob_real_aug = self._augment_observation(ob_real, reward_real, self.cumulative_real_reward) ob_sim_aug = self._augment_observation(ob_sim, reward_sim, self.cumulative_sim_reward) ob_err_aug = self._augment_observation( ob_err, reward_sim - reward_real, self.cumulative_sim_reward - self.cumulative_real_reward ) ob = np.concatenate([ob_sim_aug, ob_real_aug, ob_err_aug], axis=1) _, reward, done, info = envs_step_tuples["real_env"] return ob, reward, done, info
[ "def", "_player_step_tuple", "(", "self", ",", "envs_step_tuples", ")", ":", "ob_real", ",", "reward_real", ",", "_", ",", "_", "=", "envs_step_tuples", "[", "\"real_env\"", "]", "ob_sim", ",", "reward_sim", ",", "_", ",", "_", "=", "envs_step_tuples", "[", "\"sim_env\"", "]", "ob_err", "=", "absolute_hinge_difference", "(", "ob_sim", ",", "ob_real", ")", "ob_real_aug", "=", "self", ".", "_augment_observation", "(", "ob_real", ",", "reward_real", ",", "self", ".", "cumulative_real_reward", ")", "ob_sim_aug", "=", "self", ".", "_augment_observation", "(", "ob_sim", ",", "reward_sim", ",", "self", ".", "cumulative_sim_reward", ")", "ob_err_aug", "=", "self", ".", "_augment_observation", "(", "ob_err", ",", "reward_sim", "-", "reward_real", ",", "self", ".", "cumulative_sim_reward", "-", "self", ".", "cumulative_real_reward", ")", "ob", "=", "np", ".", "concatenate", "(", "[", "ob_sim_aug", ",", "ob_real_aug", ",", "ob_err_aug", "]", ",", "axis", "=", "1", ")", "_", ",", "reward", ",", "done", ",", "info", "=", "envs_step_tuples", "[", "\"real_env\"", "]", "return", "ob", ",", "reward", ",", "done", ",", "info" ]
Construct observation, return usual step tuple. Args: envs_step_tuples: tuples. Returns: Step tuple: ob, reward, done, info ob: concatenated images [simulated observation, real observation, difference], with additional informations in header. reward: real environment reward done: True iff. envs_step_tuples['real_env'][2] is True info: real environment info
[ "Construct", "observation", "return", "usual", "step", "tuple", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L345-L373
train
Construct observation return usual step tuple.
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,_bik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aIaWE,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(703 - 655) + chr(111) + chr(834 - 785) + chr(0b110011) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(1997 - 1946) + chr(0b10010 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + chr(328 - 279) + chr(0b110010) + chr(55), 23374 - 23366), ehT0Px3KOsy9(chr(1424 - 1376) + chr(0b1101111) + '\061' + '\x36' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(4277 - 4166) + '\061' + '\061' + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11001 + 0o30) + chr(0b110011) + chr(424 - 375), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(1629 - 1578) + chr(0b100000 + 0o21) + chr(0b110000), 63857 - 63849), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\063' + chr(0b110110) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(5382 - 5271) + chr(1728 - 1678) + chr(0b10100 + 0o35), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b110110 + 0o71) + chr(0b110110 + 0o0) + '\063', 0o10), ehT0Px3KOsy9(chr(427 - 379) + chr(0b1101111) + chr(2451 - 2401) + '\x33' + '\064', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b100000 + 0o23) + '\063', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1010010 + 0o35) + '\061' + chr(55) + chr(455 - 401), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(54) + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + chr(0b110010) + chr(0b110111) + chr(352 - 297), 10072 - 10064), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\066' + chr(0b101010 + 0o12), 0b1000), ehT0Px3KOsy9('\x30' + chr(9658 - 9547) + chr(0b100011 + 0o17) + chr(1772 - 1724) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + chr(0b110010) + chr(914 - 864) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1503 - 1455) + chr(111) + '\062' + chr(50) + '\x31', 12872 - 12864), ehT0Px3KOsy9(chr(2070 - 2022) + '\157' + '\x31' + chr(2984 - 2929) + chr(0b10001 + 0o45), 8), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(2095 - 2046) + chr(0b100100 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1341 - 1230) + chr(0b110010 + 0o0) + chr(169 - 118) + chr(0b110001 + 0o3), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(52) + chr(1796 - 1748), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b101001 + 0o7) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x33' + chr(2563 - 2508), 32564 - 32556), ehT0Px3KOsy9(chr(48) + chr(6374 - 6263) + chr(49) + '\x37' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(519 - 471) + '\x6f' + chr(412 - 362) + chr(0b110111) + '\067', 8), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(4739 - 4628) + chr(0b10101 + 0o36) + '\x37' + '\060', 8364 - 8356), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(5086 - 4975) + chr(637 - 588) + chr(50) + chr(1434 - 1383), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\066', 0o10), ehT0Px3KOsy9(chr(2040 - 1992) + chr(111) + '\061' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\x31' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(252 - 202) + chr(52) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + '\061' + chr(0b1101 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(2094 - 2044) + chr(0b1110 + 0o46) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(1454 - 1406) + '\157' + chr(0b110010) + chr(0b10101 + 0o35) + chr(55), 0o10), ehT0Px3KOsy9(chr(579 - 531) + chr(0b11101 + 0o122) + chr(0b110001) + '\060' + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(55) + chr(0b100111 + 0o14), 0b1000), ehT0Px3KOsy9(chr(1162 - 1114) + chr(11486 - 11375) + chr(49) + chr(0b10010 + 0o43) + chr(1013 - 961), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\066' + chr(0b110101), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'u'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1010000 + 0o24) + chr(0b1010011 + 0o22))(chr(0b1110101) + chr(116) + '\146' + chr(665 - 620) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def O1tUpM277vSb(oVre8I6UXc3b, WluH4F8WrLGQ): (rDvZVtKTHhV4, PpJdXOvdTIhh, VNGQdHSFPrso, VNGQdHSFPrso) = WluH4F8WrLGQ[xafqLlk3kkUe(SXOLrMavuUCe(b')96\x1b\x15<\xa6\x87'), '\x64' + '\145' + chr(0b1100011) + chr(0b1011101 + 0o22) + chr(0b1100100) + chr(8507 - 8406))(chr(0b1010100 + 0o41) + chr(8803 - 8687) + chr(0b1100110) + chr(0b100 + 0o51) + '\070')] (tsXBRpodlgD0, LARFnIRg_lkN, VNGQdHSFPrso, VNGQdHSFPrso) = WluH4F8WrLGQ[xafqLlk3kkUe(SXOLrMavuUCe(b'(5:(/7\xbe'), chr(0b11111 + 0o105) + chr(1144 - 1043) + chr(1320 - 1221) + '\157' + chr(3161 - 3061) + chr(101))(chr(8861 - 8744) + chr(8881 - 8765) + '\146' + chr(45) + '\070')] pIl4Nyn93ZuU = ixK92NOVmFcu(tsXBRpodlgD0, rDvZVtKTHhV4) nvdE8y7OTQOc = oVre8I6UXc3b._augment_observation(rDvZVtKTHhV4, PpJdXOvdTIhh, oVre8I6UXc3b.cumulative_real_reward) cHs22utiSTz3 = oVre8I6UXc3b._augment_observation(tsXBRpodlgD0, LARFnIRg_lkN, oVre8I6UXc3b.cumulative_sim_reward) t24qs4ZxF8oy = oVre8I6UXc3b._augment_observation(pIl4Nyn93ZuU, LARFnIRg_lkN - PpJdXOvdTIhh, oVre8I6UXc3b.cumulative_sim_reward - oVre8I6UXc3b.cumulative_real_reward) yS9T1jpbJOfJ = WqUC3KWvYVup.concatenate([cHs22utiSTz3, nvdE8y7OTQOc, t24qs4ZxF8oy], axis=ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(49), 0o10)) (VNGQdHSFPrso, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk) = WluH4F8WrLGQ[xafqLlk3kkUe(SXOLrMavuUCe(b')96\x1b\x15<\xa6\x87'), chr(0b1100100) + chr(2157 - 2056) + chr(0b11101 + 0o106) + '\157' + '\x64' + chr(7027 - 6926))(chr(0b110001 + 0o104) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56))] return (yS9T1jpbJOfJ, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk)
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
SimAndRealEnvPlayer.reset
def reset(self): """Reset simulated and real environments.""" self._frame_counter = 0 ob_real = self.real_env.reset() # Initialize simulated environment with frames from real one. self.sim_env.add_to_initial_stack(ob_real) for _ in range(3): ob_real, _, _, _ = self.real_env.step(self.name_to_action_num["NOOP"]) self.sim_env.add_to_initial_stack(ob_real) ob_sim = self.sim_env.reset() assert np.all(ob_real == ob_sim) self._last_step_tuples = self._pack_step_tuples((ob_real, 0, False, {}), (ob_sim, 0, False, {})) self.set_zero_cumulative_rewards() ob, _, _, _ = self._player_step_tuple(self._last_step_tuples) return ob
python
def reset(self): """Reset simulated and real environments.""" self._frame_counter = 0 ob_real = self.real_env.reset() # Initialize simulated environment with frames from real one. self.sim_env.add_to_initial_stack(ob_real) for _ in range(3): ob_real, _, _, _ = self.real_env.step(self.name_to_action_num["NOOP"]) self.sim_env.add_to_initial_stack(ob_real) ob_sim = self.sim_env.reset() assert np.all(ob_real == ob_sim) self._last_step_tuples = self._pack_step_tuples((ob_real, 0, False, {}), (ob_sim, 0, False, {})) self.set_zero_cumulative_rewards() ob, _, _, _ = self._player_step_tuple(self._last_step_tuples) return ob
[ "def", "reset", "(", "self", ")", ":", "self", ".", "_frame_counter", "=", "0", "ob_real", "=", "self", ".", "real_env", ".", "reset", "(", ")", "# Initialize simulated environment with frames from real one.", "self", ".", "sim_env", ".", "add_to_initial_stack", "(", "ob_real", ")", "for", "_", "in", "range", "(", "3", ")", ":", "ob_real", ",", "_", ",", "_", ",", "_", "=", "self", ".", "real_env", ".", "step", "(", "self", ".", "name_to_action_num", "[", "\"NOOP\"", "]", ")", "self", ".", "sim_env", ".", "add_to_initial_stack", "(", "ob_real", ")", "ob_sim", "=", "self", ".", "sim_env", ".", "reset", "(", ")", "assert", "np", ".", "all", "(", "ob_real", "==", "ob_sim", ")", "self", ".", "_last_step_tuples", "=", "self", ".", "_pack_step_tuples", "(", "(", "ob_real", ",", "0", ",", "False", ",", "{", "}", ")", ",", "(", "ob_sim", ",", "0", ",", "False", ",", "{", "}", ")", ")", "self", ".", "set_zero_cumulative_rewards", "(", ")", "ob", ",", "_", ",", "_", ",", "_", "=", "self", ".", "_player_step_tuple", "(", "self", ".", "_last_step_tuples", ")", "return", "ob" ]
Reset simulated and real environments.
[ "Reset", "simulated", "and", "real", "environments", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L375-L390
train
Reset simulated and real environments.
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,e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wwHEeM4cxI,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' + '\x34', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x31' + chr(0b10100 + 0o36), 51665 - 51657), ehT0Px3KOsy9(chr(1681 - 1633) + '\157' + '\062' + chr(0b110101) + chr(0b110000), 58545 - 58537), ehT0Px3KOsy9(chr(1201 - 1153) + chr(111) + chr(50) + '\x34', 0b1000), ehT0Px3KOsy9(chr(2144 - 2096) + '\x6f' + chr(260 - 209) + chr(0b10001 + 0o43) + chr(0b110000), 53801 - 53793), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b11000 + 0o34) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\064' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(2315 - 2266) + '\061' + '\x35', 0b1000), ehT0Px3KOsy9(chr(395 - 347) + chr(111) + '\063' + chr(122 - 74) + chr(0b1011 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\067' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(727 - 679) + chr(3252 - 3141) + '\x31' + chr(0b110000) + chr(1937 - 1887), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1928 - 1817) + chr(51) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(2425 - 2314) + chr(0b110001) + chr(0b110100) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110000 + 0o7) + chr(0b10 + 0o60), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1111 + 0o43) + '\060' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b101010 + 0o10) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(52) + '\x32', 56529 - 56521), ehT0Px3KOsy9(chr(1582 - 1534) + '\157' + '\x32' + chr(51) + chr(248 - 198), 52720 - 52712), ehT0Px3KOsy9(chr(564 - 516) + chr(0b10101 + 0o132) + '\x32' + chr(0b110011) + chr(0b110011), 49921 - 49913), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(872 - 824) + '\067', 49921 - 49913), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + '\062' + chr(55) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(48) + '\062', 8), ehT0Px3KOsy9('\060' + chr(9696 - 9585) + '\063' + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b1000 + 0o51) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(436 - 387) + '\x31' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(55), 36410 - 36402), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b100 + 0o61) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100001 + 0o21) + chr(0b110100) + chr(53), 28724 - 28716), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10010 + 0o37) + chr(0b110100) + chr(0b1100 + 0o50), 8), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + '\x37' + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(3920 - 3809) + chr(1092 - 1042) + chr(0b110001) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(10170 - 10059) + chr(51) + chr(49) + '\062', 8), ehT0Px3KOsy9('\x30' + chr(9713 - 9602) + '\063' + chr(0b110011) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b10111 + 0o35) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101100 + 0o3) + chr(0b11011 + 0o30) + '\065' + chr(0b1011 + 0o51), 816 - 808), ehT0Px3KOsy9(chr(48) + chr(4002 - 3891) + chr(0b11110 + 0o25) + '\067' + chr(1986 - 1933), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b110001) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + '\067' + '\x34', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\065' + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(0b1100100) + chr(4072 - 3971) + chr(2006 - 1907) + '\157' + chr(0b1100100) + chr(0b100110 + 0o77))(chr(3286 - 3169) + chr(6171 - 6055) + chr(0b1100110) + '\x2d' + chr(1960 - 1904)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def G0V856pwkJmZ(oVre8I6UXc3b): oVre8I6UXc3b.WaKuidkWvT33 = ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + '\060', 0o10) rDvZVtKTHhV4 = oVre8I6UXc3b.real_env.reset() xafqLlk3kkUe(oVre8I6UXc3b.sim_env, xafqLlk3kkUe(SXOLrMavuUCe(b'e\xae\xccK\x94\xcbW\r#\xaa\x8d+n\x848I\xf6v\x01\xf1'), chr(0b1000000 + 0o44) + '\145' + chr(9587 - 9488) + chr(111) + chr(536 - 436) + '\x65')('\165' + '\x74' + '\146' + chr(0b101101) + '\070'))(rDvZVtKTHhV4) for VNGQdHSFPrso in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(94 - 46) + chr(0b1100 + 0o143) + chr(51), 0b1000)): (rDvZVtKTHhV4, VNGQdHSFPrso, VNGQdHSFPrso, VNGQdHSFPrso) = oVre8I6UXc3b.real_env.kDuFsAhEatcU(oVre8I6UXc3b.name_to_action_num[xafqLlk3kkUe(SXOLrMavuUCe(b'J\x85\xe7D'), '\x64' + '\145' + chr(3416 - 3317) + chr(111) + chr(100) + chr(521 - 420))('\165' + '\x74' + chr(0b11101 + 0o111) + chr(0b101010 + 0o3) + '\070')]) xafqLlk3kkUe(oVre8I6UXc3b.sim_env, xafqLlk3kkUe(SXOLrMavuUCe(b'e\xae\xccK\x94\xcbW\r#\xaa\x8d+n\x848I\xf6v\x01\xf1'), chr(100) + chr(0b1100101) + '\x63' + chr(111) + chr(1139 - 1039) + chr(101))('\x75' + chr(0b110010 + 0o102) + chr(0b11111 + 0o107) + '\x2d' + '\x38'))(rDvZVtKTHhV4) tsXBRpodlgD0 = oVre8I6UXc3b.sim_env.reset() assert xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'@\xa6\x9c,\x8e\xce9\x16/\xaa\xcbq'), chr(100) + '\145' + chr(99) + '\x6f' + '\x64' + chr(101))('\165' + chr(0b1100111 + 0o15) + chr(4355 - 4253) + chr(1745 - 1700) + chr(0b111000)))(rDvZVtKTHhV4 == tsXBRpodlgD0) oVre8I6UXc3b.luurnoi044bB = oVre8I6UXc3b._pack_step_tuples((rDvZVtKTHhV4, ehT0Px3KOsy9(chr(48) + chr(111) + '\x30', 8), ehT0Px3KOsy9(chr(583 - 535) + chr(111) + chr(0b110000), 8), {}), (tsXBRpodlgD0, ehT0Px3KOsy9(chr(48) + chr(0b1101000 + 0o7) + chr(942 - 894), 8), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(5117 - 5006) + chr(48), 8), {})) xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'w\xaf\xdcK\x9a\xc1z\x0b\x12\xa0\x8c/z\x84\x06N\xeba\x07\xc5\xe9\xa2\xcc#\x8e-;'), chr(0b1010001 + 0o23) + chr(101) + chr(0b1010011 + 0o20) + chr(0b1010101 + 0o32) + chr(0b1001010 + 0o32) + chr(0b1100101))('\165' + chr(0b10101 + 0o137) + chr(2668 - 2566) + chr(45) + '\x38'))() (yS9T1jpbJOfJ, VNGQdHSFPrso, VNGQdHSFPrso, VNGQdHSFPrso) = oVre8I6UXc3b._player_step_tuple(oVre8I6UXc3b.luurnoi044bB) return yS9T1jpbJOfJ
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
SimAndRealEnvPlayer._step_envs
def _step_envs(self, action): """Perform step(action) on environments and update initial_frame_stack.""" self._frame_counter += 1 real_env_step_tuple = self.real_env.step(action) sim_env_step_tuple = self.sim_env.step(action) self.sim_env.add_to_initial_stack(real_env_step_tuple[0]) return self._pack_step_tuples(real_env_step_tuple, sim_env_step_tuple)
python
def _step_envs(self, action): """Perform step(action) on environments and update initial_frame_stack.""" self._frame_counter += 1 real_env_step_tuple = self.real_env.step(action) sim_env_step_tuple = self.sim_env.step(action) self.sim_env.add_to_initial_stack(real_env_step_tuple[0]) return self._pack_step_tuples(real_env_step_tuple, sim_env_step_tuple)
[ "def", "_step_envs", "(", "self", ",", "action", ")", ":", "self", ".", "_frame_counter", "+=", "1", "real_env_step_tuple", "=", "self", ".", "real_env", ".", "step", "(", "action", ")", "sim_env_step_tuple", "=", "self", ".", "sim_env", ".", "step", "(", "action", ")", "self", ".", "sim_env", ".", "add_to_initial_stack", "(", "real_env_step_tuple", "[", "0", "]", ")", "return", "self", ".", "_pack_step_tuples", "(", "real_env_step_tuple", ",", "sim_env_step_tuple", ")" ]
Perform step(action) on environments and update initial_frame_stack.
[ "Perform", "step", "(", "action", ")", "on", "environments", "and", "update", "initial_frame_stack", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/player.py#L400-L406
train
Perform step on environments and update initial_frame_stack.
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,pz9Flfz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M2Z,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(0b11011 + 0o25) + chr(3803 - 3692) + chr(49) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1921 - 1873) + '\157' + '\x32' + chr(323 - 270) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(1804 - 1753) + chr(0b11101 + 0o27), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(0b110001) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100110 + 0o111) + '\061' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\063' + chr(0b110010), 28482 - 28474), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\067' + chr(0b1101 + 0o45), 30030 - 30022), ehT0Px3KOsy9(chr(1446 - 1398) + '\157' + '\x31' + chr(0b110001) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(48) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(51) + chr(1978 - 1926), 61330 - 61322), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\060' + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\x6f' + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110110) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\067' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9372 - 9261) + chr(51) + chr(0b101100 + 0o6), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o42) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\067' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + chr(0b1000 + 0o52) + chr(55) + chr(860 - 811), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\x32' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(10855 - 10744) + chr(0b110011) + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10110 + 0o33) + chr(1607 - 1558) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1686 - 1636) + chr(481 - 426) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + '\x33' + chr(50) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11101 + 0o25) + '\060' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(55) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(51) + chr(0b1100 + 0o44) + chr(0b101001 + 0o7), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\066' + '\067', 40798 - 40790), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\066' + chr(0b101111 + 0o1), 20868 - 20860), ehT0Px3KOsy9(chr(94 - 46) + '\x6f' + '\063' + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + chr(49) + '\x30' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\067' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1022 - 972) + chr(0b0 + 0o64) + chr(2318 - 2264), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b111 + 0o60), 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(53) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + '\x31' + chr(237 - 185) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(11241 - 11130) + '\064' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(0b11 + 0o61) + chr(0b110000), 30078 - 30070), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b110001 + 0o76) + chr(657 - 607) + '\x31' + chr(0b101110 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(297 - 249) + chr(0b1001010 + 0o45) + chr(51) + '\x36' + chr(0b11111 + 0o24), 7078 - 7070), ehT0Px3KOsy9(chr(48) + chr(1405 - 1294) + '\063' + chr(54), 65462 - 65454)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11001 + 0o34) + chr(48), 4628 - 4620)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b"'"), chr(0b1001010 + 0o32) + chr(1251 - 1150) + chr(0b1010000 + 0o23) + chr(111) + chr(7359 - 7259) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1010001 + 0o25) + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wApv0l2egm1T(oVre8I6UXc3b, vyskHDXig6uT): oVre8I6UXc3b.WaKuidkWvT33 += ehT0Px3KOsy9('\x30' + chr(111) + chr(49), 8) e5DNqUJLWC6E = oVre8I6UXc3b.real_env.kDuFsAhEatcU(vyskHDXig6uT) o4HGMVgdpGcY = oVre8I6UXc3b.sim_env.kDuFsAhEatcU(vyskHDXig6uT) xafqLlk3kkUe(oVre8I6UXc3b.sim_env, xafqLlk3kkUe(SXOLrMavuUCe(b'h\xcd\xf8W{\xf5e&\xae5\xb4h\x90\x17EyH\xd8\xf1\xa4'), chr(7755 - 7655) + chr(9506 - 9405) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b100110 + 0o77))(chr(0b1110101) + chr(7763 - 7647) + '\146' + chr(1367 - 1322) + chr(1376 - 1320)))(e5DNqUJLWC6E[ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(2116 - 2068), 60838 - 60830)]) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'V\xd9\xfdkd\xc5I;\xa5,\x9fu\x84\x0bvoO'), '\144' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + '\x74' + '\x66' + chr(0b100100 + 0o11) + chr(0b111000)))(e5DNqUJLWC6E, o4HGMVgdpGcY)
tensorflow/tensor2tensor
tensor2tensor/rl/player.py
SingleEnvPlayer._player_step_tuple
def _player_step_tuple(self, envs_step_tuples): """Augment observation, return usual step tuple.""" ob, reward, done, info = envs_step_tuples["env"] ob = self._augment_observation(ob, reward, self.cumulative_reward) return ob, reward, done, info
python
def _player_step_tuple(self, envs_step_tuples): """Augment observation, return usual step tuple.""" ob, reward, done, info = envs_step_tuples["env"] ob = self._augment_observation(ob, reward, self.cumulative_reward) return ob, reward, done, info
[ "def", "_player_step_tuple", "(", "self", ",", "envs_step_tuples", ")", ":", "ob", ",", "reward", ",", "done", ",", "info", "=", "envs_step_tuples", "[", "\"env\"", "]", "ob", "=", "self", ".", "_augment_observation", "(", "ob", ",", "reward", ",", "self", ".", "cumulative_reward", ")", "return", "ob", ",", "reward", ",", "done", ",", "info" ]
Augment observation, return usual step tuple.
[ "Augment", "observation", "return", "usual", "step", "tuple", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/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,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(0b111101 + 0o62) + chr(50) + '\x33' + chr(0b11001 + 0o30), 36082 - 36074), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\x32' + '\062', 49941 - 49933), ehT0Px3KOsy9(chr(874 - 826) + chr(10883 - 10772) + chr(50) + chr(53) + chr(53), 64766 - 64758), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x33' + chr(52) + chr(304 - 251), 32368 - 32360), ehT0Px3KOsy9('\x30' + chr(8541 - 8430) + chr(1252 - 1202) + chr(2629 - 2575) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(53) + chr(54), 0o10), ehT0Px3KOsy9(chr(170 - 122) + '\x6f' + chr(999 - 949) + '\066' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b101010 + 0o11) + chr(0b110000) + '\067', 3001 - 2993), ehT0Px3KOsy9(chr(48) + chr(3295 - 3184) + chr(0b1101 + 0o46) + '\x36' + chr(1276 - 1228), 39871 - 39863), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(0b110000) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110101) + '\065', 17135 - 17127), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\060' + chr(0b10010 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2326 - 2275) + '\066' + chr(0b110010 + 0o0), 49917 - 49909), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + chr(2407 - 2356) + chr(0b110011) + chr(0b110111), 29157 - 29149), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + '\x32' + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + chr(0b1011 + 0o46) + '\x33' + chr(2036 - 1987), 49150 - 49142), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(9929 - 9818) + chr(0b1110 + 0o43) + chr(1014 - 961) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101101 + 0o4) + chr(0b110010) + chr(0b10110 + 0o36), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(2869 - 2815) + chr(2190 - 2141), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(262 - 213) + chr(0b101011 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001 + 0o1) + '\061' + chr(0b101001 + 0o10), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110010) + chr(1549 - 1499), 8), ehT0Px3KOsy9(chr(343 - 295) + '\157' + chr(0b1 + 0o61) + chr(1485 - 1432), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1748 - 1699) + chr(50) + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1104 - 1054) + chr(1996 - 1945) + chr(55), 4626 - 4618), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + '\x32' + chr(0b110001) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + '\066' + '\066', 51294 - 51286), ehT0Px3KOsy9(chr(1339 - 1291) + chr(0b100000 + 0o117) + chr(0b1101 + 0o44) + '\x33' + chr(294 - 244), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10001 + 0o136) + '\x33' + chr(0b110000) + '\x34', 52843 - 52835), ehT0Px3KOsy9(chr(511 - 463) + '\x6f' + '\062' + '\066', 50305 - 50297), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(138 - 86) + chr(54), 5809 - 5801), ehT0Px3KOsy9('\060' + chr(0b1010010 + 0o35) + chr(2316 - 2266) + chr(49) + '\x31', 8), ehT0Px3KOsy9(chr(2060 - 2012) + chr(8432 - 8321) + '\062' + chr(48) + chr(353 - 304), 59529 - 59521), ehT0Px3KOsy9(chr(2160 - 2112) + chr(111) + chr(51) + chr(51) + chr(2504 - 2451), 1397 - 1389), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(528 - 479) + chr(0b1000 + 0o57) + chr(953 - 899), 60016 - 60008), ehT0Px3KOsy9(chr(1506 - 1458) + '\157' + chr(1565 - 1512) + '\x35', 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x35' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110100 + 0o1) + chr(219 - 165), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2853 - 2798) + chr(1052 - 999), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(558 - 510) + chr(0b1101111) + '\x35' + chr(0b110000), 36674 - 36666)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def O1tUpM277vSb(oVre8I6UXc3b, WluH4F8WrLGQ): (yS9T1jpbJOfJ, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk) = WluH4F8WrLGQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc<\xdb'), chr(6252 - 6152) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + chr(0b1011001 + 0o33) + '\x66' + '\x2d' + '\070')] yS9T1jpbJOfJ = oVre8I6UXc3b._augment_observation(yS9T1jpbJOfJ, jEXsEsgeguP4, oVre8I6UXc3b.cumulative_reward) return (yS9T1jpbJOfJ, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk)
tensorflow/tensor2tensor
tensor2tensor/layers/common_audio.py
add_delta_deltas
def add_delta_deltas(filterbanks, name=None): """Compute time first and second-order derivative channels. Args: filterbanks: float32 tensor with shape [batch_size, len, num_bins, 1] name: scope name Returns: float32 tensor with shape [batch_size, len, num_bins, 3] """ delta_filter = np.array([2, 1, 0, -1, -2]) delta_delta_filter = scipy.signal.convolve(delta_filter, delta_filter, "full") delta_filter_stack = np.array( [[0] * 4 + [1] + [0] * 4, [0] * 2 + list(delta_filter) + [0] * 2, list(delta_delta_filter)], dtype=np.float32).T[:, None, None, :] delta_filter_stack /= np.sqrt( np.sum(delta_filter_stack**2, axis=0, keepdims=True)) filterbanks = tf.nn.conv2d( filterbanks, delta_filter_stack, [1, 1, 1, 1], "SAME", data_format="NHWC", name=name) return filterbanks
python
def add_delta_deltas(filterbanks, name=None): """Compute time first and second-order derivative channels. Args: filterbanks: float32 tensor with shape [batch_size, len, num_bins, 1] name: scope name Returns: float32 tensor with shape [batch_size, len, num_bins, 3] """ delta_filter = np.array([2, 1, 0, -1, -2]) delta_delta_filter = scipy.signal.convolve(delta_filter, delta_filter, "full") delta_filter_stack = np.array( [[0] * 4 + [1] + [0] * 4, [0] * 2 + list(delta_filter) + [0] * 2, list(delta_delta_filter)], dtype=np.float32).T[:, None, None, :] delta_filter_stack /= np.sqrt( np.sum(delta_filter_stack**2, axis=0, keepdims=True)) filterbanks = tf.nn.conv2d( filterbanks, delta_filter_stack, [1, 1, 1, 1], "SAME", data_format="NHWC", name=name) return filterbanks
[ "def", "add_delta_deltas", "(", "filterbanks", ",", "name", "=", "None", ")", ":", "delta_filter", "=", "np", ".", "array", "(", "[", "2", ",", "1", ",", "0", ",", "-", "1", ",", "-", "2", "]", ")", "delta_delta_filter", "=", "scipy", ".", "signal", ".", "convolve", "(", "delta_filter", ",", "delta_filter", ",", "\"full\"", ")", "delta_filter_stack", "=", "np", ".", "array", "(", "[", "[", "0", "]", "*", "4", "+", "[", "1", "]", "+", "[", "0", "]", "*", "4", ",", "[", "0", "]", "*", "2", "+", "list", "(", "delta_filter", ")", "+", "[", "0", "]", "*", "2", ",", "list", "(", "delta_delta_filter", ")", "]", ",", "dtype", "=", "np", ".", "float32", ")", ".", "T", "[", ":", ",", "None", ",", "None", ",", ":", "]", "delta_filter_stack", "/=", "np", ".", "sqrt", "(", "np", ".", "sum", "(", "delta_filter_stack", "**", "2", ",", "axis", "=", "0", ",", "keepdims", "=", "True", ")", ")", "filterbanks", "=", "tf", ".", "nn", ".", "conv2d", "(", "filterbanks", ",", "delta_filter_stack", ",", "[", "1", ",", "1", ",", "1", ",", "1", "]", ",", "\"SAME\"", ",", "data_format", "=", "\"NHWC\"", ",", "name", "=", "name", ")", "return", "filterbanks" ]
Compute time first and second-order derivative channels. Args: filterbanks: float32 tensor with shape [batch_size, len, num_bins, 1] name: scope name Returns: float32 tensor with shape [batch_size, len, num_bins, 3]
[ "Compute", "time", "first", "and", "second", "-", "order", "derivative", "channels", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/layers/common_audio.py#L28-L52
train
Compute time first and second - order derivative channels.
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,yROw0HW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ORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1048 - 999) + chr(48) + chr(0b11 + 0o62), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(0b11010 + 0o30) + chr(1367 - 1312) + chr(0b10010 + 0o44), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(895 - 844) + chr(54) + '\061', 29003 - 28995), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1001011 + 0o44) + '\x31' + '\x33' + chr(0b110100), 25141 - 25133), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(54) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1796 - 1685) + chr(49) + '\x31', 8605 - 8597), ehT0Px3KOsy9(chr(0b110000) + chr(2446 - 2335) + chr(0b101111 + 0o3) + chr(0b110101) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(3422 - 3311) + chr(299 - 249) + chr(54) + chr(0b110100), 15962 - 15954), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + '\061' + '\063' + chr(843 - 789), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b11111 + 0o21) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(6823 - 6712) + chr(50) + '\x31' + chr(401 - 346), 15476 - 15468), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(300 - 249) + chr(48) + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + chr(52), 18360 - 18352), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(7596 - 7485) + chr(1397 - 1348) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101101 + 0o102) + chr(50) + chr(48) + chr(52), 0o10), ehT0Px3KOsy9(chr(949 - 901) + chr(111) + '\x31' + '\062' + '\065', 28158 - 28150), ehT0Px3KOsy9(chr(2288 - 2240) + '\157' + chr(0b110010) + chr(0b110001) + chr(1626 - 1576), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100100 + 0o15) + chr(778 - 729), 29374 - 29366), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + chr(680 - 631) + chr(0b110011 + 0o0) + chr(0b110000), 1527 - 1519), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x32' + chr(0b11000 + 0o30), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11110 + 0o25) + chr(322 - 272) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b10 + 0o62) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000101 + 0o52) + '\061' + '\067', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(242 - 190) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(52) + chr(289 - 236), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1448 - 1337) + '\x33' + '\x34' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b0 + 0o62) + chr(0b110000 + 0o2) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110 + 0o55) + chr(0b110001 + 0o0) + chr(1905 - 1857), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1001000 + 0o47) + chr(0b10 + 0o57) + chr(696 - 648) + chr(0b1001 + 0o55), 0o10), ehT0Px3KOsy9(chr(1979 - 1931) + chr(0b1010100 + 0o33) + '\x31' + chr(52) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1457 - 1407) + chr(0b10011 + 0o42) + '\064', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(51) + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(11331 - 11220) + chr(0b100111 + 0o12) + chr(218 - 166) + chr(50), 34890 - 34882), ehT0Px3KOsy9(chr(491 - 443) + chr(0b1101111) + chr(0b110010) + chr(0b10010 + 0o44) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\067', 51507 - 51499), ehT0Px3KOsy9(chr(834 - 786) + chr(0b11 + 0o154) + chr(974 - 923) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100 + 0o2), 38406 - 38398), ehT0Px3KOsy9('\060' + chr(11690 - 11579) + chr(54) + '\064', 8), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + '\061' + '\066' + '\064', 52681 - 52673), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b101111 + 0o4) + chr(52) + chr(0b101000 + 0o12), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10 + 0o63) + chr(48), 4769 - 4761)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'k'), chr(0b1100100) + chr(0b1010001 + 0o24) + chr(5894 - 5795) + chr(12225 - 12114) + '\144' + chr(0b111000 + 0o55))(chr(0b1110101) + chr(116) + '\x66' + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def gkyuHfYQ9jRq(FYYJfq83CLt1, AIvJRzLdDfgF=None): t_Gfi2BsEXc0 = WqUC3KWvYVup.B0ePDhpqxN5n([ehT0Px3KOsy9(chr(250 - 202) + chr(111) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31', 0o10), ehT0Px3KOsy9(chr(1707 - 1659) + '\157' + '\x30', 0b1000), -ehT0Px3KOsy9(chr(0b110000) + chr(7007 - 6896) + chr(49), 8), -ehT0Px3KOsy9('\x30' + chr(0b1000111 + 0o50) + chr(0b110010), 8)]) OYimvpSqEIN8 = evIdJHfOlMSS.signal.convolve(t_Gfi2BsEXc0, t_Gfi2BsEXc0, xafqLlk3kkUe(SXOLrMavuUCe(b'#\xcb\x9d0'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b10001 + 0o123) + '\x65')('\x75' + '\164' + chr(0b10001 + 0o125) + '\x2d' + '\x38')) Kjs7C5v_hc3q = WqUC3KWvYVup.array([[ehT0Px3KOsy9('\x30' + chr(10837 - 10726) + chr(0b110000), 8)] * ehT0Px3KOsy9(chr(48) + '\x6f' + chr(52), 24479 - 24471) + [ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\x31', 8)] + [ehT0Px3KOsy9(chr(1261 - 1213) + chr(111) + '\060', 8)] * ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x34', 8), [ehT0Px3KOsy9(chr(48) + '\157' + chr(676 - 628), 8)] * ehT0Px3KOsy9(chr(48) + '\x6f' + '\062', 8) + YyaZ4tpXu4lf(t_Gfi2BsEXc0) + [ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + '\x30', 8)] * ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + '\x32', 8), YyaZ4tpXu4lf(OYimvpSqEIN8)], dtype=WqUC3KWvYVup.float32).T[:, None, None, :] Kjs7C5v_hc3q /= WqUC3KWvYVup.sqrt(WqUC3KWvYVup.xkxBmo49x2An(Kjs7C5v_hc3q ** ehT0Px3KOsy9('\x30' + chr(111) + '\062', 8), axis=ehT0Px3KOsy9('\x30' + chr(8278 - 8167) + chr(0b101 + 0o53), 8), keepdims=ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + '\061', 8))) FYYJfq83CLt1 = IDJ2eXGCBCDu.nn.conv2d(FYYJfq83CLt1, Kjs7C5v_hc3q, [ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + '\x31', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(2134 - 2023) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(8533 - 8422) + '\x31', 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\x16\xff\xbc\x19'), chr(0b10110 + 0o116) + '\145' + chr(4254 - 4155) + chr(0b1001010 + 0o45) + '\144' + chr(0b101110 + 0o67))(chr(117) + chr(0b11 + 0o161) + chr(102) + chr(381 - 336) + chr(56)), data_format=xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xf6\xa6\x1f'), chr(0b1011001 + 0o13) + chr(0b101111 + 0o66) + '\143' + chr(0b1101111) + '\x64' + '\145')('\x75' + '\164' + chr(102) + chr(45) + chr(0b111000)), name=AIvJRzLdDfgF) return FYYJfq83CLt1
tensorflow/tensor2tensor
tensor2tensor/layers/common_audio.py
compute_mel_filterbank_features
def compute_mel_filterbank_features( waveforms, sample_rate=16000, dither=1.0 / np.iinfo(np.int16).max, preemphasis=0.97, frame_length=25, frame_step=10, fft_length=None, window_fn=functools.partial(tf.contrib.signal.hann_window, periodic=True), lower_edge_hertz=80.0, upper_edge_hertz=7600.0, num_mel_bins=80, log_noise_floor=1e-3, apply_mask=True): """Implement mel-filterbank extraction using tf ops. Args: waveforms: float32 tensor with shape [batch_size, max_len] sample_rate: sampling rate of the waveform dither: stddev of Gaussian noise added to waveform to prevent quantization artefacts preemphasis: waveform high-pass filtering constant frame_length: frame length in ms frame_step: frame_Step in ms fft_length: number of fft bins window_fn: windowing function lower_edge_hertz: lowest frequency of the filterbank upper_edge_hertz: highest frequency of the filterbank num_mel_bins: filterbank size log_noise_floor: clip small values to prevent numeric overflow in log apply_mask: When working on a batch of samples, set padding frames to zero Returns: filterbanks: a float32 tensor with shape [batch_size, len, num_bins, 1] """ # `stfts` is a complex64 Tensor representing the short-time Fourier # Transform of each signal in `signals`. Its shape is # [batch_size, ?, fft_unique_bins] # where fft_unique_bins = fft_length // 2 + 1 # Find the wave length: the largest index for which the value is !=0 # note that waveforms samples that are exactly 0.0 are quite common, so # simply doing sum(waveforms != 0, axis=-1) will not work correctly. wav_lens = tf.reduce_max( tf.expand_dims(tf.range(tf.shape(waveforms)[1]), 0) * tf.to_int32(tf.not_equal(waveforms, 0.0)), axis=-1) + 1 if dither > 0: waveforms += tf.random_normal(tf.shape(waveforms), stddev=dither) if preemphasis > 0: waveforms = waveforms[:, 1:] - preemphasis * waveforms[:, :-1] wav_lens -= 1 frame_length = int(frame_length * sample_rate / 1e3) frame_step = int(frame_step * sample_rate / 1e3) if fft_length is None: fft_length = int(2**(np.ceil(np.log2(frame_length)))) stfts = tf.contrib.signal.stft( waveforms, frame_length=frame_length, frame_step=frame_step, fft_length=fft_length, window_fn=window_fn, pad_end=True) stft_lens = (wav_lens + (frame_step - 1)) // frame_step masks = tf.to_float(tf.less_equal( tf.expand_dims(tf.range(tf.shape(stfts)[1]), 0), tf.expand_dims(stft_lens, 1))) # An energy spectrogram is the magnitude of the complex-valued STFT. # A float32 Tensor of shape [batch_size, ?, 257]. magnitude_spectrograms = tf.abs(stfts) # Warp the linear-scale, magnitude spectrograms into the mel-scale. num_spectrogram_bins = magnitude_spectrograms.shape[-1].value linear_to_mel_weight_matrix = ( tf.contrib.signal.linear_to_mel_weight_matrix( num_mel_bins, num_spectrogram_bins, sample_rate, lower_edge_hertz, upper_edge_hertz)) mel_spectrograms = tf.tensordot( magnitude_spectrograms, linear_to_mel_weight_matrix, 1) # Note: Shape inference for tensordot does not currently handle this case. mel_spectrograms.set_shape(magnitude_spectrograms.shape[:-1].concatenate( linear_to_mel_weight_matrix.shape[-1:])) log_mel_sgram = tf.log(tf.maximum(log_noise_floor, mel_spectrograms)) if apply_mask: log_mel_sgram *= tf.expand_dims(tf.to_float(masks), -1) return tf.expand_dims(log_mel_sgram, -1, name="mel_sgrams")
python
def compute_mel_filterbank_features( waveforms, sample_rate=16000, dither=1.0 / np.iinfo(np.int16).max, preemphasis=0.97, frame_length=25, frame_step=10, fft_length=None, window_fn=functools.partial(tf.contrib.signal.hann_window, periodic=True), lower_edge_hertz=80.0, upper_edge_hertz=7600.0, num_mel_bins=80, log_noise_floor=1e-3, apply_mask=True): """Implement mel-filterbank extraction using tf ops. Args: waveforms: float32 tensor with shape [batch_size, max_len] sample_rate: sampling rate of the waveform dither: stddev of Gaussian noise added to waveform to prevent quantization artefacts preemphasis: waveform high-pass filtering constant frame_length: frame length in ms frame_step: frame_Step in ms fft_length: number of fft bins window_fn: windowing function lower_edge_hertz: lowest frequency of the filterbank upper_edge_hertz: highest frequency of the filterbank num_mel_bins: filterbank size log_noise_floor: clip small values to prevent numeric overflow in log apply_mask: When working on a batch of samples, set padding frames to zero Returns: filterbanks: a float32 tensor with shape [batch_size, len, num_bins, 1] """ # `stfts` is a complex64 Tensor representing the short-time Fourier # Transform of each signal in `signals`. Its shape is # [batch_size, ?, fft_unique_bins] # where fft_unique_bins = fft_length // 2 + 1 # Find the wave length: the largest index for which the value is !=0 # note that waveforms samples that are exactly 0.0 are quite common, so # simply doing sum(waveforms != 0, axis=-1) will not work correctly. wav_lens = tf.reduce_max( tf.expand_dims(tf.range(tf.shape(waveforms)[1]), 0) * tf.to_int32(tf.not_equal(waveforms, 0.0)), axis=-1) + 1 if dither > 0: waveforms += tf.random_normal(tf.shape(waveforms), stddev=dither) if preemphasis > 0: waveforms = waveforms[:, 1:] - preemphasis * waveforms[:, :-1] wav_lens -= 1 frame_length = int(frame_length * sample_rate / 1e3) frame_step = int(frame_step * sample_rate / 1e3) if fft_length is None: fft_length = int(2**(np.ceil(np.log2(frame_length)))) stfts = tf.contrib.signal.stft( waveforms, frame_length=frame_length, frame_step=frame_step, fft_length=fft_length, window_fn=window_fn, pad_end=True) stft_lens = (wav_lens + (frame_step - 1)) // frame_step masks = tf.to_float(tf.less_equal( tf.expand_dims(tf.range(tf.shape(stfts)[1]), 0), tf.expand_dims(stft_lens, 1))) # An energy spectrogram is the magnitude of the complex-valued STFT. # A float32 Tensor of shape [batch_size, ?, 257]. magnitude_spectrograms = tf.abs(stfts) # Warp the linear-scale, magnitude spectrograms into the mel-scale. num_spectrogram_bins = magnitude_spectrograms.shape[-1].value linear_to_mel_weight_matrix = ( tf.contrib.signal.linear_to_mel_weight_matrix( num_mel_bins, num_spectrogram_bins, sample_rate, lower_edge_hertz, upper_edge_hertz)) mel_spectrograms = tf.tensordot( magnitude_spectrograms, linear_to_mel_weight_matrix, 1) # Note: Shape inference for tensordot does not currently handle this case. mel_spectrograms.set_shape(magnitude_spectrograms.shape[:-1].concatenate( linear_to_mel_weight_matrix.shape[-1:])) log_mel_sgram = tf.log(tf.maximum(log_noise_floor, mel_spectrograms)) if apply_mask: log_mel_sgram *= tf.expand_dims(tf.to_float(masks), -1) return tf.expand_dims(log_mel_sgram, -1, name="mel_sgrams")
[ "def", "compute_mel_filterbank_features", "(", "waveforms", ",", "sample_rate", "=", "16000", ",", "dither", "=", "1.0", "/", "np", ".", "iinfo", "(", "np", ".", "int16", ")", ".", "max", ",", "preemphasis", "=", "0.97", ",", "frame_length", "=", "25", ",", "frame_step", "=", "10", ",", "fft_length", "=", "None", ",", "window_fn", "=", "functools", ".", "partial", "(", "tf", ".", "contrib", ".", "signal", ".", "hann_window", ",", "periodic", "=", "True", ")", ",", "lower_edge_hertz", "=", "80.0", ",", "upper_edge_hertz", "=", "7600.0", ",", "num_mel_bins", "=", "80", ",", "log_noise_floor", "=", "1e-3", ",", "apply_mask", "=", "True", ")", ":", "# `stfts` is a complex64 Tensor representing the short-time Fourier", "# Transform of each signal in `signals`. Its shape is", "# [batch_size, ?, fft_unique_bins]", "# where fft_unique_bins = fft_length // 2 + 1", "# Find the wave length: the largest index for which the value is !=0", "# note that waveforms samples that are exactly 0.0 are quite common, so", "# simply doing sum(waveforms != 0, axis=-1) will not work correctly.", "wav_lens", "=", "tf", ".", "reduce_max", "(", "tf", ".", "expand_dims", "(", "tf", ".", "range", "(", "tf", ".", "shape", "(", "waveforms", ")", "[", "1", "]", ")", ",", "0", ")", "*", "tf", ".", "to_int32", "(", "tf", ".", "not_equal", "(", "waveforms", ",", "0.0", ")", ")", ",", "axis", "=", "-", "1", ")", "+", "1", "if", "dither", ">", "0", ":", "waveforms", "+=", "tf", ".", "random_normal", "(", "tf", ".", "shape", "(", "waveforms", ")", ",", "stddev", "=", "dither", ")", "if", "preemphasis", ">", "0", ":", "waveforms", "=", "waveforms", "[", ":", ",", "1", ":", "]", "-", "preemphasis", "*", "waveforms", "[", ":", ",", ":", "-", "1", "]", "wav_lens", "-=", "1", "frame_length", "=", "int", "(", "frame_length", "*", "sample_rate", "/", "1e3", ")", "frame_step", "=", "int", "(", "frame_step", "*", "sample_rate", "/", "1e3", ")", "if", "fft_length", "is", "None", ":", "fft_length", "=", "int", "(", "2", "**", "(", "np", ".", "ceil", "(", "np", ".", "log2", "(", "frame_length", ")", ")", ")", ")", "stfts", "=", "tf", ".", "contrib", ".", "signal", ".", "stft", "(", "waveforms", ",", "frame_length", "=", "frame_length", ",", "frame_step", "=", "frame_step", ",", "fft_length", "=", "fft_length", ",", "window_fn", "=", "window_fn", ",", "pad_end", "=", "True", ")", "stft_lens", "=", "(", "wav_lens", "+", "(", "frame_step", "-", "1", ")", ")", "//", "frame_step", "masks", "=", "tf", ".", "to_float", "(", "tf", ".", "less_equal", "(", "tf", ".", "expand_dims", "(", "tf", ".", "range", "(", "tf", ".", "shape", "(", "stfts", ")", "[", "1", "]", ")", ",", "0", ")", ",", "tf", ".", "expand_dims", "(", "stft_lens", ",", "1", ")", ")", ")", "# An energy spectrogram is the magnitude of the complex-valued STFT.", "# A float32 Tensor of shape [batch_size, ?, 257].", "magnitude_spectrograms", "=", "tf", ".", "abs", "(", "stfts", ")", "# Warp the linear-scale, magnitude spectrograms into the mel-scale.", "num_spectrogram_bins", "=", "magnitude_spectrograms", ".", "shape", "[", "-", "1", "]", ".", "value", "linear_to_mel_weight_matrix", "=", "(", "tf", ".", "contrib", ".", "signal", ".", "linear_to_mel_weight_matrix", "(", "num_mel_bins", ",", "num_spectrogram_bins", ",", "sample_rate", ",", "lower_edge_hertz", ",", "upper_edge_hertz", ")", ")", "mel_spectrograms", "=", "tf", ".", "tensordot", "(", "magnitude_spectrograms", ",", "linear_to_mel_weight_matrix", ",", "1", ")", "# Note: Shape inference for tensordot does not currently handle this case.", "mel_spectrograms", ".", "set_shape", "(", "magnitude_spectrograms", ".", "shape", "[", ":", "-", "1", "]", ".", "concatenate", "(", "linear_to_mel_weight_matrix", ".", "shape", "[", "-", "1", ":", "]", ")", ")", "log_mel_sgram", "=", "tf", ".", "log", "(", "tf", ".", "maximum", "(", "log_noise_floor", ",", "mel_spectrograms", ")", ")", "if", "apply_mask", ":", "log_mel_sgram", "*=", "tf", ".", "expand_dims", "(", "tf", ".", "to_float", "(", "masks", ")", ",", "-", "1", ")", "return", "tf", ".", "expand_dims", "(", "log_mel_sgram", ",", "-", "1", ",", "name", "=", "\"mel_sgrams\"", ")" ]
Implement mel-filterbank extraction using tf ops. Args: waveforms: float32 tensor with shape [batch_size, max_len] sample_rate: sampling rate of the waveform dither: stddev of Gaussian noise added to waveform to prevent quantization artefacts preemphasis: waveform high-pass filtering constant frame_length: frame length in ms frame_step: frame_Step in ms fft_length: number of fft bins window_fn: windowing function lower_edge_hertz: lowest frequency of the filterbank upper_edge_hertz: highest frequency of the filterbank num_mel_bins: filterbank size log_noise_floor: clip small values to prevent numeric overflow in log apply_mask: When working on a batch of samples, set padding frames to zero Returns: filterbanks: a float32 tensor with shape [batch_size, len, num_bins, 1]
[ "Implement", "mel", "-", "filterbank", "extraction", "using", "tf", "ops", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/layers/common_audio.py#L55-L138
train
Implement mel - filterbank extraction using tf ops.
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,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2A0yzQpDQB3,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(0b110010 + 0o75) + '\x33' + chr(0b111 + 0o53) + chr(0b100 + 0o55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101 + 0o61) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + '\061' + chr(53) + chr(0b110000), 15917 - 15909), ehT0Px3KOsy9(chr(1186 - 1138) + '\157' + '\065' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(2678 - 2626) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000010 + 0o55) + chr(0b10011 + 0o36) + chr(0b101000 + 0o13) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(971 - 923) + chr(111) + chr(1958 - 1908) + chr(0b11010 + 0o31) + chr(2079 - 2030), 30211 - 30203), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(391 - 341) + '\x36', 23584 - 23576), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b1110 + 0o47) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x34' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\063' + chr(0b100100 + 0o20) + chr(2357 - 2307), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101001 + 0o6) + chr(0b100111 + 0o14) + chr(0b10000 + 0o41) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(10355 - 10244) + chr(0b110001) + '\064' + chr(0b0 + 0o62), 20651 - 20643), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101010 + 0o7) + '\x35' + chr(54), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(54), 47949 - 47941), ehT0Px3KOsy9(chr(1109 - 1061) + chr(0b1101111) + '\063' + chr(0b110100) + chr(0b11101 + 0o23), 55226 - 55218), ehT0Px3KOsy9(chr(1965 - 1917) + '\157' + '\062' + chr(2229 - 2180) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1944 - 1894) + '\x33' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10111 + 0o36) + chr(1008 - 959), 0b1000), ehT0Px3KOsy9('\x30' + chr(267 - 156) + chr(54) + chr(53), 8), ehT0Px3KOsy9('\060' + chr(9582 - 9471) + chr(49) + '\067' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(630 - 580) + chr(2376 - 2326) + '\x37', 15262 - 15254), ehT0Px3KOsy9(chr(1321 - 1273) + chr(111) + chr(0b110011) + chr(48) + '\064', 33933 - 33925), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b110111) + chr(1604 - 1553), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9732 - 9621) + chr(0b1100 + 0o47) + chr(0b110010) + chr(0b10011 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2106 - 2057) + chr(0b110111) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(8589 - 8478) + chr(2444 - 2393) + chr(0b1100 + 0o47) + chr(0b100011 + 0o24), 0b1000), ehT0Px3KOsy9(chr(1311 - 1263) + '\157' + chr(0b110001) + chr(101 - 51) + '\x30', 63262 - 63254), ehT0Px3KOsy9('\x30' + chr(6847 - 6736) + '\065' + chr(0b100 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100100 + 0o15) + chr(0b110000 + 0o6) + '\060', 0b1000), ehT0Px3KOsy9(chr(900 - 852) + '\157' + chr(0b101101 + 0o4) + chr(1562 - 1509), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1888 - 1838) + '\064' + '\061', 64546 - 64538), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\x31' + chr(267 - 213), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\061' + chr(53), 52824 - 52816), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b101000 + 0o12) + chr(697 - 649) + chr(0b101010 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + '\061' + chr(0b110010) + '\064', 49916 - 49908), ehT0Px3KOsy9(chr(1054 - 1006) + '\x6f' + chr(50) + chr(712 - 664) + chr(1725 - 1677), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(1772 - 1724) + chr(0b10001 + 0o46), 27489 - 27481), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\066', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110101) + chr(0b100111 + 0o11), 9930 - 9922)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xff'), chr(6702 - 6602) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + '\145')(chr(0b11110 + 0o127) + chr(0b1110100) + chr(0b1001000 + 0o36) + '\x2d' + chr(1424 - 1368)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def vbuHaDLvAJvs(yP0a4QRs0KoT, FC1ozjKG3or9=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1686 - 1631) + chr(0b110010) + chr(1450 - 1402) + chr(0b110000), 0o10), O5cV_XRivmxU=1.0 / xafqLlk3kkUe(WqUC3KWvYVup.iinfo(WqUC3KWvYVup.int16), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5F\x0cF\xd26\xfe~WC\xa6\x99'), chr(991 - 891) + chr(0b111101 + 0o50) + '\143' + chr(111) + chr(7240 - 7140) + chr(0b1010011 + 0o22))(chr(0b1010000 + 0o45) + chr(3149 - 3033) + chr(6146 - 6044) + '\055' + '\x38')), rSTQOldbIP9z=0.97, NRA5BoP8m8hi=ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + chr(0b11101 + 0o26) + chr(0b110 + 0o53), 1977 - 1969), AdBFIE19y7mT=ehT0Px3KOsy9('\060' + chr(1284 - 1173) + chr(0b101011 + 0o6) + chr(0b10011 + 0o37), 0o10), lu1tCSCRDpE4=None, AyBXfaS82Glk=xafqLlk3kkUe(E6ula8_Zv1yl, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1T\x1aX\xcd;\xf5'), '\144' + '\x65' + chr(0b1100011) + chr(11485 - 11374) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b100110 + 0o100) + '\055' + chr(2055 - 1999)))(xafqLlk3kkUe(IDJ2eXGCBCDu.contrib.signal, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9T\x06B\xfb-\xf0x\nK\x95'), '\x64' + '\145' + '\x63' + '\x6f' + chr(534 - 434) + '\x65')('\165' + '\164' + '\146' + '\x2d' + chr(0b1111 + 0o51))), periodic=ehT0Px3KOsy9(chr(1477 - 1429) + chr(0b1101111) + '\061', 8)), k_bZX2rCjpzV=80.0, Y06Yx_jAQVLI=7600.0, Df5qJhi6L1Sy=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110001 + 0o1) + chr(277 - 229), 8), EltrUVseXg3p=0.001, LYL3V1KHIcrj=ehT0Px3KOsy9(chr(48) + '\157' + '\x31', 8)): PnF91VNhHvRg = IDJ2eXGCBCDu.reduce_max(IDJ2eXGCBCDu.expand_dims(IDJ2eXGCBCDu.range(IDJ2eXGCBCDu.nauYfLglTpcb(yP0a4QRs0KoT)[ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 8)]), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110000), 0b1000)) * IDJ2eXGCBCDu.to_int32(IDJ2eXGCBCDu.not_equal(yP0a4QRs0KoT, 0.0)), axis=-ehT0Px3KOsy9(chr(391 - 343) + chr(1111 - 1000) + chr(303 - 254), 8)) + ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31', 8) if O5cV_XRivmxU > ehT0Px3KOsy9('\060' + chr(6301 - 6190) + '\060', 8): yP0a4QRs0KoT += IDJ2eXGCBCDu.random_normal(IDJ2eXGCBCDu.nauYfLglTpcb(yP0a4QRs0KoT), stddev=O5cV_XRivmxU) if rSTQOldbIP9z > ehT0Px3KOsy9('\060' + chr(3372 - 3261) + '\x30', 8): yP0a4QRs0KoT = yP0a4QRs0KoT[:, ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101101 + 0o4), 8):] - rSTQOldbIP9z * yP0a4QRs0KoT[:, :-ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1011000 + 0o27) + chr(49), 8)] PnF91VNhHvRg -= ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 8) NRA5BoP8m8hi = ehT0Px3KOsy9(NRA5BoP8m8hi * FC1ozjKG3or9 / 1000.0) AdBFIE19y7mT = ehT0Px3KOsy9(AdBFIE19y7mT * FC1ozjKG3or9 / 1000.0) if lu1tCSCRDpE4 is None: lu1tCSCRDpE4 = ehT0Px3KOsy9(ehT0Px3KOsy9('\x30' + '\x6f' + chr(2319 - 2269), 0o10) ** WqUC3KWvYVup.ceil(WqUC3KWvYVup.log2(NRA5BoP8m8hi))) u3gVOSwSrNEp = IDJ2eXGCBCDu.contrib.signal.stft(yP0a4QRs0KoT, frame_length=NRA5BoP8m8hi, frame_step=AdBFIE19y7mT, fft_length=lu1tCSCRDpE4, window_fn=AyBXfaS82Glk, pad_end=ehT0Px3KOsy9(chr(48) + chr(0b1100101 + 0o12) + '\061', 8)) taTKZeitxmLh = (PnF91VNhHvRg + (AdBFIE19y7mT - ehT0Px3KOsy9('\x30' + '\x6f' + chr(49), 8))) // AdBFIE19y7mT iB_C7ejAba13 = IDJ2eXGCBCDu.to_float(IDJ2eXGCBCDu.less_equal(IDJ2eXGCBCDu.expand_dims(IDJ2eXGCBCDu.range(IDJ2eXGCBCDu.nauYfLglTpcb(u3gVOSwSrNEp)[ehT0Px3KOsy9(chr(182 - 134) + chr(3808 - 3697) + '\x31', 8)]), ehT0Px3KOsy9('\x30' + chr(9336 - 9225) + '\x30', 8)), IDJ2eXGCBCDu.expand_dims(taTKZeitxmLh, ehT0Px3KOsy9(chr(0b110000) + chr(2393 - 2282) + '\061', 8)))) KkgtdgKp1bUR = IDJ2eXGCBCDu.abs(u3gVOSwSrNEp) mdnDWqkktEr3 = KkgtdgKp1bUR.shape[-ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001), 8)].QmmgWUB13VCJ mKT29FMuo44L = IDJ2eXGCBCDu.contrib.signal.linear_to_mel_weight_matrix(Df5qJhi6L1Sy, mdnDWqkktEr3, FC1ozjKG3or9, k_bZX2rCjpzV, Y06Yx_jAQVLI) ZSXav3lNbx07 = IDJ2eXGCBCDu.tensordot(KkgtdgKp1bUR, mKT29FMuo44L, ehT0Px3KOsy9(chr(1750 - 1702) + chr(0b100100 + 0o113) + '\x31', 8)) xafqLlk3kkUe(ZSXav3lNbx07, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2P\x1cs\xd72\xf8f\x0b'), chr(100) + chr(0b10000 + 0o125) + chr(4610 - 4511) + '\157' + '\x64' + '\x65')(chr(0b1010011 + 0o42) + '\164' + chr(102) + chr(765 - 720) + chr(838 - 782)))(xafqLlk3kkUe(KkgtdgKp1bUR.shape[:-ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(49), 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2Z\x06O\xc5.\xfcx\x0fP\x87'), chr(0b1011101 + 0o7) + '\x65' + chr(0b1010010 + 0o21) + chr(111) + chr(4220 - 4120) + chr(0b11011 + 0o112))('\165' + chr(0b100111 + 0o115) + '\x66' + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(mKT29FMuo44L, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbfT\x1du\xc2\x16\xfez:T\x81\xab'), chr(0b11110 + 0o106) + chr(0b100110 + 0o77) + '\143' + '\x6f' + chr(3803 - 3703) + chr(0b1100000 + 0o5))(chr(0b1110101) + '\164' + chr(0b111 + 0o137) + '\055' + chr(56)))[-ehT0Px3KOsy9(chr(664 - 616) + chr(0b1100001 + 0o16) + '\061', 8):])) NS1MrSErxwHN = IDJ2eXGCBCDu.log(IDJ2eXGCBCDu.maximum(EltrUVseXg3p, ZSXav3lNbx07)) if LYL3V1KHIcrj: NS1MrSErxwHN *= IDJ2eXGCBCDu.expand_dims(IDJ2eXGCBCDu.to_float(iB_C7ejAba13), -ehT0Px3KOsy9('\060' + chr(111) + '\x31', 8)) return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4M\x18M\xca>\xc6r\x07I\x91'), chr(0b1100100) + '\x65' + chr(0b101111 + 0o64) + chr(11774 - 11663) + chr(0b110010 + 0o62) + '\x65')(chr(9143 - 9026) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(56)))(NS1MrSErxwHN, -ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(653 - 604), 8), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xbcP\x04s\xd7=\xebw\x03W'), '\x64' + chr(101) + '\143' + chr(111) + '\x64' + chr(8460 - 8359))('\165' + '\164' + chr(5616 - 5514) + '\x2d' + chr(0b100000 + 0o30)))
tensorflow/tensor2tensor
tensor2tensor/envs/env_problem_utils.py
play_env_problem_randomly
def play_env_problem_randomly(env_problem, num_steps): """Plays the env problem by randomly sampling actions for `num_steps`.""" # Reset all environments. env_problem.reset() # Play all environments, sampling random actions each time. for _ in range(num_steps): # Sample batch_size actions from the action space and stack them. actions = np.stack([env_problem.action_space.sample() for _ in range( env_problem.batch_size)]) # Execute actions, observations are stored in `env_problem`. _, _, dones, _ = env_problem.step(actions) # Get the indices where we are done and reset those. env_problem.reset(indices=done_indices(dones))
python
def play_env_problem_randomly(env_problem, num_steps): """Plays the env problem by randomly sampling actions for `num_steps`.""" # Reset all environments. env_problem.reset() # Play all environments, sampling random actions each time. for _ in range(num_steps): # Sample batch_size actions from the action space and stack them. actions = np.stack([env_problem.action_space.sample() for _ in range( env_problem.batch_size)]) # Execute actions, observations are stored in `env_problem`. _, _, dones, _ = env_problem.step(actions) # Get the indices where we are done and reset those. env_problem.reset(indices=done_indices(dones))
[ "def", "play_env_problem_randomly", "(", "env_problem", ",", "num_steps", ")", ":", "# Reset all environments.", "env_problem", ".", "reset", "(", ")", "# Play all environments, sampling random actions each time.", "for", "_", "in", "range", "(", "num_steps", ")", ":", "# Sample batch_size actions from the action space and stack them.", "actions", "=", "np", ".", "stack", "(", "[", "env_problem", ".", "action_space", ".", "sample", "(", ")", "for", "_", "in", "range", "(", "env_problem", ".", "batch_size", ")", "]", ")", "# Execute actions, observations are stored in `env_problem`.", "_", ",", "_", ",", "dones", ",", "_", "=", "env_problem", ".", "step", "(", "actions", ")", "# Get the indices where we are done and reset those.", "env_problem", ".", "reset", "(", "indices", "=", "done_indices", "(", "dones", ")", ")" ]
Plays the env problem by randomly sampling actions for `num_steps`.
[ "Plays", "the", "env", "problem", "by", "randomly", "sampling", "actions", "for", "num_steps", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/envs/env_problem_utils.py#L30-L46
train
Plays the env problem by randomly sampling actions for num_steps.
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,KOHQGQ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lvR,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(272 - 161) + chr(774 - 723) + '\x33' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\063' + chr(215 - 162), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b100 + 0o57) + chr(0b110101), 8), ehT0Px3KOsy9(chr(1791 - 1743) + chr(0b0 + 0o157) + chr(0b110001) + '\062' + '\x32', 50531 - 50523), ehT0Px3KOsy9('\x30' + chr(5002 - 4891) + '\061' + '\x35' + chr(55), 49388 - 49380), ehT0Px3KOsy9(chr(48) + chr(0b1010100 + 0o33) + chr(54) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + chr(51) + '\x35' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(697 - 586) + '\062' + chr(51) + chr(0b10111 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(2155 - 2107) + chr(6385 - 6274) + '\066' + chr(301 - 249), 0b1000), ehT0Px3KOsy9(chr(636 - 588) + '\157' + '\063' + chr(0b110011) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(5359 - 5248) + chr(332 - 283) + chr(0b110000) + chr(2029 - 1976), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(0b110001) + '\x32' + chr(1565 - 1516), ord("\x08")), ehT0Px3KOsy9(chr(1993 - 1945) + chr(0b11001 + 0o126) + '\061' + chr(0b110111) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x33' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\063' + chr(51) + '\061', 23541 - 23533), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(870 - 817) + '\063', 22213 - 22205), ehT0Px3KOsy9(chr(0b110000) + chr(7586 - 7475) + chr(0b110010) + chr(0b0 + 0o61) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(52) + '\060', 29172 - 29164), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b0 + 0o63) + chr(0b10000 + 0o41) + '\x35', 27534 - 27526), ehT0Px3KOsy9(chr(0b110000) + chr(7505 - 7394) + chr(0b110011 + 0o0) + '\x34', 51613 - 51605), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(2372 - 2318) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1314 - 1266) + '\157' + '\x33' + chr(1733 - 1680) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(1941 - 1892) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + '\063' + chr(1118 - 1064) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1838 - 1789) + '\x33' + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(54) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1405 - 1354) + chr(0b110111) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(48) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\x31' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x34' + chr(0b110101), 49764 - 49756), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + '\061' + chr(0b10111 + 0o36) + chr(0b110101), 56210 - 56202), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + chr(53) + chr(0b110011), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b1100 + 0o45) + '\x37' + chr(0b11110 + 0o27), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\067' + chr(0b10000 + 0o42), 27528 - 27520), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(2443 - 2392) + '\062', 0o10), ehT0Px3KOsy9(chr(784 - 736) + '\157' + chr(186 - 135) + chr(0b100101 + 0o16) + chr(53), 8), ehT0Px3KOsy9('\060' + '\157' + '\x36' + chr(0b101011 + 0o11), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110010) + '\064' + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(54) + chr(1252 - 1199), 52426 - 52418)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(9860 - 9749) + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3'), chr(0b1100100) + chr(2458 - 2357) + '\x63' + '\x6f' + chr(0b1100100) + chr(101))('\x75' + chr(0b1001110 + 0o46) + chr(102) + chr(0b10111 + 0o26) + chr(2663 - 2607)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def kBB_0vihV1fu(ABBY257KUJZK, UQsgPnJC3jY0): xafqLlk3kkUe(ABBY257KUJZK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf\xb8\xae7\x1b'), '\x64' + chr(101) + chr(0b1100011) + chr(4538 - 4427) + chr(100) + chr(101))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(0b111000)))() for VNGQdHSFPrso in vQr8gNKaIaWE(UQsgPnJC3jY0): WCl6VUkME_8I = WqUC3KWvYVup.stack([ABBY257KUJZK.action_space.sample() for VNGQdHSFPrso in vQr8gNKaIaWE(ABBY257KUJZK.ix9dZyeAmUxY)]) (VNGQdHSFPrso, VNGQdHSFPrso, ijPEVpFpIejc, VNGQdHSFPrso) = ABBY257KUJZK.kDuFsAhEatcU(WCl6VUkME_8I) xafqLlk3kkUe(ABBY257KUJZK, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf\xb8\xae7\x1b'), chr(7489 - 7389) + '\145' + '\143' + '\x6f' + '\144' + chr(101))('\x75' + chr(116) + chr(9903 - 9801) + chr(0b10100 + 0o31) + chr(0b1011 + 0o55)))(indices=vquHOvSlaABZ(ijPEVpFpIejc))
tensorflow/tensor2tensor
tensor2tensor/data_generators/cipher.py
generate_plaintext_random
def generate_plaintext_random(plain_vocab, distribution, train_samples, length): """Generates samples of text from the provided vocabulary. Args: plain_vocab: vocabulary. distribution: distribution. train_samples: samples for training. length: length. Returns: train_indices (np.array of Integers): random integers for training. shape = [num_samples, length] test_indices (np.array of Integers): random integers for testing. shape = [num_samples, length] plain_vocab (list of Integers): unique vocabularies. """ if distribution is not None: assert len(distribution) == len(plain_vocab) train_indices = np.random.choice( range(len(plain_vocab)), (train_samples, length), p=distribution) return train_indices
python
def generate_plaintext_random(plain_vocab, distribution, train_samples, length): """Generates samples of text from the provided vocabulary. Args: plain_vocab: vocabulary. distribution: distribution. train_samples: samples for training. length: length. Returns: train_indices (np.array of Integers): random integers for training. shape = [num_samples, length] test_indices (np.array of Integers): random integers for testing. shape = [num_samples, length] plain_vocab (list of Integers): unique vocabularies. """ if distribution is not None: assert len(distribution) == len(plain_vocab) train_indices = np.random.choice( range(len(plain_vocab)), (train_samples, length), p=distribution) return train_indices
[ "def", "generate_plaintext_random", "(", "plain_vocab", ",", "distribution", ",", "train_samples", ",", "length", ")", ":", "if", "distribution", "is", "not", "None", ":", "assert", "len", "(", "distribution", ")", "==", "len", "(", "plain_vocab", ")", "train_indices", "=", "np", ".", "random", ".", "choice", "(", "range", "(", "len", "(", "plain_vocab", ")", ")", ",", "(", "train_samples", ",", "length", ")", ",", "p", "=", "distribution", ")", "return", "train_indices" ]
Generates samples of text from the provided vocabulary. Args: plain_vocab: vocabulary. distribution: distribution. train_samples: samples for training. length: length. Returns: train_indices (np.array of Integers): random integers for training. shape = [num_samples, length] test_indices (np.array of Integers): random integers for testing. shape = [num_samples, length] plain_vocab (list of Integers): unique vocabularies.
[ "Generates", "samples", "of", "text", "from", "the", "provided", "vocabulary", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/cipher.py#L154-L177
train
Generates samples of text from the provided vocabulary.
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,q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8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100010 + 0o20) + '\x35' + chr(0b10100 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + chr(2031 - 1920) + '\x33' + chr(0b100000 + 0o20) + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(7109 - 6998) + chr(0b110001) + chr(0b110111) + '\065', 35106 - 35098), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\060' + chr(1592 - 1539), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\x31' + chr(0b100101 + 0o13), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10011 + 0o40) + '\x32' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(2017 - 1969) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + '\x31' + chr(502 - 448) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + '\061' + chr(0b100100 + 0o22) + chr(0b10000 + 0o44), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110111) + chr(0b11100 + 0o31), 8), ehT0Px3KOsy9(chr(1684 - 1636) + '\157' + '\063' + chr(54) + chr(0b110100 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\062' + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(10945 - 10834) + chr(772 - 720) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(99 - 51) + chr(0b1000110 + 0o51) + '\061' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(4724 - 4613) + '\063' + chr(812 - 764) + chr(2366 - 2316), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1453 - 1342) + chr(0b101001 + 0o11) + '\x36' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b110101), 62426 - 62418), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(55) + chr(922 - 870), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101111 + 0o4) + chr(0b110110) + chr(423 - 370), 40312 - 40304), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(7961 - 7850) + '\x31' + chr(0b110101) + '\061', 56648 - 56640), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + chr(50) + chr(1940 - 1892) + chr(0b101010 + 0o15), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + '\x32' + chr(0b1110 + 0o51) + chr(49), 50094 - 50086), ehT0Px3KOsy9(chr(2007 - 1959) + chr(111) + chr(0b1011 + 0o50) + chr(53) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(951 - 903) + '\x6f' + chr(0b110011) + '\067' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(49) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\060' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + '\060', 49998 - 49990), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(52) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(737 - 687) + chr(0b110001) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + chr(10753 - 10642) + '\063' + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35' + '\x31', 28549 - 28541), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10100 + 0o36) + chr(2148 - 2097) + chr(0b101 + 0o60), 678 - 670), ehT0Px3KOsy9(chr(1127 - 1079) + chr(0b1101111) + chr(1867 - 1816) + '\x35' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(202 - 154) + '\157' + '\x33' + chr(0b1100 + 0o51) + chr(0b101110 + 0o7), 7882 - 7874), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\x36' + chr(53), 0o10), ehT0Px3KOsy9(chr(1793 - 1745) + chr(6508 - 6397) + '\061' + chr(0b101101 + 0o10) + chr(48), 0o10), ehT0Px3KOsy9(chr(1930 - 1882) + chr(0b0 + 0o157) + '\x31' + chr(0b10010 + 0o45) + '\065', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b101100 + 0o12) + '\067', 8), ehT0Px3KOsy9(chr(48) + chr(1053 - 942) + chr(0b101010 + 0o10) + chr(55) + chr(2240 - 2187), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(53) + chr(0b1100 + 0o44), 20282 - 20274)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x81'), chr(9289 - 9189) + chr(101) + chr(9427 - 9328) + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + chr(0b10101 + 0o30) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def DwIGWRTFjgDh(W6tZOEHl1hw3, iJvq7pIHWwTP, o9dheVKzREID, CHAOgk5VCHH_): if iJvq7pIHWwTP is not None: assert c2A0yzQpDQB3(iJvq7pIHWwTP) == c2A0yzQpDQB3(W6tZOEHl1hw3) ChPjL4zpKIJr = WqUC3KWvYVup.random.choice(vQr8gNKaIaWE(c2A0yzQpDQB3(W6tZOEHl1hw3)), (o9dheVKzREID, CHAOgk5VCHH_), p=iJvq7pIHWwTP) return ChPjL4zpKIJr
tensorflow/tensor2tensor
tensor2tensor/data_generators/cipher.py
encipher_shift
def encipher_shift(plaintext, plain_vocab, shift): """Encrypt plain text with a single shift layer. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. shift (Integer): number of shift, shift to the right if shift is positive. Returns: ciphertext (list of Strings): encrypted plain text. """ ciphertext = [] cipher = ShiftEncryptionLayer(plain_vocab, shift) for _, sentence in enumerate(plaintext): cipher_sentence = [] for _, character in enumerate(sentence): encrypted_char = cipher.encrypt_character(character) cipher_sentence.append(encrypted_char) ciphertext.append(cipher_sentence) return ciphertext
python
def encipher_shift(plaintext, plain_vocab, shift): """Encrypt plain text with a single shift layer. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. shift (Integer): number of shift, shift to the right if shift is positive. Returns: ciphertext (list of Strings): encrypted plain text. """ ciphertext = [] cipher = ShiftEncryptionLayer(plain_vocab, shift) for _, sentence in enumerate(plaintext): cipher_sentence = [] for _, character in enumerate(sentence): encrypted_char = cipher.encrypt_character(character) cipher_sentence.append(encrypted_char) ciphertext.append(cipher_sentence) return ciphertext
[ "def", "encipher_shift", "(", "plaintext", ",", "plain_vocab", ",", "shift", ")", ":", "ciphertext", "=", "[", "]", "cipher", "=", "ShiftEncryptionLayer", "(", "plain_vocab", ",", "shift", ")", "for", "_", ",", "sentence", "in", "enumerate", "(", "plaintext", ")", ":", "cipher_sentence", "=", "[", "]", "for", "_", ",", "character", "in", "enumerate", "(", "sentence", ")", ":", "encrypted_char", "=", "cipher", ".", "encrypt_character", "(", "character", ")", "cipher_sentence", ".", "append", "(", "encrypted_char", ")", "ciphertext", ".", "append", "(", "cipher_sentence", ")", "return", "ciphertext" ]
Encrypt plain text with a single shift layer. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. shift (Integer): number of shift, shift to the right if shift is positive. Returns: ciphertext (list of Strings): encrypted plain text.
[ "Encrypt", "plain", "text", "with", "a", "single", "shift", "layer", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/cipher.py#L180-L200
train
Encipher a list of plain text with a single shift layer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtW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pH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(492 - 444) + chr(0b1101101 + 0o2) + '\x32' + '\067', 0b1000), ehT0Px3KOsy9(chr(206 - 158) + '\157' + '\063' + '\062' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x31' + chr(79 - 30), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110010) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111111 + 0o60) + '\061' + chr(2061 - 2012) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + '\x32' + chr(0b110011) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(1029 - 918) + chr(51) + '\063' + chr(0b11100 + 0o26), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(0b110010) + chr(2379 - 2330) + chr(0b110100), 30074 - 30066), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(620 - 569) + chr(49) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\x32' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\x32' + '\061', 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1011011 + 0o24) + chr(0b110001) + '\x30' + chr(2156 - 2104), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1110 + 0o44) + '\x33' + chr(0b100111 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b10010 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\064' + chr(0b101110 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + chr(0b110001) + '\060' + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o36) + '\061' + chr(0b10100 + 0o43), 0o10), ehT0Px3KOsy9(chr(48) + chr(9300 - 9189) + chr(0b110011) + chr(0b110010) + '\x32', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1100 + 0o45) + chr(0b1110 + 0o42) + chr(48), 37087 - 37079), ehT0Px3KOsy9('\060' + chr(111) + '\065' + '\063', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + chr(0b110011) + chr(48) + '\x35', 53831 - 53823), ehT0Px3KOsy9('\060' + chr(4311 - 4200) + chr(0b110000 + 0o1) + chr(194 - 140) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2244 - 2196) + chr(5266 - 5155) + '\061' + '\060' + chr(0b11 + 0o57), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b1 + 0o60) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(4474 - 4363) + '\x31' + chr(402 - 352) + '\060', 20736 - 20728), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + chr(0b101111 + 0o3) + chr(52) + chr(1729 - 1681), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b101011 + 0o12) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + chr(51) + chr(0b110000) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + '\063' + chr(49) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(985 - 933) + '\062', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(1272 - 1223) + '\x30' + chr(782 - 731), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10844 - 10733) + '\x31' + '\062' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(0b110011) + chr(2015 - 1965) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(49) + chr(0b110011), 25022 - 25014), ehT0Px3KOsy9(chr(0b110000) + chr(9096 - 8985) + chr(1032 - 983) + '\x32' + chr(2579 - 2527), 27134 - 27126), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b110000) + chr(0b11110 + 0o22), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b10010 + 0o43) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1010100 + 0o33) + '\062' + '\065' + chr(0b101010 + 0o6), 0b1000), ehT0Px3KOsy9(chr(2127 - 2079) + chr(6942 - 6831) + chr(0b110011) + chr(49) + chr(448 - 394), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1000111 + 0o50) + chr(1961 - 1908) + chr(48), 8566 - 8558)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'9'), chr(5894 - 5794) + chr(6674 - 6573) + chr(0b1100011) + chr(0b1011010 + 0o25) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1010110 + 0o20) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def XHwaOi01TVN6(c2kFQYIhMIWH, W6tZOEHl1hw3, LnbELFj1hfyx): e7fdMa8aIQPs = [] XCEXnYSaoXSF = zBfHWCET8HjJ(W6tZOEHl1hw3, LnbELFj1hfyx) for (VNGQdHSFPrso, pamQPTGoym5v) in YlkZvXL8qwsX(c2kFQYIhMIWH): YycNEyVwRZtC = [] for (VNGQdHSFPrso, QlQlF5THQesr) in YlkZvXL8qwsX(pamQPTGoym5v): itZbMNNRQn9k = XCEXnYSaoXSF.encrypt_character(QlQlF5THQesr) xafqLlk3kkUe(YycNEyVwRZtC, xafqLlk3kkUe(SXOLrMavuUCe(b'v\xa2\xf94 \xf9'), chr(2611 - 2511) + chr(0b100 + 0o141) + chr(99) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1001010 + 0o53) + chr(116) + '\146' + '\055' + '\x38'))(itZbMNNRQn9k) xafqLlk3kkUe(e7fdMa8aIQPs, xafqLlk3kkUe(SXOLrMavuUCe(b'v\xa2\xf94 \xf9'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(0b1010011 + 0o21) + chr(0b111100 + 0o51))(chr(1362 - 1245) + chr(913 - 797) + chr(9447 - 9345) + chr(45) + chr(1499 - 1443)))(YycNEyVwRZtC) return e7fdMa8aIQPs
tensorflow/tensor2tensor
tensor2tensor/data_generators/cipher.py
encipher_vigenere
def encipher_vigenere(plaintext, plain_vocab, key): """Encrypt plain text with given key. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. key (list of Integer): key to encrypt cipher using Vigenere table. Returns: ciphertext (list of Strings): encrypted plain text. """ ciphertext = [] # generate Vigenere table layers = [ ShiftEncryptionLayer(plain_vocab, i) for i in range(len(plain_vocab)) ] for i, sentence in enumerate(plaintext): cipher_sentence = [] for j, character in enumerate(sentence): key_idx = key[j % len(key)] encrypted_char = layers[key_idx].encrypt_character(character) cipher_sentence.append(encrypted_char) ciphertext.append(cipher_sentence) return ciphertext
python
def encipher_vigenere(plaintext, plain_vocab, key): """Encrypt plain text with given key. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. key (list of Integer): key to encrypt cipher using Vigenere table. Returns: ciphertext (list of Strings): encrypted plain text. """ ciphertext = [] # generate Vigenere table layers = [ ShiftEncryptionLayer(plain_vocab, i) for i in range(len(plain_vocab)) ] for i, sentence in enumerate(plaintext): cipher_sentence = [] for j, character in enumerate(sentence): key_idx = key[j % len(key)] encrypted_char = layers[key_idx].encrypt_character(character) cipher_sentence.append(encrypted_char) ciphertext.append(cipher_sentence) return ciphertext
[ "def", "encipher_vigenere", "(", "plaintext", ",", "plain_vocab", ",", "key", ")", ":", "ciphertext", "=", "[", "]", "# generate Vigenere table", "layers", "=", "[", "ShiftEncryptionLayer", "(", "plain_vocab", ",", "i", ")", "for", "i", "in", "range", "(", "len", "(", "plain_vocab", ")", ")", "]", "for", "i", ",", "sentence", "in", "enumerate", "(", "plaintext", ")", ":", "cipher_sentence", "=", "[", "]", "for", "j", ",", "character", "in", "enumerate", "(", "sentence", ")", ":", "key_idx", "=", "key", "[", "j", "%", "len", "(", "key", ")", "]", "encrypted_char", "=", "layers", "[", "key_idx", "]", ".", "encrypt_character", "(", "character", ")", "cipher_sentence", ".", "append", "(", "encrypted_char", ")", "ciphertext", ".", "append", "(", "cipher_sentence", ")", "return", "ciphertext" ]
Encrypt plain text with given key. Args: plaintext (list of list of Strings): a list of plain text to encrypt. plain_vocab (list of Integer): unique vocabularies being used. key (list of Integer): key to encrypt cipher using Vigenere table. Returns: ciphertext (list of Strings): encrypted plain text.
[ "Encrypt", "plain", "text", "with", "given", "key", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/cipher.py#L203-L228
train
Encipher a list of plain text with given key using Vigenere table.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCV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reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(1621 - 1571) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(707 - 657) + chr(0b110110) + chr(307 - 252), 4479 - 4471), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(416 - 364) + '\065', 56283 - 56275), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1000011 + 0o54) + '\x31' + chr(52) + '\066', 46322 - 46314), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b110001) + chr(0b1010 + 0o51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b10110 + 0o32) + chr(512 - 458), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001010 + 0o45) + chr(0b101001 + 0o10) + '\x36' + chr(0b10000 + 0o44), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11110 + 0o23) + chr(0b110001) + chr(1773 - 1719), 1823 - 1815), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\066' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\x31' + chr(0b110 + 0o52) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(407 - 359) + '\x6f' + chr(0b11010 + 0o27) + chr(1913 - 1864) + chr(0b11 + 0o61), 0o10), ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + chr(51) + chr(0b110110) + '\x30', 21330 - 21322), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + '\062' + chr(54) + chr(2195 - 2140), 8), ehT0Px3KOsy9(chr(1807 - 1759) + chr(0b1101 + 0o142) + chr(0b110011) + '\065' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\x33' + chr(1739 - 1687) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(2296 - 2241), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11688 - 11577) + chr(51) + '\x30', 48366 - 48358), ehT0Px3KOsy9('\x30' + chr(1573 - 1462) + '\x33' + '\066' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b110001) + '\x34' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + chr(55) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(580 - 532) + chr(1696 - 1585) + chr(0b100110 + 0o13) + '\x34' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2226 - 2178) + chr(9225 - 9114) + chr(285 - 234) + '\066' + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(7813 - 7702) + '\x32' + chr(0b110001) + chr(961 - 908), 46232 - 46224), ehT0Px3KOsy9(chr(48) + chr(11281 - 11170) + '\x36' + chr(0b110010 + 0o1), 0o10), ehT0Px3KOsy9(chr(48) + chr(9209 - 9098) + chr(51) + chr(48) + chr(0b110100), 65267 - 65259), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b101100 + 0o7) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1197 - 1148) + chr(0b110001) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b101 + 0o152) + '\064' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(52) + chr(0b11011 + 0o32), 9721 - 9713), ehT0Px3KOsy9(chr(48) + chr(5764 - 5653) + chr(1562 - 1512) + '\060' + chr(460 - 406), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x37' + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1100 + 0o51) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + chr(0b110001) + chr(0b110110) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110110) + chr(51), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(52) + '\x30', 15491 - 15483), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + '\061' + '\x30' + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(0b1011001 + 0o26) + chr(1543 - 1494) + chr(0b110011) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(677 - 625) + '\x35', 57613 - 57605), ehT0Px3KOsy9(chr(48) + chr(111) + '\x34' + chr(86 - 33), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\x35' + chr(0b100100 + 0o14), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), '\x64' + chr(2595 - 2494) + chr(99) + chr(11134 - 11023) + '\144' + chr(0b1100101))('\x75' + chr(116) + chr(102) + chr(1967 - 1922) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def L5B4Y7wduKGW(c2kFQYIhMIWH, W6tZOEHl1hw3, K3J4ZwSlE0sT): e7fdMa8aIQPs = [] sGi5Aql23May = [zBfHWCET8HjJ(W6tZOEHl1hw3, WVxHKyX45z_L) for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(W6tZOEHl1hw3))] for (WVxHKyX45z_L, pamQPTGoym5v) in YlkZvXL8qwsX(c2kFQYIhMIWH): YycNEyVwRZtC = [] for (tlORBuYsiw3X, QlQlF5THQesr) in YlkZvXL8qwsX(pamQPTGoym5v): Vm4id97cbkTv = K3J4ZwSlE0sT[tlORBuYsiw3X % c2A0yzQpDQB3(K3J4ZwSlE0sT)] itZbMNNRQn9k = sGi5Aql23May[Vm4id97cbkTv].encrypt_character(QlQlF5THQesr) xafqLlk3kkUe(YycNEyVwRZtC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xc7U\x03e\xa2'), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(0b1001111 + 0o25) + '\x65')(chr(10954 - 10837) + chr(0b110011 + 0o101) + chr(0b1000101 + 0o41) + '\055' + chr(0b11110 + 0o32)))(itZbMNNRQn9k) xafqLlk3kkUe(e7fdMa8aIQPs, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xc7U\x03e\xa2'), chr(0b1100100) + '\145' + chr(6331 - 6232) + chr(0b1010000 + 0o37) + chr(0b1100100) + chr(101))(chr(3227 - 3110) + '\164' + chr(1905 - 1803) + '\x2d' + chr(0b111000)))(YycNEyVwRZtC) return e7fdMa8aIQPs
tensorflow/tensor2tensor
tensor2tensor/models/research/super_lm.py
_super_stack
def _super_stack(inputs, attention_bias, hparams, mp, padding="LEFT"): """A stack of super_lm layers. Args: inputs: a list of Tensors attention_bias: list of bias Tensor for self-attention (see common_attention.attention_bias()) hparams: hyperparameters for model mp: a Parallelism object padding: a string Returns: y: a list of Tensors extra_loss: an optional scalar """ layers = hparams.layers.strip(",").split(",") moe_hidden_sizes = [int(s) for s in hparams.moe_hidden_sizes.split(",")] if hparams.diet_experts: hsize, = moe_hidden_sizes def _diet_expert(x): return diet.diet_expert(x, hsize, diet.diet_adam_optimizer_params()) expert_fn = _diet_expert else: expert_fn = expert_utils.ffn_expert_fn( hparams.hidden_size, moe_hidden_sizes, hparams.hidden_size) # scaled_dot_product_attention_with_projections uses a 3d attention bias # (no heads), where multihead_attention uses 4d attention bias. attention_bias_3d = mp(tf.squeeze, attention_bias, 1) mix_size = int(hparams.mix_fraction * hparams.hidden_size) accumulator = inputs x = inputs extra_losses = [] for layer_num, layer_type in enumerate(layers): with tf.variable_scope("%s_%d" % (layer_type, layer_num)): tf.logging.info("%s_%d" % (layer_type, layer_num)) if layer_type == "a": # accumulate accumulator = mp(tf.add, x, accumulator) x = accumulator elif layer_type == "n": # normalize x = mp(common_layers.apply_norm, x, hparams.norm_type, hparams.hidden_size, hparams.norm_epsilon) elif layer_type == "d": # dropout x = mp(tf.nn.dropout, x, 1.0 - hparams.layer_prepostprocess_dropout) elif layer_type == "m": # mix across shards def _split(t): return tuple(tf.split( t, [mix_size, hparams.hidden_size - mix_size], 2)) to_mix, to_keep = mp(_split, x) mixed = expert_utils.all_reduce_ring(to_mix, mp) mixed = mp(tf.multiply, mixed, mp.n ** -0.5) x = mp(lambda a, b: tf.concat([a, b], 2), mixed, to_keep) elif layer_type == "att": # single-head attention q = mp(tf.layers.dense, x, hparams.hidden_size, use_bias=False, name="q_transform") x = mp( common_attention.scaled_dot_product_attention_simple, q, x, x, attention_bias_3d) x = mp(tf.layers.dense, x, hparams.hidden_size, use_bias=False, name="o_transform") elif layer_type == "multihead-att": # multi-head attention x = mp( common_attention.multihead_attention, x, None, attention_bias, # bias hparams.multihead_attention_key_channels or hparams.hidden_size, hparams.multihead_attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.multihead_attention_num_heads, hparams.attention_dropout) elif layer_type == "ffn": x = mp( common_layers.dense_relu_dense, x, hparams.filter_size, hparams.hidden_size) elif layer_type == "conv": # convolution x = mp( common_layers.conv1d, x, hparams.hidden_size, hparams.kernel_height, activation=tf.nn.relu, padding=padding, ) elif layer_type == "moe": # mixture of experts - each model shard has its own local MoE. x, loss = mp( expert_utils.local_moe, x, train=hparams.mode == tf.estimator.ModeKeys.TRAIN, expert_fn=expert_fn, num_experts=hparams.moe_num_experts, k=hparams.moe_k, loss_coef=hparams.moe_loss_coef) extra_losses.extend(loss) else: assert False, "unknown sublayer %s" % layer_type if extra_losses: extra_loss = tf.add_n(extra_losses) else: extra_loss = None return x, extra_loss
python
def _super_stack(inputs, attention_bias, hparams, mp, padding="LEFT"): """A stack of super_lm layers. Args: inputs: a list of Tensors attention_bias: list of bias Tensor for self-attention (see common_attention.attention_bias()) hparams: hyperparameters for model mp: a Parallelism object padding: a string Returns: y: a list of Tensors extra_loss: an optional scalar """ layers = hparams.layers.strip(",").split(",") moe_hidden_sizes = [int(s) for s in hparams.moe_hidden_sizes.split(",")] if hparams.diet_experts: hsize, = moe_hidden_sizes def _diet_expert(x): return diet.diet_expert(x, hsize, diet.diet_adam_optimizer_params()) expert_fn = _diet_expert else: expert_fn = expert_utils.ffn_expert_fn( hparams.hidden_size, moe_hidden_sizes, hparams.hidden_size) # scaled_dot_product_attention_with_projections uses a 3d attention bias # (no heads), where multihead_attention uses 4d attention bias. attention_bias_3d = mp(tf.squeeze, attention_bias, 1) mix_size = int(hparams.mix_fraction * hparams.hidden_size) accumulator = inputs x = inputs extra_losses = [] for layer_num, layer_type in enumerate(layers): with tf.variable_scope("%s_%d" % (layer_type, layer_num)): tf.logging.info("%s_%d" % (layer_type, layer_num)) if layer_type == "a": # accumulate accumulator = mp(tf.add, x, accumulator) x = accumulator elif layer_type == "n": # normalize x = mp(common_layers.apply_norm, x, hparams.norm_type, hparams.hidden_size, hparams.norm_epsilon) elif layer_type == "d": # dropout x = mp(tf.nn.dropout, x, 1.0 - hparams.layer_prepostprocess_dropout) elif layer_type == "m": # mix across shards def _split(t): return tuple(tf.split( t, [mix_size, hparams.hidden_size - mix_size], 2)) to_mix, to_keep = mp(_split, x) mixed = expert_utils.all_reduce_ring(to_mix, mp) mixed = mp(tf.multiply, mixed, mp.n ** -0.5) x = mp(lambda a, b: tf.concat([a, b], 2), mixed, to_keep) elif layer_type == "att": # single-head attention q = mp(tf.layers.dense, x, hparams.hidden_size, use_bias=False, name="q_transform") x = mp( common_attention.scaled_dot_product_attention_simple, q, x, x, attention_bias_3d) x = mp(tf.layers.dense, x, hparams.hidden_size, use_bias=False, name="o_transform") elif layer_type == "multihead-att": # multi-head attention x = mp( common_attention.multihead_attention, x, None, attention_bias, # bias hparams.multihead_attention_key_channels or hparams.hidden_size, hparams.multihead_attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.multihead_attention_num_heads, hparams.attention_dropout) elif layer_type == "ffn": x = mp( common_layers.dense_relu_dense, x, hparams.filter_size, hparams.hidden_size) elif layer_type == "conv": # convolution x = mp( common_layers.conv1d, x, hparams.hidden_size, hparams.kernel_height, activation=tf.nn.relu, padding=padding, ) elif layer_type == "moe": # mixture of experts - each model shard has its own local MoE. x, loss = mp( expert_utils.local_moe, x, train=hparams.mode == tf.estimator.ModeKeys.TRAIN, expert_fn=expert_fn, num_experts=hparams.moe_num_experts, k=hparams.moe_k, loss_coef=hparams.moe_loss_coef) extra_losses.extend(loss) else: assert False, "unknown sublayer %s" % layer_type if extra_losses: extra_loss = tf.add_n(extra_losses) else: extra_loss = None return x, extra_loss
[ "def", "_super_stack", "(", "inputs", ",", "attention_bias", ",", "hparams", ",", "mp", ",", "padding", "=", "\"LEFT\"", ")", ":", "layers", "=", "hparams", ".", "layers", ".", "strip", "(", "\",\"", ")", ".", "split", "(", "\",\"", ")", "moe_hidden_sizes", "=", "[", "int", "(", "s", ")", "for", "s", "in", "hparams", ".", "moe_hidden_sizes", ".", "split", "(", "\",\"", ")", "]", "if", "hparams", ".", "diet_experts", ":", "hsize", ",", "=", "moe_hidden_sizes", "def", "_diet_expert", "(", "x", ")", ":", "return", "diet", ".", "diet_expert", "(", "x", ",", "hsize", ",", "diet", ".", "diet_adam_optimizer_params", "(", ")", ")", "expert_fn", "=", "_diet_expert", "else", ":", "expert_fn", "=", "expert_utils", ".", "ffn_expert_fn", "(", "hparams", ".", "hidden_size", ",", "moe_hidden_sizes", ",", "hparams", ".", "hidden_size", ")", "# scaled_dot_product_attention_with_projections uses a 3d attention bias", "# (no heads), where multihead_attention uses 4d attention bias.", "attention_bias_3d", "=", "mp", "(", "tf", ".", "squeeze", ",", "attention_bias", ",", "1", ")", "mix_size", "=", "int", "(", "hparams", ".", "mix_fraction", "*", "hparams", ".", "hidden_size", ")", "accumulator", "=", "inputs", "x", "=", "inputs", "extra_losses", "=", "[", "]", "for", "layer_num", ",", "layer_type", "in", "enumerate", "(", "layers", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"%s_%d\"", "%", "(", "layer_type", ",", "layer_num", ")", ")", ":", "tf", ".", "logging", ".", "info", "(", "\"%s_%d\"", "%", "(", "layer_type", ",", "layer_num", ")", ")", "if", "layer_type", "==", "\"a\"", ":", "# accumulate", "accumulator", "=", "mp", "(", "tf", ".", "add", ",", "x", ",", "accumulator", ")", "x", "=", "accumulator", "elif", "layer_type", "==", "\"n\"", ":", "# normalize", "x", "=", "mp", "(", "common_layers", ".", "apply_norm", ",", "x", ",", "hparams", ".", "norm_type", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "norm_epsilon", ")", "elif", "layer_type", "==", "\"d\"", ":", "# dropout", "x", "=", "mp", "(", "tf", ".", "nn", ".", "dropout", ",", "x", ",", "1.0", "-", "hparams", ".", "layer_prepostprocess_dropout", ")", "elif", "layer_type", "==", "\"m\"", ":", "# mix across shards", "def", "_split", "(", "t", ")", ":", "return", "tuple", "(", "tf", ".", "split", "(", "t", ",", "[", "mix_size", ",", "hparams", ".", "hidden_size", "-", "mix_size", "]", ",", "2", ")", ")", "to_mix", ",", "to_keep", "=", "mp", "(", "_split", ",", "x", ")", "mixed", "=", "expert_utils", ".", "all_reduce_ring", "(", "to_mix", ",", "mp", ")", "mixed", "=", "mp", "(", "tf", ".", "multiply", ",", "mixed", ",", "mp", ".", "n", "**", "-", "0.5", ")", "x", "=", "mp", "(", "lambda", "a", ",", "b", ":", "tf", ".", "concat", "(", "[", "a", ",", "b", "]", ",", "2", ")", ",", "mixed", ",", "to_keep", ")", "elif", "layer_type", "==", "\"att\"", ":", "# single-head attention", "q", "=", "mp", "(", "tf", ".", "layers", ".", "dense", ",", "x", ",", "hparams", ".", "hidden_size", ",", "use_bias", "=", "False", ",", "name", "=", "\"q_transform\"", ")", "x", "=", "mp", "(", "common_attention", ".", "scaled_dot_product_attention_simple", ",", "q", ",", "x", ",", "x", ",", "attention_bias_3d", ")", "x", "=", "mp", "(", "tf", ".", "layers", ".", "dense", ",", "x", ",", "hparams", ".", "hidden_size", ",", "use_bias", "=", "False", ",", "name", "=", "\"o_transform\"", ")", "elif", "layer_type", "==", "\"multihead-att\"", ":", "# multi-head attention", "x", "=", "mp", "(", "common_attention", ".", "multihead_attention", ",", "x", ",", "None", ",", "attention_bias", ",", "# bias", "hparams", ".", "multihead_attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "multihead_attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "multihead_attention_num_heads", ",", "hparams", ".", "attention_dropout", ")", "elif", "layer_type", "==", "\"ffn\"", ":", "x", "=", "mp", "(", "common_layers", ".", "dense_relu_dense", ",", "x", ",", "hparams", ".", "filter_size", ",", "hparams", ".", "hidden_size", ")", "elif", "layer_type", "==", "\"conv\"", ":", "# convolution", "x", "=", "mp", "(", "common_layers", ".", "conv1d", ",", "x", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "kernel_height", ",", "activation", "=", "tf", ".", "nn", ".", "relu", ",", "padding", "=", "padding", ",", ")", "elif", "layer_type", "==", "\"moe\"", ":", "# mixture of experts - each model shard has its own local MoE.", "x", ",", "loss", "=", "mp", "(", "expert_utils", ".", "local_moe", ",", "x", ",", "train", "=", "hparams", ".", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "TRAIN", ",", "expert_fn", "=", "expert_fn", ",", "num_experts", "=", "hparams", ".", "moe_num_experts", ",", "k", "=", "hparams", ".", "moe_k", ",", "loss_coef", "=", "hparams", ".", "moe_loss_coef", ")", "extra_losses", ".", "extend", "(", "loss", ")", "else", ":", "assert", "False", ",", "\"unknown sublayer %s\"", "%", "layer_type", "if", "extra_losses", ":", "extra_loss", "=", "tf", ".", "add_n", "(", "extra_losses", ")", "else", ":", "extra_loss", "=", "None", "return", "x", ",", "extra_loss" ]
A stack of super_lm layers. Args: inputs: a list of Tensors attention_bias: list of bias Tensor for self-attention (see common_attention.attention_bias()) hparams: hyperparameters for model mp: a Parallelism object padding: a string Returns: y: a list of Tensors extra_loss: an optional scalar
[ "A", "stack", "of", "super_lm", "layers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/super_lm.py#L126-L237
train
A stack of super_lm layers.
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('\x30' + '\157' + chr(0b11100 + 0o27) + chr(391 - 342) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2142 - 2092) + chr(451 - 396) + chr(0b101000 + 0o10), 56232 - 56224), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001010 + 0o45) + '\062' + chr(0b101111 + 0o3) + chr(0b110111), 63399 - 63391), ehT0Px3KOsy9(chr(1142 - 1094) + '\x6f' + chr(51) + chr(1441 - 1393) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110111) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1921 - 1873) + chr(111) + chr(49) + chr(54) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(53) + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\x32' + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2824 - 2713) + chr(0b101100 + 0o5) + chr(54) + chr(0b11100 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + '\x31' + '\063' + '\060', 17057 - 17049), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2084 - 2034) + chr(0b11000 + 0o36) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1711 - 1662) + '\067' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(726 - 615) + chr(2232 - 2182) + '\061', 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(11735 - 11624) + chr(0b101010 + 0o15) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(2183 - 2135) + '\157' + '\x31' + '\x31' + chr(1062 - 1007), 0o10), ehT0Px3KOsy9('\060' + chr(11875 - 11764) + chr(0b110010) + chr(2626 - 2573) + '\x36', 10797 - 10789), ehT0Px3KOsy9(chr(48) + chr(3492 - 3381) + chr(0b110001) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1100 + 0o50) + chr(0b110011), 2531 - 2523), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110010) + chr(0b110001 + 0o6) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1499 - 1448) + chr(638 - 589) + chr(50), 8), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b110001) + chr(0b10101 + 0o37) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(422 - 374) + chr(111) + chr(0b1100 + 0o45) + chr(0b110111) + '\x37', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(49) + chr(0b100111 + 0o16), 18367 - 18359), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(51) + chr(0b1 + 0o62), 17970 - 17962), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(50) + chr(48) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + chr(1192 - 1142) + chr(1599 - 1547) + chr(0b100101 + 0o16), 0o10), ehT0Px3KOsy9(chr(497 - 449) + chr(10614 - 10503) + chr(0b110010) + '\065' + chr(252 - 197), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(2295 - 2244) + '\x30', 0b1000), ehT0Px3KOsy9(chr(846 - 798) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(1769 - 1719), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\x31' + chr(0b101000 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o22) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(49) + chr(1267 - 1216) + '\x30', 8), ehT0Px3KOsy9(chr(48) + '\157' + '\065' + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(156 - 106) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(5164 - 5053) + chr(51) + chr(0b100010 + 0o23) + '\066', 9042 - 9034), ehT0Px3KOsy9(chr(1500 - 1452) + '\x6f' + chr(1094 - 1045) + chr(2541 - 2487) + chr(0b1010 + 0o51), 0b1000), ehT0Px3KOsy9(chr(2014 - 1966) + '\157' + chr(1467 - 1416) + chr(0b100 + 0o56) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\064' + chr(0b110011), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(829 - 776) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4'), chr(0b1010011 + 0o21) + '\145' + '\143' + chr(8792 - 8681) + chr(5093 - 4993) + '\145')(chr(1538 - 1421) + '\164' + chr(2652 - 2550) + chr(0b11101 + 0o20) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def hTHY4nHe84pY(vXoupepMtCXU, UqieptimmuCP, n4ljua2gi1Pr, eroBSmBzokO2, TFLseEYASEKG=xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xfd\xd1\x90'), chr(9526 - 9426) + chr(0b10101 + 0o120) + chr(4955 - 4856) + chr(111) + '\144' + chr(0b1011111 + 0o6))(chr(9752 - 9635) + chr(6276 - 6160) + chr(102) + chr(1426 - 1381) + chr(0b10001 + 0o47))): sGi5Aql23May = n4ljua2gi1Pr.layers.strip(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b110010 + 0o75) + '\x64' + chr(101))(chr(13556 - 13439) + chr(10175 - 10059) + '\146' + chr(0b10000 + 0o35) + chr(126 - 70))).split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\055' + chr(0b111000))) GlalSbqmunyH = [ehT0Px3KOsy9(vGrByMSYMp9h) for vGrByMSYMp9h in n4ljua2gi1Pr.moe_hidden_sizes.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6'), '\x64' + chr(0b1100101) + chr(99) + chr(0b110111 + 0o70) + chr(3474 - 3374) + chr(0b1010111 + 0o16))(chr(0b1110101) + '\x74' + chr(785 - 683) + '\x2d' + chr(0b111000)))] if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\xd1\xf2\xb0 \x15P\xe2~\x06U+'), chr(6752 - 6652) + '\x65' + '\143' + chr(7422 - 7311) + '\144' + chr(0b11001 + 0o114))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(0b1110 + 0o52))): (TmzOat7GRz7m,) = GlalSbqmunyH def WsIrLgOaWHlj(OeWW0F1dBPRQ): return xafqLlk3kkUe(o5rDvGm7WZIN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\xd1\xf2\xb0 \x15P\xe2~\x06U'), '\x64' + '\x65' + chr(99) + chr(11090 - 10979) + '\144' + chr(5017 - 4916))('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(1222 - 1166)))(OeWW0F1dBPRQ, TmzOat7GRz7m, xafqLlk3kkUe(o5rDvGm7WZIN, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae\xd1\xf2\xb0 \x11L\xf3v+N(\xc0\x17|V5\xcby|\xce\xab\x10\x1e\xe0\xe8'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(8332 - 8232) + '\x65')(chr(117) + chr(7646 - 7530) + '\146' + chr(45) + chr(0b110001 + 0o7)))()) jezniusvtdPL = WsIrLgOaWHlj else: jezniusvtdPL = mpdtyez0NuRm.ffn_expert_fn(n4ljua2gi1Pr.qzoyXN3kdhDL, GlalSbqmunyH, n4ljua2gi1Pr.qzoyXN3kdhDL) ckbB7szCTihk = eroBSmBzokO2(IDJ2eXGCBCDu.squeeze, UqieptimmuCP, ehT0Px3KOsy9('\x30' + '\157' + '\061', 0b1000)) uPvAnxY9k2e2 = ehT0Px3KOsy9(n4ljua2gi1Pr.mix_fraction * n4ljua2gi1Pr.qzoyXN3kdhDL) dBvMz07v8VLa = vXoupepMtCXU OeWW0F1dBPRQ = vXoupepMtCXU IXh9m4NrxbLg = [] for (zpxP3vO4wNTm, nF24o7I0_Wgs) in YlkZvXL8qwsX(sGi5Aql23May): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xd9\xe5\xad\x1e\x12D\xf7D\x07B7\xc4\x1b'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(9116 - 9016) + '\x65')(chr(0b1110101) + chr(116) + '\146' + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xcb\xc8\xe1\x1b'), chr(9056 - 8956) + chr(101) + '\143' + chr(0b1001111 + 0o40) + '\144' + chr(0b1011111 + 0o6))('\165' + chr(3751 - 3635) + chr(0b1100110) + '\055' + '\x38') % (nF24o7I0_Wgs, zpxP3vO4wNTm)): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99\x8f\xdf\xbc\n\x13O\xa5q\x18{3'), '\144' + chr(8323 - 8222) + chr(99) + chr(5552 - 5441) + '\x64' + chr(101))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xef\xcb\xc8\xe1\x1b'), chr(3200 - 3100) + chr(0b1100101) + chr(0b101 + 0o136) + chr(9363 - 9252) + '\x64' + '\x65')(chr(117) + chr(2781 - 2665) + chr(0b100 + 0o142) + '\x2d' + '\x38') % (nF24o7I0_Wgs, zpxP3vO4wNTm)) if nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(0b1100100) + chr(0b100000 + 0o105) + chr(99) + '\x6f' + chr(100) + chr(1124 - 1023))(chr(0b100000 + 0o125) + chr(0b1110100) + chr(102) + chr(45) + chr(0b1101 + 0o53)): dBvMz07v8VLa = eroBSmBzokO2(IDJ2eXGCBCDu.add, OeWW0F1dBPRQ, dBvMz07v8VLa) OeWW0F1dBPRQ = dBvMz07v8VLa elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4'), chr(2294 - 2194) + chr(0b1000110 + 0o37) + chr(99) + chr(11294 - 11183) + chr(8440 - 8340) + chr(0b1100101))('\x75' + '\164' + chr(0b1010111 + 0o17) + chr(0b101101) + '\x38'): OeWW0F1dBPRQ = eroBSmBzokO2(jSKPaHwSAfVv.apply_norm, OeWW0F1dBPRQ, n4ljua2gi1Pr.LE5Fu6Tcl7nw, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.norm_epsilon) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xae'), '\144' + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(10111 - 10010))(chr(3847 - 3730) + chr(0b1110100) + chr(9980 - 9878) + chr(1104 - 1059) + chr(988 - 932)): OeWW0F1dBPRQ = eroBSmBzokO2(IDJ2eXGCBCDu.nn.ag0mwEgWzjYv, OeWW0F1dBPRQ, 1.0 - n4ljua2gi1Pr.layer_prepostprocess_dropout) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7'), chr(100) + chr(1620 - 1519) + '\143' + chr(1456 - 1345) + chr(100) + '\x65')('\165' + chr(977 - 861) + '\146' + chr(1492 - 1447) + chr(0b111000)): def XpqlogcT1p1Z(YeT3l7JgTbWR): return KNyTy8rYcwji(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\xc8\xfb\xad\x0b'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + chr(2383 - 2283) + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(56)))(YeT3l7JgTbWR, [uPvAnxY9k2e2, xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\xbb\xc2\xf8\xbd'>\x1b\xf9\x7f\x1ce\x14"), chr(8837 - 8737) + chr(0b101101 + 0o70) + '\x63' + chr(0b1101010 + 0o5) + '\144' + '\145')(chr(117) + chr(3827 - 3711) + '\146' + chr(45) + chr(2049 - 1993))) - uPvAnxY9k2e2], ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(186 - 136), 0b1000))) (a9O6Tlex2TXd, jYDMRiI0EWJE) = eroBSmBzokO2(XpqlogcT1p1Z, OeWW0F1dBPRQ) BXuRXwpJNbyN = mpdtyez0NuRm.all_reduce_ring(a9O6Tlex2TXd, eroBSmBzokO2) BXuRXwpJNbyN = eroBSmBzokO2(IDJ2eXGCBCDu.multiply, BXuRXwpJNbyN, eroBSmBzokO2.m1NkCryOw9Bx ** (-0.5)) OeWW0F1dBPRQ = eroBSmBzokO2(lambda XPh1qbAgrPgG, wmN3dvez4qzC: IDJ2eXGCBCDu.concat([XPh1qbAgrPgG, wmN3dvez4qzC], ehT0Px3KOsy9('\x30' + '\x6f' + chr(1341 - 1291), 8)), BXuRXwpJNbyN, jYDMRiI0EWJE) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\xcc\xe3'), chr(100) + chr(0b1100101) + chr(802 - 703) + chr(0b1010000 + 0o37) + chr(100) + chr(7015 - 6914))(chr(0b1011101 + 0o30) + '\x74' + '\x66' + '\055' + chr(0b11010 + 0o36)): WtwjCI_b3w8O = eroBSmBzokO2(IDJ2eXGCBCDu.layers.dense, OeWW0F1dBPRQ, n4ljua2gi1Pr.qzoyXN3kdhDL, use_bias=ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000), 0b1000), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\xe7\xe3\xb6\x1e\x1e[\xf4t\x06L'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1000100 + 0o41))('\x75' + '\164' + '\x66' + chr(1361 - 1316) + chr(1993 - 1937))) OeWW0F1dBPRQ = eroBSmBzokO2(WOnrfm4dlYcf.scaled_dot_product_attention_simple, WtwjCI_b3w8O, OeWW0F1dBPRQ, OeWW0F1dBPRQ, ckbB7szCTihk) OeWW0F1dBPRQ = eroBSmBzokO2(IDJ2eXGCBCDu.layers.dense, OeWW0F1dBPRQ, n4ljua2gi1Pr.qzoyXN3kdhDL, use_bias=ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101101 + 0o3), 8), name=xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xe7\xe3\xb6\x1e\x1e[\xf4t\x06L'), '\x64' + chr(0b1100000 + 0o5) + chr(0b1100011) + chr(0b11110 + 0o121) + chr(741 - 641) + '\x65')(chr(3596 - 3479) + chr(0b111111 + 0o65) + chr(0b1100010 + 0o4) + chr(0b101101) + '\070')) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xcd\xfb\xb0\x16\x18M\xf3\x7fY@,\xc0'), chr(0b1100100) + chr(3489 - 3388) + '\x63' + chr(0b1101111) + chr(0b1100011 + 0o1) + '\x65')(chr(117) + '\164' + chr(1369 - 1267) + '\x2d' + '\070'): OeWW0F1dBPRQ = eroBSmBzokO2(WOnrfm4dlYcf.multihead_attention, OeWW0F1dBPRQ, None, UqieptimmuCP, n4ljua2gi1Pr.multihead_attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.multihead_attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.multihead_attention_num_heads, n4ljua2gi1Pr.attention_dropout) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xde\xf9'), chr(4052 - 3952) + '\x65' + '\x63' + chr(0b1010111 + 0o30) + '\x64' + chr(4102 - 4001))('\165' + '\x74' + chr(3638 - 3536) + chr(1379 - 1334) + chr(56)): OeWW0F1dBPRQ = eroBSmBzokO2(jSKPaHwSAfVv.dense_relu_dense, OeWW0F1dBPRQ, n4ljua2gi1Pr.filter_size, n4ljua2gi1Pr.qzoyXN3kdhDL) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\xd7\xf9\xb2'), chr(6186 - 6086) + chr(0b110111 + 0o56) + chr(0b1100011) + chr(0b110101 + 0o72) + chr(0b1011110 + 0o6) + chr(101))('\x75' + chr(0b100010 + 0o122) + chr(102) + chr(0b101101) + chr(56)): OeWW0F1dBPRQ = eroBSmBzokO2(jSKPaHwSAfVv.conv1d, OeWW0F1dBPRQ, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.kernel_height, activation=IDJ2eXGCBCDu.nn.relu, padding=TFLseEYASEKG) elif nF24o7I0_Wgs == xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xd7\xf2'), chr(0b1010000 + 0o24) + chr(0b1000 + 0o135) + '\x63' + '\157' + chr(7996 - 7896) + chr(0b101000 + 0o75))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(56)): (OeWW0F1dBPRQ, YpO0BcZ6fMsf) = eroBSmBzokO2(mpdtyez0NuRm.local_moe, OeWW0F1dBPRQ, train=n4ljua2gi1Pr.mode == IDJ2eXGCBCDu.estimator.ModeKeys.TRAIN, expert_fn=jezniusvtdPL, num_experts=n4ljua2gi1Pr.r99iQzD4Y8i3, k=n4ljua2gi1Pr.moe_k, loss_coef=n4ljua2gi1Pr.moe_loss_coef) xafqLlk3kkUe(IXh9m4NrxbLg, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf\xc0\xe3\xa1\x11\x14'), chr(100) + chr(0b1000111 + 0o36) + '\143' + '\157' + chr(0b11100 + 0o110) + chr(6379 - 6278))(chr(117) + '\164' + '\146' + chr(45) + chr(0b1000 + 0o60)))(YpO0BcZ6fMsf) else: assert ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf\xd6\xfc\xaa\x10\x07F\xb2h\x01C4\xd5\x07tMo\x8bx'), '\144' + '\x65' + '\143' + '\x6f' + chr(0b1100100) + '\145')(chr(0b110101 + 0o100) + chr(0b1011111 + 0o25) + chr(0b1100110) + '\x2d' + chr(1558 - 1502)) % nF24o7I0_Wgs if IXh9m4NrxbLg: OyYXdGmcLv7F = IDJ2eXGCBCDu.add_n(IXh9m4NrxbLg) else: OyYXdGmcLv7F = None return (OeWW0F1dBPRQ, OyYXdGmcLv7F)
tensorflow/tensor2tensor
tensor2tensor/models/research/super_lm.py
super_lm_base
def super_lm_base(): """Set of hyperparameters.""" hparams = common_hparams.basic_params1() hparams.hidden_size = 512 hparams.moe_hidden_sizes = "512" hparams.batch_size = 16384 hparams.max_length = 0 # All hyperparameters ending in "dropout" are automatically set to 0.0 # when not in training mode. hparams.layer_prepostprocess_dropout = 0.0 hparams.symbol_dropout = 0.1 hparams.add_hparam("attention_dropout", 0.0) hparams.label_smoothing = 0.0 hparams.clip_grad_norm = 0. # i.e. no gradient clipping hparams.optimizer = "Adafactor" hparams.learning_rate_decay_scheme = "noam" hparams.learning_rate = 0.1 hparams.learning_rate_warmup_steps = 8000 hparams.initializer_gain = 1.0 hparams.initializer = "uniform_unit_scaling" hparams.weight_decay = 0.0 hparams.shared_embedding_and_softmax_weights = False hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" # we only want one data shard. hparams.no_data_parallelism = True # bypass the symbol modality so that we can use model parallelism. hparams.bottom = { "inputs": modalities.identity_bottom, "targets": modalities.identity_bottom, } hparams.top = { "targets": modalities.identity_top, } hparams.add_hparam("filter_size", 512) hparams.add_hparam("mix_fraction", 0.5) # attention-related flags hparams.add_hparam("multihead_attention_num_heads", 4) hparams.add_hparam("multihead_attention_key_channels", 0) hparams.add_hparam("multihead_attention_value_channels", 0) hparams.add_hparam("pos", "timing") # timing, none hparams.add_hparam( "layers", ("n,att,m,d,a," "n,ffn,m,d,a,") * 4 + "n,ffn,d") # Number of model shards - each one has separate parameters. # Changing this number invalidates checkpoints. hparams.add_hparam("num_model_shards", 8) hparams.add_hparam("diet_experts", False) return hparams
python
def super_lm_base(): """Set of hyperparameters.""" hparams = common_hparams.basic_params1() hparams.hidden_size = 512 hparams.moe_hidden_sizes = "512" hparams.batch_size = 16384 hparams.max_length = 0 # All hyperparameters ending in "dropout" are automatically set to 0.0 # when not in training mode. hparams.layer_prepostprocess_dropout = 0.0 hparams.symbol_dropout = 0.1 hparams.add_hparam("attention_dropout", 0.0) hparams.label_smoothing = 0.0 hparams.clip_grad_norm = 0. # i.e. no gradient clipping hparams.optimizer = "Adafactor" hparams.learning_rate_decay_scheme = "noam" hparams.learning_rate = 0.1 hparams.learning_rate_warmup_steps = 8000 hparams.initializer_gain = 1.0 hparams.initializer = "uniform_unit_scaling" hparams.weight_decay = 0.0 hparams.shared_embedding_and_softmax_weights = False hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" # we only want one data shard. hparams.no_data_parallelism = True # bypass the symbol modality so that we can use model parallelism. hparams.bottom = { "inputs": modalities.identity_bottom, "targets": modalities.identity_bottom, } hparams.top = { "targets": modalities.identity_top, } hparams.add_hparam("filter_size", 512) hparams.add_hparam("mix_fraction", 0.5) # attention-related flags hparams.add_hparam("multihead_attention_num_heads", 4) hparams.add_hparam("multihead_attention_key_channels", 0) hparams.add_hparam("multihead_attention_value_channels", 0) hparams.add_hparam("pos", "timing") # timing, none hparams.add_hparam( "layers", ("n,att,m,d,a," "n,ffn,m,d,a,") * 4 + "n,ffn,d") # Number of model shards - each one has separate parameters. # Changing this number invalidates checkpoints. hparams.add_hparam("num_model_shards", 8) hparams.add_hparam("diet_experts", False) return hparams
[ "def", "super_lm_base", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "hparams", ".", "hidden_size", "=", "512", "hparams", ".", "moe_hidden_sizes", "=", "\"512\"", "hparams", ".", "batch_size", "=", "16384", "hparams", ".", "max_length", "=", "0", "# All hyperparameters ending in \"dropout\" are automatically set to 0.0", "# when not in training mode.", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.0", "hparams", ".", "symbol_dropout", "=", "0.1", "hparams", ".", "add_hparam", "(", "\"attention_dropout\"", ",", "0.0", ")", "hparams", ".", "label_smoothing", "=", "0.0", "hparams", ".", "clip_grad_norm", "=", "0.", "# i.e. no gradient clipping", "hparams", ".", "optimizer", "=", "\"Adafactor\"", "hparams", ".", "learning_rate_decay_scheme", "=", "\"noam\"", "hparams", ".", "learning_rate", "=", "0.1", "hparams", ".", "learning_rate_warmup_steps", "=", "8000", "hparams", ".", "initializer_gain", "=", "1.0", "hparams", ".", "initializer", "=", "\"uniform_unit_scaling\"", "hparams", ".", "weight_decay", "=", "0.0", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "False", "hparams", ".", "layer_preprocess_sequence", "=", "\"n\"", "hparams", ".", "layer_postprocess_sequence", "=", "\"da\"", "# we only want one data shard.", "hparams", ".", "no_data_parallelism", "=", "True", "# bypass the symbol modality so that we can use model parallelism.", "hparams", ".", "bottom", "=", "{", "\"inputs\"", ":", "modalities", ".", "identity_bottom", ",", "\"targets\"", ":", "modalities", ".", "identity_bottom", ",", "}", "hparams", ".", "top", "=", "{", "\"targets\"", ":", "modalities", ".", "identity_top", ",", "}", "hparams", ".", "add_hparam", "(", "\"filter_size\"", ",", "512", ")", "hparams", ".", "add_hparam", "(", "\"mix_fraction\"", ",", "0.5", ")", "# attention-related flags", "hparams", ".", "add_hparam", "(", "\"multihead_attention_num_heads\"", ",", "4", ")", "hparams", ".", "add_hparam", "(", "\"multihead_attention_key_channels\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"multihead_attention_value_channels\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"pos\"", ",", "\"timing\"", ")", "# timing, none", "hparams", ".", "add_hparam", "(", "\"layers\"", ",", "(", "\"n,att,m,d,a,\"", "\"n,ffn,m,d,a,\"", ")", "*", "4", "+", "\"n,ffn,d\"", ")", "# Number of model shards - each one has separate parameters.", "# Changing this number invalidates checkpoints.", "hparams", ".", "add_hparam", "(", "\"num_model_shards\"", ",", "8", ")", "hparams", ".", "add_hparam", "(", "\"diet_experts\"", ",", "False", ")", "return", "hparams" ]
Set of hyperparameters.
[ "Set", "of", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/super_lm.py#L241-L288
train
Set of hyperparameters for super - lm model.
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('\060' + chr(0b1101111) + chr(51) + chr(51) + chr(0b1111 + 0o45), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b110 + 0o54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1549 - 1498) + chr(50) + chr(857 - 802), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b10110 + 0o41) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(54) + chr(594 - 542), 49196 - 49188), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(487 - 436) + '\066' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x31' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2484 - 2434) + '\061' + '\064', 12013 - 12005), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b1011 + 0o52) + chr(369 - 315), 51202 - 51194), ehT0Px3KOsy9('\x30' + chr(5647 - 5536) + chr(0b101 + 0o56) + chr(514 - 466) + chr(0b101011 + 0o11), 24837 - 24829), ehT0Px3KOsy9(chr(0b110000) + chr(10179 - 10068) + chr(1224 - 1172) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + '\065' + '\060', 0b1000), ehT0Px3KOsy9(chr(258 - 210) + chr(2572 - 2461) + chr(0b110110) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(53) + '\065', 54412 - 54404), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\x30' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + chr(0b100111 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(49) + chr(0b10010 + 0o43), 8), ehT0Px3KOsy9(chr(1754 - 1706) + '\x6f' + chr(87 - 37) + chr(0b110010) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\062' + '\x37' + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001111 + 0o40) + chr(0b11110 + 0o24) + chr(2686 - 2631) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b101101 + 0o102) + chr(2133 - 2082) + chr(1219 - 1171) + '\x34', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x37' + chr(0b10001 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + chr(0b100001 + 0o26) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(674 - 626) + '\x6f' + chr(1507 - 1457) + chr(0b100000 + 0o22) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100 + 0o55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11124 - 11013) + chr(695 - 645) + '\x34' + chr(0b110111), 39852 - 39844), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b10101 + 0o40) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b110000 + 0o5) + '\061', 0b1000), ehT0Px3KOsy9(chr(48 - 0) + chr(11307 - 11196) + chr(1918 - 1868) + chr(51) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\062' + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(11965 - 11854) + chr(0b101110 + 0o4) + chr(48) + chr(533 - 484), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\067' + chr(1328 - 1280), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(53), 8), ehT0Px3KOsy9(chr(712 - 664) + chr(0b1001 + 0o146) + '\x37' + chr(0b110100), 12073 - 12065), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1001 + 0o52) + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + chr(1622 - 1572) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(0b10101 + 0o34) + chr(828 - 776) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(2123 - 2074) + '\x31', 47731 - 47723), ehT0Px3KOsy9('\060' + chr(1110 - 999) + '\063' + '\x30' + '\x33', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(53) + '\060', 12311 - 12303)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2'), chr(0b1100100) + chr(0b110101 + 0o60) + chr(3350 - 3251) + '\157' + chr(0b1100100) + '\x65')(chr(10116 - 9999) + '\164' + chr(0b101010 + 0o74) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def cqHqY9CodSG4(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9('\x30' + chr(8069 - 7958) + '\061' + '\060' + chr(0b110000) + chr(0b0 + 0o60), 0o10) n4ljua2gi1Pr.GlalSbqmunyH = xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\xd3\xe5'), chr(3186 - 3086) + '\x65' + '\x63' + chr(7399 - 7288) + chr(100) + chr(0b100010 + 0o103))('\165' + chr(0b1001101 + 0o47) + chr(0b1100110) + '\055' + '\x38') n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b110000) + chr(4635 - 4524) + '\064' + chr(1637 - 1589) + '\060' + chr(0b101100 + 0o4) + '\x30', 0b1000) n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100 + 0o54), 8) n4ljua2gi1Pr.RW_xSzp18UeS = 0.0 n4ljua2gi1Pr.ycYLHKnRG3mu = 0.1 xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), '\x64' + chr(0b1100101) + chr(0b10011 + 0o120) + chr(7389 - 7278) + chr(8030 - 7930) + chr(0b1100101))(chr(117) + chr(12568 - 12452) + chr(0b100000 + 0o106) + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x96\xa3\xd8\x1a\x83\xe4\xe3\x80\x9b@\x9aX],uh'), chr(0b100010 + 0o102) + chr(101) + '\x63' + chr(0b1101001 + 0o6) + chr(100) + chr(101))(chr(117) + '\x74' + chr(8661 - 8559) + chr(0b10000 + 0o35) + chr(56)), 0.0) n4ljua2gi1Pr.FSjUgdaczzRk = 0.0 n4ljua2gi1Pr.SdNSZNVkVjLh = 0.0 n4ljua2gi1Pr.XdKNcYRObPK3 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d\x86\xb6\xdb\x15\x94\xf9\xe3\x9c'), chr(100) + chr(0b1100101) + chr(4765 - 4666) + chr(111) + chr(0b1001000 + 0o34) + chr(0b1000100 + 0o41))(chr(0b1110101) + chr(10586 - 10470) + chr(6201 - 6099) + chr(45) + '\070') n4ljua2gi1Pr.v3ZnJE9Hdub1 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x8d\xb6\xd0'), chr(100) + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(8863 - 8762))(chr(117) + chr(1757 - 1641) + chr(0b1100110) + chr(653 - 608) + chr(336 - 280)) n4ljua2gi1Pr.QGSIpd_yUNzU = 0.1 n4ljua2gi1Pr.fHyhoyGmdvM9 = ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110111) + chr(0b110101) + chr(1884 - 1836) + chr(0b110000), 49823 - 49815) n4ljua2gi1Pr.S1SbCBXLapw8 = 1.0 n4ljua2gi1Pr.kwfuYzkY5C57 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\x8c\xbe\xdb\x1b\x85\xe0\xd3\x9b\xaaM\x9ch^ ap\xe4\xfc\xdd'), chr(354 - 254) + chr(0b1100101 + 0o0) + chr(0b1100011) + chr(336 - 225) + chr(0b1100100) + chr(8264 - 8163))(chr(0b1110101) + '\x74' + chr(5971 - 5869) + chr(0b101101) + chr(0b111000)) n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0 n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9('\x30' + chr(7904 - 7793) + chr(0b110000), 8) n4ljua2gi1Pr.WjY1aZ7lwLOu = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2'), '\144' + chr(0b1001000 + 0o35) + '\143' + chr(0b1101111) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1011000 + 0o34) + '\146' + chr(1503 - 1458) + chr(56)) n4ljua2gi1Pr.s6T_PoakASTI = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\x83'), '\144' + chr(101) + chr(6743 - 6644) + chr(0b1101111) + '\144' + chr(8082 - 7981))(chr(12561 - 12444) + chr(0b1101110 + 0o6) + chr(0b1100110) + chr(157 - 112) + chr(452 - 396)) n4ljua2gi1Pr.ahN6YYm9NJTr = ehT0Px3KOsy9(chr(48) + chr(5103 - 4992) + chr(49), 8) n4ljua2gi1Pr.kXxsZxlIQUSQ = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\x8c\xa7\xc8\x00\x84'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1000100 + 0o42) + chr(0b1111 + 0o36) + chr(56)): PuPeNl0CuqOQ.identity_bottom, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x83\xa5\xda\x11\x83\xfe'), chr(100) + '\145' + '\143' + '\157' + chr(0b1100100) + '\145')(chr(0b1010111 + 0o36) + chr(0b1001101 + 0o47) + '\x66' + '\x2d' + chr(0b111000)): PuPeNl0CuqOQ.identity_bottom} n4ljua2gi1Pr.qxrVBjeryNEZ = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x83\xa5\xda\x11\x83\xfe'), chr(268 - 168) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1000 + 0o135))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)): PuPeNl0CuqOQ.identity_top} xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), '\x64' + '\x65' + chr(99) + '\157' + chr(590 - 490) + '\145')(chr(0b1110101) + chr(116) + '\x66' + chr(1475 - 1430) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\x8b\xbb\xc9\x11\x85\xd2\xff\x87\xbeA'), chr(0b1100100) + chr(0b101110 + 0o67) + '\x63' + chr(111) + '\x64' + chr(0b1100101))(chr(6873 - 6756) + chr(116) + chr(0b1100110) + '\055' + chr(0b1100 + 0o54)), ehT0Px3KOsy9(chr(48) + chr(5561 - 5450) + chr(1630 - 1581) + '\060' + chr(48) + chr(0b110000), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), chr(100) + chr(5961 - 5860) + chr(9429 - 9330) + '\157' + chr(100) + chr(101))('\x75' + chr(0b1110100) + chr(7688 - 7586) + chr(0b101101) + chr(0b10011 + 0o45)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x8b\xaf\xe2\x12\x85\xec\xef\x9a\xadK\x86'), chr(100) + chr(101) + chr(841 - 742) + chr(111) + chr(100) + '\145')(chr(0b1010110 + 0o37) + chr(0b1110100) + chr(0b10100 + 0o122) + '\x2d' + chr(56)), 0.5) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(0b111 + 0o61)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x97\xbb\xc9\x1d\x9f\xe8\xed\x8a\x9bE\x9cCH-tu\xe2\xfc\xe5\xd4\xb1\x14g\xf8d\xc6\x89Z'), chr(0b1011011 + 0o11) + chr(0b100011 + 0o102) + chr(99) + '\157' + chr(6969 - 6869) + '\145')('\x75' + chr(116) + chr(102) + '\x2d' + '\070'), ehT0Px3KOsy9('\060' + '\157' + '\x34', 0b1000)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), '\x64' + '\145' + '\x63' + chr(0b1000001 + 0o56) + '\x64' + '\145')(chr(0b1101001 + 0o14) + chr(116) + '\x66' + chr(0b11011 + 0o22) + chr(0b101100 + 0o14)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x97\xbb\xc9\x1d\x9f\xe8\xed\x8a\x9bE\x9cCH-tu\xe2\xfc\xe5\xd1\xa1\x00g\xf3i\xc6\x83G\xff\xb9\xf2'), chr(0b1100100) + chr(0b111010 + 0o53) + '\143' + chr(0b1101111) + chr(3318 - 3218) + chr(7149 - 7048))('\165' + chr(116) + chr(102) + chr(45) + '\x38'), ehT0Px3KOsy9(chr(48) + '\157' + chr(48), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), chr(100) + chr(0b1011101 + 0o10) + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(12773 - 12656) + chr(6584 - 6468) + chr(9725 - 9623) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x97\xbb\xc9\x1d\x9f\xe8\xed\x8a\x9bE\x9cCH-tu\xe2\xfc\xe5\xcc\xa5\x15M\xf5^\xc4\x85H\xf4\xbb\xe4T^'), chr(0b1100100) + chr(7962 - 7861) + '\143' + '\157' + chr(0b10000 + 0o124) + '\145')('\165' + chr(0b1110100) + chr(5084 - 4982) + chr(0b100 + 0o51) + '\x38'), ehT0Px3KOsy9(chr(206 - 158) + chr(10037 - 9926) + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), chr(0b101010 + 0o72) + chr(101) + '\143' + chr(3152 - 3041) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(9048 - 8932) + chr(6325 - 6223) + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\x8d\xa4'), chr(4057 - 3957) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(4942 - 4841))('\x75' + chr(3655 - 3539) + chr(8231 - 8129) + '\055' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x8b\xba\xd4\x1a\x90'), chr(0b1011000 + 0o14) + '\145' + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(12133 - 12016) + '\164' + chr(0b1100110) + '\x2d' + '\070')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), chr(3602 - 3502) + chr(101) + chr(99) + chr(0b1011001 + 0o26) + '\144' + '\x65')(chr(11468 - 11351) + chr(116) + chr(102) + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\x83\xae\xd8\x06\x84'), chr(0b110110 + 0o56) + '\x65' + chr(99) + chr(11847 - 11736) + chr(100) + chr(6524 - 6423))(chr(0b11100 + 0o131) + chr(116) + '\x66' + chr(0b1001 + 0o44) + chr(0b101011 + 0o15)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xce\xb6\xc9\x00\xdb\xe0\xa0\x8a\xe8E\xc4Y\x01%fr\xa1\xff\x96\xde\xe8\x18\x14'), '\144' + '\145' + '\143' + '\157' + chr(0b1 + 0o143) + chr(0b1100101))('\165' + chr(0b1000001 + 0o63) + '\146' + '\x2d' + chr(1663 - 1607)) * ehT0Px3KOsy9('\x30' + chr(111) + chr(52), 8) + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xce\xb1\xdb\x1a\xdb\xe9'), '\144' + chr(0b1100000 + 0o5) + chr(2098 - 1999) + chr(0b1101111) + chr(0b1100100) + chr(3887 - 3786))('\165' + chr(0b1010000 + 0o44) + chr(0b1100110) + chr(579 - 534) + chr(2076 - 2020))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), chr(0b1100010 + 0o2) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')('\165' + chr(116) + '\146' + chr(1735 - 1690) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xb2\x97\xba\xe2\x19\x98\xe9\xe9\x82\x9bW\x80V_'s"), chr(0b10101 + 0o117) + chr(0b1100101) + chr(8002 - 7903) + '\x6f' + chr(0b10 + 0o142) + '\145')(chr(1151 - 1034) + chr(0b1110100) + chr(102) + chr(45) + chr(1761 - 1705)), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + chr(1353 - 1304) + chr(48), 0b1000)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x86\xb3\xe2\x1c\x87\xec\xfe\x8f\xa9'), '\144' + chr(0b1100101) + chr(99) + chr(111) + '\x64' + '\145')(chr(0b1011010 + 0o33) + chr(116) + chr(102) + chr(45) + chr(1286 - 1230)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\x8b\xb2\xc9+\x92\xf5\xfc\x8b\xb6P\x9b'), chr(0b101111 + 0o65) + chr(5658 - 5557) + chr(99) + chr(1089 - 978) + '\x64' + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(56)), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x30', 8)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/super_lm.py
super_lm_moe
def super_lm_moe(): """Add mixture of experts with ~1B params.""" hparams = super_lm_base() hparams.layers = ( ("n,att,m,d,a," "n,moe,m,d,a,") * 4 + "n,ffn,d") hparams.moe_num_experts = 32 hparams.moe_hidden_sizes = "1024" return hparams
python
def super_lm_moe(): """Add mixture of experts with ~1B params.""" hparams = super_lm_base() hparams.layers = ( ("n,att,m,d,a," "n,moe,m,d,a,") * 4 + "n,ffn,d") hparams.moe_num_experts = 32 hparams.moe_hidden_sizes = "1024" return hparams
[ "def", "super_lm_moe", "(", ")", ":", "hparams", "=", "super_lm_base", "(", ")", "hparams", ".", "layers", "=", "(", "(", "\"n,att,m,d,a,\"", "\"n,moe,m,d,a,\"", ")", "*", "4", "+", "\"n,ffn,d\"", ")", "hparams", ".", "moe_num_experts", "=", "32", "hparams", ".", "moe_hidden_sizes", "=", "\"1024\"", "return", "hparams" ]
Add mixture of experts with ~1B params.
[ "Add", "mixture", "of", "experts", "with", "~1B", "params", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/super_lm.py#L334-L341
train
Add mixture of experts with ~1B 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,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dt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ammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(9910 - 9799) + chr(0b110010) + chr(50) + chr(2218 - 2167), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(896 - 845) + '\064' + chr(347 - 296), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(12305 - 12194) + chr(49) + '\x36' + chr(0b1001 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010010 + 0o35) + chr(1767 - 1716) + chr(48) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + '\x33' + '\x31' + chr(0b110001), 10243 - 10235), ehT0Px3KOsy9(chr(0b110000) + chr(747 - 636) + chr(0b110001) + chr(375 - 321) + chr(0b110111), 61465 - 61457), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(55) + '\064', 38850 - 38842), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b110101) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11111 + 0o22) + chr(926 - 872) + chr(55), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101100 + 0o6) + chr(53) + '\066', 18159 - 18151), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(422 - 372) + '\064' + '\063', 20096 - 20088), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b11010 + 0o30) + chr(0b110110) + '\062', 35162 - 35154), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + chr(0b11100 + 0o27) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b0 + 0o157) + '\061' + '\x30' + chr(0b1 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(1861 - 1813) + chr(111) + chr(0b101011 + 0o6) + chr(0b101101 + 0o5) + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(0b11000 + 0o127) + chr(50) + chr(0b100011 + 0o20) + '\064', 0o10), ehT0Px3KOsy9(chr(1878 - 1830) + '\157' + chr(0b110010) + chr(54) + chr(0b110010), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(1395 - 1346) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11749 - 11638) + chr(2123 - 2073) + chr(1338 - 1285) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1027 - 979) + '\x6f' + '\063' + '\x33' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\x31' + chr(1326 - 1277), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101 + 0o57) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11000 + 0o32) + chr(439 - 386) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(86 - 31) + chr(0b110011), 23901 - 23893), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b110100) + chr(0b100000 + 0o21), 43679 - 43671), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(2165 - 2110) + '\067', 29152 - 29144), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11100 + 0o27) + '\x35' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110100) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(50) + chr(0b110101) + chr(51), 0o10), ehT0Px3KOsy9(chr(1620 - 1572) + chr(0b101010 + 0o105) + chr(464 - 409) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(0b110001 + 0o76) + chr(0b100011 + 0o16) + chr(180 - 129) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1101 + 0o44) + chr(55) + chr(0b110010), 57086 - 57078), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(111) + '\061' + chr(0b101010 + 0o12) + '\x34', 25547 - 25539), ehT0Px3KOsy9(chr(1314 - 1266) + chr(111) + chr(0b100110 + 0o20) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1142 - 1091) + chr(0b110101) + chr(0b11 + 0o62), 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b101011 + 0o104) + chr(2095 - 2045) + chr(0b110011 + 0o4) + chr(0b110110), 23672 - 23664), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011 + 0o0) + chr(0b110001) + chr(0b110010 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(359 - 311) + chr(3171 - 3060) + '\062' + chr(53) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(51) + chr(0b10 + 0o56), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd'), chr(1280 - 1180) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1001000 + 0o55) + chr(10052 - 9936) + chr(8059 - 7957) + chr(264 - 219) + chr(1947 - 1891)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def i3qTqYMNS6TZ(): n4ljua2gi1Pr = cqHqY9CodSG4() n4ljua2gi1Pr.sGi5Aql23May = xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\xcf\x15\xb3\xbd[\xd1\x84\x13\x82\xc2\x9eui?\xf3\xd7b\xc0\xf0\xad\x0c\xce\x17'), chr(100) + chr(0b111100 + 0o51) + chr(3947 - 3848) + chr(0b1001001 + 0o46) + chr(100) + '\145')(chr(0b1110101) + chr(0b100 + 0o160) + chr(9815 - 9713) + chr(0b11101 + 0o20) + chr(0b10101 + 0o43)) * ehT0Px3KOsy9(chr(0b110000) + chr(8390 - 8279) + chr(802 - 750), 8450 - 8442) + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\xcf\x12\xa1\xa7[\xd8'), chr(2785 - 2685) + chr(0b100101 + 0o100) + chr(0b1100011) + chr(0b1011111 + 0o20) + chr(100) + chr(3057 - 2956))(chr(117) + '\x74' + '\146' + chr(0b101101) + chr(1798 - 1742)) n4ljua2gi1Pr.r99iQzD4Y8i3 = ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100110 + 0o16) + '\x30', 8) n4ljua2gi1Pr.GlalSbqmunyH = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xd3F\xf3'), chr(100) + chr(101) + chr(0b100011 + 0o100) + '\157' + chr(100) + chr(4266 - 4165))(chr(0b1110101) + chr(0b1010000 + 0o44) + chr(102) + '\055' + chr(0b11111 + 0o31)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_tr_dense_2k
def xmoe_tr_dense_2k(): """Series of architectural experiments on Translation. # run on 8-core setup 119M params, einsum=0.95e13 Returns: a hparams """ hparams = mtf_transformer2.mtf_bitransformer_base() hparams.encoder_layers = ["self_att", "drd"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "drd"] * 4 hparams.batch_size = 64 hparams.shared_embedding_and_softmax_weights = True hparams.mesh_shape = "batch:8" return hparams
python
def xmoe_tr_dense_2k(): """Series of architectural experiments on Translation. # run on 8-core setup 119M params, einsum=0.95e13 Returns: a hparams """ hparams = mtf_transformer2.mtf_bitransformer_base() hparams.encoder_layers = ["self_att", "drd"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "drd"] * 4 hparams.batch_size = 64 hparams.shared_embedding_and_softmax_weights = True hparams.mesh_shape = "batch:8" return hparams
[ "def", "xmoe_tr_dense_2k", "(", ")", ":", "hparams", "=", "mtf_transformer2", ".", "mtf_bitransformer_base", "(", ")", "hparams", ".", "encoder_layers", "=", "[", "\"self_att\"", ",", "\"drd\"", "]", "*", "4", "hparams", ".", "decoder_layers", "=", "[", "\"self_att\"", ",", "\"enc_att\"", ",", "\"drd\"", "]", "*", "4", "hparams", ".", "batch_size", "=", "64", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "True", "hparams", ".", "mesh_shape", "=", "\"batch:8\"", "return", "hparams" ]
Series of architectural experiments on Translation. # run on 8-core setup 119M params, einsum=0.95e13 Returns: a hparams
[ "Series", "of", "architectural", "experiments", "on", "Translation", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L30-L46
train
Series of architectural experiments on Translation.
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,RQ6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l3EEEj,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) + '\x34' + '\x31', 51581 - 51573), ehT0Px3KOsy9('\x30' + chr(111) + chr(1675 - 1624) + chr(0b100010 + 0o21) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\x33' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + chr(0b11010 + 0o33), 34643 - 34635), ehT0Px3KOsy9(chr(48) + '\157' + chr(2232 - 2182) + chr(2573 - 2521) + '\060', 15954 - 15946), ehT0Px3KOsy9(chr(111 - 63) + '\x6f' + '\066' + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(10482 - 10371) + chr(0b110001 + 0o0) + '\x34' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(482 - 428), 4305 - 4297), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + '\x35' + chr(0b101100 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(48) + '\x30', 37932 - 37924), ehT0Px3KOsy9(chr(1353 - 1305) + '\157' + '\x33' + chr(0b11010 + 0o30) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x36' + chr(50), 16432 - 16424), ehT0Px3KOsy9(chr(274 - 226) + chr(5039 - 4928) + chr(51) + chr(50) + chr(1039 - 986), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110011) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\060' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1222 - 1171) + '\060' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(2991 - 2880) + chr(1563 - 1508) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110000) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b10000 + 0o45) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + '\x32' + '\060' + chr(0b110000), 8), ehT0Px3KOsy9(chr(1375 - 1327) + chr(0b100110 + 0o111) + '\x33' + chr(54), 21930 - 21922), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\062' + chr(51) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101 + 0o152) + chr(82 - 31) + chr(0b110100) + chr(54), 45191 - 45183), ehT0Px3KOsy9(chr(0b110000) + chr(2335 - 2224) + chr(0b0 + 0o61) + chr(0b110010) + chr(108 - 54), 0o10), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(49) + chr(1059 - 1010) + chr(0b101010 + 0o15), 0o10), ehT0Px3KOsy9('\x30' + chr(10645 - 10534) + chr(0b110000 + 0o3) + chr(0b11001 + 0o33) + chr(0b1101 + 0o45), 2922 - 2914), ehT0Px3KOsy9(chr(955 - 907) + chr(5044 - 4933) + chr(0b110010) + chr(2375 - 2322) + chr(0b1111 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2328 - 2279) + '\061' + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101110 + 0o3) + chr(51) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2275 - 2226) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\067' + chr(0b1000 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(0b11001 + 0o31) + '\064' + chr(0b110111), 20423 - 20415), ehT0Px3KOsy9(chr(1424 - 1376) + '\x6f' + '\x32' + chr(51) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1387 - 1339) + chr(5873 - 5762) + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b101010 + 0o12) + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9(chr(2136 - 2088) + chr(111) + '\063' + chr(0b1111 + 0o41) + chr(0b1111 + 0o42), 0b1000), ehT0Px3KOsy9(chr(643 - 595) + chr(0b1101111) + chr(0b10011 + 0o40) + chr(0b110001) + chr(0b110100 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(54) + chr(50), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(8197 - 8086) + chr(0b110 + 0o53) + '\x33' + '\x33', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f'), chr(9886 - 9786) + '\x65' + chr(0b1100011) + chr(111) + chr(2243 - 2143) + '\x65')(chr(117) + chr(2656 - 2540) + chr(0b1100110 + 0o0) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Fb3xc2kvtjkm(): n4ljua2gi1Pr = KRlzou_1VboM.mtf_bitransformer_base() n4ljua2gi1Pr.pbeC7au6N1jQ = [xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb8\xf2K\xffS\x16z'), chr(9643 - 9543) + chr(101) + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(1078 - 961) + chr(11974 - 11858) + chr(8687 - 8585) + chr(1777 - 1732) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'E\xaf\xfa'), chr(7674 - 7574) + '\x65' + chr(0b1100011) + chr(0b1011110 + 0o21) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(9515 - 9413) + '\x2d' + chr(56))] * ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(70 - 18), 0o10) n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'R\xb8\xf2K\xffS\x16z'), '\144' + chr(101) + chr(0b1100011) + chr(0b100111 + 0o110) + '\144' + '\145')(chr(0b1110101) + '\x74' + chr(0b1011011 + 0o13) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb3\xfdr\xc1F\x16'), '\x64' + chr(0b1100101) + chr(522 - 423) + chr(111) + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(0b100000 + 0o125) + '\x74' + '\146' + chr(1520 - 1475) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'E\xaf\xfa'), chr(4965 - 4865) + chr(0b1100101) + chr(0b1100011) + chr(0b11111 + 0o120) + chr(1729 - 1629) + '\x65')(chr(0b1001100 + 0o51) + chr(116) + chr(0b1100110) + chr(0b11001 + 0o24) + chr(0b100000 + 0o30))] * ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\x34', 8) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b110000) + chr(0b110000), 0b1000) n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9(chr(48) + chr(111) + chr(49), ord("\x08")) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'C\xbc\xeaN\xc8\x08Z'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\x64' + chr(101))(chr(2594 - 2477) + chr(2865 - 2749) + chr(5019 - 4917) + '\055' + '\070') return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_tr_1d
def xmoe_tr_1d(): """Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams """ hparams = xmoe_tr_dense_2k() hparams.encoder_layers = ["self_att", "moe_1d"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "moe_1d"] * 4 hparams.layout = "batch:batch;experts:batch" hparams.moe_hidden_size = 2048 hparams.moe_num_experts = 16 return hparams
python
def xmoe_tr_1d(): """Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams """ hparams = xmoe_tr_dense_2k() hparams.encoder_layers = ["self_att", "moe_1d"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "moe_1d"] * 4 hparams.layout = "batch:batch;experts:batch" hparams.moe_hidden_size = 2048 hparams.moe_num_experts = 16 return hparams
[ "def", "xmoe_tr_1d", "(", ")", ":", "hparams", "=", "xmoe_tr_dense_2k", "(", ")", "hparams", ".", "encoder_layers", "=", "[", "\"self_att\"", ",", "\"moe_1d\"", "]", "*", "4", "hparams", ".", "decoder_layers", "=", "[", "\"self_att\"", ",", "\"enc_att\"", ",", "\"moe_1d\"", "]", "*", "4", "hparams", ".", "layout", "=", "\"batch:batch;experts:batch\"", "hparams", ".", "moe_hidden_size", "=", "2048", "hparams", ".", "moe_num_experts", "=", "16", "return", "hparams" ]
Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams
[ "Mixture", "of", "experts", "(", "16", "experts", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L64-L79
train
Mixture of experts. 623M Params einsum = 1.09e13
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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bl9sLammpH,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(0b101011 + 0o5) + '\157' + chr(0b10011 + 0o40) + '\x34' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(51) + chr(0b110001) + chr(0b10100 + 0o34), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\x34' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(740 - 692) + chr(771 - 660) + chr(0b110101) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b11011 + 0o33) + chr(0b100111 + 0o12), 0b1000), ehT0Px3KOsy9('\060' + chr(961 - 850) + chr(2005 - 1956) + chr(48) + '\x37', 43978 - 43970), ehT0Px3KOsy9(chr(748 - 700) + chr(0b1101111) + chr(2309 - 2259) + chr(0b110000) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b0 + 0o157) + chr(2140 - 2089) + '\065', 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(0b110001) + chr(0b100011 + 0o23) + chr(2296 - 2242), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(821 - 772) + chr(0b110011) + chr(0b110011), 30636 - 30628), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + chr(51) + '\060' + chr(0b10011 + 0o40), 15093 - 15085), ehT0Px3KOsy9(chr(0b110000) + chr(0b110000 + 0o77) + chr(364 - 313) + chr(52) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5021 - 4910) + chr(1590 - 1541) + chr(0b1100 + 0o44) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(797 - 749) + chr(3024 - 2913) + chr(0b110011) + chr(0b110110) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(49) + chr(51) + chr(0b11000 + 0o30), 0b1000), ehT0Px3KOsy9('\060' + chr(8971 - 8860) + '\064' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(2526 - 2472) + chr(0b10110 + 0o35), 33019 - 33011), ehT0Px3KOsy9(chr(861 - 813) + '\157' + '\062' + chr(0b110111) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\063' + chr(2006 - 1956), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1 + 0o156) + chr(820 - 770) + '\x36' + chr(1206 - 1153), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11010 + 0o31) + '\x35' + chr(2443 - 2391), 27492 - 27484), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x35' + chr(0b110 + 0o53), 58329 - 58321), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100011 + 0o23) + chr(0b1000 + 0o54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(50) + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(843 - 793) + chr(0b101100 + 0o5) + chr(0b101001 + 0o13), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x36' + chr(0b1101 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + '\065', 55270 - 55262), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110001) + '\x34' + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011111 + 0o20) + '\x33' + chr(0b1110 + 0o47) + chr(0b100000 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1529 - 1479) + chr(0b100011 + 0o20) + chr(654 - 605), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(2066 - 2017) + chr(0b110101) + chr(0b101110 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(6109 - 5998) + chr(0b110001) + chr(763 - 714) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(55) + chr(0b101010 + 0o14), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(50) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\065' + chr(78 - 24), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b10001 + 0o136) + '\x31' + '\x34' + '\062', 0o10), ehT0Px3KOsy9(chr(1040 - 992) + '\157' + '\065' + chr(0b11001 + 0o32), 57330 - 57322), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110 + 0o52) + '\063', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(0b110100) + chr(48), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1216 - 1168) + chr(111) + chr(53) + chr(1212 - 1164), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), '\x64' + chr(9112 - 9011) + chr(99) + '\157' + chr(1975 - 1875) + chr(8028 - 7927))(chr(0b1110101) + chr(0b111110 + 0o66) + chr(0b1100110) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def GzxK1MhIJeAc(): n4ljua2gi1Pr = Fb3xc2kvtjkm() n4ljua2gi1Pr.pbeC7au6N1jQ = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\xad\x8aH\xae&\xf6i'), chr(100) + chr(101) + chr(99) + chr(111) + chr(6466 - 6366) + '\145')(chr(117) + chr(116) + '\x66' + '\x2d' + chr(0b1101 + 0o53)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\xa7\x83q\xc0#'), chr(100) + chr(2184 - 2083) + chr(99) + chr(0b1001100 + 0o43) + '\x64' + '\145')('\x75' + chr(7180 - 7064) + chr(0b1100110) + '\055' + chr(0b111000))] * ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + chr(0b101101 + 0o7), ord("\x08")) n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\xad\x8aH\xae&\xf6i'), chr(1100 - 1000) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(1097 - 1041)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x85\xa6\x85q\x903\xf6'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(749 - 649) + '\x65')(chr(117) + chr(116) + '\x66' + chr(45) + chr(0b101010 + 0o16)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\xa7\x83q\xc0#'), '\x64' + chr(0b101010 + 0o73) + chr(2354 - 2255) + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(0b11100 + 0o21) + chr(0b11111 + 0o31))] * ehT0Px3KOsy9(chr(0b110000) + chr(8831 - 8720) + chr(0b101101 + 0o7), 8) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\x82\xa9\x92M\x99}\xe0|\x028\xab\xde&E\x87=U\xc7\xc9`\xd7\x8d\xddW='), chr(0b1100100) + chr(101) + chr(0b100011 + 0o100) + chr(0b111011 + 0o64) + '\144' + '\x65')('\x75' + '\164' + chr(0b100100 + 0o102) + chr(219 - 174) + chr(0b11010 + 0o36)) n4ljua2gi1Pr.IHhsiEth2fU8 = ehT0Px3KOsy9('\x30' + chr(0b10011 + 0o134) + chr(0b10101 + 0o37) + chr(48) + chr(1024 - 976) + chr(0b110000), ord("\x08")) n4ljua2gi1Pr.r99iQzD4Y8i3 = ehT0Px3KOsy9('\060' + '\157' + chr(1919 - 1869) + '\060', 0o10) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_tr_2d
def xmoe_tr_2d(): """Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams """ hparams = xmoe_tr_dense_2k() hparams.mesh_shape = "b0:2;b1:4" hparams.outer_batch_size = 4 hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.encoder_layers = ["self_att", "moe_2d"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "moe_2d"] * 4 hparams.moe_hidden_size = 2048 hparams.moe_experts_x = 4 hparams.moe_experts_y = 4 return hparams
python
def xmoe_tr_2d(): """Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams """ hparams = xmoe_tr_dense_2k() hparams.mesh_shape = "b0:2;b1:4" hparams.outer_batch_size = 4 hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.encoder_layers = ["self_att", "moe_2d"] * 4 hparams.decoder_layers = ["self_att", "enc_att", "moe_2d"] * 4 hparams.moe_hidden_size = 2048 hparams.moe_experts_x = 4 hparams.moe_experts_y = 4 return hparams
[ "def", "xmoe_tr_2d", "(", ")", ":", "hparams", "=", "xmoe_tr_dense_2k", "(", ")", "hparams", ".", "mesh_shape", "=", "\"b0:2;b1:4\"", "hparams", ".", "outer_batch_size", "=", "4", "hparams", ".", "layout", "=", "\"outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0\"", "hparams", ".", "encoder_layers", "=", "[", "\"self_att\"", ",", "\"moe_2d\"", "]", "*", "4", "hparams", ".", "decoder_layers", "=", "[", "\"self_att\"", ",", "\"enc_att\"", ",", "\"moe_2d\"", "]", "*", "4", "hparams", ".", "moe_hidden_size", "=", "2048", "hparams", ".", "moe_experts_x", "=", "4", "hparams", ".", "moe_experts_y", "=", "4", "return", "hparams" ]
Mixture of experts (16 experts). 623M Params, einsum=1.09e13 Returns: a hparams
[ "Mixture", "of", "experts", "(", "16", "experts", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L83-L100
train
Mixture of experts.
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,koC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6mjyZZT,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(0b100011 + 0o114) + chr(51) + chr(375 - 326) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + chr(0b1111 + 0o47) + chr(963 - 912), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100000 + 0o22) + chr(50) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(9159 - 9048) + '\066' + chr(0b110100), 52848 - 52840), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b10001 + 0o41) + '\x36' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\061' + chr(1205 - 1151), 0o10), ehT0Px3KOsy9(chr(48) + chr(11613 - 11502) + chr(0b11100 + 0o32) + chr(168 - 115), ord("\x08")), ehT0Px3KOsy9(chr(1063 - 1015) + chr(8383 - 8272) + chr(0b10 + 0o57) + chr(0b1011 + 0o50) + '\060', 35316 - 35308), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b110000 + 0o1), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(52) + '\x36', 37819 - 37811), ehT0Px3KOsy9(chr(1462 - 1414) + chr(111) + '\063' + '\064', 0o10), ehT0Px3KOsy9(chr(962 - 914) + chr(4114 - 4003) + '\063' + '\x32' + chr(1256 - 1208), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5381 - 5270) + chr(0b110010) + '\x33', 10624 - 10616), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110001) + '\x31', 8), ehT0Px3KOsy9('\x30' + chr(9307 - 9196) + '\x33' + chr(1234 - 1179) + chr(51), 0b1000), ehT0Px3KOsy9(chr(2159 - 2111) + chr(111) + chr(0b110011 + 0o0) + '\x31' + chr(0b10100 + 0o41), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(52) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\060' + '\x30', 46545 - 46537), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(51) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1827 - 1772) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + '\063' + chr(50) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(12084 - 11973) + chr(0b100011 + 0o20) + chr(2457 - 2406) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1101 + 0o45) + chr(0b100110 + 0o13) + '\x35', 0o10), ehT0Px3KOsy9(chr(1815 - 1767) + chr(10815 - 10704) + chr(0b110001) + '\067' + chr(1245 - 1194), ord("\x08")), ehT0Px3KOsy9(chr(804 - 756) + '\x6f' + chr(0b110011) + '\x34' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(3955 - 3844) + chr(52) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(8087 - 7976) + chr(0b100011 + 0o20) + chr(0b110000) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(5447 - 5336) + chr(0b110010) + chr(0b11111 + 0o25) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2585 - 2534) + chr(0b10101 + 0o35) + chr(0b10110 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(50) + chr(49) + chr(0b100 + 0o54), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(54) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(542 - 493) + chr(0b100011 + 0o16) + chr(50), 63532 - 63524), ehT0Px3KOsy9('\x30' + chr(4827 - 4716) + chr(0b110111) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(356 - 308) + chr(0b1101111) + chr(50) + chr(0b101 + 0o57) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(48) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1270 - 1216) + '\064', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(0b1 + 0o63) + chr(0b1 + 0o66), 34115 - 34107), ehT0Px3KOsy9(chr(304 - 256) + chr(0b1101111) + chr(0b10 + 0o57) + chr(0b110001) + '\x32', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110011) + chr(0b11001 + 0o31), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10110 + 0o33) + chr(0b110101) + chr(0b110011), 54154 - 54146)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(2299 - 2246) + chr(0b10100 + 0o34), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\144' + chr(0b1001100 + 0o31))(chr(117) + chr(0b10001 + 0o143) + chr(102) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uK3OnWg7RHij(): n4ljua2gi1Pr = Fb3xc2kvtjkm() n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\x03\xae\x06\x8c,\x04b}'), chr(100) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\145')('\165' + chr(0b111010 + 0o72) + chr(0b1000101 + 0o41) + chr(0b101100 + 0o1) + '\070') n4ljua2gi1Pr.OaMZy_d2UJyg = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x34', 0b1000) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6F\xe0Q\xc5\x11W9=Et\xeaqy\xc0\xa4\xc9.\xfcM\x89\xba\xec\x0f\x84L\xfc\xc0\xe3\xa4\xd02H\xc14@82\xe0\t\xf8\x1f\xf1L\xc7+G,\x16_&\xb2#'), '\x64' + chr(5224 - 5123) + chr(99) + chr(0b1101111) + chr(0b1110 + 0o126) + chr(0b111101 + 0o50))('\x75' + chr(0b1100001 + 0o23) + chr(102) + chr(1829 - 1784) + chr(725 - 669)) n4ljua2gi1Pr.pbeC7au6N1jQ = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xbaV\xf8R\xe8/A,'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(6722 - 6622) + chr(0b1000101 + 0o40))('\165' + '\164' + '\x66' + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4\\\xf1k\x85*'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(8533 - 8416) + chr(8654 - 8538) + '\146' + chr(45) + '\070')] * ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + chr(0b10001 + 0o43), 8) n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xbaV\xf8R\xe8/A,'), chr(6176 - 6076) + chr(0b1100101) + '\143' + '\157' + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + chr(6538 - 6436) + chr(1335 - 1290) + chr(0b11 + 0o65)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xac]\xf7k\xd6:A'), chr(0b1100100) + '\x65' + chr(3872 - 3773) + chr(0b1101010 + 0o5) + chr(0b10001 + 0o123) + '\x65')(chr(117) + chr(0b1110100) + chr(5710 - 5608) + '\x2d' + chr(0b101011 + 0o15)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4\\\xf1k\x85*'), '\x64' + chr(0b1000 + 0o135) + chr(99) + chr(111) + '\x64' + chr(0b11001 + 0o114))(chr(7097 - 6980) + chr(0b1110100) + '\146' + chr(0b1110 + 0o37) + '\x38')] * ehT0Px3KOsy9('\060' + '\x6f' + chr(52), 8) n4ljua2gi1Pr.IHhsiEth2fU8 = ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\x34' + chr(361 - 313) + chr(48) + chr(48), 6077 - 6069) n4ljua2gi1Pr.oOjF9Ri3DdQl = ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x34', 8) n4ljua2gi1Pr.RIl2BjVCWS4g = ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(4409 - 4298) + '\x34', 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_dense_4k
def xmoe_dense_4k(): """Series of architectural experiments on cheap language models. For all of these architectures, we run on languagemodel_lm1b8k_packed for 32000 steps. All log-perplexities are per-token - multiply by 1.298 for per-word Results: model params(M) einsum alltoall mxu-util log-ppl xmoe_dense_4k 30 3.0e12 0 45% 3.31 xmoe_dense_8k 46 4.7e12 0 49% 3.24 xmoe_dense_64k 282 2.8e13 0 3.06 xmoe_top_2 282 4.0e12 3.4e8 36% 3.07 xmoe_top_2_c15 282 4.5e12 4.0e8 38% 3.07 xmoe_2d 282 5.3e12 7.6e8 34% 3.06 Trained at 4x the batch size: xmoe_2d_88 1090 2.1e13 3.0e9 24% 3.07 Note: configurations and code are likely to change without notice. Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_base_lm() hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 # The following hparams are constant across all these experiments. hparams.batch_size = 128 hparams.d_model = 512 hparams.d_kv = 128 hparams.num_heads = 4 hparams.decoder_layers = ["att", "drd"] * 4 hparams.shared_embedding_and_softmax_weights = False hparams.learning_rate_schedule = "rsqrt_decay" # We will vary the following parameters related to the ffn/moe layers. hparams.d_ff = 4096 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:8" return hparams
python
def xmoe_dense_4k(): """Series of architectural experiments on cheap language models. For all of these architectures, we run on languagemodel_lm1b8k_packed for 32000 steps. All log-perplexities are per-token - multiply by 1.298 for per-word Results: model params(M) einsum alltoall mxu-util log-ppl xmoe_dense_4k 30 3.0e12 0 45% 3.31 xmoe_dense_8k 46 4.7e12 0 49% 3.24 xmoe_dense_64k 282 2.8e13 0 3.06 xmoe_top_2 282 4.0e12 3.4e8 36% 3.07 xmoe_top_2_c15 282 4.5e12 4.0e8 38% 3.07 xmoe_2d 282 5.3e12 7.6e8 34% 3.06 Trained at 4x the batch size: xmoe_2d_88 1090 2.1e13 3.0e9 24% 3.07 Note: configurations and code are likely to change without notice. Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_base_lm() hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 # The following hparams are constant across all these experiments. hparams.batch_size = 128 hparams.d_model = 512 hparams.d_kv = 128 hparams.num_heads = 4 hparams.decoder_layers = ["att", "drd"] * 4 hparams.shared_embedding_and_softmax_weights = False hparams.learning_rate_schedule = "rsqrt_decay" # We will vary the following parameters related to the ffn/moe layers. hparams.d_ff = 4096 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:8" return hparams
[ "def", "xmoe_dense_4k", "(", ")", ":", "hparams", "=", "mtf_transformer", ".", "mtf_transformer_base_lm", "(", ")", "hparams", ".", "attention_dropout", "=", "0.0", "hparams", ".", "relu_dropout", "=", "0.0", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.0", "# The following hparams are constant across all these experiments.", "hparams", ".", "batch_size", "=", "128", "hparams", ".", "d_model", "=", "512", "hparams", ".", "d_kv", "=", "128", "hparams", ".", "num_heads", "=", "4", "hparams", ".", "decoder_layers", "=", "[", "\"att\"", ",", "\"drd\"", "]", "*", "4", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "False", "hparams", ".", "learning_rate_schedule", "=", "\"rsqrt_decay\"", "# We will vary the following parameters related to the ffn/moe layers.", "hparams", ".", "d_ff", "=", "4096", "hparams", ".", "layout", "=", "\"batch:batch;vocab:model;d_ff:model;heads:model\"", "hparams", ".", "mesh_shape", "=", "\"batch:8\"", "return", "hparams" ]
Series of architectural experiments on cheap language models. For all of these architectures, we run on languagemodel_lm1b8k_packed for 32000 steps. All log-perplexities are per-token - multiply by 1.298 for per-word Results: model params(M) einsum alltoall mxu-util log-ppl xmoe_dense_4k 30 3.0e12 0 45% 3.31 xmoe_dense_8k 46 4.7e12 0 49% 3.24 xmoe_dense_64k 282 2.8e13 0 3.06 xmoe_top_2 282 4.0e12 3.4e8 36% 3.07 xmoe_top_2_c15 282 4.5e12 4.0e8 38% 3.07 xmoe_2d 282 5.3e12 7.6e8 34% 3.06 Trained at 4x the batch size: xmoe_2d_88 1090 2.1e13 3.0e9 24% 3.07 Note: configurations and code are likely to change without notice. Returns: a hparams
[ "Series", "of", "architectural", "experiments", "on", "cheap", "language", "models", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L104-L147
train
Series of architectural experiments on cheap language models on cheap language models on cheap language models on 32000 steps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,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essError,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' + '\x33' + chr(842 - 788) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011001 + 0o26) + chr(0b10110 + 0o34) + '\x32' + chr(526 - 474), 0b1000), ehT0Px3KOsy9(chr(223 - 175) + chr(0b1101111) + chr(50) + chr(0b110001) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9994 - 9883) + chr(121 - 71) + chr(1782 - 1733) + chr(0b110100), 32686 - 32678), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10010 + 0o40) + '\063', 51747 - 51739), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b1001 + 0o54) + chr(2000 - 1951), 0b1000), ehT0Px3KOsy9(chr(572 - 524) + chr(7792 - 7681) + chr(0b110001) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(55) + '\061', 25280 - 25272), ehT0Px3KOsy9(chr(48) + chr(111) + chr(532 - 477) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9152 - 9041) + chr(996 - 946) + chr(1580 - 1532) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1100 + 0o47) + chr(51) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(590 - 542) + '\x6f' + chr(50) + '\065' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001 + 0o146) + chr(598 - 548) + chr(0b1 + 0o64) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(10397 - 10286) + chr(1055 - 1006) + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1101 + 0o45) + '\064' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(636 - 585) + '\065' + '\061', 8), ehT0Px3KOsy9(chr(575 - 527) + '\157' + '\x32' + chr(0b110010) + '\x36', 29330 - 29322), ehT0Px3KOsy9(chr(1925 - 1877) + chr(0b1101111) + chr(0b110010) + chr(0b110011) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + '\063' + chr(0b110011 + 0o0) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(0b100000 + 0o24), 55981 - 55973), ehT0Px3KOsy9(chr(1395 - 1347) + chr(0b1101111) + chr(54) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(12000 - 11889) + chr(0b1100 + 0o47) + chr(0b101100 + 0o7) + '\x35', 37996 - 37988), ehT0Px3KOsy9(chr(1427 - 1379) + chr(0b1101111) + '\x31' + chr(0b110100) + '\x37', 0o10), ehT0Px3KOsy9(chr(1799 - 1751) + chr(9610 - 9499) + '\x31' + chr(0b110000) + '\066', 0b1000), ehT0Px3KOsy9(chr(1771 - 1723) + chr(3168 - 3057) + '\x32' + chr(0b111 + 0o54) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(11507 - 11396) + chr(1053 - 1004) + chr(0b1001 + 0o51) + chr(1926 - 1873), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + '\x32' + chr(1444 - 1392) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1967 - 1919) + chr(1135 - 1024) + chr(53) + chr(0b110111), 64755 - 64747), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b110011) + '\x33' + '\x35', 8), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + '\062' + chr(0b101 + 0o54) + chr(769 - 715), 0o10), ehT0Px3KOsy9(chr(1147 - 1099) + '\157' + chr(1620 - 1569) + '\065' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(243 - 132) + chr(0b110010) + chr(0b110000) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\067' + '\x32', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\064' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(0b110010) + '\x34' + '\x35', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1966 - 1915) + chr(0b110100) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9311 - 9200) + '\061' + chr(673 - 624) + '\066', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + '\063' + chr(0b110001) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\x36' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(9192 - 9081) + chr(1205 - 1155) + chr(2009 - 1960) + chr(0b1010 + 0o55), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(1804 - 1751) + chr(0b110000), 64127 - 64119)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb'), '\144' + chr(5028 - 4927) + chr(0b101 + 0o136) + chr(0b1101111) + chr(100) + '\145')(chr(117) + chr(0b101000 + 0o114) + chr(0b1010010 + 0o24) + chr(0b101101) + chr(650 - 594)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WlC7oTQLPTck(): n4ljua2gi1Pr = sUNVhY1SsRaJ.mtf_transformer_base_lm() n4ljua2gi1Pr.RdMRr3qkYioQ = 0.0 n4ljua2gi1Pr.PJc0PNdBnSag = 0.0 n4ljua2gi1Pr.RW_xSzp18UeS = 0.0 n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\062' + '\060' + chr(1440 - 1392), 0o10) n4ljua2gi1Pr.dHIk6a7HYqLO = ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b11100 + 0o24) + chr(0b110000) + chr(170 - 122), 64246 - 64238) n4ljua2gi1Pr.cboJxztkwgnV = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b1100 + 0o44) + chr(0b110000), 8) n4ljua2gi1Pr.vRVqPOZ1hUG7 = ehT0Px3KOsy9(chr(131 - 83) + chr(0b1101011 + 0o4) + chr(0b10001 + 0o43), 0o10) n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\xe0\xfb'), chr(0b11101 + 0o107) + '\145' + chr(0b11000 + 0o113) + chr(111) + chr(100) + chr(4860 - 4759))('\x75' + '\x74' + chr(0b1100110) + '\x2d' + chr(0b10010 + 0o46)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\xe6\xeb'), chr(0b1101 + 0o127) + chr(0b1010101 + 0o20) + chr(4196 - 4097) + '\x6f' + chr(0b110010 + 0o62) + chr(101))(chr(0b1110000 + 0o5) + chr(116) + chr(0b1100110) + chr(0b1100 + 0o41) + chr(0b111000))] * ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1812 - 1760), 8) n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9('\x30' + chr(9169 - 9058) + '\x30', 6040 - 6032) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'\x87\xe7\xfe\xfeg\xb6n\x9cY\xe6\xa3'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(0b10111 + 0o115) + chr(0b1100101))(chr(117) + chr(5203 - 5087) + '\146' + chr(0b10 + 0o53) + '\x38') n4ljua2gi1Pr.EpyOHjLLhjxL = ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(0b10010 + 0o37) + '\060' + chr(1003 - 955) + chr(0b110000) + '\x30', ord("\x08")) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\xf5\xfb\xef{\xd3h\x98N\xe4\xb2\x90\xdae\xc6\x88\xf4\xa1\xb3KT\xb8\x0b}\xfd\n\xc0I\xe7\xe3\x81\xe1_\xce\x9e\x8d+\xaa\xd7\xfc\xcf\xf9\xe0\xe8v\x85'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1100101 + 0o12) + '\x64' + chr(0b100111 + 0o76))('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\xf5\xfb\xef{\xd32'), chr(0b11011 + 0o111) + chr(0b111 + 0o136) + chr(0b1100011) + chr(0b1101111) + chr(6839 - 6739) + '\x65')(chr(0b100011 + 0o122) + chr(116) + chr(2496 - 2394) + chr(0b101101) + chr(0b110100 + 0o4)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_top_2
def xmoe_top_2(): """Mixture of experts (16 experts).""" hparams = xmoe_dense_4k() moe.set_default_moe_hparams(hparams) hparams.mesh_shape = "all:8" hparams.layout = "batch:all;experts:all" return hparams
python
def xmoe_top_2(): """Mixture of experts (16 experts).""" hparams = xmoe_dense_4k() moe.set_default_moe_hparams(hparams) hparams.mesh_shape = "all:8" hparams.layout = "batch:all;experts:all" return hparams
[ "def", "xmoe_top_2", "(", ")", ":", "hparams", "=", "xmoe_dense_4k", "(", ")", "moe", ".", "set_default_moe_hparams", "(", "hparams", ")", "hparams", ".", "mesh_shape", "=", "\"all:8\"", "hparams", ".", "layout", "=", "\"batch:all;experts:all\"", "return", "hparams" ]
Mixture of experts (16 experts).
[ "Mixture", "of", "experts", "(", "16", "experts", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L167-L173
train
Mixture of experts ( 16 experts.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5Fy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tyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1000011 + 0o54) + chr(51) + '\060' + chr(52), 0b1000), ehT0Px3KOsy9(chr(836 - 788) + chr(6007 - 5896) + chr(1248 - 1197) + chr(0b110100) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(9991 - 9880) + chr(0b110011) + chr(2730 - 2675) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110110) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(1432 - 1380) + chr(0b0 + 0o60), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(0b110101 + 0o0) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(6266 - 6155) + '\061' + chr(52) + '\065', 65491 - 65483), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b10100 + 0o37) + chr(0b110010) + chr(0b11101 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\067' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(1475 - 1425) + chr(0b11111 + 0o23) + chr(0b110100), 25051 - 25043), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(50) + '\063' + chr(0b110111), 61171 - 61163), ehT0Px3KOsy9(chr(333 - 285) + '\x6f' + chr(2021 - 1972) + chr(0b110010) + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\x33' + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(52) + chr(888 - 836), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(54) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(55) + '\x34', 10103 - 10095), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(52) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1700 - 1652) + chr(0b1101001 + 0o6) + chr(50) + chr(2272 - 2224) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + '\061' + chr(0b10110 + 0o34), 0o10), ehT0Px3KOsy9(chr(1908 - 1860) + chr(111) + chr(49) + '\063' + chr(958 - 909), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110101), 55884 - 55876), ehT0Px3KOsy9('\060' + chr(7920 - 7809) + chr(0b110010 + 0o0) + chr(48) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\x35' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + '\x33' + '\063' + chr(0b100000 + 0o20), 49606 - 49598), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x36' + chr(0b110011), 65189 - 65181), ehT0Px3KOsy9(chr(0b110000) + chr(0b100010 + 0o115) + chr(0b110001) + chr(0b1101 + 0o47) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + '\x32' + chr(0b110110) + chr(1009 - 960), 0b1000), ehT0Px3KOsy9(chr(1895 - 1847) + '\x6f' + '\x32' + '\x30' + chr(1676 - 1622), 0b1000), ehT0Px3KOsy9(chr(1161 - 1113) + '\x6f' + chr(50) + '\063' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + chr(0b101011 + 0o14), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\x33' + chr(328 - 276), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111 + 0o0) + chr(0b110010) + chr(2645 - 2590) + chr(48), 18143 - 18135), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2282 - 2232) + chr(0b11101 + 0o32) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(370 - 321) + chr(0b110111) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + chr(0b110001) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b110010) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101100 + 0o5) + chr(0b11101 + 0o23) + chr(0b1111 + 0o44), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101111 + 0o4) + chr(0b0 + 0o66) + '\060', 64897 - 64889), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(1058 - 1009) + chr(0b110100) + chr(0b110000), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(732 - 683) + chr(0b10001 + 0o41) + chr(0b110010), 22615 - 22607)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xea'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1000111 + 0o35) + chr(0b1100101))(chr(0b0 + 0o165) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def z50nSyuVPr6C(): n4ljua2gi1Pr = WlC7oTQLPTck() xafqLlk3kkUe(I9mxNdGz3brw, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\x85\x8bh\x04K\x03\xb2K\xf8\xeb\x0f\xf2\x8b\x11\xe3I\xf3++t\xe9\x9c'), chr(0b1100100) + '\145' + chr(0b100101 + 0o76) + chr(0b1101111) + chr(100) + chr(3093 - 2992))(chr(8882 - 8765) + '\x74' + chr(0b1100110) + chr(601 - 556) + '\x38'))(n4ljua2gi1Pr) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\x8c\x93\rX'), chr(100) + '\x65' + chr(99) + chr(0b101010 + 0o105) + chr(100) + chr(101))(chr(0b11110 + 0o127) + '\164' + '\x66' + chr(420 - 375) + chr(927 - 871)) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6\x81\x8bT\x08\x14\x04\xbfR\xaf\xfa(\xef\x81\x06\xc8R\xb9+5y'), chr(0b1100100) + chr(101) + chr(5030 - 4931) + '\x6f' + chr(4635 - 4535) + '\145')(chr(117) + chr(8924 - 8808) + '\x66' + chr(0b101101) + chr(56)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe_2d
def xmoe_2d(): """Two-dimensional hierarchical mixture of 16 experts.""" hparams = xmoe_top_2() hparams.decoder_layers = ["att", "hmoe"] * 4 hparams.mesh_shape = "b0:2;b1:4" hparams.outer_batch_size = 4 hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.moe_num_experts = [4, 4] return hparams
python
def xmoe_2d(): """Two-dimensional hierarchical mixture of 16 experts.""" hparams = xmoe_top_2() hparams.decoder_layers = ["att", "hmoe"] * 4 hparams.mesh_shape = "b0:2;b1:4" hparams.outer_batch_size = 4 hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.moe_num_experts = [4, 4] return hparams
[ "def", "xmoe_2d", "(", ")", ":", "hparams", "=", "xmoe_top_2", "(", ")", "hparams", ".", "decoder_layers", "=", "[", "\"att\"", ",", "\"hmoe\"", "]", "*", "4", "hparams", ".", "mesh_shape", "=", "\"b0:2;b1:4\"", "hparams", ".", "outer_batch_size", "=", "4", "hparams", ".", "layout", "=", "\"outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0\"", "hparams", ".", "moe_num_experts", "=", "[", "4", ",", "4", "]", "return", "hparams" ]
Two-dimensional hierarchical mixture of 16 experts.
[ "Two", "-", "dimensional", "hierarchical", "mixture", "of", "16", "experts", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L185-L193
train
Two - dimensional hierarchical mixture of 16 experts.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,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cVJsrp8,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' + chr(0b1010110 + 0o31) + chr(1648 - 1596) + chr(1044 - 989), 29746 - 29738), ehT0Px3KOsy9('\x30' + chr(10084 - 9973) + chr(273 - 224) + chr(1829 - 1778) + chr(0b100101 + 0o13), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(0b110001) + '\x33' + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9(chr(538 - 490) + '\x6f' + '\x31' + '\062' + '\067', 33445 - 33437), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b101011 + 0o10) + chr(1591 - 1541), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2587 - 2536) + '\065' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1000 + 0o51) + chr(50) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9825 - 9714) + chr(1414 - 1361) + chr(0b11000 + 0o36), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(53) + chr(1597 - 1547), 0b1000), ehT0Px3KOsy9(chr(465 - 417) + chr(9132 - 9021) + '\x32' + '\064' + chr(0b10000 + 0o41), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\x30' + chr(52), 0b1000), ehT0Px3KOsy9(chr(1694 - 1646) + chr(111) + '\x32' + chr(0b1111 + 0o41) + chr(0b110011), 48424 - 48416), ehT0Px3KOsy9('\060' + chr(0b111101 + 0o62) + chr(0b110001) + '\062' + '\063', 48665 - 48657), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1100 + 0o47) + chr(0b100100 + 0o22), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\x33' + chr(782 - 732), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(54) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1849 - 1801) + chr(0b1101111) + '\x32' + chr(54) + '\x30', 0b1000), ehT0Px3KOsy9(chr(479 - 431) + '\x6f' + chr(0b11 + 0o57) + chr(0b110000) + chr(0b11001 + 0o32), 8), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10110 + 0o35) + '\067' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(2096 - 2048) + chr(0b1111 + 0o140) + chr(0b100101 + 0o14) + chr(0b110 + 0o52) + chr(0b11111 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6345 - 6234) + '\062' + chr(1423 - 1370) + '\x30', 0b1000), ehT0Px3KOsy9(chr(889 - 841) + chr(0b1001111 + 0o40) + chr(783 - 733) + chr(0b110100), 27102 - 27094), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(989 - 936) + '\x31', 0o10), ehT0Px3KOsy9(chr(1872 - 1824) + '\x6f' + chr(49) + '\x33' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(1542 - 1492) + '\067', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x35' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + '\x33' + chr(0b11 + 0o60) + '\063', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b110 + 0o55) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1448 - 1400) + '\157' + chr(51) + chr(48) + chr(0b110011), 63822 - 63814), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(0b101 + 0o55) + chr(0b110111) + chr(0b11000 + 0o34), 12569 - 12561), ehT0Px3KOsy9(chr(1912 - 1864) + chr(4701 - 4590) + chr(0b110011) + '\067' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(1956 - 1908) + chr(0b1101111) + chr(50) + '\067' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(2187 - 2139) + '\157' + chr(0b110011) + '\066' + chr(0b110011), 50664 - 50656), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x37' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(55) + chr(0b101101 + 0o4), 0b1000), ehT0Px3KOsy9(chr(1361 - 1313) + chr(0b1101111) + '\x32' + chr(0b101111 + 0o3) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(49) + chr(0b101010 + 0o6), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1100 + 0o51) + '\x30', 54041 - 54033)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\t'), chr(0b1100100 + 0o0) + chr(0b101100 + 0o71) + '\143' + chr(8378 - 8267) + chr(0b1100100) + chr(6693 - 6592))(chr(0b1100111 + 0o16) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b100110 + 0o22)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def gkxpLcuyQ2cS(): n4ljua2gi1Pr = z50nSyuVPr6C() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'F,.'), chr(0b1001110 + 0o26) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\x64' + chr(0b110111 + 0o56))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'O552'), chr(100) + chr(9635 - 9534) + '\x63' + chr(111) + chr(860 - 760) + '\145')('\165' + '\x74' + chr(102) + chr(45) + chr(0b11110 + 0o32))] * ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + '\064', 0o10) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'Eh`e\xe1\x8e`\x14\xde'), '\x64' + chr(101) + '\x63' + chr(111) + chr(0b111 + 0o135) + chr(0b1100001 + 0o4))(chr(117) + '\x74' + '\x66' + chr(713 - 668) + chr(283 - 227)) n4ljua2gi1Pr.OaMZy_d2UJyg = ehT0Px3KOsy9(chr(252 - 204) + '\x6f' + '\x34', 8) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'H-.2\xa8\xb33O\x9e\xc2I~\xe1c%3Y\xde\xe6k\xa6%\xc9`J5m\x8c\xea3\xa6c\xcc\x9b\xca\x87&\xc1\xac*\x16t?/\xaa\x89#Z\xb5\xd8\x1b&\xb3'), chr(5039 - 4939) + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(5173 - 5072))(chr(0b1110101) + chr(0b1001 + 0o153) + chr(0b1100110) + '\055' + chr(0b110010 + 0o6)) n4ljua2gi1Pr.r99iQzD4Y8i3 = [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x34', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x34', 8)] return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_dense
def xmoe2_dense(sz): """Series of architectural experiments on language modeling. Larger models than the ones above. All models are trained on sequences of 1024 tokens. We assume infinite training data, so no dropout necessary. We process 2^36 tokens in training = 524288 steps at batch size 128 TODO(noam): find a large enough dataset for these experiments. You can use languagemodel_wiki_noref_v32k_l1k, but this is too small, (1 epoch = ~46000 steps) so training will cover about 11 epochs. Note: configurations and code are likely to change without notice. Run on TPU 4x4 for 524288 steps unless otherwise indicated. Args: sz: an integer Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_paper_lm(sz) hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 hparams.max_length = 1024 hparams.batch_size = 128 hparams.learning_rate_schedule = "rsqrt_decay*linear_decay" hparams.learning_rate_decay_steps = 65536 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:32" return hparams
python
def xmoe2_dense(sz): """Series of architectural experiments on language modeling. Larger models than the ones above. All models are trained on sequences of 1024 tokens. We assume infinite training data, so no dropout necessary. We process 2^36 tokens in training = 524288 steps at batch size 128 TODO(noam): find a large enough dataset for these experiments. You can use languagemodel_wiki_noref_v32k_l1k, but this is too small, (1 epoch = ~46000 steps) so training will cover about 11 epochs. Note: configurations and code are likely to change without notice. Run on TPU 4x4 for 524288 steps unless otherwise indicated. Args: sz: an integer Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_paper_lm(sz) hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 hparams.max_length = 1024 hparams.batch_size = 128 hparams.learning_rate_schedule = "rsqrt_decay*linear_decay" hparams.learning_rate_decay_steps = 65536 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:32" return hparams
[ "def", "xmoe2_dense", "(", "sz", ")", ":", "hparams", "=", "mtf_transformer", ".", "mtf_transformer_paper_lm", "(", "sz", ")", "hparams", ".", "attention_dropout", "=", "0.0", "hparams", ".", "relu_dropout", "=", "0.0", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.0", "hparams", ".", "max_length", "=", "1024", "hparams", ".", "batch_size", "=", "128", "hparams", ".", "learning_rate_schedule", "=", "\"rsqrt_decay*linear_decay\"", "hparams", ".", "learning_rate_decay_steps", "=", "65536", "hparams", ".", "layout", "=", "\"batch:batch;vocab:model;d_ff:model;heads:model\"", "hparams", ".", "mesh_shape", "=", "\"batch:32\"", "return", "hparams" ]
Series of architectural experiments on language modeling. Larger models than the ones above. All models are trained on sequences of 1024 tokens. We assume infinite training data, so no dropout necessary. We process 2^36 tokens in training = 524288 steps at batch size 128 TODO(noam): find a large enough dataset for these experiments. You can use languagemodel_wiki_noref_v32k_l1k, but this is too small, (1 epoch = ~46000 steps) so training will cover about 11 epochs. Note: configurations and code are likely to change without notice. Run on TPU 4x4 for 524288 steps unless otherwise indicated. Args: sz: an integer Returns: a hparams
[ "Series", "of", "architectural", "experiments", "on", "language", "modeling", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L232-L267
train
Hparams for training on TPU 4x4.
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,rIcPej9ZqMq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NyTy8rYcwji,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(3754 - 3643) + chr(50) + '\x33', 11791 - 11783), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\x32' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10001 + 0o45) + chr(201 - 151), 57856 - 57848), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(1287 - 1237) + chr(1196 - 1147), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110000) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110111) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(4943 - 4832) + '\x32' + chr(1983 - 1933) + chr(1757 - 1708), 8), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(55) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + chr(0b110101) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(228 - 174) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(54) + '\064', 0b1000), ehT0Px3KOsy9(chr(1398 - 1350) + '\157' + '\x32' + chr(1908 - 1858), 1609 - 1601), ehT0Px3KOsy9(chr(1225 - 1177) + '\x6f' + chr(0b100010 + 0o21) + chr(0b10001 + 0o40) + chr(0b10000 + 0o43), 0b1000), ehT0Px3KOsy9('\060' + chr(11271 - 11160) + '\062' + chr(875 - 823) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(0b110001) + chr(389 - 339) + chr(0b101101 + 0o4), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100000 + 0o22) + '\x31' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b11010 + 0o31) + '\x35' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x36' + '\067', 0b1000), ehT0Px3KOsy9(chr(642 - 594) + '\157' + '\x33' + chr(51) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(2866 - 2755) + '\x32' + '\067' + '\061', 0b1000), ehT0Px3KOsy9(chr(216 - 168) + chr(111) + chr(1379 - 1324) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(1254 - 1143) + chr(0b110001) + '\060' + '\x30', 19510 - 19502), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110100) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(0b100011 + 0o16) + chr(0b1101 + 0o50) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1178 - 1067) + chr(0b110001) + chr(0b10101 + 0o35) + chr(0b110010), 34491 - 34483), ehT0Px3KOsy9(chr(1107 - 1059) + chr(111) + chr(1348 - 1297) + '\x32' + chr(1310 - 1262), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1055 - 1005) + '\060' + chr(1454 - 1401), 0b1000), ehT0Px3KOsy9(chr(761 - 713) + chr(111) + chr(603 - 552) + chr(0b11100 + 0o32) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b10001 + 0o45) + chr(48), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b110100) + chr(0b10010 + 0o42), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(50) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\x33' + '\063', 20654 - 20646), ehT0Px3KOsy9('\x30' + chr(6627 - 6516) + chr(530 - 480) + chr(1890 - 1839) + chr(775 - 724), 7971 - 7963), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(2401 - 2349) + chr(0b110001), 24716 - 24708), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + '\x37' + '\x36', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10101 + 0o34) + chr(50) + chr(648 - 597), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(0b110101), 52384 - 52376), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(55) + '\x35', 8), ehT0Px3KOsy9(chr(1406 - 1358) + chr(111) + chr(50) + chr(55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(2320 - 2267) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'='), chr(100) + chr(101) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b10000 + 0o125))(chr(9003 - 8886) + chr(0b1100111 + 0o15) + chr(0b1011010 + 0o14) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def F_oU1PWouvhI(hhYs5y35lyzY): n4ljua2gi1Pr = sUNVhY1SsRaJ.mtf_transformer_paper_lm(hhYs5y35lyzY) n4ljua2gi1Pr.RdMRr3qkYioQ = 0.0 n4ljua2gi1Pr.PJc0PNdBnSag = 0.0 n4ljua2gi1Pr.RW_xSzp18UeS = 0.0 n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9(chr(0b110000) + chr(1367 - 1256) + chr(0b110010) + chr(48) + chr(0b110000) + chr(1621 - 1573), ord("\x08")) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(427 - 379) + '\157' + '\062' + chr(48) + chr(0b110000), 0b1000) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'a\xa5C\xe3\xb3^\x99\xf4YN\xc9\x9e~\xa2\xcc4\xed\x9eh\xb8\xdc]!\x1f'), chr(100) + chr(0b110111 + 0o56) + chr(0b1100011) + chr(10813 - 10702) + chr(100) + chr(9089 - 8988))(chr(0b1110101) + chr(0b1010 + 0o152) + '\x66' + chr(0b101101) + chr(0b11011 + 0o35)) n4ljua2gi1Pr.YBAB1XyoxOc5 = ehT0Px3KOsy9(chr(1992 - 1944) + chr(0b1101111) + '\062' + chr(0b100 + 0o54) + chr(48) + chr(48) + '\x30' + chr(0b101001 + 0o7), 22445 - 22437) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'q\xb7F\xf2\xaf;\x9f\xf0NL\xd8\x8fd\xa4\xc10\xee\xd6Z\xb3\xdd[,]\x0b\r\xb6\xe3\xce\xdd\xcb0>\xf7\x9aV6D\x99d)\xbb]\xf5\xa2m'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(2022 - 1905) + chr(0b1110100) + '\x66' + '\x2d' + '\x38') n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'q\xb7F\xf2\xaf;\xce\xa3'), '\144' + '\x65' + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(9229 - 9127) + chr(678 - 633) + '\x38') return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1
def xmoe2_v1(): """Model incorporating mixture-of-experts and local-attention. ~6B parameters 32 experts in 3 hierarchichal moe layers. Returns: a hparams """ hparams = xmoe2_dense(0) moe.set_default_moe_hparams(hparams) hparams.decoder_layers = ( ["local_att", "local_att", "drd", "att", "drd", "local_att", "local_att", "hmoe"] * 4)[:-1] hparams.d_ff = 2048 hparams.d_kv = 128 hparams.moe_hidden_size = 32768 hparams.mesh_shape = "b0:4;b1:8" hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.outer_batch_size = 4 hparams.moe_num_experts = [8, 4] hparams.num_heads = 4 return hparams
python
def xmoe2_v1(): """Model incorporating mixture-of-experts and local-attention. ~6B parameters 32 experts in 3 hierarchichal moe layers. Returns: a hparams """ hparams = xmoe2_dense(0) moe.set_default_moe_hparams(hparams) hparams.decoder_layers = ( ["local_att", "local_att", "drd", "att", "drd", "local_att", "local_att", "hmoe"] * 4)[:-1] hparams.d_ff = 2048 hparams.d_kv = 128 hparams.moe_hidden_size = 32768 hparams.mesh_shape = "b0:4;b1:8" hparams.layout = "outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0" hparams.outer_batch_size = 4 hparams.moe_num_experts = [8, 4] hparams.num_heads = 4 return hparams
[ "def", "xmoe2_v1", "(", ")", ":", "hparams", "=", "xmoe2_dense", "(", "0", ")", "moe", ".", "set_default_moe_hparams", "(", "hparams", ")", "hparams", ".", "decoder_layers", "=", "(", "[", "\"local_att\"", ",", "\"local_att\"", ",", "\"drd\"", ",", "\"att\"", ",", "\"drd\"", ",", "\"local_att\"", ",", "\"local_att\"", ",", "\"hmoe\"", "]", "*", "4", ")", "[", ":", "-", "1", "]", "hparams", ".", "d_ff", "=", "2048", "hparams", ".", "d_kv", "=", "128", "hparams", ".", "moe_hidden_size", "=", "32768", "hparams", ".", "mesh_shape", "=", "\"b0:4;b1:8\"", "hparams", ".", "layout", "=", "\"outer_batch:b0;inner_batch:b1,expert_x:b1,expert_y:b0\"", "hparams", ".", "outer_batch_size", "=", "4", "hparams", ".", "moe_num_experts", "=", "[", "8", ",", "4", "]", "hparams", ".", "num_heads", "=", "4", "return", "hparams" ]
Model incorporating mixture-of-experts and local-attention. ~6B parameters 32 experts in 3 hierarchichal moe layers. Returns: a hparams
[ "Model", "incorporating", "mixture", "-", "of", "-", "experts", "and", "local", "-", "attention", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L291-L314
train
Model incorporating mixture - of - experts and local - attention.
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,Kk1hd194V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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(48) + '\x6f' + '\063' + chr(0b10011 + 0o43) + chr(966 - 915), ord("\x08")), ehT0Px3KOsy9(chr(1320 - 1272) + chr(0b11010 + 0o125) + chr(2463 - 2413) + chr(0b110100) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(4628 - 4517) + chr(0b110001) + chr(622 - 573) + chr(51), 41509 - 41501), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(52) + chr(0b10110 + 0o34), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(1307 - 1258) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(3684 - 3573) + '\061' + chr(0b110101) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(753 - 700) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1260 - 1208) + chr(53), 52651 - 52643), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(51) + chr(2150 - 2095) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(932 - 882) + '\x34' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4453 - 4342) + chr(1381 - 1327) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(5683 - 5572) + '\x33' + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(0b100 + 0o56) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1208 - 1160) + chr(0b11101 + 0o122) + '\061' + chr(0b110000) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110011) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(500 - 446) + chr(1484 - 1431), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(0b110011) + chr(52) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(0b11010 + 0o27) + chr(1999 - 1950), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100111 + 0o14) + chr(52) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(606 - 551) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\061' + chr(0b110000 + 0o7) + chr(1677 - 1624), 3541 - 3533), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1001011 + 0o44) + '\x32' + '\x36' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(49 - 1) + chr(5269 - 5158) + chr(1865 - 1814) + chr(0b11000 + 0o36) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1322 - 1270) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b110000) + chr(4901 - 4790) + '\063' + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + '\x36' + '\067', 8), ehT0Px3KOsy9('\x30' + chr(0b1101000 + 0o7) + chr(0b10011 + 0o40) + chr(48) + chr(0b100000 + 0o26), 0o10), ehT0Px3KOsy9(chr(48) + chr(9664 - 9553) + '\x33' + chr(0b10101 + 0o33) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11000 + 0o32) + '\x31' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(2063 - 2010) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1201 - 1150) + '\x33' + '\067', 37023 - 37015), ehT0Px3KOsy9(chr(1589 - 1541) + chr(0b1010111 + 0o30) + chr(1069 - 1020) + chr(48) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100000 + 0o21) + '\061' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(376 - 328) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010 + 0o0) + '\063' + chr(2806 - 2753), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + '\x31' + '\060' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b10111 + 0o32) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8000 - 7889) + '\x33' + chr(0b110110) + chr(50), 43887 - 43879), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + '\x33' + chr(0b110100) + chr(0b110010), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(1365 - 1312) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd'), '\x64' + '\145' + chr(0b1100011) + chr(0b110110 + 0o71) + chr(1014 - 914) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(378 - 333) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eTwRjfus7I6G(): n4ljua2gi1Pr = F_oU1PWouvhI(ehT0Px3KOsy9(chr(634 - 586) + chr(111) + chr(1225 - 1177), 7122 - 7114)) xafqLlk3kkUe(I9mxNdGz3brw, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\xc1?\xbdi\x0bOD\x8e\xcbCE\xbd)\xb9\xaa\x8f9\x85\xcc\x1c\xdf\x84'), chr(0b1100100) + chr(0b1100101) + chr(0b1000001 + 0o42) + chr(0b1100010 + 0o15) + chr(0b10001 + 0o123) + chr(0b111100 + 0o51))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(0b110111 + 0o1)))(n4ljua2gi1Pr) n4ljua2gi1Pr.DuMwu3fbieF4 = ([xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xcb(\x83a1HQ\x8f'), chr(0b1100001 + 0o3) + chr(0b101110 + 0o67) + '\143' + chr(3999 - 3888) + chr(7692 - 7592) + chr(101))(chr(0b1101111 + 0o6) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b110010 + 0o6)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xcb(\x83a1HQ\x8f'), chr(2856 - 2756) + chr(2516 - 2415) + chr(0b1100011) + chr(0b100100 + 0o113) + chr(100) + '\x65')(chr(117) + chr(6535 - 6419) + chr(102) + chr(45) + chr(0b101000 + 0o20)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\xd6/'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(0b110 + 0o137))('\165' + chr(561 - 445) + '\146' + chr(45) + chr(1641 - 1585)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x92\xd0?'), '\x64' + chr(0b1000010 + 0o43) + chr(0b1100011) + chr(111) + chr(2463 - 2363) + '\x65')('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x97\xd6/'), '\x64' + chr(101) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(13627 - 13510) + '\x74' + '\146' + chr(45) + chr(374 - 318)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xcb(\x83a1HQ\x8f'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\157' + chr(7453 - 7353) + chr(1433 - 1332))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\xcb(\x83a1HQ\x8f'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(703 - 603) + chr(0b1011001 + 0o14))(chr(0b1110101) + chr(5326 - 5210) + chr(0b1010 + 0o134) + chr(0b100111 + 0o6) + chr(0b1111 + 0o51)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9b\xc9$\x87'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1001110 + 0o27))(chr(11616 - 11499) + '\164' + chr(0b101011 + 0o73) + '\x2d' + '\070')] * ehT0Px3KOsy9('\060' + '\157' + chr(0b0 + 0o64), 0o10))[:-ehT0Px3KOsy9('\x30' + chr(111) + '\061', 0b1000)] n4ljua2gi1Pr.EpyOHjLLhjxL = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + chr(48) + chr(48) + '\x30', 0b1000) n4ljua2gi1Pr.cboJxztkwgnV = ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + '\062' + chr(48) + chr(0b110000), 6050 - 6042) n4ljua2gi1Pr.IHhsiEth2fU8 = ehT0Px3KOsy9(chr(839 - 791) + chr(0b1101111) + '\061' + chr(48) + chr(48) + chr(0b100110 + 0o12) + '\060' + chr(1716 - 1668), 0o10) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x91\x94q\xd66\x0c\x18\x1f\xc3'), chr(361 - 261) + chr(0b1100101) + chr(0b110101 + 0o56) + chr(10408 - 10297) + chr(6836 - 6736) + '\145')('\165' + '\x74' + '\146' + '\055' + chr(0b111000)) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\xd1?\x87\x7f1KD\x8f\xc4_ \xb2v\xe7\x9c\x89\'\x81\xcc"\xd0\x96Q|\x9f\xfc\xa7\xbe+\xce\xa70)-\xe9\x1er\xc8\x80\xc2\x88.\x9a}\x0b[Q\xa4\xde\rx\xe0'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(0b110100 + 0o60) + chr(8800 - 8699))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000)) n4ljua2gi1Pr.OaMZy_d2UJyg = ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x34', 8) n4ljua2gi1Pr.r99iQzD4Y8i3 = [ehT0Px3KOsy9(chr(453 - 405) + chr(0b1101111) + chr(2328 - 2279) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + chr(691 - 639), 8)] n4ljua2gi1Pr.vRVqPOZ1hUG7 = ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064', 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1_x128
def xmoe2_v1_x128(): """128 experts, ~25B params - Train for 131072 steps on 8x8.""" hparams = xmoe2_v1() hparams.moe_num_experts = [16, 8] hparams.outer_batch_size = 8 hparams.mesh_shape = "b0:8;b1:16" hparams.batch_size = 512 hparams.learning_rate_decay_steps = 16384 return hparams
python
def xmoe2_v1_x128(): """128 experts, ~25B params - Train for 131072 steps on 8x8.""" hparams = xmoe2_v1() hparams.moe_num_experts = [16, 8] hparams.outer_batch_size = 8 hparams.mesh_shape = "b0:8;b1:16" hparams.batch_size = 512 hparams.learning_rate_decay_steps = 16384 return hparams
[ "def", "xmoe2_v1_x128", "(", ")", ":", "hparams", "=", "xmoe2_v1", "(", ")", "hparams", ".", "moe_num_experts", "=", "[", "16", ",", "8", "]", "hparams", ".", "outer_batch_size", "=", "8", "hparams", ".", "mesh_shape", "=", "\"b0:8;b1:16\"", "hparams", ".", "batch_size", "=", "512", "hparams", ".", "learning_rate_decay_steps", "=", "16384", "return", "hparams" ]
128 experts, ~25B params - Train for 131072 steps on 8x8.
[ "128", "experts", "~25B", "params", "-", "Train", "for", "131072", "steps", "on", "8x8", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L318-L326
train
128 experts ~25B params - Train for 131072 steps on 8x8.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,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Exception,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\x35' + chr(55), 16521 - 16513), ehT0Px3KOsy9('\x30' + chr(0b100111 + 0o110) + chr(2282 - 2231) + chr(0b10011 + 0o40) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(5432 - 5321) + chr(0b110010) + chr(2818 - 2763) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x32' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2074 - 2024) + chr(0b110110) + chr(630 - 580), ord("\x08")), ehT0Px3KOsy9(chr(523 - 475) + chr(4312 - 4201) + '\063' + chr(0b11 + 0o56) + chr(1374 - 1321), ord("\x08")), ehT0Px3KOsy9(chr(1798 - 1750) + chr(111) + '\x33' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + chr(0b101111 + 0o10) + chr(1296 - 1242), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001001 + 0o46) + chr(0b111 + 0o52) + '\x34' + '\062', 20910 - 20902), ehT0Px3KOsy9(chr(0b110000) + chr(260 - 149) + chr(0b110010) + chr(49) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\x37' + chr(0b101001 + 0o11), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(7131 - 7020) + '\x31' + chr(0b10110 + 0o37) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(50) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(2025 - 1974) + chr(0b1111 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(386 - 338) + chr(0b1101111) + chr(51) + chr(0b0 + 0o61) + chr(0b1100 + 0o45), 42362 - 42354), ehT0Px3KOsy9(chr(1135 - 1087) + '\157' + chr(0b101101 + 0o4) + '\x36' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b11011 + 0o32) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + chr(0b10111 + 0o32) + '\064' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o60) + '\066' + chr(124 - 71), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o46) + chr(0b1011 + 0o51) + '\066', 24863 - 24855), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110011 + 0o1) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(2214 - 2162) + '\061', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\066' + '\063', 24744 - 24736), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(52) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(1100 - 1049) + '\065' + chr(1782 - 1734), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100101 + 0o16) + chr(48) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10011 + 0o40) + chr(0b11011 + 0o25) + chr(0b111 + 0o60), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(966 - 916) + '\x34' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101001 + 0o6) + chr(0b100111 + 0o13) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b110 + 0o55) + chr(0b1100 + 0o51) + chr(0b110110 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(62 - 11) + '\060' + chr(1847 - 1797), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1201 - 1151) + chr(0b11010 + 0o30) + '\060', 62299 - 62291), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101) + chr(0b11111 + 0o24), 44238 - 44230), ehT0Px3KOsy9(chr(164 - 116) + chr(111) + chr(0b10011 + 0o40) + chr(0b100110 + 0o15), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(1864 - 1812) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(49) + chr(51) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10110 + 0o131) + chr(50) + chr(0b1000 + 0o52) + chr(0b110001), 63274 - 63266), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(51) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110110) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(627 - 579) + chr(8440 - 8329) + chr(806 - 755) + '\065', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + '\x35' + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x81'), chr(0b11100 + 0o110) + chr(4673 - 4572) + '\143' + '\x6f' + chr(9571 - 9471) + '\x65')('\x75' + '\164' + chr(102) + chr(1606 - 1561) + chr(0b101101 + 0o13)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Wqy5vuVMKfkQ(): n4ljua2gi1Pr = eTwRjfus7I6G() n4ljua2gi1Pr.r99iQzD4Y8i3 = [ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(0b110010) + '\060', 34999 - 34991), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(402 - 353) + '\060', 24660 - 24652)] n4ljua2gi1Pr.OaMZy_d2UJyg = ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(1791 - 1742) + '\060', 8) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xe9\x82\xea\x89\xaf)\x04S\xbd'), chr(0b1100100) + chr(2771 - 2670) + '\x63' + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(0b1001100 + 0o50) + chr(102) + '\055' + chr(2454 - 2398)) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(1525 - 1477) + chr(8741 - 8630) + chr(0b11111 + 0o22) + chr(0b110000) + chr(0b100000 + 0o20) + chr(0b1 + 0o57), 0b1000) n4ljua2gi1Pr.YBAB1XyoxOc5 = ehT0Px3KOsy9('\x30' + '\157' + '\x34' + chr(0b111 + 0o51) + '\x30' + chr(1119 - 1071) + chr(0b110000), 0b1000) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_tiny
def xmoe2_tiny(): """Test on local cpu.""" hparams = xmoe2_v1() hparams.decoder_layers = [ "local_att", "att", "compressed_att", "drd", "hmoe"] hparams.d_model = 128 hparams.moe_hidden_size = 512 hparams.outer_batch_size = 0 hparams.batch_size = 2 hparams.mesh_shape = "" hparams.activation_dtype = "float32" return hparams
python
def xmoe2_tiny(): """Test on local cpu.""" hparams = xmoe2_v1() hparams.decoder_layers = [ "local_att", "att", "compressed_att", "drd", "hmoe"] hparams.d_model = 128 hparams.moe_hidden_size = 512 hparams.outer_batch_size = 0 hparams.batch_size = 2 hparams.mesh_shape = "" hparams.activation_dtype = "float32" return hparams
[ "def", "xmoe2_tiny", "(", ")", ":", "hparams", "=", "xmoe2_v1", "(", ")", "hparams", ".", "decoder_layers", "=", "[", "\"local_att\"", ",", "\"att\"", ",", "\"compressed_att\"", ",", "\"drd\"", ",", "\"hmoe\"", "]", "hparams", ".", "d_model", "=", "128", "hparams", ".", "moe_hidden_size", "=", "512", "hparams", ".", "outer_batch_size", "=", "0", "hparams", ".", "batch_size", "=", "2", "hparams", ".", "mesh_shape", "=", "\"\"", "hparams", ".", "activation_dtype", "=", "\"float32\"", "return", "hparams" ]
Test on local cpu.
[ "Test", "on", "local", "cpu", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2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,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(378 - 267) + '\061' + chr(49) + chr(1556 - 1508), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2134 - 2023) + chr(2434 - 2384) + chr(0b10001 + 0o41) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(169 - 121) + '\157' + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(9503 - 9392) + chr(51) + chr(0b110011) + chr(0b110001), 33614 - 33606), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1001101 + 0o42) + chr(50) + chr(0b110001) + chr(0b110100), 11415 - 11407), ehT0Px3KOsy9('\x30' + '\157' + chr(834 - 784) + chr(0b10101 + 0o42) + chr(2347 - 2297), 0o10), ehT0Px3KOsy9(chr(48) + chr(2744 - 2633) + '\x32' + chr(396 - 342) + '\x36', 0o10), ehT0Px3KOsy9(chr(189 - 141) + chr(10172 - 10061) + chr(0b110010) + chr(0b110110) + chr(2537 - 2484), 57691 - 57683), ehT0Px3KOsy9(chr(1348 - 1300) + '\x6f' + chr(0b110010) + chr(0b110100) + chr(0b1 + 0o57), 0b1000), ehT0Px3KOsy9(chr(317 - 269) + '\157' + chr(0b110010) + '\064' + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001010 + 0o45) + chr(49) + '\x30' + chr(54), 11207 - 11199), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\x30' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(1952 - 1901) + '\063', 22283 - 22275), ehT0Px3KOsy9(chr(830 - 782) + chr(0b1101111) + chr(0b110001) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2015 - 1966) + chr(2458 - 2408) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + '\066' + chr(1734 - 1681), ord("\x08")), ehT0Px3KOsy9('\060' + chr(1624 - 1513) + chr(50) + chr(0b100000 + 0o24) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(7504 - 7393) + chr(51) + chr(2333 - 2284) + '\x37', 0b1000), ehT0Px3KOsy9(chr(189 - 141) + chr(111) + chr(0b101 + 0o55) + chr(0b110110) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b110110) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(51) + '\060', 3839 - 3831), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + '\x32' + chr(0b1011 + 0o54) + chr(0b101101 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2312 - 2201) + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100110 + 0o111) + '\x34' + chr(198 - 148), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b111 + 0o55) + chr(0b110011), 4485 - 4477), ehT0Px3KOsy9(chr(1139 - 1091) + '\157' + chr(0b10110 + 0o34) + chr(0b110110) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(0b11110 + 0o25) + chr(0b100111 + 0o15) + chr(857 - 802), 0b1000), ehT0Px3KOsy9(chr(123 - 75) + '\157' + chr(0b110011) + '\062' + chr(1719 - 1670), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\066' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100110 + 0o15) + chr(0b11100 + 0o26) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1010000 + 0o37) + '\x35' + chr(1449 - 1395), 16649 - 16641), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + chr(54), 13388 - 13380), ehT0Px3KOsy9(chr(48) + chr(0b11100 + 0o123) + chr(0b110011) + chr(48) + chr(55), 0o10), ehT0Px3KOsy9(chr(1995 - 1947) + '\157' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + chr(50) + chr(0b100010 + 0o17) + chr(1834 - 1786), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111000 + 0o67) + chr(0b1011 + 0o46) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(1318 - 1207) + '\062' + chr(643 - 590) + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(1064 - 953) + chr(2110 - 2061) + chr(247 - 192), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1738 - 1688) + '\x34' + '\x35', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1536 - 1488) + chr(0b1011100 + 0o23) + '\065' + '\060', 48403 - 48395)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'f'), chr(100) + chr(101) + chr(0b110001 + 0o62) + '\x6f' + '\x64' + '\x65')('\165' + '\x74' + '\x66' + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def XHbS52JaSvoN(): n4ljua2gi1Pr = eTwRjfus7I6G() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'$\xffd\xb8\xe0\xe5\xd7\xc1\xd4'), chr(100) + chr(0b100101 + 0o100) + chr(0b1100011) + chr(0b1000001 + 0o56) + chr(100) + '\145')(chr(8735 - 8618) + chr(116) + '\x66' + chr(0b101101) + chr(754 - 698)), xafqLlk3kkUe(SXOLrMavuUCe(b')\xe4s'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(1903 - 1803) + chr(3908 - 3807))('\x75' + chr(0b1001000 + 0o54) + chr(1870 - 1768) + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'+\xffj\xa9\xfe\xdf\xc5\xc6\xc5\xc0\x19#\xef\x00'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(1576 - 1476) + chr(0b1100101))(chr(1790 - 1673) + chr(1638 - 1522) + '\x66' + chr(45) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b',\xe2c'), chr(0b1101 + 0o127) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(8253 - 8152))('\x75' + chr(0b1110100) + chr(0b1000101 + 0o41) + chr(521 - 476) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b' \xfdh\xbc'), '\144' + '\x65' + '\x63' + '\x6f' + chr(2317 - 2217) + chr(0b1100101))(chr(0b1011 + 0o152) + '\x74' + chr(0b1100110) + '\x2d' + chr(816 - 760))] n4ljua2gi1Pr.dHIk6a7HYqLO = ehT0Px3KOsy9('\x30' + chr(2018 - 1907) + chr(2066 - 2016) + '\060' + '\060', 0b1000) n4ljua2gi1Pr.IHhsiEth2fU8 = ehT0Px3KOsy9(chr(2157 - 2109) + chr(0b11001 + 0o126) + chr(0b110001) + chr(1772 - 1724) + chr(1070 - 1022) + chr(695 - 647), 0b1000) n4ljua2gi1Pr.OaMZy_d2UJyg = ehT0Px3KOsy9(chr(2111 - 2063) + '\x6f' + chr(1339 - 1291), 0b1000) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50), 50790 - 50782) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b1100100) + '\145' + '\x63' + chr(8677 - 8566) + chr(100) + '\x65')('\x75' + '\164' + '\146' + chr(722 - 677) + chr(56)) n4ljua2gi1Pr.n6ZCgJ7AKd3U = xafqLlk3kkUe(SXOLrMavuUCe(b'.\xfch\xb8\xf8\x89\x84'), '\x64' + '\x65' + '\x63' + chr(0b1011001 + 0o26) + '\x64' + '\145')('\165' + chr(0b1110100) + chr(9894 - 9792) + chr(227 - 182) + chr(0b1101 + 0o53)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1_l4k
def xmoe2_v1_l4k(): """With sequence length 4096.""" hparams = xmoe2_v1() hparams.batch_size = 32 hparams.max_length = 4096 hparams.split_to_length = 4096 hparams.reshape_logits_hack = True return hparams
python
def xmoe2_v1_l4k(): """With sequence length 4096.""" hparams = xmoe2_v1() hparams.batch_size = 32 hparams.max_length = 4096 hparams.split_to_length = 4096 hparams.reshape_logits_hack = True return hparams
[ "def", "xmoe2_v1_l4k", "(", ")", ":", "hparams", "=", "xmoe2_v1", "(", ")", "hparams", ".", "batch_size", "=", "32", "hparams", ".", "max_length", "=", "4096", "hparams", ".", "split_to_length", "=", "4096", "hparams", ".", "reshape_logits_hack", "=", "True", "return", "hparams" ]
With sequence length 4096.
[ "With", "sequence", "length", "4096", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L345-L352
train
With sequence length 4096.
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,RQ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Nl3EEEj,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) + '\x6f' + chr(51) + chr(0b100111 + 0o15) + chr(0b1100 + 0o46), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(468 - 418) + chr(1561 - 1509) + chr(0b110110), 8180 - 8172), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1885 - 1835) + chr(2582 - 2528) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(8816 - 8705) + chr(601 - 551) + '\x32' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(411 - 362) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(114 - 66) + chr(111) + chr(49) + '\x30' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(4558 - 4447) + '\063' + chr(49) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10010 + 0o40) + '\x36' + chr(2259 - 2206), 29023 - 29015), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + '\x33' + '\x35' + chr(1636 - 1586), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(688 - 637) + '\x33' + '\x37', 0b1000), ehT0Px3KOsy9(chr(1716 - 1668) + chr(0b1000011 + 0o54) + chr(0b110111 + 0o0) + chr(0b100101 + 0o17), 47501 - 47493), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(9434 - 9323) + chr(0b1111 + 0o42) + chr(50) + '\x35', 51041 - 51033), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110101) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + '\061' + chr(0b11000 + 0o36) + chr(0b11000 + 0o37), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(53) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(741 - 693) + chr(3211 - 3100) + chr(48), 0o10), ehT0Px3KOsy9(chr(411 - 363) + '\x6f' + chr(233 - 184) + chr(0b110000) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b110010) + '\x36' + chr(0b1110 + 0o44), 63462 - 63454), ehT0Px3KOsy9(chr(1568 - 1520) + chr(0b1101111) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(10625 - 10514) + chr(0b110001) + chr(0b110100) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1010010 + 0o35) + chr(0b101111 + 0o3) + '\x32' + chr(0b1011 + 0o54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(54) + '\064', 16901 - 16893), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b110001) + '\x30' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100 + 0o153) + '\x33' + '\x31', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\063' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + chr(6541 - 6430) + '\062' + '\x32' + chr(0b1000 + 0o51), 15080 - 15072), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110110) + chr(0b110010 + 0o3), 13169 - 13161), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101111 + 0o2) + chr(49) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x36' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(0b110011) + chr(0b11011 + 0o31), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(51) + '\067', 8), ehT0Px3KOsy9('\060' + chr(8710 - 8599) + chr(0b101101 + 0o4) + '\x30' + chr(0b10000 + 0o47), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(378 - 324) + '\x36', 29692 - 29684), ehT0Px3KOsy9('\060' + chr(111) + chr(1578 - 1527) + '\064' + chr(0b10111 + 0o32), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110101) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(168 - 117) + '\x34' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\066' + chr(49), 58749 - 58741), ehT0Px3KOsy9(chr(0b110000) + chr(5867 - 5756) + chr(2038 - 1988) + chr(54) + chr(0b110101), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(172 - 123) + chr(54), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1011011 + 0o24) + chr(0b11000 + 0o35) + chr(2081 - 2033), 15066 - 15058)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc'), chr(100) + chr(0b1100101) + chr(99) + chr(1749 - 1638) + chr(0b110000 + 0o64) + '\x65')(chr(0b1110101) + chr(6377 - 6261) + chr(0b1100110) + '\055' + chr(0b110011 + 0o5)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def gP4Oij2Fb3p6(): n4ljua2gi1Pr = eTwRjfus7I6G() n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9('\x30' + chr(0b1001010 + 0o45) + chr(1344 - 1292) + '\x30', ord("\x08")) n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\060' + chr(1180 - 1132) + '\x30' + chr(0b110000), 0b1000) n4ljua2gi1Pr.S6kFshN39Gls = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(752 - 703) + chr(48) + '\x30' + chr(1757 - 1709) + '\060', 8) n4ljua2gi1Pr.LURxj9xCZBcH = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', 60063 - 60055) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1_l4k_local_only
def xmoe2_v1_l4k_local_only(): """With sequence length 4096.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "local_att" if l == "att" else l for l in hparams.decoder_layers] return hparams
python
def xmoe2_v1_l4k_local_only(): """With sequence length 4096.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "local_att" if l == "att" else l for l in hparams.decoder_layers] return hparams
[ "def", "xmoe2_v1_l4k_local_only", "(", ")", ":", "hparams", "=", "xmoe2_v1_l4k", "(", ")", "hparams", ".", "decoder_layers", "=", "[", "\"local_att\"", "if", "l", "==", "\"att\"", "else", "l", "for", "l", "in", "hparams", ".", "decoder_layers", "]", "return", "hparams" ]
With sequence length 4096.
[ "With", "sequence", "length", "4096", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L356-L361
train
With sequence length 4096.
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,rIc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az9UM0,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) + chr(8879 - 8768) + chr(2284 - 2235) + chr(0b100100 + 0o23) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\060' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(1719 - 1670) + chr(100 - 46) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1598 - 1547) + chr(0b110000) + '\064', 0o10), ehT0Px3KOsy9(chr(578 - 530) + chr(111) + chr(0b110010) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(878 - 828) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2281 - 2230) + chr(0b110010) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b100010 + 0o17) + chr(53) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(51) + chr(0b101 + 0o62) + chr(0b110001), 45665 - 45657), ehT0Px3KOsy9(chr(778 - 730) + chr(0b1100 + 0o143) + chr(2365 - 2316) + chr(0b110010 + 0o3) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110101) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101 + 0o55) + '\x35' + chr(0b110010), 48997 - 48989), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011110 + 0o21) + chr(0b110100) + chr(852 - 803), 0o10), ehT0Px3KOsy9(chr(1404 - 1356) + chr(0b1101111) + chr(51) + chr(0b110000) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + '\x33' + chr(2200 - 2145) + '\062', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(806 - 755), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5219 - 5108) + chr(0b110001) + chr(51) + chr(0b100 + 0o56), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101 + 0o56) + '\062' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1543 - 1432) + chr(51) + chr(0b110001) + '\064', 36797 - 36789), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(1887 - 1837) + chr(1787 - 1738), 15358 - 15350), ehT0Px3KOsy9(chr(464 - 416) + chr(8101 - 7990) + '\x37' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(563 - 515) + chr(111) + '\063' + chr(51) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3579 - 3468) + chr(49) + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11188 - 11077) + chr(0b101000 + 0o13) + '\067' + chr(2010 - 1959), 60000 - 59992), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(0b110101) + chr(0b10011 + 0o43), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(10131 - 10020) + chr(0b10011 + 0o36) + '\x33' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110111) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(48) + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b110110) + chr(50), 32113 - 32105), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\067' + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1569 - 1518) + chr(2109 - 2057) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1010 + 0o145) + '\x37' + chr(1111 - 1059), 10908 - 10900), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(48) + chr(464 - 413), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(51) + chr(0b11001 + 0o35), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1917 - 1866) + chr(1341 - 1290) + chr(49), 26269 - 26261), ehT0Px3KOsy9(chr(48) + '\157' + chr(2017 - 1966) + chr(0b110100) + chr(442 - 392), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\065' + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'R'), chr(2663 - 2563) + chr(0b101000 + 0o75) + '\143' + chr(0b11001 + 0o126) + chr(3320 - 3220) + chr(6979 - 6878))('\165' + chr(0b1000111 + 0o55) + chr(102) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ExCSWuBOPTE3(): n4ljua2gi1Pr = gP4Oij2Fb3p6() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x10\xe9\x12\xa5xH\xb7c\x1e'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(116) + chr(0b1011000 + 0o16) + chr(419 - 374) + chr(0b110001 + 0o7)) if aLoH_Mt0dzwO == xafqLlk3kkUe(SXOLrMavuUCe(b'\x1d\xf2\x05'), chr(8525 - 8425) + chr(0b1100101) + chr(0b100010 + 0o101) + '\x6f' + chr(100) + '\x65')(chr(2658 - 2541) + chr(116) + '\146' + '\055' + chr(56)) else aLoH_Mt0dzwO for aLoH_Mt0dzwO in n4ljua2gi1Pr.DuMwu3fbieF4] return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1_l4k_global_only
def xmoe2_v1_l4k_global_only(): """With sequence length 4096.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "att" if l == "local_att" else l for l in hparams.decoder_layers] return hparams
python
def xmoe2_v1_l4k_global_only(): """With sequence length 4096.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "att" if l == "local_att" else l for l in hparams.decoder_layers] return hparams
[ "def", "xmoe2_v1_l4k_global_only", "(", ")", ":", "hparams", "=", "xmoe2_v1_l4k", "(", ")", "hparams", ".", "decoder_layers", "=", "[", "\"att\"", "if", "l", "==", "\"local_att\"", "else", "l", "for", "l", "in", "hparams", ".", "decoder_layers", "]", "return", "hparams" ]
With sequence length 4096.
[ "With", "sequence", "length", "4096", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L365-L370
train
With sequence length 4096.
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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8rvoPw8ep3k,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(0b101 + 0o53) + '\x6f' + chr(0b110011) + chr(53) + chr(0b110010), 37204 - 37196), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110000) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(51) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101000 + 0o12) + '\065' + '\067', 0b1000), ehT0Px3KOsy9(chr(736 - 688) + chr(0b1101111) + chr(1741 - 1691) + chr(0b110011) + chr(1172 - 1119), 0o10), ehT0Px3KOsy9(chr(525 - 477) + chr(0b1101111) + '\x32' + '\065' + chr(0b110010), 14759 - 14751), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(11820 - 11709) + '\063' + chr(825 - 772) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110010) + chr(0b111 + 0o60) + chr(0b11000 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(50 - 2) + '\157' + chr(1015 - 964) + chr(0b10011 + 0o40) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1967 - 1918) + '\x32' + chr(0b110011 + 0o1), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(55) + chr(0b10010 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(49), 56577 - 56569), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110010) + chr(0b10010 + 0o41), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\062' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\063' + chr(0b1001 + 0o55), 8), ehT0Px3KOsy9(chr(476 - 428) + '\157' + chr(1625 - 1576), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(7365 - 7254) + chr(51) + chr(1212 - 1161) + chr(828 - 778), 8), ehT0Px3KOsy9(chr(0b110000) + chr(7750 - 7639) + '\x33' + '\x36' + chr(1155 - 1101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + chr(0b110011) + chr(2375 - 2320) + chr(2117 - 2064), ord("\x08")), ehT0Px3KOsy9(chr(371 - 323) + chr(0b110001 + 0o76) + chr(50) + chr(0b110001 + 0o2) + chr(52), 30462 - 30454), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(0b1001 + 0o51), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + '\x32' + chr(1945 - 1894) + '\064', 8), ehT0Px3KOsy9(chr(1691 - 1643) + chr(0b1101111) + chr(0b1000 + 0o53) + '\062' + chr(0b110000), 19733 - 19725), ehT0Px3KOsy9(chr(48) + chr(0b1011 + 0o144) + chr(2376 - 2326) + chr(0b110110) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b101010 + 0o12) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(1109 - 1061) + chr(0b11111 + 0o120) + '\x33' + chr(0b110111) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110000) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(395 - 345) + chr(0b110111) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1035 - 987) + chr(0b1111 + 0o140) + chr(2014 - 1962) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10001 + 0o136) + '\063' + chr(49) + chr(0b11101 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110000) + '\062', 29964 - 29956), ehT0Px3KOsy9(chr(693 - 645) + '\157' + chr(51) + chr(51) + chr(401 - 351), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110111) + '\061', 14670 - 14662), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(49) + chr(55), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100 + 0o57) + '\063', 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\x32' + chr(0b11011 + 0o27) + chr(351 - 301), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\066' + chr(0b110100), 0o10)][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'\xc4'), chr(0b101111 + 0o65) + chr(0b111 + 0o136) + chr(6157 - 6058) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(10685 - 10568) + chr(9000 - 8884) + chr(0b1010101 + 0o21) + chr(1550 - 1505) + chr(0b10111 + 0o41)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RX9Av9stJAOT(): n4ljua2gi1Pr = gP4Oij2Fb3p6() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\xb1\xab'), chr(100) + chr(101) + '\x63' + chr(10829 - 10718) + chr(8333 - 8233) + chr(1675 - 1574))('\165' + chr(0b1110100) + chr(6699 - 6597) + chr(0b101101) + '\070') if aLoH_Mt0dzwO == xafqLlk3kkUe(SXOLrMavuUCe(b'\x86\xaa\xbcv\xc3\xc2\xcb\x98\xcc'), '\144' + chr(4816 - 4715) + '\143' + '\x6f' + chr(0b100101 + 0o77) + chr(0b111111 + 0o46))('\x75' + '\164' + chr(0b1100110) + chr(45) + '\x38') else aLoH_Mt0dzwO for aLoH_Mt0dzwO in n4ljua2gi1Pr.DuMwu3fbieF4] return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
xmoe2_v1_l4k_compressed_c4
def xmoe2_v1_l4k_compressed_c4(): """With compressed attention.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "compressed_att" if l == "att" else l for l in hparams.decoder_layers] hparams.compression_factor = 4 return hparams
python
def xmoe2_v1_l4k_compressed_c4(): """With compressed attention.""" hparams = xmoe2_v1_l4k() hparams.decoder_layers = [ "compressed_att" if l == "att" else l for l in hparams.decoder_layers] hparams.compression_factor = 4 return hparams
[ "def", "xmoe2_v1_l4k_compressed_c4", "(", ")", ":", "hparams", "=", "xmoe2_v1_l4k", "(", ")", "hparams", ".", "decoder_layers", "=", "[", "\"compressed_att\"", "if", "l", "==", "\"att\"", "else", "l", "for", "l", "in", "hparams", ".", "decoder_layers", "]", "hparams", ".", "compression_factor", "=", "4", "return", "hparams" ]
With compressed attention.
[ "With", "compressed", "attention", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L374-L380
train
With compressed attention.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_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NKaIaWE,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' + chr(53) + chr(0b1100 + 0o51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(1945 - 1896) + '\x37' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(1544 - 1496) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(12212 - 12101) + chr(0b100110 + 0o14) + '\064' + chr(0b11000 + 0o34), 529 - 521), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110011 + 0o0) + chr(0b110011), 22856 - 22848), ehT0Px3KOsy9(chr(1398 - 1350) + chr(0b100011 + 0o114) + chr(0b110001) + '\062' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(2570 - 2518) + chr(0b10101 + 0o40), 5461 - 5453), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(9185 - 9074) + chr(49) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(559 - 511) + '\157' + chr(1884 - 1833) + chr(0b110001) + '\060', 0o10), ehT0Px3KOsy9(chr(759 - 711) + '\157' + chr(1182 - 1127), 58630 - 58622), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(51) + '\061' + chr(0b1001 + 0o51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110001) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x36' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(2294 - 2245) + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + '\x34' + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(54), 11771 - 11763), ehT0Px3KOsy9(chr(813 - 765) + '\x6f' + chr(49) + chr(0b10011 + 0o35) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(254 - 199) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(0b101110 + 0o5) + chr(0b110001) + chr(48), 8), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(699 - 648) + '\x32' + chr(0b110101), 12172 - 12164), ehT0Px3KOsy9(chr(150 - 102) + chr(385 - 274) + chr(712 - 662) + chr(1978 - 1926) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + '\061' + '\x34' + chr(1118 - 1070), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(0b110010) + '\060', 0o10), ehT0Px3KOsy9(chr(358 - 310) + chr(1248 - 1137) + chr(0b110010) + '\067' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2315 - 2266) + '\x31' + chr(0b10100 + 0o34), 35216 - 35208), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1110 + 0o44) + chr(0b101 + 0o62) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(0b101 + 0o56) + chr(50) + chr(1088 - 1038), 28445 - 28437), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(0b10100 + 0o34) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(52) + chr(0b110011), 32180 - 32172), ehT0Px3KOsy9(chr(2178 - 2130) + chr(111) + chr(0b110010 + 0o2) + chr(1270 - 1218), 11318 - 11310), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(50) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\x34' + chr(1520 - 1465), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1010101 + 0o32) + chr(0b1001 + 0o56) + '\x33', 7905 - 7897), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b11000 + 0o35) + '\066', 5327 - 5319), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1000 + 0o56) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(198 - 87) + chr(2023 - 1973) + chr(0b101001 + 0o12) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(2200 - 2149) + chr(2210 - 2160) + '\066', 0b1000), ehT0Px3KOsy9(chr(1153 - 1105) + '\157' + '\061' + chr(0b110001 + 0o1) + '\x34', 0b1000), ehT0Px3KOsy9(chr(1712 - 1664) + '\157' + chr(0b1001 + 0o50) + chr(2112 - 2063) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\064' + chr(0b110100), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(1625 - 1572) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x83'), chr(4978 - 4878) + '\145' + chr(0b1100011) + chr(4195 - 4084) + chr(4159 - 4059) + '\145')('\x75' + chr(4253 - 4137) + chr(6066 - 5964) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ELA4GMo2ntNJ(): n4ljua2gi1Pr = gP4Oij2Fb3p6() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xce\x17\xeb\xd4\xa92Vx\xadc\x95\xec\x03\xbe'), '\144' + '\x65' + chr(8948 - 8849) + chr(8033 - 7922) + chr(0b111000 + 0o54) + '\x65')(chr(8852 - 8735) + chr(12437 - 12321) + '\x66' + '\x2d' + '\x38') if aLoH_Mt0dzwO == xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\x0c\xf2'), '\x64' + chr(0b1011101 + 0o10) + '\143' + chr(0b1101111) + '\144' + chr(0b10001 + 0o124))('\165' + '\x74' + '\x66' + '\x2d' + chr(0b110111 + 0o1)) else aLoH_Mt0dzwO for aLoH_Mt0dzwO in n4ljua2gi1Pr.DuMwu3fbieF4] n4ljua2gi1Pr.VO1jlq_Tr8Cl = ehT0Px3KOsy9(chr(48) + chr(9714 - 9603) + '\064', ord("\x08")) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
wiki_2x2_base
def wiki_2x2_base(): """Set of architectural experiments - language model on wikipedia on a 2x2. 1 epoch = ~180k steps at batch size 32 - we may never finish an epoch! Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_base_lm() hparams.shared_embedding_and_softmax_weights = False # no dropout - dataset is big enough to avoid overfitting. hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 hparams.max_length = 1024 # 4 sequences per core hparams.batch_size = 32 # We don't use linear decay in these experiments, since we don't want # a sharp jump in quality at the end of the training schedule. # You can insert this once you find the right architecture. hparams.learning_rate_schedule = "rsqrt_decay" hparams.mesh_shape = "all:8" hparams.layout = "batch:all;experts:all" # parameters for mixture-of-experts moe.set_default_moe_hparams(hparams) hparams.moe_num_experts = 16 hparams.moe_hidden_size = 8192 hparams.decoder_layers = ["att", "drd"] * 6 hparams.d_model = 1024 hparams.d_ff = 2048 hparams.d_kv = 128 hparams.num_heads = 4 return hparams
python
def wiki_2x2_base(): """Set of architectural experiments - language model on wikipedia on a 2x2. 1 epoch = ~180k steps at batch size 32 - we may never finish an epoch! Returns: a hparams """ hparams = mtf_transformer.mtf_transformer_base_lm() hparams.shared_embedding_and_softmax_weights = False # no dropout - dataset is big enough to avoid overfitting. hparams.attention_dropout = 0.0 hparams.relu_dropout = 0.0 hparams.layer_prepostprocess_dropout = 0.0 hparams.max_length = 1024 # 4 sequences per core hparams.batch_size = 32 # We don't use linear decay in these experiments, since we don't want # a sharp jump in quality at the end of the training schedule. # You can insert this once you find the right architecture. hparams.learning_rate_schedule = "rsqrt_decay" hparams.mesh_shape = "all:8" hparams.layout = "batch:all;experts:all" # parameters for mixture-of-experts moe.set_default_moe_hparams(hparams) hparams.moe_num_experts = 16 hparams.moe_hidden_size = 8192 hparams.decoder_layers = ["att", "drd"] * 6 hparams.d_model = 1024 hparams.d_ff = 2048 hparams.d_kv = 128 hparams.num_heads = 4 return hparams
[ "def", "wiki_2x2_base", "(", ")", ":", "hparams", "=", "mtf_transformer", ".", "mtf_transformer_base_lm", "(", ")", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "False", "# no dropout - dataset is big enough to avoid overfitting.", "hparams", ".", "attention_dropout", "=", "0.0", "hparams", ".", "relu_dropout", "=", "0.0", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.0", "hparams", ".", "max_length", "=", "1024", "# 4 sequences per core", "hparams", ".", "batch_size", "=", "32", "# We don't use linear decay in these experiments, since we don't want", "# a sharp jump in quality at the end of the training schedule.", "# You can insert this once you find the right architecture.", "hparams", ".", "learning_rate_schedule", "=", "\"rsqrt_decay\"", "hparams", ".", "mesh_shape", "=", "\"all:8\"", "hparams", ".", "layout", "=", "\"batch:all;experts:all\"", "# parameters for mixture-of-experts", "moe", ".", "set_default_moe_hparams", "(", "hparams", ")", "hparams", ".", "moe_num_experts", "=", "16", "hparams", ".", "moe_hidden_size", "=", "8192", "hparams", ".", "decoder_layers", "=", "[", "\"att\"", ",", "\"drd\"", "]", "*", "6", "hparams", ".", "d_model", "=", "1024", "hparams", ".", "d_ff", "=", "2048", "hparams", ".", "d_kv", "=", "128", "hparams", ".", "num_heads", "=", "4", "return", "hparams" ]
Set of architectural experiments - language model on wikipedia on a 2x2. 1 epoch = ~180k steps at batch size 32 - we may never finish an epoch! Returns: a hparams
[ "Set", "of", "architectural", "experiments", "-", "language", "model", "on", "wikipedia", "on", "a", "2x2", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L392-L427
train
Architectural experiments on 2x2 base model.
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,_b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KaIaWE,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(0b110010) + chr(0b110110) + chr(54), 0o10), ehT0Px3KOsy9(chr(862 - 814) + chr(111) + chr(0b110011) + chr(52) + chr(0b1101 + 0o51), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(529 - 479) + chr(0b110000), 35038 - 35030), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + chr(0b10001 + 0o41) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010111 + 0o30) + '\x31' + chr(51) + chr(0b100110 + 0o16), 9741 - 9733), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\064' + chr(850 - 795), 65121 - 65113), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(49) + chr(692 - 639) + '\x35', 36923 - 36915), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\064' + '\064', 59320 - 59312), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\061' + chr(928 - 880), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(52) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110000), 65201 - 65193), ehT0Px3KOsy9(chr(48) + chr(4115 - 4004) + chr(0b110011) + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(2577 - 2523) + chr(790 - 741), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x35' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o57) + '\060' + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9(chr(1033 - 985) + chr(111) + chr(2417 - 2366) + '\067' + '\x36', 38079 - 38071), ehT0Px3KOsy9(chr(1868 - 1820) + chr(0b1010000 + 0o37) + chr(0b10000 + 0o41) + chr(0b11000 + 0o31) + chr(48), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b110001) + '\062', 0o10), ehT0Px3KOsy9(chr(277 - 229) + chr(0b1101111) + '\x32' + chr(53) + '\x33', 0b1000), ehT0Px3KOsy9(chr(1627 - 1579) + chr(111) + chr(0b110010) + '\066', 29918 - 29910), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110101) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\062' + chr(0b100010 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\x33', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b110011) + chr(0b101101 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + chr(1385 - 1274) + chr(0b101100 + 0o13) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1000011 + 0o54) + '\x36' + chr(49), 11076 - 11068), ehT0Px3KOsy9('\x30' + chr(7257 - 7146) + chr(0b110011) + '\x34' + chr(0b110001), 796 - 788), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + chr(0b110011) + chr(0b10000 + 0o44) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\067', 30203 - 30195), ehT0Px3KOsy9('\060' + '\x6f' + chr(430 - 379) + '\061' + chr(0b110101), 55812 - 55804), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(159 - 107) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + chr(0b1 + 0o62) + '\x36' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(0b11110 + 0o25) + chr(0b100010 + 0o25) + chr(283 - 231), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(1471 - 1421) + '\x34' + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b110100) + chr(0b1000 + 0o51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(54) + chr(1676 - 1622), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101110 + 0o4) + chr(49) + chr(373 - 323), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31', 58047 - 58039), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1443 - 1394) + '\x31' + chr(0b1000 + 0o50), 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b110001) + '\x36', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1838 - 1790) + chr(0b1101111) + '\065' + chr(48), 47809 - 47801)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x98'), chr(189 - 89) + '\x65' + chr(7882 - 7783) + chr(0b1101111) + chr(2942 - 2842) + chr(876 - 775))(chr(0b1101100 + 0o11) + '\x74' + '\x66' + chr(0b101001 + 0o4) + chr(2186 - 2130)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def J6gtDD4Nm79t(): n4ljua2gi1Pr = sUNVhY1SsRaJ.mtf_transformer_base_lm() n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9(chr(204 - 156) + chr(0b1101111) + '\x30', 0b1000) n4ljua2gi1Pr.RdMRr3qkYioQ = 0.0 n4ljua2gi1Pr.PJc0PNdBnSag = 0.0 n4ljua2gi1Pr.RW_xSzp18UeS = 0.0 n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b110010) + chr(0b101100 + 0o4) + chr(0b110000) + chr(2134 - 2086), ord("\x08")) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(48) + '\x6f' + '\x34' + chr(955 - 907), 0b1000) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'\xc4\x95aa(\xf8\tA+Fa'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + '\070') n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\x8a|)d'), chr(0b1010101 + 0o17) + '\145' + chr(0b111000 + 0o53) + chr(0b1101111) + chr(6436 - 6336) + chr(101))('\165' + chr(116) + chr(0b1000111 + 0o37) + chr(0b101101) + chr(0b111000)) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\x87dp4\x9d\x0cH$\x1c}\x9f\xc1\x8c0\x8a;\xb0\xcaz\xc3'), chr(100) + chr(0b1100101) + chr(0b100011 + 0o100) + '\157' + '\x64' + '\145')(chr(0b1110100 + 0o1) + '\x74' + chr(102) + '\055' + chr(0b111000)) xafqLlk3kkUe(I9mxNdGz3brw, xafqLlk3kkUe(SXOLrMavuUCe(b"\xc5\x83dL8\xc2\x0bE=Kl\xb8\xdc\x86'\xa1 \xfa\xcad\xce\xbf`"), '\x64' + '\x65' + '\x63' + '\157' + chr(100) + chr(0b1100101))(chr(5936 - 5819) + '\164' + chr(102) + '\x2d' + chr(56)))(n4ljua2gi1Pr) n4ljua2gi1Pr.r99iQzD4Y8i3 = ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(1063 - 1013) + '\060', 8) n4ljua2gi1Pr.IHhsiEth2fU8 = ehT0Px3KOsy9(chr(364 - 316) + chr(5866 - 5755) + '\062' + chr(2227 - 2179) + chr(2158 - 2110) + chr(0b110000) + chr(0b110000), 0b1000) n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7\x92d'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\157' + '\144' + '\145')(chr(11858 - 11741) + chr(116) + chr(0b10100 + 0o122) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xd2\x94t'), chr(0b1100100) + '\145' + '\143' + '\157' + chr(0b0 + 0o144) + chr(101))(chr(0b1010110 + 0o37) + chr(4311 - 4195) + chr(0b1100000 + 0o6) + '\x2d' + chr(3108 - 3052))] * ehT0Px3KOsy9(chr(48) + chr(4758 - 4647) + '\x36', 0o10) n4ljua2gi1Pr.dHIk6a7HYqLO = ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + chr(50) + '\060' + chr(48) + chr(0b110000), 8) n4ljua2gi1Pr.EpyOHjLLhjxL = ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + chr(52) + chr(0b11010 + 0o26) + chr(1078 - 1030) + chr(0b101100 + 0o4), 0b1000) n4ljua2gi1Pr.cboJxztkwgnV = ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x30' + chr(0b110000), 22668 - 22660) n4ljua2gi1Pr.vRVqPOZ1hUG7 = ehT0Px3KOsy9('\060' + chr(111) + chr(52), 0b1000) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
denoise_z15
def denoise_z15(): """Replace tokens instead of masking.""" hparams = xmoe2_dense_0() hparams.decoder_type = "denoising" hparams.noising_spec_train = {"type": "random_zipfian", "prob": 0.15} hparams.noising_use_eval_during_train = 0.25 return hparams
python
def denoise_z15(): """Replace tokens instead of masking.""" hparams = xmoe2_dense_0() hparams.decoder_type = "denoising" hparams.noising_spec_train = {"type": "random_zipfian", "prob": 0.15} hparams.noising_use_eval_during_train = 0.25 return hparams
[ "def", "denoise_z15", "(", ")", ":", "hparams", "=", "xmoe2_dense_0", "(", ")", "hparams", ".", "decoder_type", "=", "\"denoising\"", "hparams", ".", "noising_spec_train", "=", "{", "\"type\"", ":", "\"random_zipfian\"", ",", "\"prob\"", ":", "0.15", "}", "hparams", ".", "noising_use_eval_during_train", "=", "0.25", "return", "hparams" ]
Replace tokens instead of masking.
[ "Replace", "tokens", "instead", "of", "masking", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L474-L480
train
Replace tokens instead of masking.
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,eh4B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EeM4cxI,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(0b1100100 + 0o13) + chr(0b110001) + chr(0b101000 + 0o13) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110101) + chr(0b0 + 0o62), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b100101 + 0o16) + chr(51) + chr(0b100 + 0o60), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35' + '\x35', 38014 - 38006), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(48) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(1742 - 1694) + chr(111) + chr(2222 - 2172) + '\067' + '\062', 0b1000), ehT0Px3KOsy9(chr(1769 - 1721) + chr(7053 - 6942) + '\064' + chr(0b101000 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(4366 - 4255) + chr(0b110001) + chr(0b100110 + 0o16) + chr(0b10111 + 0o36), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110111) + chr(0b0 + 0o65), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\065' + chr(0b11 + 0o61), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(48) + chr(0b100011 + 0o21), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(980 - 932) + '\157' + chr(0b110000 + 0o2) + chr(48) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + '\x31' + chr(0b11010 + 0o26) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\x30' + chr(0b110001), 14245 - 14237), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(1269 - 1158) + '\x33' + chr(0b1100 + 0o46) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(0b110111) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b111010 + 0o65) + '\063' + chr(0b110001) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3524 - 3413) + chr(51) + chr(52) + chr(0b1111 + 0o46), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1093 - 1042) + chr(0b110111) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + chr(0b110001) + chr(0b110011) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x33' + chr(2157 - 2109), 31735 - 31727), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101100 + 0o7) + chr(48), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(1018 - 969) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7340 - 7229) + chr(0b110001) + chr(0b110011 + 0o3) + chr(0b1011 + 0o45), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100011 + 0o14) + chr(49) + '\066' + '\061', 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + '\061' + '\x30' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b1010 + 0o55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + chr(49) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x35', 55978 - 55970), ehT0Px3KOsy9(chr(956 - 908) + chr(0b1000000 + 0o57) + chr(0b110011) + '\x32' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(400 - 349) + chr(0b110101) + '\x36', 7460 - 7452), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(2273 - 2223) + chr(0b101010 + 0o11), 43106 - 43098), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(2238 - 2190) + '\066', 34489 - 34481), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2106 - 2055) + chr(0b110011) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(50) + '\x32' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1323 - 1272) + '\x32', 0o10), ehT0Px3KOsy9(chr(1998 - 1950) + chr(111) + '\063' + '\067' + chr(0b11001 + 0o35), 8), ehT0Px3KOsy9(chr(304 - 256) + chr(111) + chr(0b100111 + 0o12) + chr(0b110001 + 0o0) + '\060', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1906 - 1858) + chr(0b1101111) + chr(1917 - 1864) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b't'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1010100 + 0o41) + '\x74' + chr(0b1100110) + chr(0b101001 + 0o4) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uNg8zTL3WYYd(): n4ljua2gi1Pr = r6P5dFNwYkqy() n4ljua2gi1Pr.o1BAxC86F09_ = xafqLlk3kkUe(SXOLrMavuUCe(b'>\x0f\xb2wD\xf2\xd3L\x02'), chr(100) + chr(8219 - 8118) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(1571 - 1470))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1140 - 1095) + chr(0b111000)) n4ljua2gi1Pr.jay1KrKpaJUL = {xafqLlk3kkUe(SXOLrMavuUCe(b'.\x13\xac}'), '\144' + '\145' + chr(6468 - 6369) + '\157' + '\x64' + '\x65')(chr(0b1110101) + chr(0b110111 + 0o75) + chr(6520 - 6418) + chr(1827 - 1782) + '\070'): xafqLlk3kkUe(SXOLrMavuUCe(b'(\x0b\xb2|B\xec\xe5X\x0c\x8dJ-\xc0\xe9'), chr(0b1100100) + '\145' + chr(7804 - 7705) + chr(1923 - 1812) + chr(3576 - 3476) + chr(9036 - 8935))(chr(117) + chr(0b1110000 + 0o4) + chr(0b1000100 + 0o42) + '\x2d' + chr(0b110100 + 0o4)), xafqLlk3kkUe(SXOLrMavuUCe(b'*\x18\xb3z'), chr(0b1000000 + 0o44) + '\145' + chr(99) + chr(111) + chr(6676 - 6576) + chr(101))('\165' + chr(13316 - 13200) + '\146' + chr(0b100010 + 0o13) + '\070'): 0.15} n4ljua2gi1Pr.Epqre7lMf3WN = 0.25 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/moe_experiments.py
denoise_v1_m15
def denoise_v1_m15(): """Denoising experiment.""" hparams = xmoe2_v1() # no local attention # TODO(noam): non-masked version of local-attention hparams.decoder_layers = [ "att" if l == "local_att" else l for l in hparams.decoder_layers] hparams.decoder_type = "denoising" hparams.noising_spec_train = {"type": "mask", "prob": 0.15} return hparams
python
def denoise_v1_m15(): """Denoising experiment.""" hparams = xmoe2_v1() # no local attention # TODO(noam): non-masked version of local-attention hparams.decoder_layers = [ "att" if l == "local_att" else l for l in hparams.decoder_layers] hparams.decoder_type = "denoising" hparams.noising_spec_train = {"type": "mask", "prob": 0.15} return hparams
[ "def", "denoise_v1_m15", "(", ")", ":", "hparams", "=", "xmoe2_v1", "(", ")", "# no local attention", "# TODO(noam): non-masked version of local-attention", "hparams", ".", "decoder_layers", "=", "[", "\"att\"", "if", "l", "==", "\"local_att\"", "else", "l", "for", "l", "in", "hparams", ".", "decoder_layers", "]", "hparams", ".", "decoder_type", "=", "\"denoising\"", "hparams", ".", "noising_spec_train", "=", "{", "\"type\"", ":", "\"mask\"", ",", "\"prob\"", ":", "0.15", "}", "return", "hparams" ]
Denoising experiment.
[ "Denoising", "experiment", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/moe_experiments.py#L503-L512
train
Denoising experiment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYic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TYZGD68sBIs,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(9142 - 9031) + '\063' + chr(0b1000 + 0o57) + chr(0b110101), 23916 - 23908), ehT0Px3KOsy9('\x30' + chr(111) + chr(2362 - 2313) + chr(733 - 683) + chr(360 - 310), 2373 - 2365), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + '\x35' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\061' + chr(2226 - 2176), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\061' + chr(0b11011 + 0o25), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + '\x31', 0o10), ehT0Px3KOsy9(chr(889 - 841) + chr(0b1101101 + 0o2) + chr(2138 - 2088) + chr(0b101000 + 0o15) + '\x32', 31829 - 31821), ehT0Px3KOsy9(chr(373 - 325) + chr(0b1000001 + 0o56) + chr(49) + chr(51) + chr(0b1010 + 0o53), 62258 - 62250), ehT0Px3KOsy9('\x30' + '\x6f' + chr(798 - 748) + chr(0b110101 + 0o2) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + '\061' + chr(50) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(9523 - 9412) + '\x31' + '\x34' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + '\x33' + '\x35' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(0b101110 + 0o4) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(578 - 529) + '\x31', 8), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(0b10 + 0o60) + chr(55) + chr(0b110100), 24943 - 24935), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(0b110110) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(425 - 376) + chr(53) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + chr(320 - 266), 3277 - 3269), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\x36' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + chr(50) + chr(654 - 599) + chr(1666 - 1614), 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b10011 + 0o134) + '\x33' + '\x31' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b101101 + 0o6) + chr(0b110010), 15841 - 15833), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(114 - 62) + chr(2190 - 2142), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b111110 + 0o61) + '\x31' + chr(0b10001 + 0o45) + '\x37', 8), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + chr(0b110001) + chr(400 - 348) + '\067', 38510 - 38502), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x31' + chr(50), 8), ehT0Px3KOsy9(chr(336 - 288) + chr(111) + chr(50) + chr(0b10101 + 0o42) + chr(54), 8), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(49) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(5135 - 5024) + chr(173 - 124) + chr(0b110001) + chr(0b111 + 0o55), 0o10), ehT0Px3KOsy9(chr(1006 - 958) + chr(7064 - 6953) + '\061' + chr(2265 - 2217), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\x32' + chr(53), 60770 - 60762), ehT0Px3KOsy9('\x30' + chr(4925 - 4814) + '\061' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(2552 - 2500) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b10110 + 0o33) + '\x37' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + '\062' + '\064' + chr(2415 - 2363), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101 + 0o54) + chr(0b110 + 0o57) + chr(168 - 120), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110110) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + chr(0b101101 + 0o3), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(53) + chr(0b101 + 0o60), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(159 - 106) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3'), chr(0b1100100) + chr(0b101110 + 0o67) + '\x63' + '\x6f' + '\144' + chr(101))('\165' + chr(116) + '\x66' + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uu2DliBwvWAJ(): n4ljua2gi1Pr = eTwRjfus7I6G() n4ljua2gi1Pr.DuMwu3fbieF4 = [xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c&\x1e'), '\x64' + '\145' + chr(4146 - 4047) + chr(111) + '\x64' + chr(0b110000 + 0o65))(chr(0b100101 + 0o120) + chr(0b1110100) + chr(0b1000101 + 0o41) + chr(256 - 211) + '\070') if aLoH_Mt0dzwO == xafqLlk3kkUe(SXOLrMavuUCe(b'\x91=\t\xeb\xe4V\xcb)\xca'), '\x64' + chr(5170 - 5069) + chr(99) + chr(0b1010011 + 0o34) + '\x64' + chr(9432 - 9331))(chr(11332 - 11215) + chr(8846 - 8730) + chr(102) + '\055' + '\x38') else aLoH_Mt0dzwO for aLoH_Mt0dzwO in n4ljua2gi1Pr.DuMwu3fbieF4] n4ljua2gi1Pr.o1BAxC86F09_ = xafqLlk3kkUe(SXOLrMavuUCe(b'\x997\x04\xe5\xe1z\xc33\xd9'), chr(0b1100100) + chr(101) + '\x63' + chr(4338 - 4227) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(56)) n4ljua2gi1Pr.jay1KrKpaJUL = {xafqLlk3kkUe(SXOLrMavuUCe(b'\x89+\x1a\xef'), chr(0b1010110 + 0o16) + chr(2040 - 1939) + chr(5795 - 5696) + chr(0b10111 + 0o130) + chr(9981 - 9881) + chr(101))(chr(0b11000 + 0o135) + chr(0b111 + 0o155) + chr(102) + chr(45) + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x903\x19\xe1'), chr(681 - 581) + chr(6682 - 6581) + chr(0b1100011) + chr(0b1101111) + chr(0b0 + 0o144) + chr(2135 - 2034))('\165' + chr(8057 - 7941) + chr(102) + '\055' + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d \x05\xe8'), '\x64' + chr(0b10100 + 0o121) + chr(6874 - 6775) + chr(0b1101111) + chr(0b100010 + 0o102) + '\x65')(chr(0b1011011 + 0o32) + chr(116) + chr(0b111100 + 0o52) + chr(45) + '\070'): 0.15} return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math_two_variables.py
_download_mlu_data
def _download_mlu_data(tmp_dir, data_dir): """Downloads and extracts the dataset. Args: tmp_dir: temp directory to download and extract the dataset data_dir: The base directory where data and vocab files are stored. Returns: tmp_dir: temp directory containing the raw data. """ if not tf.gfile.Exists(data_dir): tf.gfile.MakeDirs(data_dir) filename = os.path.basename(_URL) file_path = os.path.join(tmp_dir, filename) headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/63.0.3239.132 Safari/537.36"} resp = requests.get(_URL, headers=headers) with open(file_path, "wb") as f: f.write(resp.content) with tarfile.open(file_path, "r:gz") as tar: tar.extractall(tmp_dir) return tmp_dir
python
def _download_mlu_data(tmp_dir, data_dir): """Downloads and extracts the dataset. Args: tmp_dir: temp directory to download and extract the dataset data_dir: The base directory where data and vocab files are stored. Returns: tmp_dir: temp directory containing the raw data. """ if not tf.gfile.Exists(data_dir): tf.gfile.MakeDirs(data_dir) filename = os.path.basename(_URL) file_path = os.path.join(tmp_dir, filename) headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) " "AppleWebKit/537.36 (KHTML, like Gecko) " "Chrome/63.0.3239.132 Safari/537.36"} resp = requests.get(_URL, headers=headers) with open(file_path, "wb") as f: f.write(resp.content) with tarfile.open(file_path, "r:gz") as tar: tar.extractall(tmp_dir) return tmp_dir
[ "def", "_download_mlu_data", "(", "tmp_dir", ",", "data_dir", ")", ":", "if", "not", "tf", ".", "gfile", ".", "Exists", "(", "data_dir", ")", ":", "tf", ".", "gfile", ".", "MakeDirs", "(", "data_dir", ")", "filename", "=", "os", ".", "path", ".", "basename", "(", "_URL", ")", "file_path", "=", "os", ".", "path", ".", "join", "(", "tmp_dir", ",", "filename", ")", "headers", "=", "{", "\"User-Agent\"", ":", "\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) \"", "\"AppleWebKit/537.36 (KHTML, like Gecko) \"", "\"Chrome/63.0.3239.132 Safari/537.36\"", "}", "resp", "=", "requests", ".", "get", "(", "_URL", ",", "headers", "=", "headers", ")", "with", "open", "(", "file_path", ",", "\"wb\"", ")", "as", "f", ":", "f", ".", "write", "(", "resp", ".", "content", ")", "with", "tarfile", ".", "open", "(", "file_path", ",", "\"r:gz\"", ")", "as", "tar", ":", "tar", ".", "extractall", "(", "tmp_dir", ")", "return", "tmp_dir" ]
Downloads and extracts the dataset. Args: tmp_dir: temp directory to download and extract the dataset data_dir: The base directory where data and vocab files are stored. Returns: tmp_dir: temp directory containing the raw data.
[ "Downloads", "and", "extracts", "the", "dataset", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math_two_variables.py#L60-L85
train
Downloads and extracts the dataset.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5V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YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(844 - 796) + chr(111) + chr(50) + chr(0b10000 + 0o43) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x36' + chr(0b101111 + 0o7), 64238 - 64230), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(1610 - 1560) + chr(0b110000), 22618 - 22610), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\062' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(2126 - 2015) + chr(0b110011) + chr(53) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5261 - 5150) + chr(1605 - 1556) + chr(0b110010) + '\x35', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\065' + '\066', 15116 - 15108), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(2139 - 2091) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(6220 - 6109) + chr(0b110001) + chr(50) + chr(606 - 554), 51316 - 51308), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(49) + chr(0b11011 + 0o30) + chr(0b101011 + 0o5), 11279 - 11271), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100101 + 0o14) + chr(48), 45685 - 45677), ehT0Px3KOsy9(chr(1689 - 1641) + '\157' + '\061' + chr(48) + chr(181 - 131), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101011 + 0o4) + '\063' + '\061' + chr(0b100110 + 0o21), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110101) + chr(1841 - 1792), 1905 - 1897), ehT0Px3KOsy9(chr(1118 - 1070) + chr(111) + chr(53) + chr(1326 - 1274), 44407 - 44399), ehT0Px3KOsy9('\060' + '\x6f' + chr(53) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10101 + 0o40) + chr(0b10111 + 0o37), 0b1000), ehT0Px3KOsy9('\060' + chr(8952 - 8841) + chr(0b101010 + 0o7) + chr(0b110011) + chr(63 - 14), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1914 - 1863) + chr(53) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\066' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(0b100111 + 0o15) + chr(1894 - 1844), 0b1000), ehT0Px3KOsy9(chr(717 - 669) + chr(0b1101111) + chr(51) + chr(668 - 615) + chr(2448 - 2393), 0o10), ehT0Px3KOsy9(chr(785 - 737) + chr(111) + '\062' + chr(0b101 + 0o56) + chr(2362 - 2311), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(2387 - 2337) + chr(0b101 + 0o56), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\063' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b11011 + 0o30) + chr(0b110010) + chr(0b110010 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b110001) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(51) + chr(716 - 663), 49194 - 49186), ehT0Px3KOsy9(chr(48) + chr(0b1101 + 0o142) + chr(0b110001) + chr(0b10111 + 0o33) + chr(52), 8), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b11010 + 0o125) + '\061' + chr(55) + '\x32', 60939 - 60931), ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + chr(0b11100 + 0o26) + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\064' + '\066', 25216 - 25208), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(0b10111 + 0o32) + '\063' + chr(49), 8), ehT0Px3KOsy9('\060' + chr(0b1101010 + 0o5) + chr(1620 - 1568) + chr(0b11111 + 0o24), 0o10), ehT0Px3KOsy9(chr(834 - 786) + chr(12087 - 11976) + chr(0b110001) + '\x31' + chr(0b11110 + 0o27), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110011 + 0o74) + '\063' + chr(0b11001 + 0o36) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b100010 + 0o17) + '\064' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b110001 + 0o0), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1001101 + 0o42) + chr(53) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2'), chr(0b1101 + 0o127) + chr(0b1010110 + 0o17) + chr(0b111001 + 0o52) + chr(4379 - 4268) + chr(0b1011 + 0o131) + '\x65')(chr(117) + chr(116) + chr(6082 - 5980) + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eAqPAqmgsuWB(JsZ36NJUqtml, kVFRD544hi_1): if not xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9\x0ef\xa3!\x98'), '\144' + chr(8142 - 8041) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(11059 - 10942) + '\164' + chr(0b1011101 + 0o11) + chr(0b10100 + 0o31) + '\070'))(kVFRD544hi_1): xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b"\xd1\x17d\xb5\x11\x82'\x1d"), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(0b100010 + 0o102) + '\x65')('\x75' + chr(0b1011000 + 0o34) + chr(0b1000111 + 0o37) + '\x2d' + chr(56)))(kVFRD544hi_1) xw4DsBfIJ22E = oqhJDdMJfuwx.path.basename(pCCmpnhZPmGO) Ti9e_bxaCVyu = oqhJDdMJfuwx.path.join(JsZ36NJUqtml, xw4DsBfIJ22E) Po1zXXTKc_sm = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9\x05j\xa2x\xaa2\x0b\xaa '), '\144' + '\x65' + chr(0b1011101 + 0o6) + chr(0b1011110 + 0o21) + chr(0b1001011 + 0o31) + chr(0b1100101))(chr(117) + '\x74' + '\146' + '\x2d' + chr(815 - 759)): xafqLlk3kkUe(SXOLrMavuUCe(b"\xd1\x19u\xb99\x874A\xf1zh(j\x82\x88OC@-\x87\xc0J\xd4\xbb\xda\xb0\xa7\xac1t7vE5\x16pm\xa5@(\xac)>\xe3\n\xda|N\x85$(d'\x98\x8cNaG-\xc7\x86\x11\xd8\xb5\xa0\xe8\xf3\xe1\x16\x1c.Zj9yO$\x96\x059\xdb\x13l\xbb:\xc2u-\xac&7e'\xe0\xdf\x1f\x04\x1ew\xdb\x81\x11\xd6\xb5\xa2\xed\xe1\xe9\x0e5\x1cvT|v\x16~\xcaN*\xaa"), '\x64' + '\x65' + chr(99) + chr(1423 - 1312) + chr(100) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(0b11101 + 0o20) + '\070')} o76vgcEvX48n = Mx6ixpcPMQy3.get(pCCmpnhZPmGO, headers=Po1zXXTKc_sm) with _fwkIVCGgtAN(Ti9e_bxaCVyu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\x14'), chr(0b111000 + 0o54) + chr(0b1011011 + 0o12) + chr(760 - 661) + chr(0b1101111) + chr(4588 - 4488) + chr(0b1000111 + 0o36))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(56))) as EGyt1xfPT1P6: xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\x04f\xa40'), chr(0b1001101 + 0o27) + chr(8233 - 8132) + chr(0b1100011 + 0o0) + chr(7792 - 7681) + chr(0b101001 + 0o73) + chr(0b1100101))(chr(0b11001 + 0o134) + '\x74' + chr(6337 - 6235) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(o76vgcEvX48n, xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\x19a\xa40\x85!'), chr(0b1011100 + 0o10) + chr(101) + '\x63' + chr(7509 - 7398) + chr(0b10100 + 0o120) + chr(9470 - 9369))(chr(117) + '\164' + '\x66' + '\055' + '\070'))) with xafqLlk3kkUe(RxqDt8LqC5Ns, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\x06j\xbe'), chr(0b1100100) + chr(0b111110 + 0o47) + chr(0b1100011) + chr(11949 - 11838) + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))(Ti9e_bxaCVyu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeeLh\xaa'), chr(100) + chr(0b1100101) + '\x63' + chr(0b101100 + 0o103) + '\144' + '\x65')('\x75' + chr(0b1110100) + '\146' + chr(45) + chr(0b111000))) as BL0nQryxvAKT: xafqLlk3kkUe(BL0nQryxvAKT, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\x0e{\xa24\x88!\x0f\xa88'), '\144' + chr(0b1010000 + 0o25) + '\x63' + chr(111) + chr(0b1000110 + 0o36) + '\x65')(chr(0b1001110 + 0o47) + chr(116) + chr(0b1100110) + '\055' + '\070'))(JsZ36NJUqtml) return JsZ36NJUqtml
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
_get_ngram_counter
def _get_ngram_counter(ids, n): """Get a Counter with the ngrams of the given ID list. Args: ids: np.array or a list corresponding to a single sentence n: n-gram size Returns: collections.Counter with ID tuples as keys and 1s as values. """ # Remove zero IDs used to pad the sequence. ids = [token_id for token_id in ids if token_id != 0] ngram_list = [tuple(ids[i:i + n]) for i in range(len(ids) + 1 - n)] ngrams = set(ngram_list) counts = collections.Counter() for ngram in ngrams: counts[ngram] = 1 return counts
python
def _get_ngram_counter(ids, n): """Get a Counter with the ngrams of the given ID list. Args: ids: np.array or a list corresponding to a single sentence n: n-gram size Returns: collections.Counter with ID tuples as keys and 1s as values. """ # Remove zero IDs used to pad the sequence. ids = [token_id for token_id in ids if token_id != 0] ngram_list = [tuple(ids[i:i + n]) for i in range(len(ids) + 1 - n)] ngrams = set(ngram_list) counts = collections.Counter() for ngram in ngrams: counts[ngram] = 1 return counts
[ "def", "_get_ngram_counter", "(", "ids", ",", "n", ")", ":", "# Remove zero IDs used to pad the sequence.", "ids", "=", "[", "token_id", "for", "token_id", "in", "ids", "if", "token_id", "!=", "0", "]", "ngram_list", "=", "[", "tuple", "(", "ids", "[", "i", ":", "i", "+", "n", "]", ")", "for", "i", "in", "range", "(", "len", "(", "ids", ")", "+", "1", "-", "n", ")", "]", "ngrams", "=", "set", "(", "ngram_list", ")", "counts", "=", "collections", ".", "Counter", "(", ")", "for", "ngram", "in", "ngrams", ":", "counts", "[", "ngram", "]", "=", "1", "return", "counts" ]
Get a Counter with the ngrams of the given ID list. Args: ids: np.array or a list corresponding to a single sentence n: n-gram size Returns: collections.Counter with ID tuples as keys and 1s as values.
[ "Get", "a", "Counter", "with", "the", "ngrams", "of", "the", "given", "ID", "list", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L50-L67
train
Get a Counter with the ngrams of the given ID list.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,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wrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(271 - 223) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(50) + chr(0b110011), 58678 - 58670), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b1011 + 0o46), 0o10), ehT0Px3KOsy9(chr(1803 - 1755) + '\x6f' + chr(0b0 + 0o62) + '\066' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(968 - 920) + chr(0b1101111) + '\x33' + '\x35' + chr(798 - 745), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10891 - 10780) + chr(0b1110 + 0o43) + chr(1733 - 1679) + chr(408 - 358), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(54) + chr(2311 - 2261), 8), ehT0Px3KOsy9(chr(571 - 523) + chr(111) + '\062' + '\061' + chr(50), 0o10), ehT0Px3KOsy9(chr(1812 - 1764) + '\157' + chr(49) + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + '\x31' + '\067' + chr(0b11010 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101010 + 0o105) + chr(51) + '\x37' + chr(0b110010), 38471 - 38463), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(51) + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(1273 - 1220) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(0b11111 + 0o23) + '\065' + chr(0b1000 + 0o52), 6959 - 6951), ehT0Px3KOsy9(chr(391 - 343) + chr(0b111001 + 0o66) + '\062' + chr(0b100101 + 0o22) + '\x32', 47771 - 47763), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + '\062' + chr(0b110011) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b0 + 0o157) + chr(50) + chr(2340 - 2289) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(11366 - 11255) + chr(51) + chr(0b101111 + 0o6) + '\x32', 64229 - 64221), ehT0Px3KOsy9(chr(2203 - 2155) + '\157' + chr(0b11101 + 0o26) + chr(1329 - 1279) + chr(52), 27213 - 27205), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\x30' + chr(437 - 386), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x35' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(623 - 573) + chr(103 - 55) + '\062', 39175 - 39167), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o13) + chr(1960 - 1909) + chr(1818 - 1764), 24647 - 24639), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10101 + 0o35) + chr(0b110010) + '\x31', 14753 - 14745), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\067' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(2136 - 2081) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(1981 - 1928) + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + chr(0b110011) + chr(51) + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110111) + chr(49), 2105 - 2097), ehT0Px3KOsy9('\x30' + '\157' + chr(734 - 683), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + '\x33' + '\062' + '\063', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1 + 0o156) + chr(1426 - 1377) + chr(51) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + chr(900 - 851) + chr(2154 - 2102) + chr(0b110111), 63685 - 63677), ehT0Px3KOsy9(chr(1946 - 1898) + '\157' + chr(0b10101 + 0o34) + '\x35' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1667 - 1616) + chr(0b110010) + chr(0b10010 + 0o42), 8), ehT0Px3KOsy9('\x30' + chr(3702 - 3591) + chr(0b110000 + 0o3) + chr(0b1 + 0o60), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\066' + chr(2288 - 2234), 16613 - 16605), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + chr(1117 - 1064), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1007 - 896) + chr(0b110001) + chr(0b11010 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2478 - 2427) + '\x34' + chr(0b110110), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + chr(53) + chr(0b110000), 33432 - 33424)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(100) + chr(2166 - 2065))('\x75' + chr(0b1000001 + 0o63) + chr(0b1100110) + '\055' + chr(1754 - 1698)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def AJQSMVXHVJ9_(zdjj2pRemk_P, m1NkCryOw9Bx): zdjj2pRemk_P = [coXbTrq6vT6N for coXbTrq6vT6N in zdjj2pRemk_P if coXbTrq6vT6N != ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\060', 0o10)] gwJzD7kRDElt = [KNyTy8rYcwji(zdjj2pRemk_P[WVxHKyX45z_L:WVxHKyX45z_L + m1NkCryOw9Bx]) for WVxHKyX45z_L in vQr8gNKaIaWE(c2A0yzQpDQB3(zdjj2pRemk_P) + ehT0Px3KOsy9('\x30' + '\157' + chr(49), 0o10) - m1NkCryOw9Bx)] lRByDADoOTFD = MVEN8G6CxlvR(gwJzD7kRDElt) qaIx4JIwHiwL = FGhnnwoh1Dd8.Counter() for bUEAX8wtRZsn in lRByDADoOTFD: qaIx4JIwHiwL[bUEAX8wtRZsn] = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(263 - 214), 8) return qaIx4JIwHiwL
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
_get_fbeta_score
def _get_fbeta_score(true_positives, selected, relevant, beta=1): """Compute Fbeta score. Args: true_positives: Number of true positive ngrams. selected: Number of selected ngrams. relevant: Number of relevant ngrams. beta: 0 gives precision only, 1 gives F1 score, and Inf gives recall only. Returns: Fbeta score. """ precision = 1 if selected > 0: precision = true_positives / selected if beta == 0: return precision recall = 1 if relevant > 0: recall = true_positives / relevant if precision > 0 and recall > 0: beta2 = beta * beta return (1 + beta2) * precision * recall / (beta2 * precision + recall) else: return 0
python
def _get_fbeta_score(true_positives, selected, relevant, beta=1): """Compute Fbeta score. Args: true_positives: Number of true positive ngrams. selected: Number of selected ngrams. relevant: Number of relevant ngrams. beta: 0 gives precision only, 1 gives F1 score, and Inf gives recall only. Returns: Fbeta score. """ precision = 1 if selected > 0: precision = true_positives / selected if beta == 0: return precision recall = 1 if relevant > 0: recall = true_positives / relevant if precision > 0 and recall > 0: beta2 = beta * beta return (1 + beta2) * precision * recall / (beta2 * precision + recall) else: return 0
[ "def", "_get_fbeta_score", "(", "true_positives", ",", "selected", ",", "relevant", ",", "beta", "=", "1", ")", ":", "precision", "=", "1", "if", "selected", ">", "0", ":", "precision", "=", "true_positives", "/", "selected", "if", "beta", "==", "0", ":", "return", "precision", "recall", "=", "1", "if", "relevant", ">", "0", ":", "recall", "=", "true_positives", "/", "relevant", "if", "precision", ">", "0", "and", "recall", ">", "0", ":", "beta2", "=", "beta", "*", "beta", "return", "(", "1", "+", "beta2", ")", "*", "precision", "*", "recall", "/", "(", "beta2", "*", "precision", "+", "recall", ")", "else", ":", "return", "0" ]
Compute Fbeta score. Args: true_positives: Number of true positive ngrams. selected: Number of selected ngrams. relevant: Number of relevant ngrams. beta: 0 gives precision only, 1 gives F1 score, and Inf gives recall only. Returns: Fbeta score.
[ "Compute", "Fbeta", "score", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L70-L94
train
Compute Fbeta score.
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,hr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2riMOClNT,_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' + '\064' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2006 - 1954), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b100110 + 0o15), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + '\062' + chr(49) + chr(53), 14670 - 14662), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + '\065', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1053 - 1004) + chr(2741 - 2688) + chr(0b0 + 0o67), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001 + 0o0) + chr(656 - 606) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100111 + 0o10) + chr(51) + '\x32' + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(54) + chr(2058 - 2007), 0b1000), ehT0Px3KOsy9('\060' + chr(9964 - 9853) + chr(0b10011 + 0o40) + chr(0b1010 + 0o54) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(51) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b10 + 0o61) + chr(107 - 59), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x33' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(55) + chr(2113 - 2065), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b100100 + 0o17) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + '\x32' + chr(0b11101 + 0o25) + chr(512 - 459), ord("\x08")), ehT0Px3KOsy9(chr(1745 - 1697) + '\157' + chr(0b110010 + 0o4) + chr(992 - 942), 45590 - 45582), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(51) + '\x37', 15545 - 15537), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b1111 + 0o42) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\064' + chr(2664 - 2610), 50869 - 50861), ehT0Px3KOsy9('\060' + chr(1784 - 1673) + '\x32' + '\060' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + chr(0b110010) + chr(0b1001 + 0o52) + chr(0b11011 + 0o31), 0o10), ehT0Px3KOsy9('\060' + chr(6995 - 6884) + '\062' + chr(53) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101000 + 0o107) + chr(0b11011 + 0o27) + chr(0b110001) + '\x34', 35681 - 35673), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(806 - 756) + chr(53) + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\x35' + '\x36', 62521 - 62513), ehT0Px3KOsy9(chr(179 - 131) + chr(9143 - 9032) + chr(0b110001) + chr(0b101001 + 0o7) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b110001) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(1745 - 1697) + chr(6355 - 6244) + '\063' + chr(125 - 75) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b0 + 0o63) + '\066' + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(11892 - 11781) + chr(0b101111 + 0o2) + chr(2076 - 2022) + chr(2500 - 2445), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110001) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(0b100100 + 0o15) + chr(369 - 319), 53234 - 53226), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2317 - 2266) + '\064' + chr(0b11101 + 0o27), 58008 - 58000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b10110 + 0o33) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(2279 - 2231) + '\x6f' + chr(2440 - 2390) + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\061' + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + chr(0b110111) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1325 - 1277) + chr(0b1001110 + 0o41) + chr(631 - 576) + chr(0b1100 + 0o47), 0b1000), ehT0Px3KOsy9('\x30' + chr(9091 - 8980) + chr(0b110010) + '\x35' + chr(49), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + chr(0b110101) + chr(381 - 333), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x08'), '\144' + '\145' + chr(99) + chr(5242 - 5131) + '\144' + '\x65')(chr(0b1000101 + 0o60) + chr(0b1100011 + 0o21) + '\x66' + chr(45) + chr(3132 - 3076)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FHAfzeGrOAID(kH63T7vKx98J, YaoWvQOCAANk, K50eYaUsfqVO, FjcovgoHM1LG=ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + '\x31', 0b1000)): gX1fbCVtNNXn = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1533 - 1484), 8) if YaoWvQOCAANk > ehT0Px3KOsy9(chr(48) + chr(111) + chr(58 - 10), 0b1000): gX1fbCVtNNXn = kH63T7vKx98J / YaoWvQOCAANk if FjcovgoHM1LG == ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110000), 8): return gX1fbCVtNNXn mmdmvtGtAwiM = ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + '\x31', 8) if K50eYaUsfqVO > ehT0Px3KOsy9('\060' + chr(111) + chr(0b101110 + 0o2), 8): mmdmvtGtAwiM = kH63T7vKx98J / K50eYaUsfqVO if gX1fbCVtNNXn > ehT0Px3KOsy9(chr(1131 - 1083) + chr(0b110101 + 0o72) + chr(0b101011 + 0o5), 8) and mmdmvtGtAwiM > ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1010100 + 0o33) + chr(1806 - 1758), 8): ekqI06bsWDgj = FjcovgoHM1LG * FjcovgoHM1LG return (ehT0Px3KOsy9(chr(2163 - 2115) + chr(0b1101111) + '\061', 8) + ekqI06bsWDgj) * gX1fbCVtNNXn * mmdmvtGtAwiM / (ekqI06bsWDgj * gX1fbCVtNNXn + mmdmvtGtAwiM) else: return ehT0Px3KOsy9('\x30' + chr(2102 - 1991) + chr(0b0 + 0o60), 8)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
get_addition_score
def get_addition_score(source_counts, prediction_counts, target_counts): """Compute the addition score (Equation 4 in the paper).""" added_to_prediction_counts = prediction_counts - source_counts true_positives = sum((added_to_prediction_counts & target_counts).values()) selected = sum(added_to_prediction_counts.values()) # Note that in the paper the summation is done over all the ngrams in the # output rather than the ngrams in the following set difference. Since the # former does not make as much sense we compute the latter, which is also done # in the GitHub implementation. relevant = sum((target_counts - source_counts).values()) return _get_fbeta_score(true_positives, selected, relevant)
python
def get_addition_score(source_counts, prediction_counts, target_counts): """Compute the addition score (Equation 4 in the paper).""" added_to_prediction_counts = prediction_counts - source_counts true_positives = sum((added_to_prediction_counts & target_counts).values()) selected = sum(added_to_prediction_counts.values()) # Note that in the paper the summation is done over all the ngrams in the # output rather than the ngrams in the following set difference. Since the # former does not make as much sense we compute the latter, which is also done # in the GitHub implementation. relevant = sum((target_counts - source_counts).values()) return _get_fbeta_score(true_positives, selected, relevant)
[ "def", "get_addition_score", "(", "source_counts", ",", "prediction_counts", ",", "target_counts", ")", ":", "added_to_prediction_counts", "=", "prediction_counts", "-", "source_counts", "true_positives", "=", "sum", "(", "(", "added_to_prediction_counts", "&", "target_counts", ")", ".", "values", "(", ")", ")", "selected", "=", "sum", "(", "added_to_prediction_counts", ".", "values", "(", ")", ")", "# Note that in the paper the summation is done over all the ngrams in the", "# output rather than the ngrams in the following set difference. Since the", "# former does not make as much sense we compute the latter, which is also done", "# in the GitHub implementation.", "relevant", "=", "sum", "(", "(", "target_counts", "-", "source_counts", ")", ".", "values", "(", ")", ")", "return", "_get_fbeta_score", "(", "true_positives", ",", "selected", ",", "relevant", ")" ]
Compute the addition score (Equation 4 in the paper).
[ "Compute", "the", "addition", "score", "(", "Equation", "4", "in", "the", "paper", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L97-L107
train
Compute the addition score.
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,sR2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WCAbiJWkL,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(0b110010) + chr(0b110001 + 0o0) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(976 - 926) + chr(1607 - 1554) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\x34' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(4373 - 4262) + '\062' + '\062' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001010 + 0o45) + '\061' + '\x37' + '\060', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\061' + '\x35' + chr(0b100100 + 0o23), 5705 - 5697), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1100101 + 0o12) + chr(178 - 129) + chr(0b110100) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101 + 0o142) + chr(0b100011 + 0o22), 12234 - 12226), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101011 + 0o10) + '\066' + chr(55), 25205 - 25197), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + chr(50) + '\062' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(1757 - 1702), 49340 - 49332), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1001 + 0o50) + chr(0b10000 + 0o47) + chr(0b100010 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + chr(0b10010 + 0o41) + '\x37' + chr(0b101011 + 0o13), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(874 - 763) + '\x33' + chr(0b110001) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(9953 - 9842) + chr(49) + chr(0b1101 + 0o47) + '\x33', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b101000 + 0o13), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111010 + 0o65) + chr(0b101110 + 0o5) + chr(0b110011) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(199 - 151) + chr(0b1101111) + chr(51) + chr(757 - 707) + '\x34', 50820 - 50812), ehT0Px3KOsy9(chr(1853 - 1805) + '\157' + chr(0b10 + 0o61) + '\x35' + chr(1627 - 1577), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\061' + chr(51) + chr(1736 - 1686), 0o10), ehT0Px3KOsy9(chr(1151 - 1103) + chr(0b1101111) + '\x31' + '\x36' + chr(0b110010 + 0o4), 0o10), ehT0Px3KOsy9(chr(48 - 0) + chr(0b1100110 + 0o11) + '\063' + chr(53) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + '\063' + chr(0b110100 + 0o3) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b10000 + 0o42), 35310 - 35302), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x37' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(1745 - 1690) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5045 - 4934) + '\064' + chr(2072 - 2022), 0o10), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + '\061' + chr(0b110101) + '\067', 8), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(6708 - 6597) + chr(981 - 931) + chr(52) + chr(2143 - 2090), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + chr(0b110 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100101 + 0o14) + '\x37' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + '\061' + '\060' + chr(0b100011 + 0o15), 0o10), ehT0Px3KOsy9(chr(1704 - 1656) + chr(111) + '\062' + '\x32' + chr(0b10101 + 0o41), 46447 - 46439), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\060' + chr(48), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(129 - 80) + '\064' + chr(1645 - 1594), 8), ehT0Px3KOsy9('\060' + chr(0b1001001 + 0o46) + '\x37' + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2520 - 2469) + '\062' + chr(1001 - 951), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1098 - 1048) + chr(48) + chr(453 - 401), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b110101) + '\063', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2399 - 2346) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4'), chr(7899 - 7799) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(5386 - 5286) + '\x65')('\x75' + '\164' + '\146' + chr(0b101 + 0o50) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def zFRsCbLMgzCk(EqAvYQoY24Cm, Rwy_bSxj7Q5V, w4RhXCqrgGjd): ljthMNhk0TH3 = Rwy_bSxj7Q5V - EqAvYQoY24Cm kH63T7vKx98J = xkxBmo49x2An((ljthMNhk0TH3 & w4RhXCqrgGjd).SPnCNu54H1db()) YaoWvQOCAANk = xkxBmo49x2An(ljthMNhk0TH3.SPnCNu54H1db()) K50eYaUsfqVO = xkxBmo49x2An((w4RhXCqrgGjd - EqAvYQoY24Cm).SPnCNu54H1db()) return FHAfzeGrOAID(kH63T7vKx98J, YaoWvQOCAANk, K50eYaUsfqVO)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
get_keep_score
def get_keep_score(source_counts, prediction_counts, target_counts): """Compute the keep score (Equation 5 in the paper).""" source_and_prediction_counts = source_counts & prediction_counts source_and_target_counts = source_counts & target_counts true_positives = sum((source_and_prediction_counts & source_and_target_counts).values()) selected = sum(source_and_prediction_counts.values()) relevant = sum(source_and_target_counts.values()) return _get_fbeta_score(true_positives, selected, relevant)
python
def get_keep_score(source_counts, prediction_counts, target_counts): """Compute the keep score (Equation 5 in the paper).""" source_and_prediction_counts = source_counts & prediction_counts source_and_target_counts = source_counts & target_counts true_positives = sum((source_and_prediction_counts & source_and_target_counts).values()) selected = sum(source_and_prediction_counts.values()) relevant = sum(source_and_target_counts.values()) return _get_fbeta_score(true_positives, selected, relevant)
[ "def", "get_keep_score", "(", "source_counts", ",", "prediction_counts", ",", "target_counts", ")", ":", "source_and_prediction_counts", "=", "source_counts", "&", "prediction_counts", "source_and_target_counts", "=", "source_counts", "&", "target_counts", "true_positives", "=", "sum", "(", "(", "source_and_prediction_counts", "&", "source_and_target_counts", ")", ".", "values", "(", ")", ")", "selected", "=", "sum", "(", "source_and_prediction_counts", ".", "values", "(", ")", ")", "relevant", "=", "sum", "(", "source_and_target_counts", ".", "values", "(", ")", ")", "return", "_get_fbeta_score", "(", "true_positives", ",", "selected", ",", "relevant", ")" ]
Compute the keep score (Equation 5 in the paper).
[ "Compute", "the", "keep", "score", "(", "Equation", "5", "in", "the", "paper", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L110-L118
train
Compute the keep score.
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,GXw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9durw_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' + '\x33' + '\062' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(1660 - 1612) + chr(111) + chr(863 - 814) + chr(1262 - 1213) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(821 - 773) + chr(111) + '\x32' + chr(48) + '\065', 48182 - 48174), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(3904 - 3793) + chr(50) + chr(53) + '\062', 20870 - 20862), ehT0Px3KOsy9(chr(1104 - 1056) + chr(0b1101111) + chr(50) + '\x32' + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(54) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(9828 - 9717) + '\x31' + chr(0b110010) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(11404 - 11293) + chr(0b110100) + chr(0b110100), 431 - 423), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x32' + chr(0b1001 + 0o47), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(273 - 219) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11000 + 0o32) + '\x35' + chr(1065 - 1017), 580 - 572), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11011 + 0o26), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1840 - 1790) + chr(2108 - 2058) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + '\x31' + '\x34' + chr(0b1100 + 0o51), 32477 - 32469), ehT0Px3KOsy9(chr(1626 - 1578) + '\x6f' + chr(0b110001) + chr(55) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1787 - 1736) + chr(52) + chr(49), 12722 - 12714), ehT0Px3KOsy9('\x30' + chr(8936 - 8825) + chr(0b110010) + chr(0b1011 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(1056 - 1008) + chr(111) + '\x32' + '\x32' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b11001 + 0o126) + chr(0b110110) + chr(951 - 898), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(55) + '\x37', 0b1000), ehT0Px3KOsy9(chr(132 - 84) + chr(111) + '\x31' + '\x31' + chr(48), 8), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1100001 + 0o16) + chr(0b110010) + chr(0b100010 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + '\x36' + chr(0b110101), 8), ehT0Px3KOsy9(chr(203 - 155) + '\x6f' + '\063' + chr(766 - 714) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(334 - 283), 18926 - 18918), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(52) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b110 + 0o151) + chr(0b110110) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101011 + 0o4) + chr(51) + '\062' + chr(0b100 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(922 - 874) + chr(111) + chr(2061 - 2012) + chr(55) + chr(1178 - 1130), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101001 + 0o13) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(873 - 825) + '\157' + chr(50) + '\x33', 36287 - 36279), ehT0Px3KOsy9('\x30' + chr(0b101001 + 0o106) + chr(0b100100 + 0o17) + '\064' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(830 - 781) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(942 - 892) + chr(1039 - 990), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(53) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(53) + '\061', 440 - 432), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b101000 + 0o13) + chr(50) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010 + 0o145) + chr(2345 - 2296) + chr(0b110010) + chr(2137 - 2089), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(0b110110 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6769 - 6658) + chr(0b110011) + '\064' + chr(53), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101010 + 0o13) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9'), chr(8278 - 8178) + '\145' + chr(5666 - 5567) + '\157' + '\144' + chr(5579 - 5478))('\165' + '\164' + chr(0b101111 + 0o67) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def SFwWkTereOxT(EqAvYQoY24Cm, Rwy_bSxj7Q5V, w4RhXCqrgGjd): pH8F1vibTH0J = EqAvYQoY24Cm & Rwy_bSxj7Q5V Xe08YsKlIFJx = EqAvYQoY24Cm & w4RhXCqrgGjd kH63T7vKx98J = xkxBmo49x2An((pH8F1vibTH0J & Xe08YsKlIFJx).SPnCNu54H1db()) YaoWvQOCAANk = xkxBmo49x2An(pH8F1vibTH0J.SPnCNu54H1db()) K50eYaUsfqVO = xkxBmo49x2An(Xe08YsKlIFJx.SPnCNu54H1db()) return FHAfzeGrOAID(kH63T7vKx98J, YaoWvQOCAANk, K50eYaUsfqVO)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
get_deletion_score
def get_deletion_score(source_counts, prediction_counts, target_counts, beta=0): """Compute the deletion score (Equation 6 in the paper).""" source_not_prediction_counts = source_counts - prediction_counts source_not_target_counts = source_counts - target_counts true_positives = sum((source_not_prediction_counts & source_not_target_counts).values()) selected = sum(source_not_prediction_counts.values()) relevant = sum(source_not_target_counts.values()) return _get_fbeta_score(true_positives, selected, relevant, beta=beta)
python
def get_deletion_score(source_counts, prediction_counts, target_counts, beta=0): """Compute the deletion score (Equation 6 in the paper).""" source_not_prediction_counts = source_counts - prediction_counts source_not_target_counts = source_counts - target_counts true_positives = sum((source_not_prediction_counts & source_not_target_counts).values()) selected = sum(source_not_prediction_counts.values()) relevant = sum(source_not_target_counts.values()) return _get_fbeta_score(true_positives, selected, relevant, beta=beta)
[ "def", "get_deletion_score", "(", "source_counts", ",", "prediction_counts", ",", "target_counts", ",", "beta", "=", "0", ")", ":", "source_not_prediction_counts", "=", "source_counts", "-", "prediction_counts", "source_not_target_counts", "=", "source_counts", "-", "target_counts", "true_positives", "=", "sum", "(", "(", "source_not_prediction_counts", "&", "source_not_target_counts", ")", ".", "values", "(", ")", ")", "selected", "=", "sum", "(", "source_not_prediction_counts", ".", "values", "(", ")", ")", "relevant", "=", "sum", "(", "source_not_target_counts", ".", "values", "(", ")", ")", "return", "_get_fbeta_score", "(", "true_positives", ",", "selected", ",", "relevant", ",", "beta", "=", "beta", ")" ]
Compute the deletion score (Equation 6 in the paper).
[ "Compute", "the", "deletion", "score", "(", "Equation", "6", "in", "the", "paper", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L121-L129
train
Compute the deletion score.
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,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NiEdDQ,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(0b101011 + 0o5) + chr(2062 - 1951) + chr(2019 - 1969) + chr(53) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(147 - 99) + chr(4361 - 4250) + chr(0b110010) + chr(0b11100 + 0o32) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111 + 0o150) + '\x33' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010010 + 0o35) + chr(0b110011) + '\x33' + chr(0b10101 + 0o33), 3202 - 3194), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11001 + 0o30) + chr(48) + chr(48), 4083 - 4075), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(194 - 145) + '\067' + chr(0b100111 + 0o11), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b1101 + 0o46) + chr(0b101101 + 0o12) + chr(814 - 760), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(0b110011) + chr(53) + chr(0b100001 + 0o26), 33954 - 33946), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(0b111 + 0o54) + chr(0b110110) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(8598 - 8487) + chr(0b101 + 0o55) + chr(0b110010) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4610 - 4499) + chr(0b1000 + 0o51) + chr(0b110010) + chr(0b110010), 61682 - 61674), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10 + 0o61) + '\065' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1132 - 1083) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b110100) + chr(2705 - 2651), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4113 - 4002) + '\063' + chr(0b100 + 0o62) + chr(0b110000), 10571 - 10563), ehT0Px3KOsy9(chr(1220 - 1172) + chr(0b1000011 + 0o54) + '\x36' + chr(569 - 516), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\x31' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(7049 - 6938) + chr(50) + chr(533 - 481), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4751 - 4640) + chr(86 - 37) + '\x37' + chr(1652 - 1600), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101001 + 0o12) + chr(349 - 300) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(3751 - 3640) + '\x32' + '\x31' + chr(588 - 534), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b1100 + 0o44) + chr(826 - 777), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + '\x33' + chr(0b10 + 0o57) + chr(55), 0o10), ehT0Px3KOsy9(chr(591 - 543) + chr(111) + chr(54) + chr(0b110010), 58293 - 58285), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\067' + chr(144 - 91), 64693 - 64685), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(53) + chr(656 - 601), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b100101 + 0o21) + chr(51), 0b1000), ehT0Px3KOsy9(chr(2188 - 2140) + chr(0b1101111) + chr(0b110011) + chr(49) + chr(0b110 + 0o52), 46243 - 46235), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1109 - 1058) + chr(1874 - 1822) + '\x36', 32277 - 32269), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(290 - 179) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b10101 + 0o35) + chr(0b100010 + 0o21), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + '\063' + chr(51) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b110000 + 0o77) + chr(2402 - 2348) + chr(294 - 241), 8), ehT0Px3KOsy9(chr(0b110000) + chr(4901 - 4790) + chr(49) + chr(55) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(49) + chr(657 - 606) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(925 - 876) + chr(0b101000 + 0o16), 8), ehT0Px3KOsy9(chr(1156 - 1108) + chr(0b1101111) + chr(0b110010 + 0o1) + chr(2548 - 2495) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010111 + 0o30) + chr(1595 - 1542) + chr(0b101101 + 0o10), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(995 - 945) + chr(2239 - 2186) + chr(0b101111 + 0o2), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1185 - 1137) + chr(0b10101 + 0o132) + chr(0b110101) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x81'), chr(0b101110 + 0o66) + chr(0b1011010 + 0o13) + '\143' + chr(8415 - 8304) + chr(100) + chr(3920 - 3819))('\165' + '\x74' + '\x66' + chr(0b10001 + 0o34) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def vVjIgvnFAbKi(EqAvYQoY24Cm, Rwy_bSxj7Q5V, w4RhXCqrgGjd, FjcovgoHM1LG=ehT0Px3KOsy9('\x30' + '\157' + '\060', 0b1000)): UZCne6mk_Hzv = EqAvYQoY24Cm - Rwy_bSxj7Q5V sBP7GVT0U7uf = EqAvYQoY24Cm - w4RhXCqrgGjd kH63T7vKx98J = xkxBmo49x2An((UZCne6mk_Hzv & sBP7GVT0U7uf).SPnCNu54H1db()) YaoWvQOCAANk = xkxBmo49x2An(UZCne6mk_Hzv.SPnCNu54H1db()) K50eYaUsfqVO = xkxBmo49x2An(sBP7GVT0U7uf.SPnCNu54H1db()) return FHAfzeGrOAID(kH63T7vKx98J, YaoWvQOCAANk, K50eYaUsfqVO, beta=FjcovgoHM1LG)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
get_sari_score
def get_sari_score(source_ids, prediction_ids, list_of_targets, max_gram_size=4, beta_for_deletion=0): """Compute the SARI score for a single prediction and one or more targets. Args: source_ids: a list / np.array of SentencePiece IDs prediction_ids: a list / np.array of SentencePiece IDs list_of_targets: a list of target ID lists / np.arrays max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) beta_for_deletion: beta for deletion F score. Returns: the SARI score and its three components: add, keep, and deletion scores """ addition_scores = [] keep_scores = [] deletion_scores = [] for n in range(1, max_gram_size + 1): source_counts = _get_ngram_counter(source_ids, n) prediction_counts = _get_ngram_counter(prediction_ids, n) # All ngrams in the targets with count 1. target_counts = collections.Counter() # All ngrams in the targets with count r/num_targets, where r is the number # of targets where the ngram occurs. weighted_target_counts = collections.Counter() num_nonempty_targets = 0 for target_ids_i in list_of_targets: target_counts_i = _get_ngram_counter(target_ids_i, n) if target_counts_i: weighted_target_counts += target_counts_i num_nonempty_targets += 1 for gram in weighted_target_counts.keys(): weighted_target_counts[gram] /= num_nonempty_targets target_counts[gram] = 1 keep_scores.append(get_keep_score(source_counts, prediction_counts, weighted_target_counts)) deletion_scores.append(get_deletion_score(source_counts, prediction_counts, weighted_target_counts, beta_for_deletion)) addition_scores.append(get_addition_score(source_counts, prediction_counts, target_counts)) avg_keep_score = sum(keep_scores) / max_gram_size avg_addition_score = sum(addition_scores) / max_gram_size avg_deletion_score = sum(deletion_scores) / max_gram_size sari = (avg_keep_score + avg_addition_score + avg_deletion_score) / 3.0 return sari, avg_keep_score, avg_addition_score, avg_deletion_score
python
def get_sari_score(source_ids, prediction_ids, list_of_targets, max_gram_size=4, beta_for_deletion=0): """Compute the SARI score for a single prediction and one or more targets. Args: source_ids: a list / np.array of SentencePiece IDs prediction_ids: a list / np.array of SentencePiece IDs list_of_targets: a list of target ID lists / np.arrays max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) beta_for_deletion: beta for deletion F score. Returns: the SARI score and its three components: add, keep, and deletion scores """ addition_scores = [] keep_scores = [] deletion_scores = [] for n in range(1, max_gram_size + 1): source_counts = _get_ngram_counter(source_ids, n) prediction_counts = _get_ngram_counter(prediction_ids, n) # All ngrams in the targets with count 1. target_counts = collections.Counter() # All ngrams in the targets with count r/num_targets, where r is the number # of targets where the ngram occurs. weighted_target_counts = collections.Counter() num_nonempty_targets = 0 for target_ids_i in list_of_targets: target_counts_i = _get_ngram_counter(target_ids_i, n) if target_counts_i: weighted_target_counts += target_counts_i num_nonempty_targets += 1 for gram in weighted_target_counts.keys(): weighted_target_counts[gram] /= num_nonempty_targets target_counts[gram] = 1 keep_scores.append(get_keep_score(source_counts, prediction_counts, weighted_target_counts)) deletion_scores.append(get_deletion_score(source_counts, prediction_counts, weighted_target_counts, beta_for_deletion)) addition_scores.append(get_addition_score(source_counts, prediction_counts, target_counts)) avg_keep_score = sum(keep_scores) / max_gram_size avg_addition_score = sum(addition_scores) / max_gram_size avg_deletion_score = sum(deletion_scores) / max_gram_size sari = (avg_keep_score + avg_addition_score + avg_deletion_score) / 3.0 return sari, avg_keep_score, avg_addition_score, avg_deletion_score
[ "def", "get_sari_score", "(", "source_ids", ",", "prediction_ids", ",", "list_of_targets", ",", "max_gram_size", "=", "4", ",", "beta_for_deletion", "=", "0", ")", ":", "addition_scores", "=", "[", "]", "keep_scores", "=", "[", "]", "deletion_scores", "=", "[", "]", "for", "n", "in", "range", "(", "1", ",", "max_gram_size", "+", "1", ")", ":", "source_counts", "=", "_get_ngram_counter", "(", "source_ids", ",", "n", ")", "prediction_counts", "=", "_get_ngram_counter", "(", "prediction_ids", ",", "n", ")", "# All ngrams in the targets with count 1.", "target_counts", "=", "collections", ".", "Counter", "(", ")", "# All ngrams in the targets with count r/num_targets, where r is the number", "# of targets where the ngram occurs.", "weighted_target_counts", "=", "collections", ".", "Counter", "(", ")", "num_nonempty_targets", "=", "0", "for", "target_ids_i", "in", "list_of_targets", ":", "target_counts_i", "=", "_get_ngram_counter", "(", "target_ids_i", ",", "n", ")", "if", "target_counts_i", ":", "weighted_target_counts", "+=", "target_counts_i", "num_nonempty_targets", "+=", "1", "for", "gram", "in", "weighted_target_counts", ".", "keys", "(", ")", ":", "weighted_target_counts", "[", "gram", "]", "/=", "num_nonempty_targets", "target_counts", "[", "gram", "]", "=", "1", "keep_scores", ".", "append", "(", "get_keep_score", "(", "source_counts", ",", "prediction_counts", ",", "weighted_target_counts", ")", ")", "deletion_scores", ".", "append", "(", "get_deletion_score", "(", "source_counts", ",", "prediction_counts", ",", "weighted_target_counts", ",", "beta_for_deletion", ")", ")", "addition_scores", ".", "append", "(", "get_addition_score", "(", "source_counts", ",", "prediction_counts", ",", "target_counts", ")", ")", "avg_keep_score", "=", "sum", "(", "keep_scores", ")", "/", "max_gram_size", "avg_addition_score", "=", "sum", "(", "addition_scores", ")", "/", "max_gram_size", "avg_deletion_score", "=", "sum", "(", "deletion_scores", ")", "/", "max_gram_size", "sari", "=", "(", "avg_keep_score", "+", "avg_addition_score", "+", "avg_deletion_score", ")", "/", "3.0", "return", "sari", ",", "avg_keep_score", ",", "avg_addition_score", ",", "avg_deletion_score" ]
Compute the SARI score for a single prediction and one or more targets. Args: source_ids: a list / np.array of SentencePiece IDs prediction_ids: a list / np.array of SentencePiece IDs list_of_targets: a list of target ID lists / np.arrays max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) beta_for_deletion: beta for deletion F score. Returns: the SARI score and its three components: add, keep, and deletion scores
[ "Compute", "the", "SARI", "score", "for", "a", "single", "prediction", "and", "one", "or", "more", "targets", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L132-L179
train
Compute the SARI score for a single prediction and one or more targets.
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,ZsDPvpP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ie6,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(51) + chr(2009 - 1959) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1878 - 1767) + chr(0b110001) + chr(55) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065', 40073 - 40065), ehT0Px3KOsy9(chr(290 - 242) + chr(7937 - 7826) + chr(0b110011) + '\x36' + chr(0b1100 + 0o44), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110000) + chr(0b1001 + 0o56), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110110) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(0b101101 + 0o11), 0b1000), ehT0Px3KOsy9(chr(288 - 240) + '\157' + chr(0b110011) + chr(2216 - 2161) + '\066', 64213 - 64205), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110000 + 0o3) + '\x34' + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b110000) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110111) + '\060', 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\x32' + chr(0b101100 + 0o4) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(323 - 273) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(0b110101) + '\x37', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(886 - 837) + chr(0b1111 + 0o45), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(48) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x37' + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(8411 - 8300) + chr(270 - 221) + chr(48) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\065' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(277 - 225) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101 + 0o56) + chr(0b110011) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2116 - 2066) + '\x34' + chr(0b110001 + 0o1), 64532 - 64524), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(1084 - 1035) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(0b110010) + chr(53) + '\x33', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(0b110001) + chr(2590 - 2538) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110010) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + '\062' + '\067' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(7556 - 7445) + chr(50) + chr(1569 - 1517) + '\062', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(383 - 334) + chr(0b110011) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(50) + chr(0b101111 + 0o5) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\062' + chr(1397 - 1344), 49769 - 49761), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + '\x32' + chr(1929 - 1877) + chr(0b110010), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(98 - 46) + chr(0b1001 + 0o54), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x36' + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + '\x31' + '\064' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100010 + 0o17) + chr(48) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(0b10 + 0o60) + chr(50) + chr(771 - 718), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10001 + 0o45) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1001111 + 0o40) + chr(0b11101 + 0o26) + '\066' + '\x32', 53907 - 53899)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(5023 - 4912) + '\065' + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfc'), '\144' + chr(6329 - 6228) + '\143' + '\157' + chr(0b1100100) + chr(2400 - 2299))(chr(1480 - 1363) + chr(11049 - 10933) + chr(0b1100110) + chr(466 - 421) + chr(334 - 278)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YKd3m2ANp2Xa(ELZzt_Jouo07, G8BsWTU07RkH, C4vyLr_6v4wZ, DO8Ao93DE3zF=ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + '\064', 8), u0TPTE1e3Dss=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), ord("\x08"))): ekmYRyVtWJP8 = [] R4R0MiPL_Z6W = [] oYKZOUlYaXaA = [] for m1NkCryOw9Bx in vQr8gNKaIaWE(ehT0Px3KOsy9('\060' + chr(6899 - 6788) + chr(0b101110 + 0o3), ord("\x08")), DO8Ao93DE3zF + ehT0Px3KOsy9(chr(956 - 908) + chr(0b1101111) + chr(0b110001), 8)): EqAvYQoY24Cm = AJQSMVXHVJ9_(ELZzt_Jouo07, m1NkCryOw9Bx) Rwy_bSxj7Q5V = AJQSMVXHVJ9_(G8BsWTU07RkH, m1NkCryOw9Bx) w4RhXCqrgGjd = FGhnnwoh1Dd8.Counter() J3EYltchjW9G = FGhnnwoh1Dd8.Counter() u12X5R0oysqf = ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(48), 8) for Lwzf70QSwHuD in C4vyLr_6v4wZ: j5hBWLrK0Fdm = AJQSMVXHVJ9_(Lwzf70QSwHuD, m1NkCryOw9Bx) if j5hBWLrK0Fdm: J3EYltchjW9G += j5hBWLrK0Fdm u12X5R0oysqf += ehT0Px3KOsy9(chr(1147 - 1099) + chr(0b1000101 + 0o52) + chr(49), 8) for n83viqo8Olur in xafqLlk3kkUe(J3EYltchjW9G, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\x1e|\x83'), '\x64' + chr(0b100100 + 0o101) + '\x63' + chr(111) + '\144' + '\x65')('\165' + chr(116) + '\146' + chr(0b100100 + 0o11) + '\070'))(): J3EYltchjW9G[n83viqo8Olur] /= u12X5R0oysqf w4RhXCqrgGjd[n83viqo8Olur] = ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1100001 + 0o16) + chr(882 - 833), 8) xafqLlk3kkUe(R4R0MiPL_Z6W, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x0bu\x95\xe9\x92'), '\x64' + '\x65' + chr(1693 - 1594) + chr(111) + chr(0b100110 + 0o76) + '\145')(chr(0b1110101) + '\164' + chr(0b101000 + 0o76) + chr(45) + chr(0b111000)))(SFwWkTereOxT(EqAvYQoY24Cm, Rwy_bSxj7Q5V, J3EYltchjW9G)) xafqLlk3kkUe(oYKZOUlYaXaA, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x0bu\x95\xe9\x92'), chr(0b1100100) + chr(0b101001 + 0o74) + chr(0b1100011) + '\157' + chr(0b111100 + 0o50) + '\x65')(chr(117) + chr(0b1000000 + 0o64) + '\146' + chr(0b101101) + '\x38'))(vVjIgvnFAbKi(EqAvYQoY24Cm, Rwy_bSxj7Q5V, J3EYltchjW9G, u0TPTE1e3Dss)) xafqLlk3kkUe(ekmYRyVtWJP8, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3\x0bu\x95\xe9\x92'), chr(2478 - 2378) + chr(0b111101 + 0o50) + chr(6806 - 6707) + '\157' + '\x64' + chr(7998 - 7897))(chr(117) + chr(12684 - 12568) + chr(0b1100110) + chr(45) + '\x38'))(zFRsCbLMgzCk(EqAvYQoY24Cm, Rwy_bSxj7Q5V, w4RhXCqrgGjd)) TtCfqhF201_F = xkxBmo49x2An(R4R0MiPL_Z6W) / DO8Ao93DE3zF rwr5PHhPdS9o = xkxBmo49x2An(ekmYRyVtWJP8) / DO8Ao93DE3zF qu8FZPKZmwSQ = xkxBmo49x2An(oYKZOUlYaXaA) / DO8Ao93DE3zF CZnJzQNO2wlr = (TtCfqhF201_F + rwr5PHhPdS9o + qu8FZPKZmwSQ) / 3.0 return (CZnJzQNO2wlr, TtCfqhF201_F, rwr5PHhPdS9o, qu8FZPKZmwSQ)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
get_sari
def get_sari(source_ids, prediction_ids, target_ids, max_gram_size=4): """Computes the SARI scores from the given source, prediction and targets. Args: source_ids: A 2D tf.Tensor of size (batch_size , sequence_length) prediction_ids: A 2D tf.Tensor of size (batch_size, sequence_length) target_ids: A 3D tf.Tensor of size (batch_size, number_of_targets, sequence_length) max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) Returns: A 4-tuple of 1D float Tensors of size (batch_size) for the SARI score and the keep, addition and deletion scores. """ def get_sari_numpy(source_ids, prediction_ids, target_ids): """Iterate over elements in the batch and call the SARI function.""" sari_scores = [] keep_scores = [] add_scores = [] deletion_scores = [] # Iterate over elements in the batch. for source_ids_i, prediction_ids_i, target_ids_i in zip( source_ids, prediction_ids, target_ids): sari, keep, add, deletion = get_sari_score( source_ids_i, prediction_ids_i, target_ids_i, max_gram_size, BETA_FOR_SARI_DELETION_F_MEASURE) sari_scores.append(sari) keep_scores.append(keep) add_scores.append(add) deletion_scores.append(deletion) return (np.asarray(sari_scores), np.asarray(keep_scores), np.asarray(add_scores), np.asarray(deletion_scores)) sari, keep, add, deletion = tf.py_func( get_sari_numpy, [source_ids, prediction_ids, target_ids], [tf.float64, tf.float64, tf.float64, tf.float64]) return sari, keep, add, deletion
python
def get_sari(source_ids, prediction_ids, target_ids, max_gram_size=4): """Computes the SARI scores from the given source, prediction and targets. Args: source_ids: A 2D tf.Tensor of size (batch_size , sequence_length) prediction_ids: A 2D tf.Tensor of size (batch_size, sequence_length) target_ids: A 3D tf.Tensor of size (batch_size, number_of_targets, sequence_length) max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) Returns: A 4-tuple of 1D float Tensors of size (batch_size) for the SARI score and the keep, addition and deletion scores. """ def get_sari_numpy(source_ids, prediction_ids, target_ids): """Iterate over elements in the batch and call the SARI function.""" sari_scores = [] keep_scores = [] add_scores = [] deletion_scores = [] # Iterate over elements in the batch. for source_ids_i, prediction_ids_i, target_ids_i in zip( source_ids, prediction_ids, target_ids): sari, keep, add, deletion = get_sari_score( source_ids_i, prediction_ids_i, target_ids_i, max_gram_size, BETA_FOR_SARI_DELETION_F_MEASURE) sari_scores.append(sari) keep_scores.append(keep) add_scores.append(add) deletion_scores.append(deletion) return (np.asarray(sari_scores), np.asarray(keep_scores), np.asarray(add_scores), np.asarray(deletion_scores)) sari, keep, add, deletion = tf.py_func( get_sari_numpy, [source_ids, prediction_ids, target_ids], [tf.float64, tf.float64, tf.float64, tf.float64]) return sari, keep, add, deletion
[ "def", "get_sari", "(", "source_ids", ",", "prediction_ids", ",", "target_ids", ",", "max_gram_size", "=", "4", ")", ":", "def", "get_sari_numpy", "(", "source_ids", ",", "prediction_ids", ",", "target_ids", ")", ":", "\"\"\"Iterate over elements in the batch and call the SARI function.\"\"\"", "sari_scores", "=", "[", "]", "keep_scores", "=", "[", "]", "add_scores", "=", "[", "]", "deletion_scores", "=", "[", "]", "# Iterate over elements in the batch.", "for", "source_ids_i", ",", "prediction_ids_i", ",", "target_ids_i", "in", "zip", "(", "source_ids", ",", "prediction_ids", ",", "target_ids", ")", ":", "sari", ",", "keep", ",", "add", ",", "deletion", "=", "get_sari_score", "(", "source_ids_i", ",", "prediction_ids_i", ",", "target_ids_i", ",", "max_gram_size", ",", "BETA_FOR_SARI_DELETION_F_MEASURE", ")", "sari_scores", ".", "append", "(", "sari", ")", "keep_scores", ".", "append", "(", "keep", ")", "add_scores", ".", "append", "(", "add", ")", "deletion_scores", ".", "append", "(", "deletion", ")", "return", "(", "np", ".", "asarray", "(", "sari_scores", ")", ",", "np", ".", "asarray", "(", "keep_scores", ")", ",", "np", ".", "asarray", "(", "add_scores", ")", ",", "np", ".", "asarray", "(", "deletion_scores", ")", ")", "sari", ",", "keep", ",", "add", ",", "deletion", "=", "tf", ".", "py_func", "(", "get_sari_numpy", ",", "[", "source_ids", ",", "prediction_ids", ",", "target_ids", "]", ",", "[", "tf", ".", "float64", ",", "tf", ".", "float64", ",", "tf", ".", "float64", ",", "tf", ".", "float64", "]", ")", "return", "sari", ",", "keep", ",", "add", ",", "deletion" ]
Computes the SARI scores from the given source, prediction and targets. Args: source_ids: A 2D tf.Tensor of size (batch_size , sequence_length) prediction_ids: A 2D tf.Tensor of size (batch_size, sequence_length) target_ids: A 3D tf.Tensor of size (batch_size, number_of_targets, sequence_length) max_gram_size: int. largest n-gram size we care about (e.g. 3 for unigrams, bigrams, and trigrams) Returns: A 4-tuple of 1D float Tensors of size (batch_size) for the SARI score and the keep, addition and deletion scores.
[ "Computes", "the", "SARI", "scores", "from", "the", "given", "source", "prediction", "and", "targets", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L182-L221
train
Computes the SARI scores from the given source prediction and target.
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,TLbJ60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,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + '\063' + '\061' + chr(0b100100 + 0o17), 63161 - 63153), ehT0Px3KOsy9('\060' + chr(0b1000100 + 0o53) + chr(0b100111 + 0o12) + chr(0b110001) + chr(0b101110 + 0o5), 28052 - 28044), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b11100 + 0o27), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110001) + '\063', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1100 + 0o45) + chr(54) + chr(51), 0o10), ehT0Px3KOsy9(chr(480 - 432) + chr(0b1101111) + chr(0b1101 + 0o44) + chr(0b110110) + chr(0b10110 + 0o34), 36063 - 36055), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1333 - 1284) + chr(0b110100) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(9268 - 9157) + '\x32' + chr(51) + chr(1799 - 1750), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101100 + 0o3) + chr(0b110110) + chr(469 - 416), ord("\x08")), ehT0Px3KOsy9(chr(1029 - 981) + chr(0b100011 + 0o114) + '\061' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(1751 - 1701) + chr(0b110 + 0o60) + chr(1357 - 1305), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x34' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101 + 0o55) + '\061' + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1367 - 1318) + '\063' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + '\x31' + chr(0b101100 + 0o13), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(0b101111 + 0o2), 23935 - 23927), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10011 + 0o37) + '\x37' + chr(872 - 824), 22220 - 22212), ehT0Px3KOsy9(chr(1660 - 1612) + chr(3152 - 3041) + chr(0b110011) + chr(0b1 + 0o60) + chr(721 - 667), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(140 - 90) + chr(0b1101 + 0o51) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(2062 - 2014) + '\157' + '\x33' + chr(0b101 + 0o55) + chr(0b110000 + 0o0), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(479 - 431), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6366 - 6255) + '\x31' + chr(53) + chr(1039 - 985), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b100101 + 0o14) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(7667 - 7556) + chr(1672 - 1623) + chr(1575 - 1524) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x36' + chr(956 - 904), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110001) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101 + 0o55) + '\x33' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + chr(1739 - 1688) + '\065' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(52) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(0b1010110 + 0o31) + chr(0b1 + 0o62) + chr(49), 31111 - 31103), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(423 - 374) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + '\063' + chr(121 - 71) + chr(0b110000), 8), ehT0Px3KOsy9(chr(692 - 644) + chr(11389 - 11278) + chr(49) + chr(249 - 194), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11844 - 11733) + '\x33' + '\063' + chr(0b10 + 0o62), 62312 - 62304), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101011 + 0o6) + '\x35' + chr(54), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\061' + chr(0b10010 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11101 + 0o122) + '\062' + chr(51) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110001 + 0o5) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b1000 + 0o52) + '\062' + chr(52), 26673 - 26665), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\060' + chr(55), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5'), chr(0b1100100) + '\145' + chr(3019 - 2920) + chr(8987 - 8876) + '\144' + '\x65')('\165' + chr(116) + '\x66' + chr(1130 - 1085) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def SCt0tkxvDk5s(ELZzt_Jouo07, G8BsWTU07RkH, xdrizar0JtcG, DO8Ao93DE3zF=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10011 + 0o41), 3745 - 3737)): def pcQGcePXzNAO(ELZzt_Jouo07, G8BsWTU07RkH, xdrizar0JtcG): h8iR_mbPQYzd = [] R4R0MiPL_Z6W = [] Sa7h2kWSJBnJ = [] oYKZOUlYaXaA = [] for (SWWYipQSJCiY, VzhR7Zp4uhJR, Lwzf70QSwHuD) in pZ0NK2y6HRbn(ELZzt_Jouo07, G8BsWTU07RkH, xdrizar0JtcG): (CZnJzQNO2wlr, KYBTv50xVjCE, uJ0q9cG5ZOR3, b6Gu4k61LDxt) = YKd3m2ANp2Xa(SWWYipQSJCiY, VzhR7Zp4uhJR, Lwzf70QSwHuD, DO8Ao93DE3zF, cLuhIBx9eeUZ) xafqLlk3kkUe(h8iR_mbPQYzd, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa;{.\x1d\x16'), chr(100) + chr(101) + chr(5811 - 5712) + chr(0b1010101 + 0o32) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1011111 + 0o25) + chr(0b1100110) + chr(1951 - 1906) + chr(56)))(CZnJzQNO2wlr) xafqLlk3kkUe(R4R0MiPL_Z6W, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa;{.\x1d\x16'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(1307 - 1190) + chr(0b1110100) + '\146' + chr(1443 - 1398) + chr(0b110100 + 0o4)))(KYBTv50xVjCE) xafqLlk3kkUe(Sa7h2kWSJBnJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa;{.\x1d\x16'), chr(100) + '\145' + chr(0b1100011) + '\157' + '\144' + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(0b1010 + 0o43) + chr(2609 - 2553)))(uJ0q9cG5ZOR3) xafqLlk3kkUe(oYKZOUlYaXaA, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa;{.\x1d\x16'), '\x64' + chr(0b1100101) + chr(0b110 + 0o135) + chr(11769 - 11658) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(45) + chr(2316 - 2260)))(b6Gu4k61LDxt) return (xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa8j9\x01\x13\x1a'), chr(0b1100100) + '\145' + chr(0b1 + 0o142) + chr(1831 - 1720) + chr(9914 - 9814) + '\145')(chr(3502 - 3385) + chr(116) + chr(102) + chr(45) + chr(0b111000)))(h8iR_mbPQYzd), xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa8j9\x01\x13\x1a'), chr(100) + chr(0b1100101) + chr(0b11101 + 0o106) + chr(0b1101111) + '\144' + '\145')(chr(10233 - 10116) + chr(0b11 + 0o161) + chr(2395 - 2293) + '\x2d' + chr(56)))(R4R0MiPL_Z6W), xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa8j9\x01\x13\x1a'), '\x64' + '\x65' + chr(0b110011 + 0o60) + chr(111) + chr(0b100100 + 0o100) + '\x65')(chr(1442 - 1325) + '\164' + chr(7304 - 7202) + chr(0b101101) + chr(1086 - 1030)))(Sa7h2kWSJBnJ), xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa8j9\x01\x13\x1a'), '\x64' + '\145' + chr(99) + chr(6453 - 6342) + '\144' + chr(4253 - 4152))(chr(117) + chr(0b1110100) + chr(0b1100100 + 0o2) + '\055' + chr(0b110101 + 0o3)))(oYKZOUlYaXaA)) (CZnJzQNO2wlr, KYBTv50xVjCE, uJ0q9cG5ZOR3, b6Gu4k61LDxt) = IDJ2eXGCBCDu.py_func(pcQGcePXzNAO, [ELZzt_Jouo07, G8BsWTU07RkH, xdrizar0JtcG], [IDJ2eXGCBCDu.float64, IDJ2eXGCBCDu.float64, IDJ2eXGCBCDu.float64, IDJ2eXGCBCDu.float64]) return (CZnJzQNO2wlr, KYBTv50xVjCE, uJ0q9cG5ZOR3, b6Gu4k61LDxt)
tensorflow/tensor2tensor
tensor2tensor/utils/sari_hook.py
sari_score
def sari_score(predictions, labels, features, **unused_kwargs): """Computes the SARI scores from the given source, prediction and targets. An approximate SARI scoring method since we do not glue word pieces or decode the ids and tokenize the output. By default, we use ngram order of 4. Also, this does not have beam search. Args: predictions: tensor, model predictions. labels: tensor, gold output. features: dict, containing inputs. Returns: sari: int, approx sari score """ if "inputs" not in features: raise ValueError("sari_score requires inputs feature") # Convert the inputs and outputs to a [batch_size, sequence_length] tensor. inputs = tf.squeeze(features["inputs"], axis=[-1, -2]) outputs = tf.to_int32(tf.argmax(predictions, axis=-1)) outputs = tf.squeeze(outputs, axis=[-1, -2]) # Convert the labels to a [batch_size, 1, sequence_length] tensor. labels = tf.squeeze(labels, axis=[-1, -2]) labels = tf.expand_dims(labels, axis=1) score, _, _, _ = get_sari(inputs, outputs, labels) return score, tf.constant(1.0)
python
def sari_score(predictions, labels, features, **unused_kwargs): """Computes the SARI scores from the given source, prediction and targets. An approximate SARI scoring method since we do not glue word pieces or decode the ids and tokenize the output. By default, we use ngram order of 4. Also, this does not have beam search. Args: predictions: tensor, model predictions. labels: tensor, gold output. features: dict, containing inputs. Returns: sari: int, approx sari score """ if "inputs" not in features: raise ValueError("sari_score requires inputs feature") # Convert the inputs and outputs to a [batch_size, sequence_length] tensor. inputs = tf.squeeze(features["inputs"], axis=[-1, -2]) outputs = tf.to_int32(tf.argmax(predictions, axis=-1)) outputs = tf.squeeze(outputs, axis=[-1, -2]) # Convert the labels to a [batch_size, 1, sequence_length] tensor. labels = tf.squeeze(labels, axis=[-1, -2]) labels = tf.expand_dims(labels, axis=1) score, _, _, _ = get_sari(inputs, outputs, labels) return score, tf.constant(1.0)
[ "def", "sari_score", "(", "predictions", ",", "labels", ",", "features", ",", "*", "*", "unused_kwargs", ")", ":", "if", "\"inputs\"", "not", "in", "features", ":", "raise", "ValueError", "(", "\"sari_score requires inputs feature\"", ")", "# Convert the inputs and outputs to a [batch_size, sequence_length] tensor.", "inputs", "=", "tf", ".", "squeeze", "(", "features", "[", "\"inputs\"", "]", ",", "axis", "=", "[", "-", "1", ",", "-", "2", "]", ")", "outputs", "=", "tf", ".", "to_int32", "(", "tf", ".", "argmax", "(", "predictions", ",", "axis", "=", "-", "1", ")", ")", "outputs", "=", "tf", ".", "squeeze", "(", "outputs", ",", "axis", "=", "[", "-", "1", ",", "-", "2", "]", ")", "# Convert the labels to a [batch_size, 1, sequence_length] tensor.", "labels", "=", "tf", ".", "squeeze", "(", "labels", ",", "axis", "=", "[", "-", "1", ",", "-", "2", "]", ")", "labels", "=", "tf", ".", "expand_dims", "(", "labels", ",", "axis", "=", "1", ")", "score", ",", "_", ",", "_", ",", "_", "=", "get_sari", "(", "inputs", ",", "outputs", ",", "labels", ")", "return", "score", ",", "tf", ".", "constant", "(", "1.0", ")" ]
Computes the SARI scores from the given source, prediction and targets. An approximate SARI scoring method since we do not glue word pieces or decode the ids and tokenize the output. By default, we use ngram order of 4. Also, this does not have beam search. Args: predictions: tensor, model predictions. labels: tensor, gold output. features: dict, containing inputs. Returns: sari: int, approx sari score
[ "Computes", "the", "SARI", "scores", "from", "the", "given", "source", "prediction", "and", "targets", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/sari_hook.py#L224-L252
train
Computes the SARI score from the given predictions and labels.
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,FXUco0R3m83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S,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(753 - 642) + chr(0b110011) + chr(55) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(796 - 748) + '\157' + chr(0b110111) + chr(0b110011), 54689 - 54681), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(0b10001 + 0o45) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(1354 - 1306) + chr(2397 - 2343), ord("\x08")), ehT0Px3KOsy9(chr(133 - 85) + '\157' + chr(1744 - 1695) + chr(717 - 664) + chr(0b110000), 23502 - 23494), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(1222 - 1172) + chr(48) + chr(0b101110 + 0o2), 26650 - 26642), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(0b101 + 0o60) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(781 - 733) + chr(111) + '\061' + chr(2446 - 2393) + chr(1054 - 1003), 9532 - 9524), ehT0Px3KOsy9('\x30' + chr(10899 - 10788) + '\x33' + '\067' + chr(0b100101 + 0o14), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(54) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101 + 0o56) + chr(55) + '\x34', 0o10), ehT0Px3KOsy9(chr(98 - 50) + chr(111) + '\061' + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(1374 - 1323) + '\x36', 57094 - 57086), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + '\062' + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b110010) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(5919 - 5808) + '\x31' + chr(1261 - 1206) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(0b101111 + 0o4) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + '\061' + chr(53) + chr(0b110001), 26796 - 26788), ehT0Px3KOsy9(chr(493 - 445) + chr(0b100011 + 0o114) + '\x32' + '\064' + chr(50), 0o10), ehT0Px3KOsy9(chr(1848 - 1800) + chr(111) + '\x33' + chr(0b11000 + 0o33) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + chr(0b110111) + chr(0b11 + 0o64), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101000 + 0o12) + '\066' + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(2699 - 2644) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + '\x33' + chr(52) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(290 - 242) + chr(111) + chr(0b110011) + '\x37' + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b1110 + 0o50) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(51) + '\x36' + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10010 + 0o44) + '\065', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\062' + chr(0b1111 + 0o47), 25920 - 25912), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11000 + 0o32) + '\066' + chr(1208 - 1159), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(54) + '\x32', 10592 - 10584), ehT0Px3KOsy9(chr(985 - 937) + chr(111) + chr(49) + chr(53) + chr(48), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b10011 + 0o42) + chr(0b1111 + 0o45), 1738 - 1730), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1100101 + 0o12) + chr(49) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x33' + chr(0b1011 + 0o51) + chr(0b11111 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3548 - 3437) + chr(50) + chr(0b100 + 0o62) + chr(0b100011 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2408 - 2354) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(574 - 526) + chr(378 - 267) + chr(0b100011 + 0o17) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101001 + 0o10) + chr(0b110000) + chr(0b11011 + 0o25), 11044 - 11036)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\x6f' + '\065' + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + '\x65')(chr(3633 - 3516) + chr(116) + chr(102) + chr(0b101101) + chr(0b1101 + 0o53)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def IIY6MVtFFq1l(qIQi_VFCIFZL, uXMK81tmdpTM, EEf4r9nUvta_, **Dl7jGuYToI93): if xafqLlk3kkUe(SXOLrMavuUCe(b'\x96U\x00m\xb2\x1b'), chr(0b110011 + 0o61) + chr(0b1100101) + '\143' + chr(0b110 + 0o151) + '\x64' + '\x65')(chr(0b1000010 + 0o63) + '\164' + chr(9535 - 9433) + chr(674 - 629) + chr(56)) not in EEf4r9nUvta_: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x8cZ\x02q\x99\x1b\xe3\xc1\x19\x9c\xd7\x8ej\xaf`\xb8\n~\x1a\x82\xb2Q\xc0\x8d\x95\x8cT\x93P7\xc5\x07\x1a\t'), '\144' + chr(0b1100101) + chr(2791 - 2692) + '\x6f' + chr(8668 - 8568) + '\x65')(chr(117) + '\164' + chr(102) + chr(45) + chr(1553 - 1497))) vXoupepMtCXU = IDJ2eXGCBCDu.squeeze(EEf4r9nUvta_[xafqLlk3kkUe(SXOLrMavuUCe(b'\x96U\x00m\xb2\x1b'), chr(0b1110 + 0o126) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + chr(101))(chr(0b111110 + 0o67) + chr(0b1011010 + 0o32) + '\x66' + '\x2d' + '\070')], axis=[-ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 29052 - 29044), -ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + chr(0b110010), ord("\x08"))]) Dx_DllZ8uCko = IDJ2eXGCBCDu.to_int32(IDJ2eXGCBCDu.argmax(qIQi_VFCIFZL, axis=-ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b111111 + 0o60) + '\061', 8))) Dx_DllZ8uCko = IDJ2eXGCBCDu.squeeze(Dx_DllZ8uCko, axis=[-ehT0Px3KOsy9(chr(1830 - 1782) + chr(111) + chr(49), 8), -ehT0Px3KOsy9('\060' + chr(4212 - 4101) + '\x32', 8)]) uXMK81tmdpTM = IDJ2eXGCBCDu.squeeze(uXMK81tmdpTM, axis=[-ehT0Px3KOsy9(chr(124 - 76) + chr(111) + chr(1171 - 1122), 8), -ehT0Px3KOsy9('\060' + '\x6f' + chr(1294 - 1244), 8)]) uXMK81tmdpTM = IDJ2eXGCBCDu.expand_dims(uXMK81tmdpTM, axis=ehT0Px3KOsy9(chr(0b110000) + chr(0b1011101 + 0o22) + '\x31', 8)) (n9fd4FsgoqFs, VNGQdHSFPrso, VNGQdHSFPrso, VNGQdHSFPrso) = SCt0tkxvDk5s(vXoupepMtCXU, Dx_DllZ8uCko, uXMK81tmdpTM) return (n9fd4FsgoqFs, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9cT\x1ek\xb2\t\xee\xda'), chr(0b1100100) + '\145' + chr(0b1011011 + 0o10) + chr(8184 - 8073) + chr(6856 - 6756) + chr(0b1001101 + 0o30))(chr(483 - 366) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'))(1.0))
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
_get_mnist
def _get_mnist(directory): """Download all MNIST files to directory unless they are there.""" for filename in [ _MNIST_TRAIN_DATA_FILENAME, _MNIST_TRAIN_LABELS_FILENAME, _MNIST_TEST_DATA_FILENAME, _MNIST_TEST_LABELS_FILENAME ]: generator_utils.maybe_download(directory, filename, _MNIST_URL + filename)
python
def _get_mnist(directory): """Download all MNIST files to directory unless they are there.""" for filename in [ _MNIST_TRAIN_DATA_FILENAME, _MNIST_TRAIN_LABELS_FILENAME, _MNIST_TEST_DATA_FILENAME, _MNIST_TEST_LABELS_FILENAME ]: generator_utils.maybe_download(directory, filename, _MNIST_URL + filename)
[ "def", "_get_mnist", "(", "directory", ")", ":", "for", "filename", "in", "[", "_MNIST_TRAIN_DATA_FILENAME", ",", "_MNIST_TRAIN_LABELS_FILENAME", ",", "_MNIST_TEST_DATA_FILENAME", ",", "_MNIST_TEST_LABELS_FILENAME", "]", ":", "generator_utils", ".", "maybe_download", "(", "directory", ",", "filename", ",", "_MNIST_URL", "+", "filename", ")" ]
Download all MNIST files to directory unless they are there.
[ "Download", "all", "MNIST", "files", "to", "directory", "unless", "they", "are", "there", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L42-L48
train
Download all MNIST files to directory unless they are there.
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,ko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Z6mjyZZT,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(0b110111 + 0o70) + '\061' + chr(1445 - 1397) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(0b110001) + '\060' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(917 - 869) + chr(0b1101110 + 0o1) + chr(0b110010) + chr(0b110001) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1397 - 1349) + '\x6f' + '\061' + chr(0b10010 + 0o45) + chr(963 - 908), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o14) + chr(0b100101 + 0o22) + chr(1415 - 1363), 50771 - 50763), ehT0Px3KOsy9(chr(0b110000) + chr(8447 - 8336) + chr(0b110001) + chr(0b110110) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8230 - 8119) + chr(0b110 + 0o53) + '\061' + chr(0b110001), 53176 - 53168), ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + chr(0b110001) + '\060' + chr(819 - 764), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\x31' + chr(0b10101 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(782 - 733) + chr(48) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(2901 - 2790) + chr(49) + '\x32' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010010 + 0o35) + chr(0b10001 + 0o41) + chr(0b1 + 0o63) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(49) + '\x36' + chr(1534 - 1479), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\063' + chr(2436 - 2384), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b101110 + 0o3) + chr(49) + '\x30', 0b1000), ehT0Px3KOsy9(chr(1739 - 1691) + '\157' + '\062' + chr(0b100110 + 0o12) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(11171 - 11060) + chr(0b110011) + chr(0b110011) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(2275 - 2164) + chr(0b110001) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11001 + 0o32) + chr(53) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1831 - 1782) + '\x34' + chr(0b11011 + 0o33), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110111) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + '\x32' + chr(0b110000) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x35' + chr(0b10100 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(310 - 262) + '\x6f' + chr(0b101111 + 0o3) + '\060' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4505 - 4394) + chr(0b100000 + 0o22) + chr(52) + '\x37', 47956 - 47948), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b11000 + 0o31) + chr(0b10000 + 0o40) + chr(0b101100 + 0o7), 8), ehT0Px3KOsy9(chr(79 - 31) + chr(2777 - 2666) + chr(0b110010) + '\x36' + chr(51), 59665 - 59657), ehT0Px3KOsy9(chr(2051 - 2003) + chr(0b1101111) + chr(0b10101 + 0o35) + chr(1823 - 1771) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110001) + chr(0b11101 + 0o32), 0b1000), ehT0Px3KOsy9('\x30' + chr(3945 - 3834) + chr(0b110010) + chr(0b110111) + chr(48), 8), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + chr(50) + chr(0b110011) + chr(0b1101 + 0o44), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(6749 - 6638) + '\x31', 26345 - 26337), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110101) + chr(276 - 223), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(54) + '\067', 23029 - 23021), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b1011 + 0o46) + chr(0b111 + 0o52), 52846 - 52838), ehT0Px3KOsy9(chr(0b110000) + chr(0b1111 + 0o140) + chr(0b1101 + 0o46) + chr(0b1 + 0o57) + chr(0b110010 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011010 + 0o25) + chr(1484 - 1433) + '\x31' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(683 - 634) + chr(0b10000 + 0o44) + chr(0b10101 + 0o37), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101010 + 0o7) + chr(50) + chr(2362 - 2311), ord("\x08")), ehT0Px3KOsy9(chr(790 - 742) + chr(6609 - 6498) + '\x31' + chr(0b110110) + chr(247 - 198), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x35' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'l'), chr(1715 - 1615) + '\x65' + '\143' + chr(0b1101111) + chr(0b1010000 + 0o24) + chr(101))('\165' + chr(625 - 509) + '\146' + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def so8EEr43gC61(EVVr9bEHclel): for xw4DsBfIJ22E in [VZWuBPxlenrP, nxza0nmzQoYV, VGPfjzPsb0H6, I2VshujOYUgP]: xafqLlk3kkUe(g1Z_RG9zP4cD, xafqLlk3kkUe(SXOLrMavuUCe(b'/"\xf5\x1d\xd9,-(x(=\xca\x16x'), chr(2438 - 2338) + chr(101) + chr(99) + '\x6f' + chr(0b111100 + 0o50) + '\x65')(chr(0b1110101) + '\164' + chr(8068 - 7966) + '\055' + chr(0b110111 + 0o1)))(EVVr9bEHclel, xw4DsBfIJ22E, FC9R8yTeBiGB + xw4DsBfIJ22E)
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
_extract_mnist_images
def _extract_mnist_images(filename, num_images): """Extract images from an MNIST file into a numpy array. Args: filename: The path to an MNIST images file. num_images: The number of images in the file. Returns: A numpy array of shape [number_of_images, height, width, channels]. """ with gzip.open(filename) as bytestream: bytestream.read(16) buf = bytestream.read(_MNIST_IMAGE_SIZE * _MNIST_IMAGE_SIZE * num_images) data = np.frombuffer(buf, dtype=np.uint8) data = data.reshape(num_images, _MNIST_IMAGE_SIZE, _MNIST_IMAGE_SIZE, 1) return data
python
def _extract_mnist_images(filename, num_images): """Extract images from an MNIST file into a numpy array. Args: filename: The path to an MNIST images file. num_images: The number of images in the file. Returns: A numpy array of shape [number_of_images, height, width, channels]. """ with gzip.open(filename) as bytestream: bytestream.read(16) buf = bytestream.read(_MNIST_IMAGE_SIZE * _MNIST_IMAGE_SIZE * num_images) data = np.frombuffer(buf, dtype=np.uint8) data = data.reshape(num_images, _MNIST_IMAGE_SIZE, _MNIST_IMAGE_SIZE, 1) return data
[ "def", "_extract_mnist_images", "(", "filename", ",", "num_images", ")", ":", "with", "gzip", ".", "open", "(", "filename", ")", "as", "bytestream", ":", "bytestream", ".", "read", "(", "16", ")", "buf", "=", "bytestream", ".", "read", "(", "_MNIST_IMAGE_SIZE", "*", "_MNIST_IMAGE_SIZE", "*", "num_images", ")", "data", "=", "np", ".", "frombuffer", "(", "buf", ",", "dtype", "=", "np", ".", "uint8", ")", "data", "=", "data", ".", "reshape", "(", "num_images", ",", "_MNIST_IMAGE_SIZE", ",", "_MNIST_IMAGE_SIZE", ",", "1", ")", "return", "data" ]
Extract images from an MNIST file into a numpy array. Args: filename: The path to an MNIST images file. num_images: The number of images in the file. Returns: A numpy array of shape [number_of_images, height, width, channels].
[ "Extract", "images", "from", "an", "MNIST", "file", "into", "a", "numpy", "array", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L51-L66
train
Extract images from an MNIST file into a numpy array.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnD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_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(2005 - 1957) + '\157' + chr(49) + '\067' + chr(696 - 646), 35975 - 35967), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\x35' + '\063', 6435 - 6427), ehT0Px3KOsy9(chr(1894 - 1846) + '\157' + chr(50) + '\064' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100101 + 0o14) + chr(2067 - 2016) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(342 - 287) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110111 + 0o70) + '\x32' + '\x31' + chr(1660 - 1612), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(93 - 38) + chr(2150 - 2097), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + '\x32' + chr(0b100110 + 0o16) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + chr(0b10100 + 0o37), 29081 - 29073), ehT0Px3KOsy9(chr(283 - 235) + chr(2252 - 2141) + '\x33' + chr(0b1010 + 0o51) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\x30' + chr(53), 46567 - 46559), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(1418 - 1367) + chr(55) + chr(255 - 201), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(0b100111 + 0o20) + chr(874 - 825), 0b1000), ehT0Px3KOsy9(chr(1516 - 1468) + chr(111) + '\062' + chr(50) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(0b110011) + '\062' + chr(0b100011 + 0o22), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b1110 + 0o45) + chr(2913 - 2859), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b100 + 0o153) + chr(50) + chr(0b110101) + chr(54), 41709 - 41701), ehT0Px3KOsy9(chr(48) + chr(0b10010 + 0o135) + chr(50) + chr(0b110101) + chr(2541 - 2490), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(1338 - 1286) + chr(0b100101 + 0o20), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x37' + '\x31', 46004 - 45996), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100001 + 0o22) + chr(51) + chr(0b110010), 15228 - 15220), ehT0Px3KOsy9('\x30' + chr(111) + chr(365 - 315) + '\x31' + chr(0b101010 + 0o11), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\066' + '\063', 0b1000), ehT0Px3KOsy9(chr(1603 - 1555) + chr(111) + '\061' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001111 + 0o40) + '\x33' + chr(0b110111) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(6339 - 6228) + '\x31' + chr(0b110101) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(216 - 167) + '\x30' + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(2200 - 2151) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8387 - 8276) + '\061' + '\x31', 40172 - 40164), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(893 - 843) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(949 - 900) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(0b11100 + 0o27) + chr(587 - 532) + chr(0b110101), 46854 - 46846), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(1381 - 1327) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10324 - 10213) + chr(1758 - 1709) + chr(52) + chr(0b100011 + 0o15), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(51) + '\x35', 60021 - 60013), ehT0Px3KOsy9('\x30' + chr(5314 - 5203) + '\x33' + chr(523 - 473) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(949 - 901) + chr(111) + chr(0b110001) + chr(0b110100) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1524 - 1476) + '\x6f' + chr(0b110001 + 0o1) + '\x34', 0b1000), ehT0Px3KOsy9(chr(839 - 791) + chr(0b1101111) + chr(1362 - 1312) + chr(0b110010), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b11001 + 0o126) + chr(0b110101) + chr(0b101 + 0o53), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'T'), chr(0b101100 + 0o70) + chr(10183 - 10082) + chr(0b1000100 + 0o37) + '\x6f' + chr(0b1001 + 0o133) + chr(0b1001 + 0o134))(chr(0b1110101) + chr(0b1110100) + chr(102) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uj0rwlouB6VI(xw4DsBfIJ22E, xf2cgVKUh6ft): with xafqLlk3kkUe(Sl9BQg7umixy, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\x1b\xc31'), '\x64' + chr(101) + '\x63' + '\157' + chr(629 - 529) + chr(0b100010 + 0o103))(chr(0b1110101) + chr(0b1110100) + chr(0b1011001 + 0o15) + '\055' + chr(0b111000)))(xw4DsBfIJ22E) as aZ45m1vEEAjf: xafqLlk3kkUe(aZ45m1vEEAjf, xafqLlk3kkUe(SXOLrMavuUCe(b'/]\xeb6\xe9\xfaU\xd1x\xb1\xf7\xa7'), '\144' + '\x65' + chr(0b11011 + 0o110) + chr(2305 - 2194) + chr(100) + '\x65')(chr(0b1110101) + chr(0b110101 + 0o77) + chr(102) + '\x2d' + chr(0b111000)))(ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + '\x32' + chr(0b110000), 0b1000)) b3K7dbpII422 = aZ45m1vEEAjf.U6MiWrhuCi2Y(vuuLxZK42dXF * vuuLxZK42dXF * xf2cgVKUh6ft) ULnjp6D6efFH = WqUC3KWvYVup.frombuffer(b3K7dbpII422, dtype=WqUC3KWvYVup.uint8) ULnjp6D6efFH = ULnjp6D6efFH.reshape(xf2cgVKUh6ft, vuuLxZK42dXF, vuuLxZK42dXF, ehT0Px3KOsy9('\x30' + chr(5940 - 5829) + chr(526 - 477), 0b1000)) return ULnjp6D6efFH
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
_extract_mnist_labels
def _extract_mnist_labels(filename, num_labels): """Extract labels from an MNIST file into integers. Args: filename: The path to an MNIST labels file. num_labels: The number of labels in the file. Returns: A int64 numpy array of shape [num_labels] """ with gzip.open(filename) as bytestream: bytestream.read(8) buf = bytestream.read(num_labels) labels = np.frombuffer(buf, dtype=np.uint8).astype(np.int64) return labels
python
def _extract_mnist_labels(filename, num_labels): """Extract labels from an MNIST file into integers. Args: filename: The path to an MNIST labels file. num_labels: The number of labels in the file. Returns: A int64 numpy array of shape [num_labels] """ with gzip.open(filename) as bytestream: bytestream.read(8) buf = bytestream.read(num_labels) labels = np.frombuffer(buf, dtype=np.uint8).astype(np.int64) return labels
[ "def", "_extract_mnist_labels", "(", "filename", ",", "num_labels", ")", ":", "with", "gzip", ".", "open", "(", "filename", ")", "as", "bytestream", ":", "bytestream", ".", "read", "(", "8", ")", "buf", "=", "bytestream", ".", "read", "(", "num_labels", ")", "labels", "=", "np", ".", "frombuffer", "(", "buf", ",", "dtype", "=", "np", ".", "uint8", ")", ".", "astype", "(", "np", ".", "int64", ")", "return", "labels" ]
Extract labels from an MNIST file into integers. Args: filename: The path to an MNIST labels file. num_labels: The number of labels in the file. Returns: A int64 numpy array of shape [num_labels]
[ "Extract", "labels", "from", "an", "MNIST", "file", "into", "integers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L69-L83
train
Extract labels from an MNIST file into integers.
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,Q6d3Qd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aC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(61 - 8) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(3575 - 3464) + chr(51) + chr(52) + chr(53), 0o10), ehT0Px3KOsy9(chr(374 - 326) + chr(0b110011 + 0o74) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(1093 - 982) + '\062' + '\x32' + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\066' + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(6345 - 6234) + chr(49) + '\x37' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(51) + '\x34', 1299 - 1291), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\x32' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(733 - 683) + chr(0b110010 + 0o2) + chr(2057 - 2007), 23115 - 23107), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\062' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\060' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1032 - 984) + '\157' + '\x31' + chr(0b11101 + 0o26) + '\066', 60301 - 60293), ehT0Px3KOsy9('\x30' + chr(11593 - 11482) + '\x31' + chr(0b100010 + 0o24) + '\x33', 55705 - 55697), ehT0Px3KOsy9(chr(0b110000) + chr(0b111110 + 0o61) + '\061' + '\x37' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101010 + 0o105) + chr(0b110111) + chr(915 - 861), 9101 - 9093), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\062' + chr(2298 - 2246) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\x31' + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(0b100001 + 0o25), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110010) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(114 - 66) + '\157' + '\063' + chr(0b1011 + 0o45) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b110011) + chr(0b110011) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110 + 0o61) + '\061', 8), ehT0Px3KOsy9(chr(570 - 522) + '\157' + chr(0b100110 + 0o15) + chr(0b110011) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + chr(0b101010 + 0o7) + '\x34' + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100011 + 0o16) + '\067' + '\x31', 8), ehT0Px3KOsy9(chr(1385 - 1337) + chr(0b1110 + 0o141) + '\063' + chr(50) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(48) + chr(0b10010 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\x31' + chr(0b11001 + 0o36) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(55), 42117 - 42109), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(10216 - 10105) + chr(961 - 910) + chr(0b110001 + 0o1) + '\066', 57646 - 57638), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\067' + chr(0b11011 + 0o27), 0b1000), ehT0Px3KOsy9('\060' + chr(9055 - 8944) + chr(0b110001) + chr(0b110000) + chr(53), 58858 - 58850), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(2093 - 2041) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + '\062' + chr(0b100001 + 0o24) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b101000 + 0o107) + chr(51) + chr(0b110101) + chr(53), 15352 - 15344), ehT0Px3KOsy9(chr(2014 - 1966) + chr(11218 - 11107) + chr(2516 - 2465) + '\067', 10296 - 10288), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + chr(52) + chr(49), 61355 - 61347), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(52) + chr(0b110100), 65092 - 65084), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b101111 + 0o10) + chr(2603 - 2549), 27003 - 26995), ehT0Px3KOsy9(chr(1936 - 1888) + chr(0b1011110 + 0o21) + '\x37' + chr(0b10000 + 0o45), 8483 - 8475)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(53) + chr(0b110 + 0o52), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x05'), chr(7440 - 7340) + chr(5077 - 4976) + '\143' + chr(111) + '\144' + chr(101))(chr(7304 - 7187) + chr(9988 - 9872) + chr(0b1000100 + 0o42) + chr(0b1000 + 0o45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KeciVbBaXddx(xw4DsBfIJ22E, cNrGXe_50UpS): with xafqLlk3kkUe(Sl9BQg7umixy, xafqLlk3kkUe(SXOLrMavuUCe(b'D\x95c\xff'), '\x64' + chr(101) + '\143' + chr(0b1001111 + 0o40) + chr(397 - 297) + chr(0b1100 + 0o131))('\x75' + chr(11673 - 11557) + chr(0b101 + 0o141) + chr(1193 - 1148) + chr(56)))(xw4DsBfIJ22E) as aZ45m1vEEAjf: xafqLlk3kkUe(aZ45m1vEEAjf, xafqLlk3kkUe(SXOLrMavuUCe(b'~\xd3K\xf8%\x0b\xf4\xa7\xe1>\xb5\x07'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b100100 + 0o101))('\165' + chr(116) + chr(102) + '\055' + chr(300 - 244)))(ehT0Px3KOsy9('\060' + chr(8434 - 8323) + chr(0b110001) + '\x30', 41161 - 41153)) b3K7dbpII422 = aZ45m1vEEAjf.U6MiWrhuCi2Y(cNrGXe_50UpS) uXMK81tmdpTM = WqUC3KWvYVup.frombuffer(b3K7dbpII422, dtype=WqUC3KWvYVup.uint8).astype(WqUC3KWvYVup.int64) return uXMK81tmdpTM
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
mnist_common_generator
def mnist_common_generator(tmp_dir, training, how_many, data_filename, label_filename, start_from=0): """Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. data_filename: file that contains features data. label_filename: file that contains labels. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ data_path = os.path.join(tmp_dir, data_filename) labels_path = os.path.join(tmp_dir, label_filename) images = _extract_mnist_images(data_path, 60000 if training else 10000) labels = _extract_mnist_labels(labels_path, 60000 if training else 10000) # Shuffle the data to make sure classes are well distributed. data = list(zip(images, labels)) random.shuffle(data) images, labels = list(zip(*data)) return image_utils.image_generator(images[start_from:start_from + how_many], labels[start_from:start_from + how_many])
python
def mnist_common_generator(tmp_dir, training, how_many, data_filename, label_filename, start_from=0): """Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. data_filename: file that contains features data. label_filename: file that contains labels. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ data_path = os.path.join(tmp_dir, data_filename) labels_path = os.path.join(tmp_dir, label_filename) images = _extract_mnist_images(data_path, 60000 if training else 10000) labels = _extract_mnist_labels(labels_path, 60000 if training else 10000) # Shuffle the data to make sure classes are well distributed. data = list(zip(images, labels)) random.shuffle(data) images, labels = list(zip(*data)) return image_utils.image_generator(images[start_from:start_from + how_many], labels[start_from:start_from + how_many])
[ "def", "mnist_common_generator", "(", "tmp_dir", ",", "training", ",", "how_many", ",", "data_filename", ",", "label_filename", ",", "start_from", "=", "0", ")", ":", "data_path", "=", "os", ".", "path", ".", "join", "(", "tmp_dir", ",", "data_filename", ")", "labels_path", "=", "os", ".", "path", ".", "join", "(", "tmp_dir", ",", "label_filename", ")", "images", "=", "_extract_mnist_images", "(", "data_path", ",", "60000", "if", "training", "else", "10000", ")", "labels", "=", "_extract_mnist_labels", "(", "labels_path", ",", "60000", "if", "training", "else", "10000", ")", "# Shuffle the data to make sure classes are well distributed.", "data", "=", "list", "(", "zip", "(", "images", ",", "labels", ")", ")", "random", ".", "shuffle", "(", "data", ")", "images", ",", "labels", "=", "list", "(", "zip", "(", "*", "data", ")", ")", "return", "image_utils", ".", "image_generator", "(", "images", "[", "start_from", ":", "start_from", "+", "how_many", "]", ",", "labels", "[", "start_from", ":", "start_from", "+", "how_many", "]", ")" ]
Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. data_filename: file that contains features data. label_filename: file that contains labels. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images.
[ "Image", "generator", "for", "MNIST", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L86-L114
train
Common image generator for MNIST.
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(1576 - 1528) + chr(1741 - 1630) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1911 - 1860), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(51) + chr(2158 - 2106), 0o10), ehT0Px3KOsy9(chr(1487 - 1439) + '\157' + chr(0b110101) + chr(0b1001 + 0o47), 0o10), ehT0Px3KOsy9('\x30' + chr(2380 - 2269) + chr(1049 - 995) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\x32' + '\x36' + chr(0b1 + 0o63), 0b1000), ehT0Px3KOsy9(chr(1860 - 1812) + chr(0b1101111) + chr(49) + '\x34' + chr(1767 - 1716), 31746 - 31738), ehT0Px3KOsy9(chr(207 - 159) + chr(0b1101111) + chr(0b100 + 0o55) + chr(593 - 544) + chr(0b1001 + 0o47), 13907 - 13899), ehT0Px3KOsy9('\x30' + '\157' + chr(2188 - 2136), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2827 - 2773) + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101100 + 0o7) + '\x33' + chr(0b110000 + 0o7), 39362 - 39354), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(1933 - 1880) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b110101) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(11346 - 11235) + chr(51) + chr(55) + chr(48), 31780 - 31772), ehT0Px3KOsy9(chr(882 - 834) + chr(11745 - 11634) + chr(0b110001) + chr(0b11001 + 0o32) + chr(0b110011), 45983 - 45975), ehT0Px3KOsy9(chr(1783 - 1735) + chr(3205 - 3094) + chr(0b10100 + 0o36) + '\x36' + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1664 - 1611) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(2454 - 2400) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(10044 - 9933) + chr(50) + '\063' + chr(1218 - 1169), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(287 - 239) + chr(0b1101111) + chr(54) + chr(0b110011 + 0o4), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(51) + chr(0b110 + 0o56) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1101 + 0o46) + chr(1903 - 1852) + '\x33', 0o10), ehT0Px3KOsy9(chr(625 - 577) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(50) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b110111 + 0o70) + chr(1640 - 1591) + '\x37' + '\x30', 55043 - 55035), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o42) + chr(0b110011) + chr(0b11111 + 0o23), 0b1000), ehT0Px3KOsy9(chr(1515 - 1467) + chr(0b110100 + 0o73) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1199 - 1151) + chr(0b1000101 + 0o52) + chr(760 - 710) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x31' + '\x32' + '\062', 52888 - 52880), ehT0Px3KOsy9('\060' + chr(11153 - 11042) + '\x32' + chr(0b101110 + 0o6) + '\x32', 0o10), ehT0Px3KOsy9(chr(1687 - 1639) + '\x6f' + chr(0b110011) + chr(0b101100 + 0o7) + '\x35', 0o10), ehT0Px3KOsy9('\060' + chr(1602 - 1491) + chr(0b11010 + 0o30) + chr(0b110011) + chr(0b11111 + 0o25), 22984 - 22976), ehT0Px3KOsy9(chr(329 - 281) + chr(0b101001 + 0o106) + chr(0b100 + 0o57) + chr(0b110011) + chr(55), 8), ehT0Px3KOsy9(chr(1331 - 1283) + chr(9908 - 9797) + '\065' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x34' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b101111 + 0o4) + '\x35' + chr(0b101010 + 0o13), 8), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + '\x32' + '\x30' + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(348 - 297) + chr(53) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1598 - 1548) + chr(0b1000 + 0o54) + chr(51), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\065' + chr(2293 - 2245), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(6086 - 5986) + chr(101) + '\x63' + chr(111) + chr(100) + '\x65')(chr(117) + chr(10100 - 9984) + '\x66' + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def DV8O9ROksE0L(JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, J3NpzUEe22CI, ibsS8rZj6CfC, dPV5mRckKEXT=ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(3738 - 3627) + chr(48), 8)): VdUkFhGc7tTb = oqhJDdMJfuwx.path.join(JsZ36NJUqtml, J3NpzUEe22CI) S4LHJ1uYgU2b = oqhJDdMJfuwx.path.join(JsZ36NJUqtml, ibsS8rZj6CfC) YJOmEcibG8C0 = uj0rwlouB6VI(VdUkFhGc7tTb, ehT0Px3KOsy9(chr(1732 - 1684) + chr(0b1101111) + '\061' + '\x36' + chr(53) + '\061' + chr(52) + '\x30', 0o10) if H15mhcYcioqz else ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11111 + 0o23) + chr(0b100000 + 0o23) + chr(52) + '\062' + chr(0b110000), 0b1000)) uXMK81tmdpTM = KeciVbBaXddx(S4LHJ1uYgU2b, ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(0b1100 + 0o45) + chr(54) + chr(0b110101) + '\061' + '\064' + chr(48), 8) if H15mhcYcioqz else ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101011 + 0o7) + chr(0b10010 + 0o41) + '\x34' + chr(0b101 + 0o55) + '\x30', 8)) ULnjp6D6efFH = YyaZ4tpXu4lf(pZ0NK2y6HRbn(YJOmEcibG8C0, uXMK81tmdpTM)) xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'sk\\\xbaNY\xd1'), chr(0b1100100) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b100000 + 0o105))(chr(117) + chr(0b1110100) + chr(0b1011010 + 0o14) + chr(0b101101) + chr(0b10100 + 0o44)))(ULnjp6D6efFH) (YJOmEcibG8C0, uXMK81tmdpTM) = YyaZ4tpXu4lf(pZ0NK2y6HRbn(*ULnjp6D6efFH)) return xafqLlk3kkUe(sOwVd6RdzUcC, xafqLlk3kkUe(SXOLrMavuUCe(b'inH\xbbMj\xd3\x06&aG\xbe\x9d\x82\x8a'), chr(1763 - 1663) + '\145' + chr(0b1100011) + '\x6f' + chr(6442 - 6342) + chr(2945 - 2844))(chr(117) + chr(8781 - 8665) + '\146' + chr(0b11111 + 0o16) + chr(0b1010 + 0o56)))(YJOmEcibG8C0[dPV5mRckKEXT:dPV5mRckKEXT + HMrjUI4R_mvf], uXMK81tmdpTM[dPV5mRckKEXT:dPV5mRckKEXT + HMrjUI4R_mvf])
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
mnist_generator
def mnist_generator(tmp_dir, training, how_many, start_from=0): """Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ _get_mnist(tmp_dir) d = _MNIST_TRAIN_DATA_FILENAME if training else _MNIST_TEST_DATA_FILENAME l = _MNIST_TRAIN_LABELS_FILENAME if training else _MNIST_TEST_LABELS_FILENAME return mnist_common_generator(tmp_dir, training, how_many, d, l, start_from)
python
def mnist_generator(tmp_dir, training, how_many, start_from=0): """Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ _get_mnist(tmp_dir) d = _MNIST_TRAIN_DATA_FILENAME if training else _MNIST_TEST_DATA_FILENAME l = _MNIST_TRAIN_LABELS_FILENAME if training else _MNIST_TEST_LABELS_FILENAME return mnist_common_generator(tmp_dir, training, how_many, d, l, start_from)
[ "def", "mnist_generator", "(", "tmp_dir", ",", "training", ",", "how_many", ",", "start_from", "=", "0", ")", ":", "_get_mnist", "(", "tmp_dir", ")", "d", "=", "_MNIST_TRAIN_DATA_FILENAME", "if", "training", "else", "_MNIST_TEST_DATA_FILENAME", "l", "=", "_MNIST_TRAIN_LABELS_FILENAME", "if", "training", "else", "_MNIST_TEST_LABELS_FILENAME", "return", "mnist_common_generator", "(", "tmp_dir", ",", "training", ",", "how_many", ",", "d", ",", "l", ",", "start_from", ")" ]
Image generator for MNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images.
[ "Image", "generator", "for", "MNIST", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31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iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(2241 - 2186), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(2161 - 2111) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(209 - 158) + chr(0b101000 + 0o12) + chr(1216 - 1166), 0o10), ehT0Px3KOsy9(chr(1346 - 1298) + chr(0b1000 + 0o147) + '\061' + chr(0b110001) + chr(51), 31325 - 31317), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b110000) + chr(0b110000 + 0o6), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + '\061' + '\x34' + '\067', 50395 - 50387), ehT0Px3KOsy9(chr(2219 - 2171) + chr(0b1011101 + 0o22) + '\061' + chr(0b101111 + 0o6) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(392 - 343) + chr(0b110001 + 0o4) + chr(0b1110 + 0o42), 0o10), ehT0Px3KOsy9('\060' + chr(1270 - 1159) + chr(0b110011) + chr(1010 - 960) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(1940 - 1892) + chr(0b1101111) + chr(50) + '\065' + '\x32', 15731 - 15723), ehT0Px3KOsy9(chr(1861 - 1813) + '\x6f' + '\063' + '\062' + chr(0b110110), 8), ehT0Px3KOsy9(chr(2180 - 2132) + chr(0b1101111) + '\x32' + chr(0b111 + 0o51) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1760 - 1712) + chr(0b1000 + 0o147) + '\061' + chr(0b110101) + chr(2512 - 2460), 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + '\063' + chr(0b11 + 0o55) + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\067' + '\x33', 20869 - 20861), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b1101 + 0o44) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(449 - 398), 4478 - 4470), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(591 - 541) + chr(0b110100) + '\x33', 0o10), ehT0Px3KOsy9(chr(857 - 809) + chr(0b11010 + 0o125) + chr(0b110010) + chr(49) + chr(55), 19106 - 19098), ehT0Px3KOsy9('\060' + chr(111) + chr(0b11100 + 0o26) + chr(1607 - 1552) + '\066', 65507 - 65499), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(48), 60871 - 60863), ehT0Px3KOsy9(chr(1507 - 1459) + chr(111) + chr(0b100010 + 0o20) + '\067' + '\x33', 8), ehT0Px3KOsy9(chr(1130 - 1082) + chr(0b1000000 + 0o57) + chr(751 - 700) + chr(0b110001) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(0b101011 + 0o6) + chr(1185 - 1137) + chr(0b10000 + 0o45), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101000 + 0o13), 35640 - 35632), ehT0Px3KOsy9(chr(0b110000) + chr(7661 - 7550) + chr(0b1000 + 0o52) + chr(2737 - 2684) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b110010) + chr(1817 - 1765) + chr(2765 - 2711), 0b1000), ehT0Px3KOsy9(chr(1257 - 1209) + '\157' + '\062' + chr(0b10001 + 0o45) + chr(620 - 566), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\x32' + chr(54) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + '\061' + chr(0b11100 + 0o31) + chr(0b1011 + 0o51), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10010 + 0o44) + '\066', 0o10), ehT0Px3KOsy9(chr(2015 - 1967) + chr(10531 - 10420) + chr(53) + chr(2897 - 2842), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(836 - 783) + chr(0b10000 + 0o44), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100011 + 0o114) + chr(0b110010) + chr(1071 - 1021) + chr(0b101 + 0o55), 9572 - 9564), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(424 - 373) + '\x30' + chr(51), 31651 - 31643), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\064' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + '\062' + chr(2460 - 2408) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1821 - 1768) + chr(54), 984 - 976), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b11110 + 0o22) + chr(50), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(246 - 198) + chr(111) + chr(0b100000 + 0o25) + chr(0b11 + 0o55), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b')'), chr(0b110100 + 0o60) + chr(9842 - 9741) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1 + 0o144))(chr(0b1110101) + chr(116) + '\146' + '\x2d' + chr(744 - 688)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def hVeIfpf5RvGa(JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, dPV5mRckKEXT=ehT0Px3KOsy9(chr(48) + '\157' + chr(1330 - 1282), 0b1000)): so8EEr43gC61(JsZ36NJUqtml) pd3lxn9vqWxp = VZWuBPxlenrP if H15mhcYcioqz else VGPfjzPsb0H6 aLoH_Mt0dzwO = nxza0nmzQoYV if H15mhcYcioqz else I2VshujOYUgP return DV8O9ROksE0L(JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, pd3lxn9vqWxp, aLoH_Mt0dzwO, dPV5mRckKEXT)
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
_get_fashion_mnist
def _get_fashion_mnist(directory): """Download all FashionMNIST files to directory unless they are there.""" # Fashion mnist files have the same names as MNIST. # We must choose a separate name (by adding 'fashion-' prefix) in the tmp_dir. for filename in [ _MNIST_TRAIN_DATA_FILENAME, _MNIST_TRAIN_LABELS_FILENAME, _MNIST_TEST_DATA_FILENAME, _MNIST_TEST_LABELS_FILENAME ]: generator_utils.maybe_download(directory, _FASHION_MNIST_LOCAL_FILE_PREFIX + filename, _FASHION_MNIST_URL + filename)
python
def _get_fashion_mnist(directory): """Download all FashionMNIST files to directory unless they are there.""" # Fashion mnist files have the same names as MNIST. # We must choose a separate name (by adding 'fashion-' prefix) in the tmp_dir. for filename in [ _MNIST_TRAIN_DATA_FILENAME, _MNIST_TRAIN_LABELS_FILENAME, _MNIST_TEST_DATA_FILENAME, _MNIST_TEST_LABELS_FILENAME ]: generator_utils.maybe_download(directory, _FASHION_MNIST_LOCAL_FILE_PREFIX + filename, _FASHION_MNIST_URL + filename)
[ "def", "_get_fashion_mnist", "(", "directory", ")", ":", "# Fashion mnist files have the same names as MNIST.", "# We must choose a separate name (by adding 'fashion-' prefix) in the tmp_dir.", "for", "filename", "in", "[", "_MNIST_TRAIN_DATA_FILENAME", ",", "_MNIST_TRAIN_LABELS_FILENAME", ",", "_MNIST_TEST_DATA_FILENAME", ",", "_MNIST_TEST_LABELS_FILENAME", "]", ":", "generator_utils", ".", "maybe_download", "(", "directory", ",", "_FASHION_MNIST_LOCAL_FILE_PREFIX", "+", "filename", ",", "_FASHION_MNIST_URL", "+", "filename", ")" ]
Download all FashionMNIST files to directory unless they are there.
[ "Download", "all", "FashionMNIST", "files", "to", "directory", "unless", "they", "are", "there", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L191-L201
train
Download all FashionMNIST files to directory unless they are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MA3VWp,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(0b10111 + 0o34) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8361 - 8250) + chr(0b110001) + chr(2939 - 2884), 51944 - 51936), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\x33' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(0b10 + 0o61) + '\x37' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110 + 0o60) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(2173 - 2125) + chr(0b10011 + 0o134) + '\062' + chr(0b10110 + 0o40) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(193 - 145) + chr(10544 - 10433) + chr(50) + chr(55) + chr(48), 64626 - 64618), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(0b110100) + chr(0b11101 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b101 + 0o56) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(358 - 309) + chr(0b100101 + 0o13), 58440 - 58432), ehT0Px3KOsy9('\x30' + chr(437 - 326) + chr(0b110011) + chr(0b10100 + 0o42) + chr(2620 - 2565), 22060 - 22052), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(0b101111 + 0o6) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\x33' + chr(48) + chr(0b101101 + 0o3), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8666 - 8555) + chr(0b110011) + chr(53) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b10 + 0o155) + '\x33' + chr(0b100010 + 0o21) + chr(0b11110 + 0o24), 6658 - 6650), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\064' + '\064', 0b1000), ehT0Px3KOsy9(chr(1051 - 1003) + chr(4291 - 4180) + chr(0b101110 + 0o5) + '\x37' + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(6579 - 6468) + chr(0b110001) + chr(276 - 228) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3550 - 3439) + chr(0b101110 + 0o3) + chr(0b110010) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(7872 - 7761) + chr(318 - 267) + '\x37' + chr(55), 8), ehT0Px3KOsy9(chr(1663 - 1615) + '\x6f' + chr(51) + chr(0b110000) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6951 - 6840) + '\061' + chr(55) + chr(1389 - 1334), 24655 - 24647), ehT0Px3KOsy9(chr(1764 - 1716) + chr(111) + chr(0b110 + 0o61) + chr(1507 - 1455), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(1736 - 1688), ord("\x08")), ehT0Px3KOsy9(chr(310 - 262) + chr(273 - 162) + '\062' + chr(0b110000) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(51) + '\x31' + '\065', 0b1000), ehT0Px3KOsy9(chr(1300 - 1252) + chr(0b1101111) + '\x31' + chr(0b1101 + 0o44) + chr(738 - 688), 0b1000), ehT0Px3KOsy9(chr(1963 - 1915) + chr(0b1101111) + chr(0b100001 + 0o20) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(9271 - 9160) + chr(1784 - 1730) + chr(1230 - 1179), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b110110) + chr(0b11101 + 0o32), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2462 - 2351) + chr(0b100110 + 0o14) + '\064' + chr(0b110011), 28482 - 28474), ehT0Px3KOsy9('\060' + chr(0b110100 + 0o73) + chr(0b110001) + '\060' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010 + 0o3) + chr(769 - 718), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(9086 - 8975) + chr(0b110000 + 0o4) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000111 + 0o50) + chr(0b110001) + chr(1556 - 1507), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + chr(49) + chr(55) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(125 - 72) + chr(461 - 413), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(10667 - 10556) + chr(0b110110) + '\065', 10511 - 10503), ehT0Px3KOsy9(chr(2260 - 2212) + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(48) + '\x35', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1623 - 1575) + chr(0b10010 + 0o135) + chr(0b10000 + 0o45) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'6'), chr(3868 - 3768) + '\x65' + chr(0b10110 + 0o115) + chr(0b10110 + 0o131) + chr(8430 - 8330) + chr(0b1011 + 0o132))(chr(6676 - 6559) + '\164' + chr(102) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def iSywViKIAYcX(EVVr9bEHclel): for xw4DsBfIJ22E in [VZWuBPxlenrP, nxza0nmzQoYV, VGPfjzPsb0H6, I2VshujOYUgP]: xafqLlk3kkUe(g1Z_RG9zP4cD, xafqLlk3kkUe(SXOLrMavuUCe(b'un&\x9dV\xea\xdc\x8b.\xa6\x9b\xc5\xa1\x88'), '\144' + chr(0b1100101) + chr(5337 - 5238) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(10140 - 10038) + chr(45) + chr(56)))(EVVr9bEHclel, kS7qiqQeVkLj + xw4DsBfIJ22E, hN7JeVm2iqXO + xw4DsBfIJ22E)
tensorflow/tensor2tensor
tensor2tensor/data_generators/mnist.py
fashion_mnist_generator
def fashion_mnist_generator(tmp_dir, training, how_many, start_from=0): """Image generator for FashionMNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ _get_fashion_mnist(tmp_dir) d = _FASHION_MNIST_LOCAL_FILE_PREFIX + ( _MNIST_TRAIN_DATA_FILENAME if training else _MNIST_TEST_DATA_FILENAME) l = _FASHION_MNIST_LOCAL_FILE_PREFIX + ( _MNIST_TRAIN_LABELS_FILENAME if training else _MNIST_TEST_LABELS_FILENAME) return mnist_common_generator(tmp_dir, training, how_many, d, l, start_from)
python
def fashion_mnist_generator(tmp_dir, training, how_many, start_from=0): """Image generator for FashionMNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images. """ _get_fashion_mnist(tmp_dir) d = _FASHION_MNIST_LOCAL_FILE_PREFIX + ( _MNIST_TRAIN_DATA_FILENAME if training else _MNIST_TEST_DATA_FILENAME) l = _FASHION_MNIST_LOCAL_FILE_PREFIX + ( _MNIST_TRAIN_LABELS_FILENAME if training else _MNIST_TEST_LABELS_FILENAME) return mnist_common_generator(tmp_dir, training, how_many, d, l, start_from)
[ "def", "fashion_mnist_generator", "(", "tmp_dir", ",", "training", ",", "how_many", ",", "start_from", "=", "0", ")", ":", "_get_fashion_mnist", "(", "tmp_dir", ")", "d", "=", "_FASHION_MNIST_LOCAL_FILE_PREFIX", "+", "(", "_MNIST_TRAIN_DATA_FILENAME", "if", "training", "else", "_MNIST_TEST_DATA_FILENAME", ")", "l", "=", "_FASHION_MNIST_LOCAL_FILE_PREFIX", "+", "(", "_MNIST_TRAIN_LABELS_FILENAME", "if", "training", "else", "_MNIST_TEST_LABELS_FILENAME", ")", "return", "mnist_common_generator", "(", "tmp_dir", ",", "training", ",", "how_many", ",", "d", ",", "l", ",", "start_from", ")" ]
Image generator for FashionMNIST. Args: tmp_dir: path to temporary storage directory. training: a Boolean; if true, we use the train set, otherwise the test set. how_many: how many images and labels to generate. start_from: from which image to start. Returns: An instance of image_generator that produces MNIST images.
[ "Image", "generator", "for", "FashionMNIST", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/mnist.py#L204-L221
train
Image generator for FashionMNIST.
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,Iiw8L0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AN,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(2213 - 2163) + chr(2132 - 2084) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(2103 - 2054) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(50) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(0b10011 + 0o36), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(55) + chr(819 - 764), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b10100 + 0o42) + chr(0b101001 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\x32' + '\x31', 5130 - 5122), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1970 - 1921) + chr(0b110100) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(0b110010) + '\060' + chr(1914 - 1864), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(768 - 713), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b10 + 0o57) + chr(0b110101) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1001 + 0o146) + chr(0b110001) + chr(52) + chr(733 - 681), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(658 - 603) + chr(0b110000 + 0o6), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(832 - 783) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1397 - 1349) + '\x6f' + chr(0b110001) + '\064' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(12096 - 11985) + chr(0b1111 + 0o44) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\063' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + '\x32' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7281 - 7170) + '\061' + '\x34' + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b110011) + chr(823 - 769), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b11100 + 0o30) + chr(0b100 + 0o57), 5795 - 5787), ehT0Px3KOsy9('\x30' + chr(0b1010111 + 0o30) + chr(0b0 + 0o63) + chr(0b1001 + 0o53) + chr(48), 55959 - 55951), ehT0Px3KOsy9(chr(48) + '\157' + chr(2341 - 2290) + chr(0b101 + 0o57) + chr(2167 - 2117), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(55) + chr(48), 25236 - 25228), ehT0Px3KOsy9(chr(53 - 5) + chr(0b1101111) + '\064', 5472 - 5464), ehT0Px3KOsy9('\x30' + chr(0b1010111 + 0o30) + '\061' + chr(0b110101) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(0b101010 + 0o10) + '\x37' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(586 - 535) + chr(55), 8), ehT0Px3KOsy9(chr(1012 - 964) + chr(2415 - 2304) + chr(716 - 666) + '\061' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\061' + chr(1960 - 1912) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b11000 + 0o35) + chr(0b1100 + 0o44), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + chr(789 - 740) + chr(516 - 465) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b11100 + 0o27) + chr(0b10111 + 0o34), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o14) + chr(55), 11183 - 11175), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(740 - 692), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(1017 - 963) + chr(48), 61980 - 61972), ehT0Px3KOsy9('\x30' + chr(3762 - 3651) + chr(50) + '\063' + '\x37', 56378 - 56370), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + chr(49) + chr(145 - 97) + chr(2253 - 2202), 43577 - 43569), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(52) + '\062', 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\x6f' + chr(0b111 + 0o52) + '\062' + chr(0b10101 + 0o41), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(0b0 + 0o65) + chr(640 - 592), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(2288 - 2188) + chr(0b1100101) + chr(99) + chr(4192 - 4081) + '\144' + chr(5025 - 4924))(chr(3630 - 3513) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def LFuyMak8ijDX(JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, dPV5mRckKEXT=ehT0Px3KOsy9('\060' + chr(0b110010 + 0o75) + chr(48), 0b1000)): iSywViKIAYcX(JsZ36NJUqtml) pd3lxn9vqWxp = kS7qiqQeVkLj + (VZWuBPxlenrP if H15mhcYcioqz else VGPfjzPsb0H6) aLoH_Mt0dzwO = kS7qiqQeVkLj + (nxza0nmzQoYV if H15mhcYcioqz else I2VshujOYUgP) return DV8O9ROksE0L(JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, pd3lxn9vqWxp, aLoH_Mt0dzwO, dPV5mRckKEXT)
tensorflow/tensor2tensor
tensor2tensor/data_generators/timeseries_data_generator.py
generate_data
def generate_data(timeseries_length, timeseries_params): """Generates synthetic timeseries using input parameters. Each generated timeseries has timeseries_length data points. Parameters for each timeseries are specified by timeseries_params. Args: timeseries_length: Number of data points to generate for each timeseries. timeseries_params: Parameters used to generate the timeseries. The following parameters need to be specified for each timeseries: m = Slope of the timeseries used to compute the timeseries trend. b = y-intercept of the timeseries used to compute the timeseries trend. A = Timeseries amplitude used to compute timeseries period. freqcoeff = Frequency coefficient used to compute timeseries period. rndA = Random amplitude used to inject noise into the timeseries. fn = Base timeseries function (np.cos or np.sin). Example params for two timeseries. [{"m": 0.006, "b": 300.0, "A":50.0, "freqcoeff":1500.0, "rndA":15.0, "fn": np.sin}, {"m": 0.000, "b": 500.0, "A":35.0, "freqcoeff":3500.0, "rndA":25.0, "fn": np.cos}] Returns: Multi-timeseries (list of list). """ x = range(timeseries_length) multi_timeseries = [] for p in timeseries_params: # Trend y1 = [p["m"] * i + p["b"] for i in x] # Period y2 = [p["A"] * p["fn"](i / p["freqcoeff"]) for i in x] # Noise y3 = np.random.normal(0, p["rndA"], timeseries_length).tolist() # Sum of Trend, Period and Noise. Replace negative values with zero. y = [max(a + b + c, 0) for a, b, c in zip(y1, y2, y3)] multi_timeseries.append(y) return multi_timeseries
python
def generate_data(timeseries_length, timeseries_params): """Generates synthetic timeseries using input parameters. Each generated timeseries has timeseries_length data points. Parameters for each timeseries are specified by timeseries_params. Args: timeseries_length: Number of data points to generate for each timeseries. timeseries_params: Parameters used to generate the timeseries. The following parameters need to be specified for each timeseries: m = Slope of the timeseries used to compute the timeseries trend. b = y-intercept of the timeseries used to compute the timeseries trend. A = Timeseries amplitude used to compute timeseries period. freqcoeff = Frequency coefficient used to compute timeseries period. rndA = Random amplitude used to inject noise into the timeseries. fn = Base timeseries function (np.cos or np.sin). Example params for two timeseries. [{"m": 0.006, "b": 300.0, "A":50.0, "freqcoeff":1500.0, "rndA":15.0, "fn": np.sin}, {"m": 0.000, "b": 500.0, "A":35.0, "freqcoeff":3500.0, "rndA":25.0, "fn": np.cos}] Returns: Multi-timeseries (list of list). """ x = range(timeseries_length) multi_timeseries = [] for p in timeseries_params: # Trend y1 = [p["m"] * i + p["b"] for i in x] # Period y2 = [p["A"] * p["fn"](i / p["freqcoeff"]) for i in x] # Noise y3 = np.random.normal(0, p["rndA"], timeseries_length).tolist() # Sum of Trend, Period and Noise. Replace negative values with zero. y = [max(a + b + c, 0) for a, b, c in zip(y1, y2, y3)] multi_timeseries.append(y) return multi_timeseries
[ "def", "generate_data", "(", "timeseries_length", ",", "timeseries_params", ")", ":", "x", "=", "range", "(", "timeseries_length", ")", "multi_timeseries", "=", "[", "]", "for", "p", "in", "timeseries_params", ":", "# Trend", "y1", "=", "[", "p", "[", "\"m\"", "]", "*", "i", "+", "p", "[", "\"b\"", "]", "for", "i", "in", "x", "]", "# Period", "y2", "=", "[", "p", "[", "\"A\"", "]", "*", "p", "[", "\"fn\"", "]", "(", "i", "/", "p", "[", "\"freqcoeff\"", "]", ")", "for", "i", "in", "x", "]", "# Noise", "y3", "=", "np", ".", "random", ".", "normal", "(", "0", ",", "p", "[", "\"rndA\"", "]", ",", "timeseries_length", ")", ".", "tolist", "(", ")", "# Sum of Trend, Period and Noise. Replace negative values with zero.", "y", "=", "[", "max", "(", "a", "+", "b", "+", "c", ",", "0", ")", "for", "a", ",", "b", ",", "c", "in", "zip", "(", "y1", ",", "y2", ",", "y3", ")", "]", "multi_timeseries", ".", "append", "(", "y", ")", "return", "multi_timeseries" ]
Generates synthetic timeseries using input parameters. Each generated timeseries has timeseries_length data points. Parameters for each timeseries are specified by timeseries_params. Args: timeseries_length: Number of data points to generate for each timeseries. timeseries_params: Parameters used to generate the timeseries. The following parameters need to be specified for each timeseries: m = Slope of the timeseries used to compute the timeseries trend. b = y-intercept of the timeseries used to compute the timeseries trend. A = Timeseries amplitude used to compute timeseries period. freqcoeff = Frequency coefficient used to compute timeseries period. rndA = Random amplitude used to inject noise into the timeseries. fn = Base timeseries function (np.cos or np.sin). Example params for two timeseries. [{"m": 0.006, "b": 300.0, "A":50.0, "freqcoeff":1500.0, "rndA":15.0, "fn": np.sin}, {"m": 0.000, "b": 500.0, "A":35.0, "freqcoeff":3500.0, "rndA":25.0, "fn": np.cos}] Returns: Multi-timeseries (list of list).
[ "Generates", "synthetic", "timeseries", "using", "input", "parameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/timeseries_data_generator.py#L24-L63
train
Generates synthetic data points for a given number of data points.
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,RouZF7bjEX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,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2474 - 2424) + chr(0b1101 + 0o51) + chr(55), 43099 - 43091), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\061' + chr(0b110001) + chr(0b11010 + 0o32), 0o10), ehT0Px3KOsy9(chr(1817 - 1769) + chr(111) + chr(0b1010 + 0o47) + chr(617 - 564) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(1906 - 1856) + chr(460 - 409) + chr(0b10 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(425 - 375) + chr(48) + chr(0b110010), 32078 - 32070), ehT0Px3KOsy9(chr(591 - 543) + chr(0b1101111) + '\x31' + '\064', 177 - 169), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(51) + chr(0b101100 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(246 - 197) + '\060', 33238 - 33230), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(1925 - 1876) + chr(0b101011 + 0o6) + chr(69 - 20), 59585 - 59577), ehT0Px3KOsy9('\060' + '\157' + chr(0b11001 + 0o33) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2699 - 2588) + chr(51) + '\x35' + '\065', 40569 - 40561), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\x35' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10011 + 0o134) + chr(0b10011 + 0o44) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(50) + '\063' + '\065', 64017 - 64009), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(953 - 902) + '\066' + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b101101 + 0o102) + chr(0b110011) + chr(0b110110) + chr(1076 - 1026), ord("\x08")), ehT0Px3KOsy9(chr(236 - 188) + '\x6f' + chr(957 - 907) + '\x31' + chr(0b110011), 18831 - 18823), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(176 - 127), 0o10), ehT0Px3KOsy9(chr(603 - 555) + chr(12261 - 12150) + chr(51) + chr(53) + chr(2639 - 2587), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101001 + 0o6) + chr(51) + chr(1565 - 1510) + chr(887 - 837), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x34' + chr(48), 8), ehT0Px3KOsy9('\x30' + chr(12035 - 11924) + chr(0b110010 + 0o2), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(797 - 746) + '\061' + chr(0b10111 + 0o40), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110100) + chr(1678 - 1626), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11 + 0o154) + chr(51) + chr(0b101011 + 0o10) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(0b110010) + '\065' + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(0b111000 + 0o67) + chr(0b10010 + 0o41) + chr(2416 - 2364) + chr(0b10 + 0o61), 58335 - 58327), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + chr(50) + chr(54) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b110001) + chr(2459 - 2404) + '\061', 14128 - 14120), ehT0Px3KOsy9('\060' + chr(111) + '\x37' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + '\x32' + chr(0b10100 + 0o37) + chr(0b100 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1011011 + 0o24) + chr(0b110011) + chr(0b11100 + 0o26) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1100 + 0o143) + chr(49) + chr(0b110100) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11125 - 11014) + '\x33' + chr(0b110110) + chr(0b101011 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011 + 0o0) + chr(0b110111) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(4682 - 4571) + chr(0b11 + 0o60) + chr(1483 - 1431) + chr(2006 - 1954), 0o10), ehT0Px3KOsy9(chr(940 - 892) + '\x6f' + chr(1162 - 1112) + chr(53) + chr(48), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110000 + 0o6) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(50) + chr(1582 - 1532) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(10240 - 10129) + chr(0b110011) + '\x30' + chr(0b1110 + 0o43), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b111 + 0o56) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x99'), chr(216 - 116) + chr(0b11110 + 0o107) + chr(99) + chr(10316 - 10205) + '\144' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1010000 + 0o26) + chr(1753 - 1708) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def jHQgtlDNFkuG(frlIC1kgQJG6, DmmNws_nwPaR): OeWW0F1dBPRQ = vQr8gNKaIaWE(frlIC1kgQJG6) C0NEgfnPRDju = [] for UyakMW2IMFEj in DmmNws_nwPaR: bdlzQNguJ1X_ = [UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xda'), chr(7005 - 6905) + chr(0b1100100 + 0o1) + '\x63' + '\x6f' + chr(100) + chr(0b100110 + 0o77))('\x75' + '\164' + chr(0b1100110) + chr(45) + '\x38')] * WVxHKyX45z_L + UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5'), chr(6332 - 6232) + '\145' + '\x63' + chr(0b1101111) + chr(0b1000010 + 0o42) + chr(0b1100101))(chr(0b110100 + 0o101) + chr(0b1110100) + chr(0b1100110) + chr(1829 - 1784) + '\070')] for WVxHKyX45z_L in OeWW0F1dBPRQ] dgC_QAONOODe = [UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6'), chr(0b110 + 0o136) + '\x65' + chr(0b1100011) + chr(0b100101 + 0o112) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b1010 + 0o134) + '\055' + '\x38')] * UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1"'), chr(100) + chr(101) + chr(0b10100 + 0o117) + chr(0b111 + 0o150) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(0b1100110) + chr(45) + '\070')](WVxHKyX45z_L / UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1>\t\xe8\xe1c\xbcn/'), '\x64' + chr(8476 - 8375) + '\x63' + chr(0b1101111) + '\x64' + chr(0b100111 + 0o76))(chr(0b101100 + 0o111) + chr(116) + chr(6790 - 6688) + chr(0b101101) + '\070')]) for WVxHKyX45z_L in OeWW0F1dBPRQ] u451dB0vrfI1 = WqUC3KWvYVup.random.normal(ehT0Px3KOsy9('\x30' + chr(0b100010 + 0o115) + chr(0b11 + 0o55), 0o10), UyakMW2IMFEj[xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5"\x08\xd8'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(3647 - 3536) + chr(0b1100100) + '\x65')(chr(0b1101 + 0o150) + '\x74' + chr(0b110100 + 0o62) + chr(45) + chr(2556 - 2500))], frlIC1kgQJG6).tolist() SqiSOtYOqOJH = [tsdjvlgh9gDP(XPh1qbAgrPgG + wmN3dvez4qzC + qzn1Ctg9WgNh, ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101101 + 0o3), 8)) for (XPh1qbAgrPgG, wmN3dvez4qzC, qzn1Ctg9WgNh) in pZ0NK2y6HRbn(bdlzQNguJ1X_, dgC_QAONOODe, u451dB0vrfI1)] xafqLlk3kkUe(C0NEgfnPRDju, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6<\x1c\xfc\xech'), chr(3892 - 3792) + chr(0b10 + 0o143) + chr(4765 - 4666) + '\x6f' + chr(100) + chr(101))(chr(2933 - 2816) + chr(0b1101 + 0o147) + chr(102) + chr(0b1010 + 0o43) + chr(1958 - 1902)))(SqiSOtYOqOJH) return C0NEgfnPRDju
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_stochastic.py
next_frame_basic_stochastic
def next_frame_basic_stochastic(): """Basic 2-frame conv model with stochastic tower.""" hparams = basic_deterministic_params.next_frame_basic_deterministic() hparams.stochastic_model = True hparams.add_hparam("latent_channels", 1) hparams.add_hparam("latent_std_min", -5.0) hparams.add_hparam("num_iterations_1st_stage", 15000) hparams.add_hparam("num_iterations_2nd_stage", 15000) hparams.add_hparam("latent_loss_multiplier", 1e-3) hparams.add_hparam("latent_loss_multiplier_dynamic", False) hparams.add_hparam("latent_loss_multiplier_alpha", 1e-5) hparams.add_hparam("latent_loss_multiplier_epsilon", 1.0) hparams.add_hparam("latent_loss_multiplier_schedule", "constant") hparams.add_hparam("latent_num_frames", 0) # 0 means use all frames. hparams.add_hparam("anneal_end", 50000) hparams.add_hparam("information_capacity", 0.0) return hparams
python
def next_frame_basic_stochastic(): """Basic 2-frame conv model with stochastic tower.""" hparams = basic_deterministic_params.next_frame_basic_deterministic() hparams.stochastic_model = True hparams.add_hparam("latent_channels", 1) hparams.add_hparam("latent_std_min", -5.0) hparams.add_hparam("num_iterations_1st_stage", 15000) hparams.add_hparam("num_iterations_2nd_stage", 15000) hparams.add_hparam("latent_loss_multiplier", 1e-3) hparams.add_hparam("latent_loss_multiplier_dynamic", False) hparams.add_hparam("latent_loss_multiplier_alpha", 1e-5) hparams.add_hparam("latent_loss_multiplier_epsilon", 1.0) hparams.add_hparam("latent_loss_multiplier_schedule", "constant") hparams.add_hparam("latent_num_frames", 0) # 0 means use all frames. hparams.add_hparam("anneal_end", 50000) hparams.add_hparam("information_capacity", 0.0) return hparams
[ "def", "next_frame_basic_stochastic", "(", ")", ":", "hparams", "=", "basic_deterministic_params", ".", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "stochastic_model", "=", "True", "hparams", ".", "add_hparam", "(", "\"latent_channels\"", ",", "1", ")", "hparams", ".", "add_hparam", "(", "\"latent_std_min\"", ",", "-", "5.0", ")", "hparams", ".", "add_hparam", "(", "\"num_iterations_1st_stage\"", ",", "15000", ")", "hparams", ".", "add_hparam", "(", "\"num_iterations_2nd_stage\"", ",", "15000", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier\"", ",", "1e-3", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_dynamic\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_alpha\"", ",", "1e-5", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_epsilon\"", ",", "1.0", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_schedule\"", ",", "\"constant\"", ")", "hparams", ".", "add_hparam", "(", "\"latent_num_frames\"", ",", "0", ")", "# 0 means use all frames.", "hparams", ".", "add_hparam", "(", "\"anneal_end\"", ",", "50000", ")", "hparams", ".", "add_hparam", "(", "\"information_capacity\"", ",", "0.0", ")", "return", "hparams" ]
Basic 2-frame conv model with stochastic tower.
[ "Basic", "2", "-", "frame", "conv", "model", "with", "stochastic", "tower", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_stochastic.py#L215-L231
train
Basic 2 - frame conv model with stochastic tower.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,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y9,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(783 - 735) + chr(0b1010110 + 0o31) + '\x31' + '\066' + chr(912 - 859), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(528 - 475) + '\x37', 0o10), ehT0Px3KOsy9(chr(98 - 50) + '\x6f' + chr(0b110010) + chr(55) + chr(0b100001 + 0o22), 24104 - 24096), ehT0Px3KOsy9(chr(1903 - 1855) + '\157' + chr(688 - 639) + chr(48) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1826 - 1775) + chr(1514 - 1466) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(1110 - 1060) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b100110 + 0o111) + chr(0b110010) + chr(113 - 59), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101101 + 0o6) + chr(0b11101 + 0o25) + chr(0b100101 + 0o14), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(0b100110 + 0o17), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11111 + 0o24) + chr(0b110100) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + chr(1887 - 1836) + chr(0b110010) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1110 + 0o44) + chr(50) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x35' + chr(51), 0b1000), ehT0Px3KOsy9(chr(2108 - 2060) + chr(5324 - 5213) + '\x33' + chr(806 - 753) + '\x32', 31143 - 31135), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b1110 + 0o44) + chr(0b110111) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(3196 - 3085) + '\061' + chr(1875 - 1822) + '\x34', 62047 - 62039), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1911 - 1863) + '\157' + '\062' + chr(2733 - 2678) + chr(0b110110), 37385 - 37377), ehT0Px3KOsy9(chr(499 - 451) + chr(0b111001 + 0o66) + '\062' + chr(0b10101 + 0o37) + chr(1398 - 1348), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\067' + '\x36', 51177 - 51169), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\063' + '\x31', 7619 - 7611), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110011) + '\061', 44994 - 44986), ehT0Px3KOsy9('\x30' + chr(8876 - 8765) + '\062' + '\x33' + chr(0b101111 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11011 + 0o27) + chr(0b101011 + 0o11) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110 + 0o53) + '\062' + chr(720 - 672), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(0b110010) + '\064' + chr(0b110100), 9139 - 9131), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(50) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b110000) + chr(0b110011 + 0o4), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b101101 + 0o6) + '\x34' + chr(0b110101 + 0o1), 40579 - 40571), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(1617 - 1564) + '\x37', 0b1000), ehT0Px3KOsy9(chr(293 - 245) + chr(4804 - 4693) + chr(50) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(251 - 202) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x35' + chr(0b110101), 51488 - 51480), ehT0Px3KOsy9('\x30' + chr(0b1010011 + 0o34) + chr(0b111 + 0o52) + '\064' + chr(577 - 522), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11 + 0o154) + chr(0b110010 + 0o1) + chr(738 - 688) + chr(48), 57716 - 57708), ehT0Px3KOsy9(chr(86 - 38) + '\157' + '\061' + '\x32' + chr(789 - 739), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101001 + 0o12) + chr(0b100101 + 0o17) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1685 - 1633), 8), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b101011 + 0o10) + '\066' + chr(0b11111 + 0o23), 32917 - 32909), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + chr(50) + chr(0b110100) + chr(0b110011), 4325 - 4317)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + chr(0b110101) + chr(0b11010 + 0o26), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'['), chr(4955 - 4855) + chr(101) + chr(5715 - 5616) + chr(4654 - 4543) + chr(0b111 + 0o135) + chr(0b100001 + 0o104))(chr(1642 - 1525) + '\x74' + '\146' + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def IEoWxH0p0IGD(): n4ljua2gi1Pr = Gw_gMrmFHoKr.next_frame_basic_deterministic() n4ljua2gi1Pr.gGpQ62mxjRRs = ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11010 + 0o27), ord("\x08")) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(101))(chr(10374 - 10257) + chr(0b1100101 + 0o17) + chr(9055 - 8953) + chr(1129 - 1084) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xb2]\x85\xb9\xfeN\x86\xcb'), '\144' + chr(6794 - 6693) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1011001 + 0o33) + chr(0b1010100 + 0o22) + chr(0b11100 + 0o21) + chr(0b111000)), ehT0Px3KOsy9('\x30' + chr(8595 - 8484) + '\x31', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(0b1000001 + 0o43) + chr(7040 - 6939) + chr(0b1011011 + 0o10) + chr(9482 - 9371) + chr(0b1100100) + '\x65')('\165' + '\164' + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xa2A\x80\x88\xfdB\x84'), chr(0b1010111 + 0o15) + chr(0b1100101) + chr(99) + chr(10466 - 10355) + chr(333 - 233) + chr(0b1 + 0o144))('\x75' + '\164' + chr(8281 - 8179) + '\x2d' + chr(904 - 848)), -5.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(0b1100100) + '\x65' + chr(9372 - 9273) + chr(0b1100110 + 0o11) + chr(0b1100100) + chr(0b1100101))(chr(0b1001001 + 0o54) + chr(0b1011100 + 0o30) + chr(6373 - 6271) + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1bZ\xd6\x1b\xaf\xe7s\xa3T\x90\xbe\xffE\x99\xe7]w\xca\xfdM\xed\xb8\xf9\xc0'), chr(7207 - 7107) + '\x65' + chr(0b1000000 + 0o43) + chr(0b1001110 + 0o41) + '\x64' + chr(0b101100 + 0o71))(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + chr(114 - 58)), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(1111 - 1058) + '\x32' + '\x33' + chr(0b110000), 13666 - 13658)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), '\x64' + chr(101) + chr(99) + '\x6f' + chr(100) + '\145')(chr(117) + chr(3786 - 3670) + chr(0b1001100 + 0o32) + '\x2d' + chr(0b101011 + 0o15)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1bZ\xd6\x1b\xaf\xe7s\xa3T\x90\xbe\xffE\x99\xe7^j\xda\xfdM\xed\xb8\xf9\xc0'), chr(0b1000 + 0o134) + chr(3932 - 3831) + chr(99) + '\157' + '\x64' + '\145')('\x75' + chr(116) + chr(5387 - 5285) + chr(0b11111 + 0o16) + '\070'), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(0b11011 + 0o30) + '\065' + chr(2016 - 1966) + chr(0b110011) + chr(48), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(100) + chr(101) + chr(5713 - 5614) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + chr(1783 - 1738) + chr(2352 - 2296)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbdZ\x97\xa4\xcfF\x9f\xd4\x18m\xce\xceW\xfc\xab'), '\144' + chr(0b1010001 + 0o24) + '\143' + chr(8876 - 8765) + chr(495 - 395) + chr(0b1100101))(chr(0b1110101) + chr(0b110000 + 0o104) + chr(0b1100110) + chr(45) + chr(2790 - 2734)), 0.001) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(100) + chr(2344 - 2243) + chr(0b1100011) + '\x6f' + chr(0b1010010 + 0o22) + chr(101))(chr(0b1100100 + 0o21) + chr(0b11110 + 0o126) + chr(10277 - 10175) + chr(45) + chr(1041 - 985)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbdZ\x97\xa4\xcfF\x9f\xd4\x18m\xce\xceW\xfc\xab\xc1\xc1)\xcaq*\x8f\x0c'), chr(100) + '\145' + chr(99) + chr(5849 - 5738) + '\x64' + chr(0b1100101))(chr(117) + chr(13410 - 13294) + chr(3434 - 3332) + '\055' + '\070'), ehT0Px3KOsy9('\x30' + chr(5216 - 5105) + '\060', 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(0b100001 + 0o103) + '\145' + chr(99) + '\157' + chr(2297 - 2197) + chr(0b101100 + 0o71))('\x75' + chr(0b10001 + 0o143) + chr(0b1100110) + chr(45) + chr(3095 - 3039)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbdZ\x97\xa4\xcfF\x9f\xd4\x18m\xce\xceW\xfc\xab\xc1\xc4<\xd4x&'), chr(0b10011 + 0o121) + chr(2610 - 2509) + chr(99) + chr(0b1001 + 0o146) + '\144' + chr(0b0 + 0o145))(chr(117) + '\164' + chr(0b1111 + 0o127) + chr(0b101101) + chr(0b111000)), 1e-05) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(100) + '\145' + chr(0b1100011) + chr(6405 - 6294) + '\x64' + chr(101))('\165' + chr(116) + '\146' + chr(1321 - 1276) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbdZ\x97\xa4\xcfF\x9f\xd4\x18m\xce\xceW\xfc\xab\xc1\xc0 \xd7y+\x89\x01'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(5794 - 5694) + chr(0b10 + 0o143))(chr(117) + chr(0b1110100) + chr(102) + chr(102 - 57) + chr(936 - 880)), 1.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), chr(0b100101 + 0o77) + '\145' + chr(439 - 340) + '\157' + '\144' + '\x65')(chr(10519 - 10402) + chr(116) + chr(0b100100 + 0o102) + chr(0b101101 + 0o0) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbdZ\x97\xa4\xcfF\x9f\xd4\x18m\xce\xceW\xfc\xab\xc1\xd63\xccu#\x93\x03r'), chr(0b1100100) + chr(0b101111 + 0o66) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b101101 + 0o70))(chr(117) + chr(4527 - 4411) + '\146' + '\055' + chr(2764 - 2708)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x16@\xd57\xb2\xf2x\xa5'), '\x64' + chr(0b110100 + 0o61) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(0b110100 + 0o101) + '\164' + '\x66' + chr(362 - 317) + '\070')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), '\x64' + chr(0b100011 + 0o102) + chr(3421 - 3322) + chr(111) + chr(0b1010101 + 0o17) + '\x65')('\165' + chr(3653 - 3537) + chr(0b1100110) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19N\xcf!\xa8\xe7I\xbf@\x89\x88\xf6Y\x8b\xd5\tw'), chr(0b110110 + 0o56) + chr(0b11001 + 0o114) + chr(99) + chr(9470 - 9359) + chr(100) + chr(4221 - 4120))(chr(117) + chr(394 - 278) + chr(4673 - 4571) + chr(1287 - 1242) + chr(0b100101 + 0o23)), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(277 - 229), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), '\144' + chr(0b111000 + 0o55) + chr(5070 - 4971) + chr(0b1100000 + 0o17) + chr(0b1100100) + chr(0b10011 + 0o122))('\165' + chr(116) + '\x66' + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x14A\xd5!\xa7\xffI\xb4[\x80'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(6498 - 6381) + chr(0b1100010 + 0o22) + chr(0b1100110) + chr(45) + chr(0b1101 + 0o53)), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\061' + chr(52) + chr(886 - 837) + chr(53) + chr(50) + chr(0b1101 + 0o43), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x14K\xdf\x1b\xae\xe3w\xa3T\x89'), '\144' + '\x65' + '\x63' + chr(0b101000 + 0o107) + '\x64' + '\x65')(chr(1288 - 1171) + '\164' + '\146' + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1cA\xdd+\xb4\xfew\xa5\\\x8b\xb9\xcfH\x8b\xc8\rg\xd7\xd6G'), chr(0b1011111 + 0o5) + chr(4149 - 4048) + chr(3890 - 3791) + chr(12030 - 11919) + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + chr(2065 - 1963) + chr(0b11000 + 0o25) + chr(0b100101 + 0o23)), 0.0) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_stochastic.py
next_frame_sampling_stochastic
def next_frame_sampling_stochastic(): """Basic 2-frame conv model with stochastic tower.""" hparams = basic_deterministic_params.next_frame_sampling() hparams.stochastic_model = True hparams.add_hparam("latent_channels", 1) hparams.add_hparam("latent_std_min", -5.0) hparams.add_hparam("num_iterations_1st_stage", 15000) hparams.add_hparam("num_iterations_2nd_stage", 15000) hparams.add_hparam("latent_loss_multiplier", 1e-3) hparams.add_hparam("latent_loss_multiplier_dynamic", False) hparams.add_hparam("latent_loss_multiplier_alpha", 1e-5) hparams.add_hparam("latent_loss_multiplier_epsilon", 1.0) hparams.add_hparam("latent_loss_multiplier_schedule", "constant") hparams.add_hparam("latent_num_frames", 0) # 0 means use all frames. hparams.add_hparam("anneal_end", 40000) hparams.add_hparam("information_capacity", 0.0) return hparams
python
def next_frame_sampling_stochastic(): """Basic 2-frame conv model with stochastic tower.""" hparams = basic_deterministic_params.next_frame_sampling() hparams.stochastic_model = True hparams.add_hparam("latent_channels", 1) hparams.add_hparam("latent_std_min", -5.0) hparams.add_hparam("num_iterations_1st_stage", 15000) hparams.add_hparam("num_iterations_2nd_stage", 15000) hparams.add_hparam("latent_loss_multiplier", 1e-3) hparams.add_hparam("latent_loss_multiplier_dynamic", False) hparams.add_hparam("latent_loss_multiplier_alpha", 1e-5) hparams.add_hparam("latent_loss_multiplier_epsilon", 1.0) hparams.add_hparam("latent_loss_multiplier_schedule", "constant") hparams.add_hparam("latent_num_frames", 0) # 0 means use all frames. hparams.add_hparam("anneal_end", 40000) hparams.add_hparam("information_capacity", 0.0) return hparams
[ "def", "next_frame_sampling_stochastic", "(", ")", ":", "hparams", "=", "basic_deterministic_params", ".", "next_frame_sampling", "(", ")", "hparams", ".", "stochastic_model", "=", "True", "hparams", ".", "add_hparam", "(", "\"latent_channels\"", ",", "1", ")", "hparams", ".", "add_hparam", "(", "\"latent_std_min\"", ",", "-", "5.0", ")", "hparams", ".", "add_hparam", "(", "\"num_iterations_1st_stage\"", ",", "15000", ")", "hparams", ".", "add_hparam", "(", "\"num_iterations_2nd_stage\"", ",", "15000", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier\"", ",", "1e-3", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_dynamic\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_alpha\"", ",", "1e-5", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_epsilon\"", ",", "1.0", ")", "hparams", ".", "add_hparam", "(", "\"latent_loss_multiplier_schedule\"", ",", "\"constant\"", ")", "hparams", ".", "add_hparam", "(", "\"latent_num_frames\"", ",", "0", ")", "# 0 means use all frames.", "hparams", ".", "add_hparam", "(", "\"anneal_end\"", ",", "40000", ")", "hparams", ".", "add_hparam", "(", "\"information_capacity\"", ",", "0.0", ")", "return", "hparams" ]
Basic 2-frame conv model with stochastic tower.
[ "Basic", "2", "-", "frame", "conv", "model", "with", "stochastic", "tower", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_stochastic.py#L235-L251
train
Basic 2 - frame conv model with stochastic tower.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,Fw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PipeError,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) + '\x6f' + chr(54) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(954 - 905) + '\x33', 35664 - 35656), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(50) + '\066' + chr(0b10001 + 0o43), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\066' + chr(0b11001 + 0o32), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(52) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101001 + 0o106) + '\063' + '\060' + '\061', 6713 - 6705), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b1101 + 0o46) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(50) + chr(0b110110) + chr(0b101101 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(0b110011) + chr(0b110101) + chr(0b11100 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(0b100111 + 0o12) + chr(2367 - 2316) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x37' + chr(2296 - 2244), 61670 - 61662), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + chr(0b110001) + chr(0b110010) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(62 - 12) + '\x35' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\x31' + chr(0b1011 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + chr(2291 - 2240) + '\061' + chr(0b110000 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b10 + 0o155) + chr(2110 - 2060) + chr(2551 - 2496) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(1597 - 1486) + chr(0b101001 + 0o11) + chr(52) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x36' + chr(0b10101 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1110 + 0o141) + chr(0b101010 + 0o13) + chr(2394 - 2342), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b11010 + 0o31) + '\062' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(0b100010 + 0o20) + chr(52) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(3266 - 3155) + '\x32' + chr(0b110010) + chr(53), 14284 - 14276), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(0b10001 + 0o42) + '\061' + chr(0b11010 + 0o35), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2244 - 2195) + chr(0b101 + 0o55) + chr(2220 - 2170), 41256 - 41248), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b110011) + chr(0b110111) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\x32' + '\x30', 8502 - 8494), ehT0Px3KOsy9(chr(1770 - 1722) + chr(0b111100 + 0o63) + chr(0b110101) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100000 + 0o17) + chr(50) + '\065' + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\063' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110000) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(48), 5348 - 5340), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(910 - 860) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1362 - 1314), 0b1000), ehT0Px3KOsy9(chr(1494 - 1446) + '\x6f' + chr(0b110011) + chr(0b10100 + 0o42) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(48) + chr(0b110001), 50619 - 50611), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + chr(2744 - 2690) + chr(48), 0o10), ehT0Px3KOsy9(chr(408 - 360) + '\x6f' + chr(50) + chr(2635 - 2581) + chr(0b110110), 38970 - 38962), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110000 + 0o1) + chr(0b110000) + chr(977 - 923), 22915 - 22907)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(6408 - 6297) + chr(0b110101) + chr(2137 - 2089), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a'), chr(9564 - 9464) + chr(0b1100101) + chr(0b1100011) + chr(5854 - 5743) + chr(0b1100100) + chr(101))(chr(13269 - 13152) + chr(0b1110100) + '\x66' + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uie_IlAOQUdX(): n4ljua2gi1Pr = Gw_gMrmFHoKr.next_frame_sampling() n4ljua2gi1Pr.gGpQ62mxjRRs = ehT0Px3KOsy9('\x30' + chr(7591 - 7480) + '\x31', 0o10) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(100) + chr(0b1100101) + chr(0b100110 + 0o75) + '\x6f' + chr(0b1100100) + chr(101))('\165' + '\164' + '\x66' + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9e{\xdf\x881\x925\xc1\xfd'), chr(0b1100100) + chr(101) + chr(99) + chr(111) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(0b10000 + 0o50)), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(8264 - 8153) + '\x31', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), '\x64' + chr(0b1100101) + chr(0b1011011 + 0o10) + chr(11825 - 11714) + chr(0b1 + 0o143) + chr(101))(chr(0b1110101) + chr(6429 - 6313) + chr(2667 - 2565) + chr(1158 - 1113) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9ek\xc3\x8d\x00\x919\xc3'), '\144' + chr(8904 - 8803) + chr(0b1100011 + 0o0) + chr(0b1000110 + 0o51) + chr(0b1010100 + 0o20) + chr(0b1000011 + 0o42))(chr(397 - 280) + '\x74' + chr(4310 - 4208) + chr(45) + chr(845 - 789)), -5.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(0b100010 + 0o102) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))('\x75' + chr(0b1100100 + 0o20) + '\x66' + chr(1107 - 1062) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Z~\xd9,cS\xa4j\xd6\x9d6\x93>\xde\xd1\xff\xca\xd2*_\xa5\xc5\xf2\xaa'), '\x64' + '\x65' + chr(0b1011101 + 0o6) + chr(111) + chr(0b1100100) + chr(101))(chr(0b1011101 + 0o30) + '\x74' + '\x66' + chr(0b10010 + 0o33) + '\070'), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\x35' + '\062' + '\x33' + '\x30', 0b1000)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(3293 - 3193) + chr(101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))('\x75' + chr(0b1110100) + '\x66' + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'Z~\xd9,cS\xa4j\xd6\x9d6\x93>\xde\xd1\xfc\xd7\xc2*_\xa5\xc5\xf2\xaa'), chr(0b1100100) + '\x65' + chr(0b111101 + 0o46) + chr(3160 - 3049) + chr(0b1100 + 0o130) + chr(3407 - 3306))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(2650 - 2594)), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101011 + 0o10) + chr(0b100101 + 0o20) + chr(0b10110 + 0o34) + chr(51) + '\x30', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(100) + chr(0b1100101) + chr(1791 - 1692) + '\x6f' + chr(100) + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(1938 - 1893) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9et\xd8\x9a,\xa3=\xd8\xe2\xba\xd0\xd6\x19E\xb4\xd6'), '\144' + chr(0b1100101 + 0o0) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1010110 + 0o17))(chr(0b1110101) + chr(116) + '\x66' + chr(45) + chr(0b111000)), 0.001) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(4270 - 4170) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(2029 - 1929) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(2675 - 2573) + '\x2d' + chr(0b1101 + 0o53)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9et\xd8\x9a,\xa3=\xd8\xe2\xba\xd0\xd6\x19E\xb4\xd6\xca\xab+\x94\xb1C\xc58'), '\x64' + chr(0b101110 + 0o67) + chr(99) + chr(2635 - 2524) + '\144' + chr(0b1101 + 0o130))(chr(930 - 813) + chr(116) + '\146' + chr(0b101101) + chr(0b110 + 0o62)), ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(1015 - 915) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1000 + 0o134) + '\145')(chr(10508 - 10391) + chr(116) + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9et\xd8\x9a,\xa3=\xd8\xe2\xba\xd0\xd6\x19E\xb4\xd6\xca\xae>\x8a\xb8O'), '\x64' + chr(0b1100101) + chr(3819 - 3720) + chr(0b1101111) + chr(0b0 + 0o144) + chr(9126 - 9025))(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + '\x38'), 1e-05) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(0b1001111 + 0o25) + '\x65' + '\143' + chr(0b1000 + 0o147) + chr(0b1100100) + '\145')(chr(117) + chr(0b100111 + 0o115) + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9et\xd8\x9a,\xa3=\xd8\xe2\xba\xd0\xd6\x19E\xb4\xd6\xca\xaa"\x89\xb9B\xc35'), chr(0b1100100) + chr(101) + chr(0b1011010 + 0o11) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(0b1001110 + 0o46) + chr(0b1100110) + '\x2d' + chr(0b111000)), 1.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(0b111100 + 0o50) + chr(0b101000 + 0o75) + '\143' + chr(2602 - 2491) + '\144' + '\x65')('\165' + chr(0b1110100 + 0o0) + '\146' + chr(0b1 + 0o54) + chr(0b100 + 0o64)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9et\xd8\x9a,\xa3=\xd8\xe2\xba\xd0\xd6\x19E\xb4\xd6\xca\xbc1\x92\xb5J\xd97$'), '\x64' + '\145' + chr(202 - 103) + chr(0b10000 + 0o137) + '\144' + '\145')(chr(0b1110101) + '\x74' + '\146' + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'Wd\xda\x00~F\xafl'), '\x64' + chr(0b1100101) + '\x63' + chr(0b111110 + 0o61) + '\x64' + chr(0b10101 + 0o120))(chr(117) + chr(11878 - 11762) + chr(0b1001010 + 0o34) + chr(0b10000 + 0o35) + '\x38')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(0b1100100) + chr(7470 - 7369) + '\x63' + chr(0b11100 + 0o123) + '\x64' + chr(101))(chr(3383 - 3266) + '\x74' + chr(0b100001 + 0o105) + chr(0b100001 + 0o14) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'Xj\xc0\x16dS\x9ev\xc2\x84\x00\x9a"\xcc\xe3\xab\xca'), chr(100) + '\x65' + chr(0b1000111 + 0o34) + '\x6f' + '\144' + '\x65')(chr(0b10011 + 0o142) + '\164' + chr(0b111011 + 0o53) + '\055' + chr(56)), ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + '\x30', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(100) + chr(0b1100101) + '\x63' + chr(0b11010 + 0o125) + '\144' + chr(0b1100101))(chr(117) + '\x74' + chr(187 - 85) + chr(692 - 647) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'Ue\xda\x16kK\x9e}\xd9\x8d'), chr(0b1011111 + 0o5) + chr(101) + chr(99) + '\x6f' + chr(9468 - 9368) + chr(0b1100101))('\x75' + chr(4259 - 4143) + chr(0b1000110 + 0o40) + chr(0b100000 + 0o15) + '\x38'), ehT0Px3KOsy9(chr(2277 - 2229) + '\x6f' + '\x31' + chr(1350 - 1301) + '\066' + chr(49) + '\060' + '\x30', 43294 - 43286)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'Uo\xd0,bW\xa0j\xd6\x84'), chr(7252 - 7152) + '\145' + chr(99) + chr(0b100100 + 0o113) + chr(0b100001 + 0o103) + chr(101))(chr(8879 - 8762) + chr(116) + '\146' + chr(0b11000 + 0o25) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b']e\xd2\x1cxJ\xa0l\xde\x861\xa33\xcc\xfe\xaf\xda\xcf\x01U'), chr(0b1001001 + 0o33) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(1175 - 1058) + chr(0b111101 + 0o67) + '\146' + chr(45) + chr(0b111000)), 0.0) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_stochastic.py
next_frame_basic_stochastic_discrete
def next_frame_basic_stochastic_discrete(): """Basic 2-frame conv model with stochastic discrete latent.""" hparams = basic_deterministic_params.next_frame_sampling() hparams.batch_size = 4 hparams.video_num_target_frames = 6 hparams.scheduled_sampling_mode = "prob_inverse_lin" hparams.scheduled_sampling_decay_steps = 40000 hparams.scheduled_sampling_max_prob = 1.0 hparams.dropout = 0.15 hparams.filter_double_steps = 3 hparams.hidden_size = 96 hparams.learning_rate_constant = 0.002 hparams.learning_rate_warmup_steps = 2000 hparams.learning_rate_schedule = "linear_warmup * constant" hparams.concat_internal_states = True hparams.video_modality_loss_cutoff = 0.03 hparams.add_hparam("bottleneck_bits", 128) hparams.add_hparam("bottleneck_noise", 0.1) hparams.add_hparam("discretize_warmup_steps", 40000) hparams.add_hparam("latent_rnn_warmup_steps", 40000) hparams.add_hparam("latent_rnn_max_sampling", 0.5) hparams.add_hparam("latent_use_max_probability", 0.8) hparams.add_hparam("full_latent_tower", False) hparams.add_hparam("latent_predictor_state_size", 128) hparams.add_hparam("latent_predictor_temperature", 1.0) hparams.add_hparam("complex_addn", True) hparams.add_hparam("recurrent_state_size", 64) return hparams
python
def next_frame_basic_stochastic_discrete(): """Basic 2-frame conv model with stochastic discrete latent.""" hparams = basic_deterministic_params.next_frame_sampling() hparams.batch_size = 4 hparams.video_num_target_frames = 6 hparams.scheduled_sampling_mode = "prob_inverse_lin" hparams.scheduled_sampling_decay_steps = 40000 hparams.scheduled_sampling_max_prob = 1.0 hparams.dropout = 0.15 hparams.filter_double_steps = 3 hparams.hidden_size = 96 hparams.learning_rate_constant = 0.002 hparams.learning_rate_warmup_steps = 2000 hparams.learning_rate_schedule = "linear_warmup * constant" hparams.concat_internal_states = True hparams.video_modality_loss_cutoff = 0.03 hparams.add_hparam("bottleneck_bits", 128) hparams.add_hparam("bottleneck_noise", 0.1) hparams.add_hparam("discretize_warmup_steps", 40000) hparams.add_hparam("latent_rnn_warmup_steps", 40000) hparams.add_hparam("latent_rnn_max_sampling", 0.5) hparams.add_hparam("latent_use_max_probability", 0.8) hparams.add_hparam("full_latent_tower", False) hparams.add_hparam("latent_predictor_state_size", 128) hparams.add_hparam("latent_predictor_temperature", 1.0) hparams.add_hparam("complex_addn", True) hparams.add_hparam("recurrent_state_size", 64) return hparams
[ "def", "next_frame_basic_stochastic_discrete", "(", ")", ":", "hparams", "=", "basic_deterministic_params", ".", "next_frame_sampling", "(", ")", "hparams", ".", "batch_size", "=", "4", "hparams", ".", "video_num_target_frames", "=", "6", "hparams", ".", "scheduled_sampling_mode", "=", "\"prob_inverse_lin\"", "hparams", ".", "scheduled_sampling_decay_steps", "=", "40000", "hparams", ".", "scheduled_sampling_max_prob", "=", "1.0", "hparams", ".", "dropout", "=", "0.15", "hparams", ".", "filter_double_steps", "=", "3", "hparams", ".", "hidden_size", "=", "96", "hparams", ".", "learning_rate_constant", "=", "0.002", "hparams", ".", "learning_rate_warmup_steps", "=", "2000", "hparams", ".", "learning_rate_schedule", "=", "\"linear_warmup * constant\"", "hparams", ".", "concat_internal_states", "=", "True", "hparams", ".", "video_modality_loss_cutoff", "=", "0.03", "hparams", ".", "add_hparam", "(", "\"bottleneck_bits\"", ",", "128", ")", "hparams", ".", "add_hparam", "(", "\"bottleneck_noise\"", ",", "0.1", ")", "hparams", ".", "add_hparam", "(", "\"discretize_warmup_steps\"", ",", "40000", ")", "hparams", ".", "add_hparam", "(", "\"latent_rnn_warmup_steps\"", ",", "40000", ")", "hparams", ".", "add_hparam", "(", "\"latent_rnn_max_sampling\"", ",", "0.5", ")", "hparams", ".", "add_hparam", "(", "\"latent_use_max_probability\"", ",", "0.8", ")", "hparams", ".", "add_hparam", "(", "\"full_latent_tower\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"latent_predictor_state_size\"", ",", "128", ")", "hparams", ".", "add_hparam", "(", "\"latent_predictor_temperature\"", ",", "1.0", ")", "hparams", ".", "add_hparam", "(", "\"complex_addn\"", ",", "True", ")", "hparams", ".", "add_hparam", "(", "\"recurrent_state_size\"", ",", "64", ")", "return", "hparams" ]
Basic 2-frame conv model with stochastic discrete latent.
[ "Basic", "2", "-", "frame", "conv", "model", "with", "stochastic", "discrete", "latent", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_stochastic.py#L255-L282
train
Basic 2 - frame conv model with stochastic discrete latent.
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,yROw0HW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ORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(1669 - 1620) + '\x32' + chr(1130 - 1082), 19288 - 19280), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b111010 + 0o65) + chr(50) + '\x31' + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1229 - 1178) + '\066' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(7377 - 7266) + chr(0b100100 + 0o16) + '\065' + chr(0b110000 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101010 + 0o11) + '\067' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4201 - 4090) + chr(0b11011 + 0o26) + chr(53) + '\066', 0b1000), ehT0Px3KOsy9(chr(2073 - 2025) + '\157' + '\x31' + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x35' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(50) + '\x31' + chr(0b101000 + 0o12), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000 + 0o6) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\065' + chr(122 - 67), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(353 - 303) + '\065' + chr(51), 27331 - 27323), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + '\065' + '\x33', 6635 - 6627), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\062' + '\x34' + chr(392 - 341), 0b1000), ehT0Px3KOsy9(chr(2062 - 2014) + chr(6953 - 6842) + chr(0b110011) + chr(1598 - 1547) + chr(588 - 535), 0b1000), ehT0Px3KOsy9('\060' + chr(4069 - 3958) + '\x32' + chr(0b110001) + '\061', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110011) + chr(0b100101 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(1880 - 1832) + '\157' + chr(0b110001) + chr(54) + chr(1219 - 1169), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + '\064' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(310 - 262) + chr(7574 - 7463) + chr(54) + chr(0b100000 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110000) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001011 + 0o44) + '\062' + chr(48) + chr(53), 0o10), ehT0Px3KOsy9(chr(1593 - 1545) + chr(0b101001 + 0o106) + chr(0b110001) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(2256 - 2208) + chr(9547 - 9436) + chr(52) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o40) + chr(869 - 818) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(464 - 416) + '\157' + chr(0b1111 + 0o42) + '\067' + chr(804 - 752), 49465 - 49457), ehT0Px3KOsy9('\060' + '\157' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110111) + chr(2391 - 2337), 0b1000), ehT0Px3KOsy9('\060' + chr(7965 - 7854) + chr(0b110001) + chr(517 - 468) + chr(0b101 + 0o61), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(0b110111) + '\065', 49136 - 49128), ehT0Px3KOsy9(chr(2232 - 2184) + chr(111) + chr(916 - 867) + '\x32' + chr(0b11010 + 0o31), 37426 - 37418), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1100000 + 0o17) + chr(50) + chr(0b100011 + 0o17), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11100 + 0o123) + chr(50) + chr(2690 - 2635) + chr(2088 - 2037), 2786 - 2778), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\x30' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(12213 - 12102) + '\x33' + chr(55) + '\x32', 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + '\x32' + chr(0b10010 + 0o36) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + chr(308 - 253) + chr(0b110 + 0o56), 38303 - 38295), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b110010) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(1676 - 1628) + chr(6234 - 6123) + '\063' + chr(0b1101 + 0o43) + chr(2594 - 2542), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1811 - 1763) + chr(111) + '\065' + chr(0b10000 + 0o40), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'~'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(8543 - 8432) + chr(6228 - 6128) + chr(0b1100101))(chr(6314 - 6197) + '\164' + chr(102) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def huEZrL_pNM4g(): n4ljua2gi1Pr = Gw_gMrmFHoKr.next_frame_sampling() n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1101111) + chr(52), 0o10) n4ljua2gi1Pr.UxYiT0ZFW2SZ = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x36', 59720 - 59712) n4ljua2gi1Pr.RnAcJFv3oEFN = xafqLlk3kkUe(SXOLrMavuUCe(b' \xfd\x9b\xc8\xa5\x07a\x1f\xefDfJ\xf4G\xca\xb3'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')(chr(0b10011 + 0o142) + chr(0b111111 + 0o65) + '\146' + chr(0b101101) + chr(56)) n4ljua2gi1Pr.akJlwdygthZ5 = ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(11669 - 11558) + '\x31' + chr(0b110001) + chr(54) + '\061' + '\x30' + chr(0b110000), 9994 - 9986) n4ljua2gi1Pr.uUU7a3EfxKmU = 1.0 n4ljua2gi1Pr.ag0mwEgWzjYv = 0.15 n4ljua2gi1Pr.l3Jb92JIYIRX = ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(8172 - 8061) + '\063', 0b1000) n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + '\x31' + chr(0b1110 + 0o46) + '\060', 0o10) n4ljua2gi1Pr.Ot9HUjnkxXA_ = 0.002 n4ljua2gi1Pr.fHyhoyGmdvM9 = ehT0Px3KOsy9('\060' + '\x6f' + chr(2019 - 1968) + chr(235 - 180) + chr(1507 - 1457) + chr(1124 - 1076), 0o10) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'<\xe6\x9a\xcf\x9b\x1cP\x1e\xebDxZ\xdb\x0b\x89\xfd\xeav\x1c\x15A$\xeby'), chr(0b101111 + 0o65) + chr(3261 - 3160) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + chr(7146 - 7030) + chr(3113 - 3011) + '\055' + chr(0b100000 + 0o30)) n4ljua2gi1Pr.xt8TSTUNLPTf = ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b100000 + 0o117) + chr(0b110001), ord("\x08")) n4ljua2gi1Pr.EF49vBKJeCZx = 0.03 xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(0b1100001 + 0o3) + chr(7172 - 7071) + '\x63' + chr(6398 - 6287) + chr(0b1100100) + chr(0b110010 + 0o63))(chr(3595 - 3478) + chr(0b111011 + 0o71) + '\x66' + chr(0b101101) + chr(0b100 + 0o64)))(xafqLlk3kkUe(SXOLrMavuUCe(b'2\xe0\x80\xde\x96\x0ba\x0c\xe9]JM\xc2_\xd0'), '\144' + chr(101) + chr(99) + '\x6f' + chr(0b1001110 + 0o26) + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + '\055' + '\x38'), ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + '\x32' + '\x30' + chr(48), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(0b1100100) + chr(101) + chr(4431 - 4332) + chr(0b1101111) + '\144' + '\x65')(chr(117) + '\164' + chr(9763 - 9661) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'2\xe0\x80\xde\x96\x0ba\x0c\xe9]JA\xc4B\xd0\xb8'), '\x64' + chr(101) + chr(0b1000101 + 0o36) + chr(0b1001011 + 0o44) + chr(9658 - 9558) + chr(3251 - 3150))(chr(8755 - 8638) + '\164' + '\146' + '\x2d' + '\070'), 0.1) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + '\x64' + chr(0b1100101))(chr(117) + chr(116) + chr(3833 - 3731) + chr(0b101101) + chr(2543 - 2487)))(xafqLlk3kkUe(SXOLrMavuUCe(b'4\xe6\x87\xc9\x88\x0b{\x00\xf0SJX\xcaY\xce\xa8\xf9F\x01\x12P5\xf6'), chr(100) + '\145' + chr(99) + '\157' + chr(0b101110 + 0o66) + chr(0b1111 + 0o126))(chr(10639 - 10522) + chr(116) + '\146' + chr(0b11101 + 0o20) + chr(1075 - 1019)), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(8626 - 8515) + chr(0b110001) + '\061' + chr(2894 - 2840) + chr(49) + chr(48) + '\x30', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), '\144' + chr(4972 - 4871) + '\x63' + chr(1087 - 976) + chr(0b1010110 + 0o16) + chr(1493 - 1392))('\165' + '\x74' + chr(0b10011 + 0o123) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'<\xee\x80\xcf\x94\x1aP\x1b\xe4XJX\xcaY\xce\xa8\xf9F\x01\x12P5\xf6'), '\x64' + chr(0b10 + 0o143) + '\x63' + chr(5057 - 4946) + chr(100) + '\x65')('\x75' + chr(116) + chr(0b1011011 + 0o13) + chr(0b101101) + '\070'), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(5430 - 5319) + chr(245 - 196) + '\x31' + chr(0b110110) + '\x31' + chr(0b101101 + 0o3) + chr(0b110000), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(5460 - 5360) + chr(7914 - 7813) + chr(2756 - 2657) + '\x6f' + chr(100) + chr(101))('\x75' + chr(0b1010010 + 0o42) + chr(0b1100110) + chr(836 - 791) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'<\xee\x80\xcf\x94\x1aP\x1b\xe4XJB\xcaS\xfc\xae\xe8t\x02\n\\+\xe2'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1000001 + 0o56) + '\x64' + chr(0b111100 + 0o51))(chr(0b11111 + 0o126) + chr(0b1110100) + chr(102) + '\055' + '\x38'), 0.5) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(0b1100100) + '\x65' + '\143' + chr(0b10001 + 0o136) + '\x64' + chr(101))(chr(0b1001001 + 0o54) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'<\xee\x80\xcf\x94\x1aP\x1c\xf9SJB\xcaS\xfc\xad\xfbv\x10\x07W,\xe9dV\xe0'), '\x64' + chr(101) + '\x63' + '\157' + chr(2483 - 2383) + chr(9205 - 9104))(chr(0b101110 + 0o107) + chr(0b1110100) + chr(102) + chr(0b101101) + '\070'), 0.8) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), '\144' + chr(101) + '\143' + chr(0b1101111) + chr(4258 - 4158) + chr(0b1100101))(chr(117) + chr(116) + '\146' + chr(868 - 823) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'6\xfa\x98\xc6\xa5\x02n\x1d\xefXap\xdfD\xd4\xb8\xfb'), chr(0b1100100) + chr(101) + chr(6792 - 6693) + chr(0b100 + 0o153) + chr(5384 - 5284) + chr(0b1001 + 0o134))('\165' + chr(116) + chr(102) + chr(45) + chr(1808 - 1752)), ehT0Px3KOsy9(chr(48) + chr(8910 - 8799) + chr(48), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(8246 - 8146) + '\x65')(chr(0b10001 + 0o144) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(2200 - 2144)))(xafqLlk3kkUe(SXOLrMavuUCe(b'<\xee\x80\xcf\x94\x1aP\x19\xf8SqF\xc8_\xcc\xaf\xd6j\x06\x07A \xda~K\xe3\x19'), chr(9506 - 9406) + chr(0b101001 + 0o74) + '\143' + chr(9460 - 9349) + chr(0b1010011 + 0o21) + chr(0b1100101 + 0o0))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(1293 - 1237)), ehT0Px3KOsy9(chr(1542 - 1494) + chr(111) + chr(0b101111 + 0o3) + chr(48) + chr(1002 - 954), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), '\144' + chr(7876 - 7775) + chr(0b11101 + 0o106) + chr(4065 - 3954) + '\144' + chr(0b1100101))(chr(0b11011 + 0o132) + '\164' + '\146' + chr(492 - 447) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'<\xee\x80\xcf\x94\x1aP\x19\xf8SqF\xc8_\xcc\xaf\xd6m\x17\x0bE \xf7lV\xec\x0ee'), chr(0b1001000 + 0o34) + chr(0b1100101) + chr(99) + '\x6f' + '\144' + chr(0b1000011 + 0o42))(chr(0b1110101) + chr(4723 - 4607) + chr(102) + '\055' + '\x38'), 1.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(8692 - 8592) + '\x65' + '\x63' + chr(0b1101111) + chr(7789 - 7689) + '\x65')(chr(3519 - 3402) + chr(116) + '\146' + chr(0b11000 + 0o25) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'3\xe0\x99\xda\x96\x0bw6\xebRqA'), '\144' + chr(0b1000001 + 0o44) + '\x63' + chr(3681 - 3570) + '\144' + '\145')(chr(0b1110101) + chr(0b111 + 0o155) + chr(9790 - 9688) + chr(96 - 51) + chr(0b10000 + 0o50)), ehT0Px3KOsy9(chr(508 - 460) + '\157' + chr(0b101110 + 0o3), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'1\xeb\x90\xf5\x92\x1en\x1b\xeb['), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(9439 - 9338))('\x75' + '\x74' + '\x66' + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'"\xea\x97\xdf\x88\x1cj\x07\xfeif[\xca_\xc6\x82\xfap\x08\x03'), chr(100) + chr(8502 - 8401) + chr(99) + chr(5300 - 5189) + chr(0b1001011 + 0o31) + chr(0b1100101))(chr(12257 - 12140) + chr(0b111000 + 0o74) + '\x66' + '\055' + '\070'), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b101001 + 0o106) + chr(363 - 314) + chr(0b100010 + 0o16) + chr(2118 - 2070), 59284 - 59276)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_stochastic.py
next_frame_stochastic_discrete_range
def next_frame_stochastic_discrete_range(rhp): """Next frame stochastic discrete tuning grid.""" rhp.set_float("learning_rate_constant", 0.001, 0.01) rhp.set_float("dropout", 0.2, 0.6) rhp.set_int("filter_double_steps", 3, 5) rhp.set_discrete("hidden_size", [64, 96, 128]) rhp.set_discrete("bottleneck_bits", [32, 64, 128, 256]) rhp.set_discrete("video_num_target_frames", [4]) rhp.set_float("bottleneck_noise", 0.0, 0.2)
python
def next_frame_stochastic_discrete_range(rhp): """Next frame stochastic discrete tuning grid.""" rhp.set_float("learning_rate_constant", 0.001, 0.01) rhp.set_float("dropout", 0.2, 0.6) rhp.set_int("filter_double_steps", 3, 5) rhp.set_discrete("hidden_size", [64, 96, 128]) rhp.set_discrete("bottleneck_bits", [32, 64, 128, 256]) rhp.set_discrete("video_num_target_frames", [4]) rhp.set_float("bottleneck_noise", 0.0, 0.2)
[ "def", "next_frame_stochastic_discrete_range", "(", "rhp", ")", ":", "rhp", ".", "set_float", "(", "\"learning_rate_constant\"", ",", "0.001", ",", "0.01", ")", "rhp", ".", "set_float", "(", "\"dropout\"", ",", "0.2", ",", "0.6", ")", "rhp", ".", "set_int", "(", "\"filter_double_steps\"", ",", "3", ",", "5", ")", "rhp", ".", "set_discrete", "(", "\"hidden_size\"", ",", "[", "64", ",", "96", ",", "128", "]", ")", "rhp", ".", "set_discrete", "(", "\"bottleneck_bits\"", ",", "[", "32", ",", "64", ",", "128", ",", "256", "]", ")", "rhp", ".", "set_discrete", "(", "\"video_num_target_frames\"", ",", "[", "4", "]", ")", "rhp", ".", "set_float", "(", "\"bottleneck_noise\"", ",", "0.0", ",", "0.2", ")" ]
Next frame stochastic discrete tuning grid.
[ "Next", "frame", "stochastic", "discrete", "tuning", "grid", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_stochastic.py#L295-L303
train
Next frame stochastic discrete tuning grid.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR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SK8V7h0,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(0b110000 + 0o77) + chr(52) + chr(414 - 364), 47337 - 47329), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(50) + chr(0b110010) + '\067', 15237 - 15229), ehT0Px3KOsy9('\x30' + '\x6f' + '\066' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(1846 - 1735) + chr(1123 - 1073) + chr(49) + chr(0b0 + 0o67), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110000 + 0o1) + '\x31' + chr(51 - 1), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(211 - 162) + chr(48) + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11 + 0o56) + '\x30', 0o10), ehT0Px3KOsy9(chr(573 - 525) + '\157' + '\061' + chr(0b11100 + 0o24) + chr(1249 - 1198), 12661 - 12653), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\062' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(49) + chr(0b110100 + 0o3) + '\066', 60116 - 60108), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(52) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(1032 - 983) + '\x30', 0b1000), ehT0Px3KOsy9(chr(714 - 666) + chr(1017 - 906) + chr(52) + chr(0b10000 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(637 - 589) + chr(0b1100111 + 0o10) + chr(50) + '\x34' + chr(974 - 923), 40185 - 40177), ehT0Px3KOsy9('\x30' + '\157' + chr(171 - 118) + chr(1782 - 1734), 0b1000), ehT0Px3KOsy9(chr(1009 - 961) + '\157' + '\062' + '\062' + chr(0b110001), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110111), 41490 - 41482), ehT0Px3KOsy9(chr(0b110000) + chr(3126 - 3015) + '\061' + chr(1758 - 1708) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10110 + 0o34) + chr(0b11001 + 0o34) + '\062', 61418 - 61410), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + chr(49) + '\064' + chr(924 - 874), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(960 - 908) + '\067', 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b101110 + 0o101) + '\x33' + '\x35' + chr(0b110101), 59560 - 59552), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b10011 + 0o42) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(49) + '\064' + '\x32', 8), ehT0Px3KOsy9('\x30' + chr(0b10101 + 0o132) + '\062' + chr(0b110101) + chr(1975 - 1926), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100101 + 0o14) + chr(0b110011) + '\063', 39681 - 39673), ehT0Px3KOsy9(chr(1479 - 1431) + '\x6f' + '\x32' + chr(1895 - 1840) + chr(0b101000 + 0o11), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b101111 + 0o5) + chr(0b1000 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(48) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1105 - 994) + '\065' + chr(1581 - 1531), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(54) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(2655 - 2601), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010111 + 0o30) + '\061' + chr(51) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(7504 - 7393) + '\x32' + chr(50) + chr(3003 - 2948), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\x37' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\066' + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b110010) + chr(2322 - 2268), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\x32' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x35' + chr(116 - 64), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b110100 + 0o1) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), chr(0b1010000 + 0o24) + '\145' + chr(99) + chr(111) + chr(100) + chr(0b110 + 0o137))(chr(1154 - 1037) + '\164' + chr(102) + '\x2d' + chr(0b10000 + 0o50)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RygviLlKDJap(IwsgmEzQknPc): xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0,+g"\xe5'), chr(100) + chr(0b1011000 + 0o15) + chr(99) + chr(0b1101111) + chr(100) + chr(9194 - 9093))(chr(117) + chr(0b1100100 + 0o20) + chr(3959 - 3857) + '\055' + chr(0b11100 + 0o34)))(xafqLlk3kkUe(SXOLrMavuUCe(b"N\xf2W\xfd$.f$\xce\x0c\xc0\xfcD\xfcK\xfeq'\xde\x03\x89\x99"), chr(0b111110 + 0o46) + chr(0b1100101) + '\143' + chr(0b111 + 0o150) + '\144' + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(0b1011 + 0o42) + chr(0b10111 + 0o41)), 0.001, 0.01) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0,+g"\xe5'), chr(4641 - 4541) + chr(0b1100101) + '\143' + '\x6f' + '\144' + '\x65')('\165' + chr(522 - 406) + chr(10186 - 10084) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'F\xe5Y\xff%2|'), chr(0b110010 + 0o62) + '\x65' + chr(0b1100011) + chr(0b1111 + 0o140) + chr(0b0 + 0o144) + chr(101))(chr(117) + '\x74' + '\146' + chr(45) + '\070'), 0.2, 0.6) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0#)|'), chr(0b111101 + 0o47) + chr(0b11011 + 0o112) + chr(0b110011 + 0o60) + '\157' + chr(4403 - 4303) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b"D\xfeZ\xfb/5W'\xfe\x0b\xc3\xe4D\xfc[\xe5z$\xd9"), chr(100) + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(7732 - 7631))(chr(0b1001100 + 0o51) + '\x74' + chr(102) + '\055' + chr(56)), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11100 + 0o31), 0o10)) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0..{ \xe3\x1b\xd5\xed'), chr(100) + '\x65' + chr(2569 - 2470) + chr(0b101110 + 0o101) + chr(0b110001 + 0o63) + chr(9126 - 9025))('\165' + '\164' + '\x66' + chr(0b101 + 0o50) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'J\xfeR\xeb/)W0\xf8\x04\xc4'), chr(0b1001111 + 0o25) + '\x65' + chr(0b1010110 + 0o15) + chr(0b101 + 0o152) + chr(1049 - 949) + chr(0b110011 + 0o62))(chr(117) + chr(2905 - 2789) + chr(102) + '\x2d' + chr(0b1110 + 0o52)), [ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b1111 + 0o41) + chr(1185 - 1137), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\064' + chr(0b10010 + 0o36), 0o10), ehT0Px3KOsy9(chr(1940 - 1892) + chr(0b10110 + 0o131) + chr(1784 - 1734) + chr(0b0 + 0o60) + '\x30', 63427 - 63419)]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0..{ \xe3\x1b\xd5\xed'), chr(0b1100100) + chr(0b1100101) + chr(0b101 + 0o136) + chr(0b1101111) + chr(5677 - 5577) + chr(101))(chr(10237 - 10120) + chr(116) + chr(3503 - 3401) + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'@\xf8B\xfb&"f&\xf2\x15\xfe\xeaH\xd7['), '\x64' + chr(101) + chr(0b1001101 + 0o26) + chr(0b1101100 + 0o3) + chr(0b1011110 + 0o6) + '\x65')('\x75' + chr(116) + chr(0b1001000 + 0o36) + chr(1404 - 1359) + chr(0b100101 + 0o23)), [ehT0Px3KOsy9(chr(1147 - 1099) + chr(0b1101111) + '\x34' + chr(1862 - 1814), 18798 - 18790), ehT0Px3KOsy9('\060' + chr(728 - 617) + chr(0b110001) + chr(0b110000) + chr(589 - 541), 8), ehT0Px3KOsy9('\x30' + chr(477 - 366) + chr(0b10010 + 0o40) + chr(48) + '\060', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b1101 + 0o43) + '\060', ord("\x08"))]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0..{ \xe3\x1b\xd5\xed'), chr(9919 - 9819) + chr(101) + '\x63' + chr(0b1101111) + chr(100) + chr(0b111010 + 0o53))(chr(2823 - 2706) + chr(0b1100 + 0o150) + chr(0b1100110) + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'T\xfeR\xea%\x18f6\xfc!\xd5\xe9S\xc4M\xe5@2\xd8\x03\x8a\x88\x99'), chr(9840 - 9740) + chr(0b1100101) + chr(0b11010 + 0o111) + chr(0b1101111 + 0o0) + chr(0b1010 + 0o132) + '\x65')(chr(0b1110101) + chr(0b1110001 + 0o3) + '\146' + chr(0b1 + 0o54) + chr(0b10010 + 0o46)), [ehT0Px3KOsy9(chr(1581 - 1533) + '\157' + chr(0b110100), ord("\x08"))]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf2B\xd0,+g"\xe5'), chr(0b1100100) + chr(7398 - 7297) + '\x63' + chr(7092 - 6981) + chr(0b10010 + 0o122) + chr(101))(chr(117) + '\164' + '\146' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'@\xf8B\xfb&"f&\xf2\x15\xfe\xe6N\xca[\xf4'), chr(3175 - 3075) + chr(101) + chr(99) + chr(0b11110 + 0o121) + chr(0b1100100) + '\145')(chr(13115 - 12998) + chr(0b101 + 0o157) + chr(253 - 151) + chr(0b101 + 0o50) + '\070'), 0.0, 0.2)
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
nested_map
def nested_map(x, f): """Map the function f to the nested structure x (dicts, tuples, lists).""" if isinstance(x, list): return [nested_map(y, f) for y in x] if isinstance(x, tuple): return tuple([nested_map(y, f) for y in x]) if isinstance(x, dict): return {k: nested_map(x[k], f) for k in x} return f(x)
python
def nested_map(x, f): """Map the function f to the nested structure x (dicts, tuples, lists).""" if isinstance(x, list): return [nested_map(y, f) for y in x] if isinstance(x, tuple): return tuple([nested_map(y, f) for y in x]) if isinstance(x, dict): return {k: nested_map(x[k], f) for k in x} return f(x)
[ "def", "nested_map", "(", "x", ",", "f", ")", ":", "if", "isinstance", "(", "x", ",", "list", ")", ":", "return", "[", "nested_map", "(", "y", ",", "f", ")", "for", "y", "in", "x", "]", "if", "isinstance", "(", "x", ",", "tuple", ")", ":", "return", "tuple", "(", "[", "nested_map", "(", "y", ",", "f", ")", "for", "y", "in", "x", "]", ")", "if", "isinstance", "(", "x", ",", "dict", ")", ":", "return", "{", "k", ":", "nested_map", "(", "x", "[", "k", "]", ",", "f", ")", "for", "k", "in", "x", "}", "return", "f", "(", "x", ")" ]
Map the function f to the nested structure x (dicts, tuples, lists).
[ "Map", "the", "function", "f", "to", "the", "nested", "structure", "x", "(", "dicts", "tuples", "lists", ")", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L147-L155
train
Map the function f to the nested structure x.
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,TLbJ60djy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Nx0Ujaz9UM0,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(964 - 916) + '\157' + '\062' + '\064' + chr(2777 - 2723), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(1858 - 1807) + chr(1684 - 1629), 53637 - 53629), ehT0Px3KOsy9(chr(343 - 295) + chr(0b1001101 + 0o42) + chr(0b110011) + '\063', 44682 - 44674), ehT0Px3KOsy9('\060' + chr(4453 - 4342) + chr(49) + '\061' + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\066' + chr(0b111 + 0o57), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\067', 11936 - 11928), ehT0Px3KOsy9(chr(1520 - 1472) + chr(111) + '\x37' + '\x34', 55096 - 55088), ehT0Px3KOsy9(chr(0b110000) + chr(3867 - 3756) + '\x31' + chr(1363 - 1314) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\065' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(2095 - 2047) + chr(0b1101111) + chr(770 - 720) + chr(53) + chr(2706 - 2652), 0b1000), ehT0Px3KOsy9(chr(801 - 753) + chr(0b1111 + 0o140) + chr(0b10110 + 0o35) + '\x33' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(49) + chr(388 - 338) + chr(1154 - 1106), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + chr(0b110010) + chr(1091 - 1040) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(1986 - 1936) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\067' + chr(1077 - 1028), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4677 - 4566) + '\x31' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(53) + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(48) + '\x35', 0b1000), ehT0Px3KOsy9(chr(337 - 289) + chr(111) + chr(0b10010 + 0o37) + chr(0b110101), 51731 - 51723), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010 + 0o1) + '\066' + chr(0b1010 + 0o46), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + chr(0b10000 + 0o47) + chr(0b110100), 8), ehT0Px3KOsy9(chr(491 - 443) + '\x6f' + '\x37' + '\x35', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100000 + 0o21) + '\061' + chr(1864 - 1809), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(990 - 939) + chr(1168 - 1116) + '\065', 0b1000), ehT0Px3KOsy9(chr(1897 - 1849) + '\157' + '\x32' + chr(0b11010 + 0o35) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\x32' + chr(49) + chr(0b110001), 54901 - 54893), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x34' + chr(0b10000 + 0o42), 0o10), ehT0Px3KOsy9('\x30' + chr(7055 - 6944) + chr(108 - 54) + chr(0b100 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1101111) + chr(2040 - 1990) + chr(55) + chr(0b110001 + 0o5), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(53) + '\x33', 33039 - 33031), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b110110) + chr(0b1000 + 0o54), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x36' + chr(0b1010 + 0o53), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2277 - 2166) + chr(1497 - 1446) + chr(0b110010) + '\x36', 39000 - 38992), ehT0Px3KOsy9('\060' + '\x6f' + chr(597 - 548) + chr(0b110011) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + '\062' + '\060' + chr(0b101001 + 0o12), 0o10), ehT0Px3KOsy9(chr(1534 - 1486) + chr(0b1100010 + 0o15) + chr(0b110001) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(10554 - 10443) + chr(851 - 802) + '\x36' + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9(chr(2091 - 2043) + chr(0b11000 + 0o127) + chr(0b11001 + 0o30) + chr(0b11 + 0o63) + chr(1402 - 1353), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\062' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(894 - 845), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x35' + chr(2067 - 2019), 44173 - 44165)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x88'), chr(100) + chr(0b11100 + 0o111) + chr(0b1100011) + chr(0b1101111) + chr(0b10001 + 0o123) + chr(101))('\x75' + '\x74' + chr(102) + chr(0b100000 + 0o15) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def UVzVuWOrGxQn(OeWW0F1dBPRQ, EGyt1xfPT1P6): if PlSM16l2KDPD(OeWW0F1dBPRQ, YyaZ4tpXu4lf): return [UVzVuWOrGxQn(SqiSOtYOqOJH, EGyt1xfPT1P6) for SqiSOtYOqOJH in OeWW0F1dBPRQ] if PlSM16l2KDPD(OeWW0F1dBPRQ, KNyTy8rYcwji): return KNyTy8rYcwji([UVzVuWOrGxQn(SqiSOtYOqOJH, EGyt1xfPT1P6) for SqiSOtYOqOJH in OeWW0F1dBPRQ]) if PlSM16l2KDPD(OeWW0F1dBPRQ, wLqBDw8l0eIm): return {OolUPRJhRaJd: UVzVuWOrGxQn(OeWW0F1dBPRQ[OolUPRJhRaJd], EGyt1xfPT1P6) for OolUPRJhRaJd in OeWW0F1dBPRQ} return EGyt1xfPT1P6(OeWW0F1dBPRQ)
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
shapes
def shapes(x): """Get a structure of shapes for a structure of nested arrays.""" def shape(x): try: return x.shape except Exception: # pylint: disable=broad-except return [] return nested_map(x, shape)
python
def shapes(x): """Get a structure of shapes for a structure of nested arrays.""" def shape(x): try: return x.shape except Exception: # pylint: disable=broad-except return [] return nested_map(x, shape)
[ "def", "shapes", "(", "x", ")", ":", "def", "shape", "(", "x", ")", ":", "try", ":", "return", "x", ".", "shape", "except", "Exception", ":", "# pylint: disable=broad-except", "return", "[", "]", "return", "nested_map", "(", "x", ",", "shape", ")" ]
Get a structure of shapes for a structure of nested arrays.
[ "Get", "a", "structure", "of", "shapes", "for", "a", "structure", "of", "nested", "arrays", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L169-L176
train
Get a structure of shapes for a structure of nested 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,DXjfarvgFn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e,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) + '\x6f' + '\x31' + '\063', 0o10), ehT0Px3KOsy9(chr(373 - 325) + chr(111) + chr(1269 - 1220) + chr(0b110000) + chr(0b101011 + 0o11), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + chr(0b1110 + 0o45) + chr(0b110010) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(50), 6089 - 6081), ehT0Px3KOsy9(chr(1944 - 1896) + chr(9895 - 9784) + chr(51) + chr(0b11001 + 0o27) + chr(0b11100 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110010) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(0b1110 + 0o43) + chr(0b10111 + 0o37), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\x30' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1790 - 1738) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(49) + chr(54) + chr(0b11 + 0o57), 0b1000), ehT0Px3KOsy9(chr(1720 - 1672) + '\157' + chr(1214 - 1163) + chr(50) + chr(1641 - 1593), 0o10), ehT0Px3KOsy9(chr(1200 - 1152) + chr(9239 - 9128) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b110111) + chr(428 - 377), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2439 - 2388) + chr(51) + '\061', 0o10), ehT0Px3KOsy9(chr(1136 - 1088) + '\157' + '\061' + chr(2244 - 2193) + chr(3021 - 2966), 63169 - 63161), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10011 + 0o36) + chr(0b110110) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110101 + 0o2) + chr(0b11001 + 0o35), 54924 - 54916), ehT0Px3KOsy9(chr(0b110000) + chr(0b100101 + 0o112) + chr(354 - 303) + chr(52) + chr(325 - 276), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001100 + 0o43) + '\066' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + chr(1876 - 1826) + chr(54) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x34' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\066' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(73 - 24) + chr(0b110000) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\x34' + chr(49), 40810 - 40802), ehT0Px3KOsy9(chr(968 - 920) + chr(0b1101111) + chr(0b110010) + chr(49) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + '\061' + chr(0b110010 + 0o1) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(3591 - 3480) + chr(548 - 494) + chr(0b110000 + 0o1), 0b1000), ehT0Px3KOsy9(chr(641 - 593) + chr(111) + chr(0b110010) + chr(0b100011 + 0o17) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1100 + 0o46) + chr(0b110100) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35', 3137 - 3129), ehT0Px3KOsy9(chr(1451 - 1403) + chr(11829 - 11718) + '\x32' + '\064' + chr(0b110111), 8), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + '\061' + chr(0b110000 + 0o4) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x31' + chr(55) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + chr(2105 - 2056) + chr(0b110000), 39611 - 39603), ehT0Px3KOsy9(chr(1728 - 1680) + chr(0b1101111) + chr(0b111 + 0o52) + chr(55) + '\067', 15043 - 15035), ehT0Px3KOsy9(chr(1334 - 1286) + '\x6f' + chr(0b100001 + 0o22) + chr(2275 - 2220) + '\067', 30975 - 30967), ehT0Px3KOsy9(chr(944 - 896) + '\x6f' + chr(1800 - 1746) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b1000 + 0o52) + chr(0b100001 + 0o26) + chr(1129 - 1081), 48996 - 48988), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x37' + chr(1530 - 1476), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100110 + 0o13) + chr(2168 - 2115) + chr(0b11001 + 0o32), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100000 + 0o25) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'%'), chr(0b1111 + 0o125) + chr(0b11011 + 0o112) + chr(99) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b11 + 0o162) + chr(6592 - 6476) + chr(0b1100110) + '\055' + chr(0b101111 + 0o11)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def OVHEymXlQYjG(OeWW0F1dBPRQ): def nauYfLglTpcb(OeWW0F1dBPRQ): try: return xafqLlk3kkUe(OeWW0F1dBPRQ, xafqLlk3kkUe(SXOLrMavuUCe(b'e%\xa2C\xa4\\i\xabr\x02\xb3`'), chr(100) + chr(4402 - 4301) + '\143' + '\157' + chr(3865 - 3765) + '\x65')(chr(5422 - 5305) + chr(0b100111 + 0o115) + chr(776 - 674) + '\x2d' + chr(56))) except jLmadlzMdunT: return [] return UVzVuWOrGxQn(OeWW0F1dBPRQ, nauYfLglTpcb)
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
sizes
def sizes(x): """Get a structure of sizes for a structure of nested arrays.""" def size(x): try: return x.size except Exception: # pylint: disable=broad-except return 0 return nested_map(x, size)
python
def sizes(x): """Get a structure of sizes for a structure of nested arrays.""" def size(x): try: return x.size except Exception: # pylint: disable=broad-except return 0 return nested_map(x, size)
[ "def", "sizes", "(", "x", ")", ":", "def", "size", "(", "x", ")", ":", "try", ":", "return", "x", ".", "size", "except", "Exception", ":", "# pylint: disable=broad-except", "return", "0", "return", "nested_map", "(", "x", ",", "size", ")" ]
Get a structure of sizes for a structure of nested arrays.
[ "Get", "a", "structure", "of", "sizes", "for", "a", "structure", "of", "nested", "arrays", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L179-L186
train
Get a structure of sizes for a struct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RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b1001 + 0o55) + chr(1159 - 1110), 52858 - 52850), ehT0Px3KOsy9('\060' + '\157' + chr(0b11011 + 0o26) + chr(53) + chr(0b11010 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(0b100000 + 0o21) + '\066' + chr(51), 0b1000), ehT0Px3KOsy9(chr(1363 - 1315) + chr(0b1101111) + chr(0b110011) + '\x35' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001010 + 0o45) + '\062' + chr(54) + chr(1452 - 1400), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(1965 - 1912), 19698 - 19690), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + '\x31' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b10001 + 0o44) + chr(1220 - 1169), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9864 - 9753) + chr(590 - 540) + chr(1637 - 1582) + '\061', 0o10), ehT0Px3KOsy9(chr(2203 - 2155) + chr(111) + chr(0b10101 + 0o36) + chr(48) + chr(0b10 + 0o57), 714 - 706), ehT0Px3KOsy9(chr(467 - 419) + '\x6f' + '\063' + chr(53) + chr(0b0 + 0o62), 11343 - 11335), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(9911 - 9800) + chr(0b1 + 0o61) + chr(54) + '\067', 4627 - 4619), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b100101 + 0o17) + chr(528 - 480), 0o10), ehT0Px3KOsy9('\x30' + chr(4155 - 4044) + '\x33' + '\x35' + chr(0b110000), 58534 - 58526), ehT0Px3KOsy9('\x30' + chr(111) + '\x37', 2100 - 2092), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110001) + '\x33' + chr(298 - 244), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101001 + 0o6) + chr(0b110001) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(6656 - 6545) + chr(0b100100 + 0o16) + '\x32' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b11010 + 0o31) + '\x35' + chr(2016 - 1961), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\062', 0b1000), ehT0Px3KOsy9(chr(1610 - 1562) + chr(111) + chr(0b110010) + '\x32' + '\x32', 59510 - 59502), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(354 - 305) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1285 - 1237) + '\157' + chr(71 - 22) + chr(0b0 + 0o66) + chr(0b110011 + 0o4), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(0b1000 + 0o57) + '\x32', 17433 - 17425), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\064' + chr(0b100011 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(50) + '\x31' + chr(2204 - 2153), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110010) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110110) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(3561 - 3450) + chr(0b10011 + 0o40) + chr(0b11111 + 0o30) + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + '\x35' + chr(0b11100 + 0o25), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011010 + 0o25) + '\061' + '\064' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1160 - 1111) + '\x37' + chr(0b110000), 14118 - 14110), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110001) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(2285 - 2174) + chr(0b110010) + '\x37' + '\x36', 810 - 802), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + chr(0b110010) + chr(51) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(49) + chr(55), 0o10), ehT0Px3KOsy9(chr(467 - 419) + chr(111) + chr(1340 - 1289) + chr(1608 - 1554) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\x36' + '\x37', 61192 - 61184), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(48) + chr(2890 - 2836), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100011 + 0o22) + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf'), '\x64' + chr(0b1100010 + 0o3) + chr(99) + chr(10327 - 10216) + chr(0b100011 + 0o101) + chr(0b111100 + 0o51))(chr(5778 - 5661) + '\164' + '\x66' + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Q55tUpoH0W5L(OeWW0F1dBPRQ): def NLcc3BCJnQka(OeWW0F1dBPRQ): try: return xafqLlk3kkUe(OeWW0F1dBPRQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf!\x10\x8f\x87_\x0e\xe1\xd7\x90\x81\xd6'), chr(899 - 799) + '\145' + chr(0b1100011) + chr(4527 - 4416) + chr(100) + chr(8069 - 7968))(chr(117) + '\x74' + chr(0b110010 + 0o64) + chr(45) + '\070')) except jLmadlzMdunT: return ehT0Px3KOsy9(chr(0b110000) + chr(3676 - 3565) + '\x30', ord("\x08")) return UVzVuWOrGxQn(OeWW0F1dBPRQ, NLcc3BCJnQka)
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
_find_frame
def _find_frame(stack, start=0): """Find the frame with the caller on the stack.""" # We want to find the first place where the layer was called # that is *not* an __init__ function of an inheriting layer. frame = inspect.getframeinfo(stack[start][0]) # If we are in an init, move on. if frame.function == '__init__': return _find_frame(stack, start + 1) return frame
python
def _find_frame(stack, start=0): """Find the frame with the caller on the stack.""" # We want to find the first place where the layer was called # that is *not* an __init__ function of an inheriting layer. frame = inspect.getframeinfo(stack[start][0]) # If we are in an init, move on. if frame.function == '__init__': return _find_frame(stack, start + 1) return frame
[ "def", "_find_frame", "(", "stack", ",", "start", "=", "0", ")", ":", "# We want to find the first place where the layer was called", "# that is *not* an __init__ function of an inheriting layer.", "frame", "=", "inspect", ".", "getframeinfo", "(", "stack", "[", "start", "]", "[", "0", "]", ")", "# If we are in an init, move on.", "if", "frame", ".", "function", "==", "'__init__'", ":", "return", "_find_frame", "(", "stack", ",", "start", "+", "1", ")", "return", "frame" ]
Find the frame with the caller on the stack.
[ "Find", "the", "frame", "with", "the", "caller", "on", "the", "stack", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L189-L197
train
Find the frame with the caller on the stack.
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,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1PSoAwYhj,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(0b1110 + 0o141) + chr(1750 - 1699) + '\065' + chr(48), 44410 - 44402), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(1906 - 1855) + '\x37' + chr(55), 32279 - 32271), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2065 - 2016) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(49) + chr(48) + chr(0b110101), 28654 - 28646), ehT0Px3KOsy9(chr(914 - 866) + chr(111) + chr(0b110001) + chr(0b110000) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110100) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + chr(570 - 521) + chr(48) + chr(50), 49292 - 49284), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(55) + chr(2614 - 2560), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(863 - 814) + '\065' + chr(54), 4021 - 4013), ehT0Px3KOsy9(chr(0b110000) + chr(0b110001 + 0o76) + chr(0b110010 + 0o0) + chr(2075 - 2026) + chr(0b10110 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(55) + '\063', 0b1000), ehT0Px3KOsy9(chr(2130 - 2082) + chr(0b111001 + 0o66) + '\x32' + '\x36' + chr(0b110111), 17490 - 17482), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1282 - 1231) + '\x30' + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(4827 - 4716) + chr(50) + chr(0b100 + 0o54) + '\063', 0b1000), ehT0Px3KOsy9(chr(1429 - 1381) + chr(0b1101111) + chr(49) + chr(54) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1956 - 1905) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(50) + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(7365 - 7254) + '\062' + chr(50) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b10000 + 0o137) + '\064' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x36' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(588 - 536) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100000 + 0o117) + chr(0b110001) + '\066' + chr(147 - 97), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(52) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(0b110100) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(1030 - 978) + '\063', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b100110 + 0o15) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\063' + '\060', 0o10), ehT0Px3KOsy9(chr(1863 - 1815) + chr(7015 - 6904) + chr(0b110011) + chr(0b11101 + 0o23) + chr(54), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(11343 - 11232) + '\063' + chr(0b110011) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(1660 - 1549) + chr(1039 - 988) + chr(340 - 285) + chr(0b10101 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(2209 - 2159) + chr(50) + '\x33', 37680 - 37672), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11010 + 0o31) + chr(1868 - 1819) + chr(50), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2180 - 2131) + chr(0b110110) + chr(0b110000), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11101 + 0o26) + chr(0b101101 + 0o7) + chr(49), 26560 - 26552), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101000 + 0o16) + chr(0b11 + 0o61), 0o10), ehT0Px3KOsy9(chr(2270 - 2222) + '\x6f' + chr(0b110111) + chr(51), 8), ehT0Px3KOsy9(chr(546 - 498) + chr(0b10100 + 0o133) + '\062' + chr(2240 - 2185), 27302 - 27294), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(0b10111 + 0o32) + chr(53) + chr(0b110011), 23299 - 23291), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(1290 - 1237) + chr(0b100011 + 0o21), 4608 - 4600)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2234 - 2186) + chr(0b1101111) + '\x35' + chr(48), 14903 - 14895)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc6'), chr(3388 - 3288) + chr(9039 - 8938) + '\x63' + chr(2886 - 2775) + '\x64' + '\x65')(chr(117) + chr(2390 - 2274) + chr(0b1000011 + 0o43) + chr(0b10011 + 0o32) + chr(2040 - 1984)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Ywqh35oXh5iO(rFoCQMjVYqWa, avRbFsnfJxQj=ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + chr(48), 0o10)): C4IqNNmLfHXB = kzXqv8ZZwm75.getframeinfo(rFoCQMjVYqWa[avRbFsnfJxQj][ehT0Px3KOsy9('\x30' + chr(2281 - 2170) + chr(0b1100 + 0o44), 8)]) if xafqLlk3kkUe(C4IqNNmLfHXB, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a\xbdI|tn%\xed&\xf1n\xf5'), chr(100) + chr(0b1001111 + 0o26) + chr(0b100011 + 0o100) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + '\164' + '\x66' + '\x2d' + chr(0b111000))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xa0c+.W\x1d\xe1'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b10100 + 0o31) + chr(1134 - 1078)): return Ywqh35oXh5iO(rFoCQMjVYqWa, avRbFsnfJxQj + ehT0Px3KOsy9('\060' + chr(111) + '\061', ord("\x08"))) return C4IqNNmLfHXB
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
_shorten_file_path
def _shorten_file_path(line): """Shorten file path in error lines for more readable tracebacks.""" start = line.lower().find('file') if start < 0: return line first_quote = line.find('"', start) if first_quote < 0: return line second_quote = line.find('"', first_quote + 1) if second_quote < 0: return line path = line[first_quote + 1:second_quote] new_path = '/'.join(path.split('/')[-3:]) return line[:first_quote] + '[...]/' + new_path + line[second_quote + 1:]
python
def _shorten_file_path(line): """Shorten file path in error lines for more readable tracebacks.""" start = line.lower().find('file') if start < 0: return line first_quote = line.find('"', start) if first_quote < 0: return line second_quote = line.find('"', first_quote + 1) if second_quote < 0: return line path = line[first_quote + 1:second_quote] new_path = '/'.join(path.split('/')[-3:]) return line[:first_quote] + '[...]/' + new_path + line[second_quote + 1:]
[ "def", "_shorten_file_path", "(", "line", ")", ":", "start", "=", "line", ".", "lower", "(", ")", ".", "find", "(", "'file'", ")", "if", "start", "<", "0", ":", "return", "line", "first_quote", "=", "line", ".", "find", "(", "'\"'", ",", "start", ")", "if", "first_quote", "<", "0", ":", "return", "line", "second_quote", "=", "line", ".", "find", "(", "'\"'", ",", "first_quote", "+", "1", ")", "if", "second_quote", "<", "0", ":", "return", "line", "path", "=", "line", "[", "first_quote", "+", "1", ":", "second_quote", "]", "new_path", "=", "'/'", ".", "join", "(", "path", ".", "split", "(", "'/'", ")", "[", "-", "3", ":", "]", ")", "return", "line", "[", ":", "first_quote", "]", "+", "'[...]/'", "+", "new_path", "+", "line", "[", "second_quote", "+", "1", ":", "]" ]
Shorten file path in error lines for more readable tracebacks.
[ "Shorten", "file", "path", "in", "error", "lines", "for", "more", "readable", "tracebacks", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L200-L213
train
Shorten file path in error lines for more readable tracebacks.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4d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,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(0b110101) + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(9353 - 9242) + chr(0b110010) + '\064' + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + chr(8180 - 8069) + chr(49) + chr(55) + chr(0b10011 + 0o35), 45315 - 45307), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11111 + 0o26) + chr(53), 0o10), ehT0Px3KOsy9(chr(478 - 430) + chr(0b1001111 + 0o40) + chr(1987 - 1936) + chr(52) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100111 + 0o10) + '\062' + '\x32' + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(177 - 125), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010101 + 0o32) + chr(0b1010 + 0o47) + chr(0b11110 + 0o30) + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(2342 - 2291) + chr(0b110000) + '\x37', 2273 - 2265), ehT0Px3KOsy9(chr(1080 - 1032) + '\x6f' + chr(0b110010 + 0o1) + chr(52) + '\x33', 0b1000), ehT0Px3KOsy9(chr(161 - 113) + chr(0b10101 + 0o132) + chr(0b110011) + chr(0b100011 + 0o15) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(0b110011) + chr(51), 36846 - 36838), ehT0Px3KOsy9('\060' + chr(10768 - 10657) + chr(2449 - 2398) + chr(49) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\064' + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b1011 + 0o54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101001 + 0o11) + chr(1728 - 1678) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(11242 - 11131) + chr(0b110100) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b100110 + 0o21) + chr(0b101101 + 0o3), 9804 - 9796), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b101111 + 0o6) + '\063', 0b1000), ehT0Px3KOsy9(chr(2059 - 2011) + chr(0b1101111) + '\063' + chr(0b110010) + chr(2141 - 2093), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\067' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b110011) + chr(818 - 765) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + chr(0b110011) + chr(50), 44182 - 44174), ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + '\x31' + chr(0b101111 + 0o1) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(0b0 + 0o61) + '\x32' + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(2598 - 2547) + chr(1141 - 1093) + '\x33', 8), ehT0Px3KOsy9(chr(1854 - 1806) + '\x6f' + chr(0b100101 + 0o16) + chr(0b11101 + 0o26) + chr(0b110000), 10989 - 10981), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + chr(0b110010) + '\x33' + chr(0b110010), 28681 - 28673), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(11465 - 11354) + chr(49) + chr(50) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(12134 - 12023) + chr(49) + chr(0b110010 + 0o0) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1158 - 1108) + chr(1980 - 1932), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(2272 - 2218) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1303 - 1255) + chr(111) + chr(2477 - 2426) + '\x34' + chr(0b101101 + 0o3), 8), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(753 - 642) + chr(0b110010) + '\x34' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110010 + 0o3) + chr(2021 - 1968), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + '\x32' + '\063' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(160 - 49) + '\064' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(7847 - 7736) + '\061' + '\x34' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\x33' + chr(0b110000), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + chr(53) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x85'), chr(0b1100100) + chr(0b1100101) + chr(0b1010101 + 0o16) + chr(0b1101111) + chr(0b1100100) + chr(0b1001000 + 0o35))('\x75' + '\x74' + chr(6806 - 6704) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def P2GlZRrhpnqm(LycYkDpyelF6): avRbFsnfJxQj = LycYkDpyelF6.lower().find(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\xc8\x14H'), '\x64' + chr(9426 - 9325) + '\143' + chr(1738 - 1627) + '\x64' + chr(0b1100101))(chr(0b1001001 + 0o54) + chr(0b1010101 + 0o37) + chr(5403 - 5301) + chr(0b110 + 0o47) + chr(0b100101 + 0o23))) if avRbFsnfJxQj < ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(792 - 744), 51848 - 51840): return LycYkDpyelF6 HRzurr33cOsu = LycYkDpyelF6.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), chr(0b1100100) + chr(101) + '\x63' + chr(6358 - 6247) + '\144' + '\145')('\x75' + chr(2575 - 2459) + '\146' + '\055' + '\x38'), avRbFsnfJxQj) if HRzurr33cOsu < ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000), 8): return LycYkDpyelF6 qbYu3KHowWQ1 = LycYkDpyelF6.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\x89'), chr(100) + chr(0b10001 + 0o124) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1001 + 0o154) + '\x74' + '\x66' + '\x2d' + '\070'), HRzurr33cOsu + ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(0b1 + 0o60), 0o10)) if qbYu3KHowWQ1 < ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(2486 - 2375) + '\x30', 8): return LycYkDpyelF6 EaCjyhZptSer = LycYkDpyelF6[HRzurr33cOsu + ehT0Px3KOsy9('\x30' + '\157' + chr(49), 8):qbYu3KHowWQ1] EDbutuN8kt72 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), chr(0b1000011 + 0o41) + '\x65' + chr(6690 - 6591) + '\x6f' + chr(0b101110 + 0o66) + '\145')('\x75' + '\x74' + chr(102) + chr(45) + chr(56)).join(EaCjyhZptSer.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\x84'), chr(0b110101 + 0o57) + '\145' + chr(99) + chr(111) + '\144' + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(206 - 161) + chr(0b111 + 0o61)))[-ehT0Px3KOsy9(chr(0b110000) + chr(12007 - 11896) + chr(354 - 303), 0o10):]) return LycYkDpyelF6[:HRzurr33cOsu] + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x8fV\x03\xbc\xb8'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + chr(4883 - 4767) + '\146' + chr(0b1011 + 0o42) + '\070') + EDbutuN8kt72 + LycYkDpyelF6[qbYu3KHowWQ1 + ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31', 8):]
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
_short_traceback
def _short_traceback(skip=3): """Cleaned-up form of traceback.""" counter, res = 0, [] # Skipping 3 lines by default: the top (useless) and self-call. lines = traceback.format_exc().splitlines()[skip:] for l in lines: res.append(_shorten_file_path(l)) if counter % 2 == 1: res.append('') counter += 1 # If we see a LayerError, the traceback has already been processed. if l.startswith('LayerError'): # Skip 4 back except last as these are internal base-layer calls. res = res[:-4] + [res[-1]] res += lines[counter:] break return '\n'.join(res)
python
def _short_traceback(skip=3): """Cleaned-up form of traceback.""" counter, res = 0, [] # Skipping 3 lines by default: the top (useless) and self-call. lines = traceback.format_exc().splitlines()[skip:] for l in lines: res.append(_shorten_file_path(l)) if counter % 2 == 1: res.append('') counter += 1 # If we see a LayerError, the traceback has already been processed. if l.startswith('LayerError'): # Skip 4 back except last as these are internal base-layer calls. res = res[:-4] + [res[-1]] res += lines[counter:] break return '\n'.join(res)
[ "def", "_short_traceback", "(", "skip", "=", "3", ")", ":", "counter", ",", "res", "=", "0", ",", "[", "]", "# Skipping 3 lines by default: the top (useless) and self-call.", "lines", "=", "traceback", ".", "format_exc", "(", ")", ".", "splitlines", "(", ")", "[", "skip", ":", "]", "for", "l", "in", "lines", ":", "res", ".", "append", "(", "_shorten_file_path", "(", "l", ")", ")", "if", "counter", "%", "2", "==", "1", ":", "res", ".", "append", "(", "''", ")", "counter", "+=", "1", "# If we see a LayerError, the traceback has already been processed.", "if", "l", ".", "startswith", "(", "'LayerError'", ")", ":", "# Skip 4 back except last as these are internal base-layer calls.", "res", "=", "res", "[", ":", "-", "4", "]", "+", "[", "res", "[", "-", "1", "]", "]", "res", "+=", "lines", "[", "counter", ":", "]", "break", "return", "'\\n'", ".", "join", "(", "res", ")" ]
Cleaned-up form of traceback.
[ "Cleaned", "-", "up", "form", "of", "traceback", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L216-L232
train
Cleaned - up form of traceback.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb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h,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(0b1100 + 0o44) + chr(2924 - 2813) + '\x32' + chr(0b110110) + chr(0b11000 + 0o36), 54673 - 54665), ehT0Px3KOsy9('\x30' + '\157' + chr(1198 - 1143) + chr(2469 - 2417), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3991 - 3880) + chr(325 - 272) + chr(0b1000 + 0o51), 65137 - 65129), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(624 - 575), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(4841 - 4730) + chr(0b100000 + 0o27) + chr(1039 - 991), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b110001) + '\060', 12360 - 12352), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + '\x31' + chr(0b110000) + chr(1801 - 1753), 8914 - 8906), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(55) + chr(0b100110 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x32' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(5521 - 5410) + '\x34' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(745 - 697) + chr(0b1011110 + 0o21) + chr(488 - 439) + '\x35' + chr(0b110000 + 0o6), 43757 - 43749), ehT0Px3KOsy9('\060' + chr(582 - 471) + '\061' + chr(0b1 + 0o57) + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1950 - 1899) + '\x32' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(415 - 363) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1010011 + 0o34) + chr(0b1111 + 0o44) + chr(51) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b101000 + 0o11) + chr(50) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(926 - 878) + chr(10289 - 10178) + chr(49) + chr(1689 - 1639) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1759 - 1711) + chr(8668 - 8557) + chr(837 - 788) + chr(0b110010) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x32' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1232 - 1184) + chr(0b1101111) + chr(0b110011) + chr(1171 - 1119) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(562 - 510) + chr(1502 - 1454), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(51) + chr(0b110111) + chr(1700 - 1646), 58732 - 58724), ehT0Px3KOsy9('\x30' + chr(11686 - 11575) + '\063' + chr(0b111 + 0o53) + '\x35', 26001 - 25993), ehT0Px3KOsy9(chr(2176 - 2128) + chr(5568 - 5457) + chr(0b11110 + 0o24) + chr(2125 - 2073) + '\x36', 0b1000), ehT0Px3KOsy9(chr(1614 - 1566) + chr(0b111000 + 0o67) + '\065' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(2060 - 2012) + chr(111) + '\x32' + chr(51) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110101) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7915 - 7804) + chr(1951 - 1899) + chr(53), 60642 - 60634), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(1096 - 1048) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11111 + 0o120) + chr(911 - 860) + chr(116 - 61) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(12095 - 11984) + chr(51) + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(55) + chr(0b11110 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(92 - 42) + '\x30' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1189 - 1140) + chr(0b100001 + 0o25) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(2394 - 2345) + chr(0b11110 + 0o27) + chr(2340 - 2288), 39638 - 39630), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110111) + '\065', 10888 - 10880), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b10011 + 0o36) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11333 - 11222) + '\x31' + '\x33' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110100) + chr(874 - 826), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1755 - 1702) + chr(0b100001 + 0o17), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x98'), chr(7735 - 7635) + chr(6110 - 6009) + '\x63' + '\x6f' + chr(100) + chr(0b10010 + 0o123))(chr(0b1110101) + '\x74' + chr(2624 - 2522) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def St4VV0nHVlIM(tU3KFflKK59b=ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b110011), 2873 - 2865)): (pD5Ye7vZLivj, MsbwfslwLjRO) = (ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110000), 10373 - 10365), []) izUh4XSf7tJY = CiXxQDnt84wa.format_exc().splitlines()[tU3KFflKK59b:] for aLoH_Mt0dzwO in izUh4XSf7tJY: xafqLlk3kkUe(MsbwfslwLjRO, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7LY|V\xec'), chr(0b1100001 + 0o3) + '\x65' + chr(5921 - 5822) + chr(570 - 459) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(7495 - 7393) + chr(1409 - 1364) + chr(0b10001 + 0o47)))(P2GlZRrhpnqm(aLoH_Mt0dzwO)) if pD5Ye7vZLivj % ehT0Px3KOsy9('\060' + '\157' + '\x32', ord("\x08")) == ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b1 + 0o60), 9069 - 9061): xafqLlk3kkUe(MsbwfslwLjRO, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd7LY|V\xec'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + '\144' + chr(5501 - 5400))(chr(6097 - 5980) + chr(0b1110100) + '\x66' + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b''), '\x64' + chr(4375 - 4274) + chr(0b1100011) + chr(1282 - 1171) + chr(100) + '\145')(chr(117) + '\x74' + '\x66' + chr(490 - 445) + '\x38')) pD5Ye7vZLivj += ehT0Px3KOsy9(chr(48) + chr(0b1000 + 0o147) + '\061', 8) if xafqLlk3kkUe(aLoH_Mt0dzwO, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5HHkL\xfb7\x90&O'), chr(100) + chr(10131 - 10030) + chr(0b1100011) + chr(1874 - 1763) + chr(0b110 + 0o136) + chr(0b1000000 + 0o45))('\165' + '\x74' + chr(0b1100110) + chr(1444 - 1399) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa]P|J\xcd2\x8b=U'), chr(100) + chr(0b1001110 + 0o27) + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b10100 + 0o141) + chr(116) + chr(102) + chr(1682 - 1637) + chr(0b111000))): MsbwfslwLjRO = MsbwfslwLjRO[:-ehT0Px3KOsy9(chr(394 - 346) + '\157' + '\x34', ord("\x08"))] + [MsbwfslwLjRO[-ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b0 + 0o61), 8)]] MsbwfslwLjRO += izUh4XSf7tJY[pD5Ye7vZLivj:] break return xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc'), '\144' + chr(3607 - 3506) + '\143' + '\x6f' + chr(0b110100 + 0o60) + chr(0b111111 + 0o46))(chr(11884 - 11767) + chr(0b1001001 + 0o53) + chr(2980 - 2878) + '\x2d' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcS@w'), chr(0b101110 + 0o66) + chr(4301 - 4200) + '\143' + '\x6f' + '\x64' + chr(4854 - 4753))(chr(117) + '\x74' + chr(0b10110 + 0o120) + chr(45) + chr(0b110100 + 0o4)))(MsbwfslwLjRO)
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
layer
def layer(output_shape=None, new_parameters=None): """Create a layer class from a function.""" def layer_decorator(call): """Decorating the call function.""" def output_shape_fun(self, input_shape): if output_shape is None: return input_shape kwargs = self._init_kwargs # pylint: disable=protected-access return output_shape(input_shape, **kwargs) def new_parameters_fun(self, input_shape, rng): if new_parameters is None: return () kwargs = self._init_kwargs # pylint: disable=protected-access return new_parameters(input_shape, rng, **kwargs) def call_fun(self, x, params=(), **kwargs): """The call function of the created class, derived from call.""" # Merge on-call kwargs with class-kwargs. call_kwargs = kwargs.copy() call_kwargs.update(self._init_kwargs) # pylint: disable=protected-access # Call with the merged kwargs. return call(x, params=params, **call_kwargs) # Set doc for python help. call_fun.__doc__ = call.__doc__ if output_shape is None: output_shape_fun.__doc__ = output_shape.__doc__ if new_parameters is None: new_parameters_fun.__doc__ = new_parameters.__doc__ # Create the class. cls = type(call.__name__, (Layer,), {'call': call_fun, 'output_shape': output_shape_fun, 'new_parameters': new_parameters_fun}) return cls return layer_decorator
python
def layer(output_shape=None, new_parameters=None): """Create a layer class from a function.""" def layer_decorator(call): """Decorating the call function.""" def output_shape_fun(self, input_shape): if output_shape is None: return input_shape kwargs = self._init_kwargs # pylint: disable=protected-access return output_shape(input_shape, **kwargs) def new_parameters_fun(self, input_shape, rng): if new_parameters is None: return () kwargs = self._init_kwargs # pylint: disable=protected-access return new_parameters(input_shape, rng, **kwargs) def call_fun(self, x, params=(), **kwargs): """The call function of the created class, derived from call.""" # Merge on-call kwargs with class-kwargs. call_kwargs = kwargs.copy() call_kwargs.update(self._init_kwargs) # pylint: disable=protected-access # Call with the merged kwargs. return call(x, params=params, **call_kwargs) # Set doc for python help. call_fun.__doc__ = call.__doc__ if output_shape is None: output_shape_fun.__doc__ = output_shape.__doc__ if new_parameters is None: new_parameters_fun.__doc__ = new_parameters.__doc__ # Create the class. cls = type(call.__name__, (Layer,), {'call': call_fun, 'output_shape': output_shape_fun, 'new_parameters': new_parameters_fun}) return cls return layer_decorator
[ "def", "layer", "(", "output_shape", "=", "None", ",", "new_parameters", "=", "None", ")", ":", "def", "layer_decorator", "(", "call", ")", ":", "\"\"\"Decorating the call function.\"\"\"", "def", "output_shape_fun", "(", "self", ",", "input_shape", ")", ":", "if", "output_shape", "is", "None", ":", "return", "input_shape", "kwargs", "=", "self", ".", "_init_kwargs", "# pylint: disable=protected-access", "return", "output_shape", "(", "input_shape", ",", "*", "*", "kwargs", ")", "def", "new_parameters_fun", "(", "self", ",", "input_shape", ",", "rng", ")", ":", "if", "new_parameters", "is", "None", ":", "return", "(", ")", "kwargs", "=", "self", ".", "_init_kwargs", "# pylint: disable=protected-access", "return", "new_parameters", "(", "input_shape", ",", "rng", ",", "*", "*", "kwargs", ")", "def", "call_fun", "(", "self", ",", "x", ",", "params", "=", "(", ")", ",", "*", "*", "kwargs", ")", ":", "\"\"\"The call function of the created class, derived from call.\"\"\"", "# Merge on-call kwargs with class-kwargs.", "call_kwargs", "=", "kwargs", ".", "copy", "(", ")", "call_kwargs", ".", "update", "(", "self", ".", "_init_kwargs", ")", "# pylint: disable=protected-access", "# Call with the merged kwargs.", "return", "call", "(", "x", ",", "params", "=", "params", ",", "*", "*", "call_kwargs", ")", "# Set doc for python help.", "call_fun", ".", "__doc__", "=", "call", ".", "__doc__", "if", "output_shape", "is", "None", ":", "output_shape_fun", ".", "__doc__", "=", "output_shape", ".", "__doc__", "if", "new_parameters", "is", "None", ":", "new_parameters_fun", ".", "__doc__", "=", "new_parameters", ".", "__doc__", "# Create the class.", "cls", "=", "type", "(", "call", ".", "__name__", ",", "(", "Layer", ",", ")", ",", "{", "'call'", ":", "call_fun", ",", "'output_shape'", ":", "output_shape_fun", ",", "'new_parameters'", ":", "new_parameters_fun", "}", ")", "return", "cls", "return", "layer_decorator" ]
Create a layer class from a function.
[ "Create", "a", "layer", "class", "from", "a", "function", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2t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y6HRbn,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(7976 - 7865) + chr(0b100101 + 0o15) + '\061' + '\063', 0o10), ehT0Px3KOsy9(chr(2276 - 2228) + '\x6f' + chr(50) + chr(0b110011) + chr(0b1111 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100100 + 0o23), 47308 - 47300), ehT0Px3KOsy9('\x30' + '\157' + chr(54) + chr(0b1001 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(245 - 190) + chr(0b11111 + 0o30), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(54) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11746 - 11635) + chr(0b110011) + chr(0b100111 + 0o11) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110101) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1010 + 0o47) + '\x31' + chr(49), 14323 - 14315), ehT0Px3KOsy9(chr(359 - 311) + '\x6f' + chr(50) + chr(0b110111) + chr(0b10001 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\x33' + chr(0b11100 + 0o24) + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(54) + chr(0b110101), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11101 + 0o25) + chr(800 - 751) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(52), 0b1000), ehT0Px3KOsy9('\060' + chr(9779 - 9668) + '\x32' + chr(1546 - 1497), ord("\x08")), ehT0Px3KOsy9(chr(1491 - 1443) + chr(111) + chr(2347 - 2297) + chr(2227 - 2173), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5430 - 5319) + chr(0b10111 + 0o33) + chr(0b0 + 0o66), 8), ehT0Px3KOsy9(chr(0b110000) + chr(7130 - 7019) + chr(0b110010) + '\x32' + '\065', 31745 - 31737), ehT0Px3KOsy9('\060' + '\157' + chr(0b100 + 0o57) + chr(0b11100 + 0o27) + chr(0b11101 + 0o26), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b101101 + 0o4) + chr(1924 - 1874), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(11919 - 11808) + '\x33' + chr(0b101001 + 0o15) + '\066', 49582 - 49574), ehT0Px3KOsy9('\x30' + chr(11843 - 11732) + '\x34' + chr(0b11001 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(53) + chr(0b110011), 32328 - 32320), ehT0Px3KOsy9(chr(48) + chr(2293 - 2182) + chr(1672 - 1623) + '\061' + chr(1460 - 1412), 57430 - 57422), ehT0Px3KOsy9(chr(1239 - 1191) + chr(0b110101 + 0o72) + chr(1225 - 1176) + chr(574 - 524) + '\063', 61377 - 61369), ehT0Px3KOsy9(chr(48) + chr(0b1011011 + 0o24) + chr(51) + '\x32' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\x31' + chr(2015 - 1967), 8), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + '\063' + chr(55) + '\x33', 0b1000), ehT0Px3KOsy9(chr(1595 - 1547) + '\x6f' + chr(0b110011) + chr(53) + chr(1321 - 1270), 29193 - 29185), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + '\x33' + '\064' + chr(0b11 + 0o62), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(0b101 + 0o61) + chr(0b1010 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(5170 - 5059) + '\x31' + chr(48) + '\065', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110001) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(153 - 105) + chr(111) + chr(0b10011 + 0o36) + '\x33' + '\x30', 52816 - 52808), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b11111 + 0o120) + chr(776 - 727) + chr(0b1001 + 0o47) + '\061', 61765 - 61757), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b11010 + 0o32) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x34' + '\065', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2061 - 2011) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b101011 + 0o104) + '\x35' + chr(0b11010 + 0o30), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(0b110101) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5'), '\144' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(12818 - 12701) + chr(10203 - 10087) + chr(1984 - 1882) + chr(45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wgamNHppspXj(CeP8heSqnrCd=None, i0ACg5s2xWQo=None): def ktzHrYAo_Jl6(yty8SpL8o6wD): def zRn0TC4DyBh3(oVre8I6UXc3b, tANyZeuTfu5y): if CeP8heSqnrCd is None: return tANyZeuTfu5y M8EIoTs2GJXE = oVre8I6UXc3b._init_kwargs return CeP8heSqnrCd(tANyZeuTfu5y, **M8EIoTs2GJXE) def kqDxggyXo_rp(oVre8I6UXc3b, tANyZeuTfu5y, OKPXzuZwN61O): if i0ACg5s2xWQo is None: return () M8EIoTs2GJXE = oVre8I6UXc3b._init_kwargs return i0ACg5s2xWQo(tANyZeuTfu5y, OKPXzuZwN61O, **M8EIoTs2GJXE) def wYoJlVyDOnYJ(oVre8I6UXc3b, OeWW0F1dBPRQ, nEbJZ4wfte2w=(), **M8EIoTs2GJXE): YiJgou4T8wKe = M8EIoTs2GJXE.igThHS4jwVsa() xafqLlk3kkUe(YiJgou4T8wKe, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1\xeaFqV;\x89C0\x8c\xa6E'), chr(322 - 222) + chr(0b11001 + 0o114) + '\143' + chr(11825 - 11714) + chr(0b100001 + 0o103) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(673 - 628) + chr(0b111000)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xf7i]K*\xa8Z(\xca\xa4\x06'), chr(100) + '\x65' + chr(0b1011010 + 0o11) + chr(0b111010 + 0o65) + chr(0b10111 + 0o115) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + '\x38'))) return yty8SpL8o6wD(OeWW0F1dBPRQ, params=nEbJZ4wfte2w, **YiJgou4T8wKe) wYoJlVyDOnYJ.OZYzwAeSQh7N = yty8SpL8o6wD.OZYzwAeSQh7N if CeP8heSqnrCd is None: zRn0TC4DyBh3.OZYzwAeSQh7N = CeP8heSqnrCd.OZYzwAeSQh7N if i0ACg5s2xWQo is None: kqDxggyXo_rp.OZYzwAeSQh7N = i0ACg5s2xWQo.OZYzwAeSQh7N NSstowUUZlxS = wmQmyeWBmUpv(yty8SpL8o6wD.Gbej4oZqKLA6, (XzEXj6tX1a3h,), {xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xffkX'), chr(0b111111 + 0o45) + chr(101) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(0b1101111 + 0o6) + '\x74' + '\146' + chr(45) + '\070'): wYoJlVyDOnYJ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4\xebsDJ\x01\x9c^!\xd9\xb3\x10'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(301 - 256) + chr(0b10111 + 0o41)): zRn0TC4DyBh3, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xfbpkO\x14\xb1L$\xdd\xb7\x10\xfao'), '\144' + chr(101) + '\143' + chr(10566 - 10455) + chr(0b1100100) + '\145')(chr(117) + chr(0b110010 + 0o102) + chr(9357 - 9255) + chr(0b101101) + chr(56)): kqDxggyXo_rp}) return NSstowUUZlxS return ktzHrYAo_Jl6
tensorflow/tensor2tensor
tensor2tensor/trax/layers/base.py
Layer.initialize
def initialize(self, input_shape, rng): """Initialize the layer given an input shape and rng. Returns new_parameters(input_shape, rng) on the first call and () on any subsequent call, as the layer is already initialized. This is used for networks that share parameters, so the layer only produces them once. Note that all arguments and return values can be tuples or dictionaries or arbitraty nested structures composed of tuples and dictionaries. Args: input_shape: a tuple representing the shape of the input. rng: random number generator. Returns: Newly created parameters on the first call and () on all subsequent calls. """ try: # Re-using this layer, no new parameters. if not self._first_init: return () # First call of this layer, create parameters. self._first_init = False self._params = self.new_parameters(input_shape, rng) return self._params except Exception: name, trace = self.__class__.__name__, _short_traceback() raise LayerError(name, 'initialize', self._caller, input_shape, trace)
python
def initialize(self, input_shape, rng): """Initialize the layer given an input shape and rng. Returns new_parameters(input_shape, rng) on the first call and () on any subsequent call, as the layer is already initialized. This is used for networks that share parameters, so the layer only produces them once. Note that all arguments and return values can be tuples or dictionaries or arbitraty nested structures composed of tuples and dictionaries. Args: input_shape: a tuple representing the shape of the input. rng: random number generator. Returns: Newly created parameters on the first call and () on all subsequent calls. """ try: # Re-using this layer, no new parameters. if not self._first_init: return () # First call of this layer, create parameters. self._first_init = False self._params = self.new_parameters(input_shape, rng) return self._params except Exception: name, trace = self.__class__.__name__, _short_traceback() raise LayerError(name, 'initialize', self._caller, input_shape, trace)
[ "def", "initialize", "(", "self", ",", "input_shape", ",", "rng", ")", ":", "try", ":", "# Re-using this layer, no new parameters.", "if", "not", "self", ".", "_first_init", ":", "return", "(", ")", "# First call of this layer, create parameters.", "self", ".", "_first_init", "=", "False", "self", ".", "_params", "=", "self", ".", "new_parameters", "(", "input_shape", ",", "rng", ")", "return", "self", ".", "_params", "except", "Exception", ":", "name", ",", "trace", "=", "self", ".", "__class__", ".", "__name__", ",", "_short_traceback", "(", ")", "raise", "LayerError", "(", "name", ",", "'initialize'", ",", "self", ".", "_caller", ",", "input_shape", ",", "trace", ")" ]
Initialize the layer given an input shape and rng. Returns new_parameters(input_shape, rng) on the first call and () on any subsequent call, as the layer is already initialized. This is used for networks that share parameters, so the layer only produces them once. Note that all arguments and return values can be tuples or dictionaries or arbitraty nested structures composed of tuples and dictionaries. Args: input_shape: a tuple representing the shape of the input. rng: random number generator. Returns: Newly created parameters on the first call and () on all subsequent calls.
[ "Initialize", "the", "layer", "given", "an", "input", "shape", "and", "rng", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/trax/layers/base.py#L74-L102
train
Initialize the layer given an input shape and random number generator.
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,jIl9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BOH72k,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(212 - 164) + chr(11029 - 10918) + chr(0b110010) + chr(472 - 417) + '\064', 9113 - 9105), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1002 - 947) + '\x37', 15327 - 15319), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\061' + chr(52) + chr(0b101101 + 0o3), 17095 - 17087), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(50) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101101 + 0o102) + chr(50) + chr(51) + chr(0b0 + 0o62), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + chr(2277 - 2227) + chr(0b100000 + 0o25) + chr(0b110110), 9495 - 9487), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(203 - 153) + '\062' + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1111 + 0o44) + chr(0b110111) + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x31' + chr(0b110110) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101100 + 0o5) + '\065' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(0b110010) + chr(906 - 858), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9747 - 9636) + chr(0b110010) + '\x32' + chr(0b1010 + 0o47), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x36' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111111 + 0o60) + '\062' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110111) + chr(1181 - 1129), 4154 - 4146), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x32' + '\060' + chr(0b110 + 0o54), 34594 - 34586), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(9543 - 9432) + chr(49) + chr(0b110011) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(10961 - 10850) + chr(0b110010) + chr(0b1001 + 0o51) + '\x33', 1988 - 1980), ehT0Px3KOsy9(chr(1915 - 1867) + chr(111) + chr(0b110010) + chr(0b1111 + 0o45) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(48) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b101111 + 0o7) + chr(0b11011 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\064' + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101000 + 0o7) + chr(0b110011) + chr(1019 - 971) + '\061', 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1010111 + 0o30) + '\x35', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b110110) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\067' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10001 + 0o43) + chr(0b10000 + 0o43), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50), 501 - 493), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(815 - 766) + '\061' + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + '\x32' + chr(161 - 112), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(55) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(839 - 791) + chr(0b1101111) + chr(52) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b10 + 0o155) + '\063' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1011 + 0o47) + chr(0b110100) + chr(0b0 + 0o65), 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(7152 - 7041) + chr(0b110010) + chr(0b110011) + '\061', 27048 - 27040), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(160 - 49) + '\x31' + chr(1612 - 1560) + chr(0b11111 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b1101111) + chr(1148 - 1099) + chr(52) + chr(50), 15094 - 15086)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(121 - 73) + '\157' + chr(0b101001 + 0o14) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x92'), chr(0b10 + 0o142) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1011101 + 0o7) + '\145')(chr(11739 - 11622) + chr(11742 - 11626) + chr(7402 - 7300) + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def MuiHFrkYeUQ4(oVre8I6UXc3b, tANyZeuTfu5y, OKPXzuZwN61O): try: if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\x99\t\xa7z\xee\xf1\xfb\x91\x1a\x1c'), chr(8576 - 8476) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b111110 + 0o46) + chr(3647 - 3546))(chr(0b1010011 + 0o42) + chr(0b1110000 + 0o4) + chr(9768 - 9666) + chr(0b110 + 0o47) + '\x38')): return () oVre8I6UXc3b.uHrNAGpjtLAs = ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(1912 - 1864), 59510 - 59502) oVre8I6UXc3b.pHroJelArxJz = oVre8I6UXc3b.new_parameters(tANyZeuTfu5y, OKPXzuZwN61O) return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xb7\x12\xbaC\xff\xc2\xd3\x8d\x0b"\xea'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(0b111110 + 0o47))(chr(2421 - 2304) + chr(116) + chr(102) + '\x2d' + '\x38')) except jLmadlzMdunT: (AIvJRzLdDfgF, gE4TFTcol2kh) = (oVre8I6UXc3b.__class__.Gbej4oZqKLA6, St4VV0nHVlIM()) raise F2ewTWqtmKig(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5\x91\t\xa1`\xfb\xc2\xfb\x85\x16'), chr(0b10100 + 0o120) + '\145' + chr(0b1000001 + 0o42) + chr(111) + '\x64' + chr(101))(chr(117) + chr(0b11011 + 0o131) + chr(0b1100000 + 0o6) + chr(0b101101) + '\070'), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\x9c\x01\xb9e\xff\xdc'), chr(0b1100100) + chr(0b100101 + 0o100) + chr(0b1000110 + 0o35) + chr(0b110011 + 0o74) + chr(0b1100100) + chr(1073 - 972))('\x75' + '\164' + '\x66' + chr(0b11010 + 0o23) + chr(0b111000))), tANyZeuTfu5y, gE4TFTcol2kh)
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
_references_content
def _references_content(ref_files): """Returns dict<str ref_url, str ref_content>.""" example_spec = { "url": tf.FixedLenFeature([], tf.string), "content": tf.FixedLenFeature([], tf.string), } data = {} for ex in generator_utils.tfrecord_iterator( ref_files, gzipped=True, example_spec=example_spec): data[ex["url"]] = text_encoder.to_unicode(ex["content"]) return data
python
def _references_content(ref_files): """Returns dict<str ref_url, str ref_content>.""" example_spec = { "url": tf.FixedLenFeature([], tf.string), "content": tf.FixedLenFeature([], tf.string), } data = {} for ex in generator_utils.tfrecord_iterator( ref_files, gzipped=True, example_spec=example_spec): data[ex["url"]] = text_encoder.to_unicode(ex["content"]) return data
[ "def", "_references_content", "(", "ref_files", ")", ":", "example_spec", "=", "{", "\"url\"", ":", "tf", ".", "FixedLenFeature", "(", "[", "]", ",", "tf", ".", "string", ")", ",", "\"content\"", ":", "tf", ".", "FixedLenFeature", "(", "[", "]", ",", "tf", ".", "string", ")", ",", "}", "data", "=", "{", "}", "for", "ex", "in", "generator_utils", ".", "tfrecord_iterator", "(", "ref_files", ",", "gzipped", "=", "True", ",", "example_spec", "=", "example_spec", ")", ":", "data", "[", "ex", "[", "\"url\"", "]", "]", "=", "text_encoder", ".", "to_unicode", "(", "ex", "[", "\"content\"", "]", ")", "return", "data" ]
Returns dict<str ref_url, str ref_content>.
[ "Returns", "dict<str", "ref_url", "str", "ref_content", ">", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2t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dE_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(277 - 229) + chr(111) + chr(50) + chr(50) + chr(0b11101 + 0o25), 56683 - 56675), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(152 - 97) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101101 + 0o2) + chr(0b110001) + chr(0b11 + 0o55) + '\065', 0b1000), ehT0Px3KOsy9(chr(1588 - 1540) + '\x6f' + '\x33' + chr(51) + chr(0b101111 + 0o7), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(1742 - 1631) + chr(0b1000 + 0o52) + chr(789 - 737) + chr(52), 0b1000), ehT0Px3KOsy9(chr(2007 - 1959) + chr(0b1101111) + chr(51) + '\x30' + chr(0b110111), 53722 - 53714), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10011 + 0o37) + chr(0b110000 + 0o4) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o31) + chr(0b0 + 0o63) + chr(0b11111 + 0o21), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b100000 + 0o27) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110111) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1878 - 1830) + chr(111) + chr(0b110010) + chr(48) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b10010 + 0o135) + chr(0b10111 + 0o32) + '\066' + chr(0b110001 + 0o0), 3438 - 3430), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + chr(0b101 + 0o60), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111111 + 0o60) + '\062' + chr(0b11 + 0o57) + '\066', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b1010 + 0o54) + chr(0b10101 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + '\x31' + '\062' + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(0b101011 + 0o10) + chr(52) + '\x31', 0b1000), ehT0Px3KOsy9(chr(2184 - 2136) + chr(1429 - 1318) + '\x37' + chr(0b110010), 8), ehT0Px3KOsy9(chr(153 - 105) + chr(111) + chr(0b100101 + 0o15) + '\x32' + '\x36', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\x34' + chr(274 - 226), 63061 - 63053), ehT0Px3KOsy9('\x30' + chr(4775 - 4664) + chr(1859 - 1808) + chr(54), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(1167 - 1118) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2563 - 2512) + chr(51) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1011 + 0o47) + chr(52) + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110110) + chr(588 - 539), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b11 + 0o56) + '\x36', 8), ehT0Px3KOsy9(chr(616 - 568) + chr(0b110011 + 0o74) + chr(0b1001 + 0o50) + chr(54) + chr(0b110101), 8), ehT0Px3KOsy9(chr(2227 - 2179) + chr(11344 - 11233) + chr(0b110001) + chr(0b110010 + 0o3) + '\x32', 42377 - 42369), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(0b110001) + '\x32' + chr(830 - 781), 1600 - 1592), ehT0Px3KOsy9(chr(1943 - 1895) + '\157' + '\061' + '\x32' + chr(970 - 922), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x34' + chr(1198 - 1147), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + '\x31' + chr(55) + chr(2163 - 2109), 60828 - 60820), ehT0Px3KOsy9(chr(1778 - 1730) + chr(7890 - 7779) + '\x32' + chr(1689 - 1637) + '\x34', 8), ehT0Px3KOsy9(chr(48) + chr(0b0 + 0o157) + '\061' + chr(2057 - 2008) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(48) + chr(0b110010), 17185 - 17177), ehT0Px3KOsy9(chr(560 - 512) + '\x6f' + '\063' + chr(0b100100 + 0o15) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(56 - 3) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1000 + 0o53) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(5753 - 5642) + chr(0b110010) + chr(0b110001) + '\x36', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1100 + 0o143) + chr(460 - 407) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc'), chr(0b1000001 + 0o43) + '\x65' + chr(9009 - 8910) + chr(0b1101111) + '\x64' + chr(101))(chr(0b1101110 + 0o7) + chr(5446 - 5330) + chr(4109 - 4007) + chr(0b1011 + 0o42) + chr(816 - 760)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def aQxnzl9mHyjK(lRD7UFxdIWyX): ktxOw8P4v3OK = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xcf)'), chr(100) + chr(0b11000 + 0o115) + '\x63' + chr(0b1000101 + 0o52) + '\144' + chr(101))(chr(117) + '\x74' + chr(102) + '\055' + chr(56)): IDJ2eXGCBCDu.FixedLenFeature([], IDJ2eXGCBCDu.string), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xd2+\xaa\xc1\xa9\xd6'), chr(6382 - 6282) + '\x65' + '\x63' + '\x6f' + '\144' + chr(9841 - 9740))(chr(0b1110101) + chr(0b1000011 + 0o61) + chr(0b1100110) + chr(45) + chr(2755 - 2699)): IDJ2eXGCBCDu.FixedLenFeature([], IDJ2eXGCBCDu.string)} ULnjp6D6efFH = {} for DfdhY28yEwAF in xafqLlk3kkUe(g1Z_RG9zP4cD, xafqLlk3kkUe(SXOLrMavuUCe(b"\xe6\xdb7\xbb\xc7\xa8\xd0<\xe6S\xf7{\x03D\xe2\x1a'"), chr(100) + chr(0b1100101) + chr(1089 - 990) + '\157' + chr(100) + chr(5681 - 5580))('\x75' + chr(12708 - 12592) + '\146' + chr(0b10101 + 0o30) + '\070'))(lRD7UFxdIWyX, gzipped=ehT0Px3KOsy9('\060' + chr(2733 - 2622) + chr(49), 0b1000), example_spec=ktxOw8P4v3OK): ULnjp6D6efFH[DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xcf)'), chr(0b11010 + 0o112) + chr(0b1110 + 0o127) + chr(99) + chr(0b1001010 + 0o45) + chr(5844 - 5744) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b10100 + 0o31) + chr(1651 - 1595))]] = nCRDzZ_Is9fz.to_unicode(DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf1\xd2+\xaa\xc1\xa9\xd6'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(6418 - 6318) + chr(0b10001 + 0o124))(chr(1242 - 1125) + chr(116) + chr(5368 - 5266) + '\055' + chr(56))]) return ULnjp6D6efFH
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
_wiki_urls_for_shard
def _wiki_urls_for_shard(shard_id, urls_dir=None): """Urls for chunk: dict<str wiki_url, list<str> ref_urls>.""" urls_dir = urls_dir or WIKI_URLS_DIR urls_filepath = os.path.join(urls_dir, WIKI_URLS_FILE % shard_id) with tf.gfile.GFile(urls_filepath) as f: return json.loads(f.read())
python
def _wiki_urls_for_shard(shard_id, urls_dir=None): """Urls for chunk: dict<str wiki_url, list<str> ref_urls>.""" urls_dir = urls_dir or WIKI_URLS_DIR urls_filepath = os.path.join(urls_dir, WIKI_URLS_FILE % shard_id) with tf.gfile.GFile(urls_filepath) as f: return json.loads(f.read())
[ "def", "_wiki_urls_for_shard", "(", "shard_id", ",", "urls_dir", "=", "None", ")", ":", "urls_dir", "=", "urls_dir", "or", "WIKI_URLS_DIR", "urls_filepath", "=", "os", ".", "path", ".", "join", "(", "urls_dir", ",", "WIKI_URLS_FILE", "%", "shard_id", ")", "with", "tf", ".", "gfile", ".", "GFile", "(", "urls_filepath", ")", "as", "f", ":", "return", "json", ".", "loads", "(", "f", ".", "read", "(", ")", ")" ]
Urls for chunk: dict<str wiki_url, list<str> ref_urls>.
[ "Urls", "for", "chunk", ":", "dict<str", "wiki_url", "list<str", ">", "ref_urls", ">", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L261-L266
train
Urls for shard.
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,V5s4U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lYI2Bx4,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(6542 - 6431) + chr(0b110010) + '\067' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + '\x32' + chr(644 - 591) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + '\061' + chr(0b101111 + 0o10) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(2433 - 2383) + chr(51), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(48) + chr(51), 16034 - 16026), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o60) + '\x35', 18807 - 18799), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(55), 23040 - 23032), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(49) + chr(975 - 922), 0o10), ehT0Px3KOsy9(chr(2118 - 2070) + '\157' + chr(0b110001) + '\061' + chr(2206 - 2156), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110101 + 0o72) + chr(0b110010) + '\064' + chr(268 - 217), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(49) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b1 + 0o60) + chr(0b110001 + 0o2), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(276 - 227) + chr(2327 - 2277) + chr(466 - 414), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + '\067' + '\x35', 8735 - 8727), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(510 - 459) + chr(0b0 + 0o64), 14345 - 14337), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\064' + '\x36', 15675 - 15667), ehT0Px3KOsy9(chr(48) + chr(6137 - 6026) + '\061' + chr(51) + chr(0b11 + 0o62), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\157' + chr(0b1101 + 0o44) + chr(0b1101 + 0o44) + chr(0b110000 + 0o7), 0b1000), ehT0Px3KOsy9(chr(286 - 238) + '\157' + chr(0b10111 + 0o32) + chr(0b111 + 0o51) + '\x32', 0b1000), ehT0Px3KOsy9(chr(2214 - 2166) + '\157' + chr(1830 - 1776) + chr(899 - 848), 30756 - 30748), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(0b110010) + '\x36' + chr(0b110101), 34934 - 34926), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(2091 - 2037), 0b1000), ehT0Px3KOsy9(chr(714 - 666) + chr(3924 - 3813) + chr(1202 - 1153) + chr(0b110000), 40943 - 40935), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x37' + chr(0b11110 + 0o25), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1387 - 1338) + chr(0b110101 + 0o1), 0o10), ehT0Px3KOsy9('\x30' + chr(2825 - 2714) + chr(0b1101 + 0o44) + '\x32' + chr(48), 0b1000), ehT0Px3KOsy9(chr(629 - 581) + chr(0b100100 + 0o113) + chr(0b11111 + 0o24) + chr(0b101 + 0o61), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b1111 + 0o44) + chr(0b110101), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(48) + chr(0b110011), 23476 - 23468), ehT0Px3KOsy9('\060' + chr(0b1101110 + 0o1) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110000) + chr(0b101000 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b110111 + 0o70) + chr(2236 - 2187) + chr(50) + chr(0b110110), 35432 - 35424), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110111) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(866 - 816) + '\060' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(2112 - 2064) + '\x6f' + chr(1434 - 1384) + chr(1727 - 1674) + chr(767 - 716), 0o10), ehT0Px3KOsy9('\060' + chr(0b101000 + 0o107) + '\065' + chr(0b110001), 57684 - 57676), ehT0Px3KOsy9(chr(48) + chr(7181 - 7070) + chr(0b11001 + 0o31) + chr(0b1010 + 0o47) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(111) + chr(0b10 + 0o60) + '\x35', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(5342 - 5231) + chr(53) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x96'), '\x64' + chr(0b1100101) + chr(2325 - 2226) + '\157' + chr(7168 - 7068) + chr(101))(chr(117) + chr(1597 - 1481) + chr(0b1011 + 0o133) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def zcBETxaM8VrH(GlVrV0lc39s3, qxmuzav3KxFS=None): qxmuzav3KxFS = qxmuzav3KxFS or iywIvwHaGvUr QzRfDKFOogcF = oqhJDdMJfuwx.path.join(qxmuzav3KxFS, BPZdLTy15Qsq % GlVrV0lc39s3) with xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\xffm\xc1\x12\xf6'), chr(0b1100100) + '\x65' + chr(0b1010 + 0o131) + chr(3622 - 3511) + chr(0b1100100) + chr(6159 - 6058))('\165' + chr(0b1110100) + '\146' + chr(0b101010 + 0o3) + '\070'))(QzRfDKFOogcF) as EGyt1xfPT1P6: return xafqLlk3kkUe(fXk443epxtd5, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4D\xc9\x1a\xe0'), chr(2374 - 2274) + chr(101) + '\x63' + '\x6f' + chr(0b111010 + 0o52) + chr(101))(chr(0b111111 + 0o66) + '\x74' + chr(102) + chr(1706 - 1661) + '\070'))(xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\x1d\xe5\x17\xc41eB\x0e#\x91\x96'), chr(100) + chr(9930 - 9829) + chr(0b1100011) + '\x6f' + chr(0b100001 + 0o103) + chr(6801 - 6700))(chr(3129 - 3012) + chr(0b1110100) + chr(102) + chr(0b1101 + 0o40) + chr(0b1011 + 0o55)))())
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
_wiki_articles
def _wiki_articles(shard_id, wikis_dir=None): """Generates WikipediaArticles from GCS that are part of shard shard_id.""" if not wikis_dir: wikis_dir = WIKI_CONTENT_DIR with tf.Graph().as_default(): dataset = tf.data.TFRecordDataset( cc_utils.readahead( os.path.join(wikis_dir, WIKI_CONTENT_FILE % shard_id)), buffer_size=16 * 1000 * 1000) def _parse_example(ex_ser): """Parse serialized Example containing Wikipedia article content.""" features = { "url": tf.VarLenFeature(tf.string), "title": tf.VarLenFeature(tf.string), "section_titles": tf.VarLenFeature(tf.string), "section_texts": tf.VarLenFeature(tf.string), } ex = tf.parse_single_example(ex_ser, features) for k in ex.keys(): ex[k] = ex[k].values ex["url"] = ex["url"][0] ex["title"] = ex["title"][0] return ex dataset = dataset.map(_parse_example, num_parallel_calls=32) dataset = dataset.prefetch(100) record_it = dataset.make_one_shot_iterator().get_next() with tf.Session() as sess: while True: try: ex = sess.run(record_it) except tf.errors.OutOfRangeError: break sections = [ WikipediaSection(title=text_encoder.to_unicode(title), text=text_encoder.to_unicode(text)) for title, text in zip(ex["section_titles"], ex["section_texts"]) ] yield WikipediaArticle( url=text_encoder.to_unicode(ex["url"]), title=text_encoder.to_unicode(ex["title"]), sections=sections)
python
def _wiki_articles(shard_id, wikis_dir=None): """Generates WikipediaArticles from GCS that are part of shard shard_id.""" if not wikis_dir: wikis_dir = WIKI_CONTENT_DIR with tf.Graph().as_default(): dataset = tf.data.TFRecordDataset( cc_utils.readahead( os.path.join(wikis_dir, WIKI_CONTENT_FILE % shard_id)), buffer_size=16 * 1000 * 1000) def _parse_example(ex_ser): """Parse serialized Example containing Wikipedia article content.""" features = { "url": tf.VarLenFeature(tf.string), "title": tf.VarLenFeature(tf.string), "section_titles": tf.VarLenFeature(tf.string), "section_texts": tf.VarLenFeature(tf.string), } ex = tf.parse_single_example(ex_ser, features) for k in ex.keys(): ex[k] = ex[k].values ex["url"] = ex["url"][0] ex["title"] = ex["title"][0] return ex dataset = dataset.map(_parse_example, num_parallel_calls=32) dataset = dataset.prefetch(100) record_it = dataset.make_one_shot_iterator().get_next() with tf.Session() as sess: while True: try: ex = sess.run(record_it) except tf.errors.OutOfRangeError: break sections = [ WikipediaSection(title=text_encoder.to_unicode(title), text=text_encoder.to_unicode(text)) for title, text in zip(ex["section_titles"], ex["section_texts"]) ] yield WikipediaArticle( url=text_encoder.to_unicode(ex["url"]), title=text_encoder.to_unicode(ex["title"]), sections=sections)
[ "def", "_wiki_articles", "(", "shard_id", ",", "wikis_dir", "=", "None", ")", ":", "if", "not", "wikis_dir", ":", "wikis_dir", "=", "WIKI_CONTENT_DIR", "with", "tf", ".", "Graph", "(", ")", ".", "as_default", "(", ")", ":", "dataset", "=", "tf", ".", "data", ".", "TFRecordDataset", "(", "cc_utils", ".", "readahead", "(", "os", ".", "path", ".", "join", "(", "wikis_dir", ",", "WIKI_CONTENT_FILE", "%", "shard_id", ")", ")", ",", "buffer_size", "=", "16", "*", "1000", "*", "1000", ")", "def", "_parse_example", "(", "ex_ser", ")", ":", "\"\"\"Parse serialized Example containing Wikipedia article content.\"\"\"", "features", "=", "{", "\"url\"", ":", "tf", ".", "VarLenFeature", "(", "tf", ".", "string", ")", ",", "\"title\"", ":", "tf", ".", "VarLenFeature", "(", "tf", ".", "string", ")", ",", "\"section_titles\"", ":", "tf", ".", "VarLenFeature", "(", "tf", ".", "string", ")", ",", "\"section_texts\"", ":", "tf", ".", "VarLenFeature", "(", "tf", ".", "string", ")", ",", "}", "ex", "=", "tf", ".", "parse_single_example", "(", "ex_ser", ",", "features", ")", "for", "k", "in", "ex", ".", "keys", "(", ")", ":", "ex", "[", "k", "]", "=", "ex", "[", "k", "]", ".", "values", "ex", "[", "\"url\"", "]", "=", "ex", "[", "\"url\"", "]", "[", "0", "]", "ex", "[", "\"title\"", "]", "=", "ex", "[", "\"title\"", "]", "[", "0", "]", "return", "ex", "dataset", "=", "dataset", ".", "map", "(", "_parse_example", ",", "num_parallel_calls", "=", "32", ")", "dataset", "=", "dataset", ".", "prefetch", "(", "100", ")", "record_it", "=", "dataset", ".", "make_one_shot_iterator", "(", ")", ".", "get_next", "(", ")", "with", "tf", ".", "Session", "(", ")", "as", "sess", ":", "while", "True", ":", "try", ":", "ex", "=", "sess", ".", "run", "(", "record_it", ")", "except", "tf", ".", "errors", ".", "OutOfRangeError", ":", "break", "sections", "=", "[", "WikipediaSection", "(", "title", "=", "text_encoder", ".", "to_unicode", "(", "title", ")", ",", "text", "=", "text_encoder", ".", "to_unicode", "(", "text", ")", ")", "for", "title", ",", "text", "in", "zip", "(", "ex", "[", "\"section_titles\"", "]", ",", "ex", "[", "\"section_texts\"", "]", ")", "]", "yield", "WikipediaArticle", "(", "url", "=", "text_encoder", ".", "to_unicode", "(", "ex", "[", "\"url\"", "]", ")", ",", "title", "=", "text_encoder", ".", "to_unicode", "(", "ex", "[", "\"title\"", "]", ")", ",", "sections", "=", "sections", ")" ]
Generates WikipediaArticles from GCS that are part of shard shard_id.
[ "Generates", "WikipediaArticles", "from", "GCS", "that", "are", "part", "of", "shard", "shard_id", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L279-L323
train
Generates WikipediaArticles from GCS that are part of shard shard_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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4,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(1909 - 1861) + '\x6f' + chr(0b110001) + '\x33' + chr(0b101011 + 0o11), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5625 - 5514) + chr(50) + chr(52) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2823 - 2712) + '\x31' + chr(471 - 418) + chr(1483 - 1435), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100000 + 0o117) + '\x32' + chr(0b110101) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\062' + '\x31', 0o10), ehT0Px3KOsy9(chr(52 - 4) + chr(0b101001 + 0o106) + chr(51) + '\061', 64787 - 64779), ehT0Px3KOsy9(chr(516 - 468) + '\x6f' + '\063' + chr(0b10110 + 0o34) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010000 + 0o37) + chr(0b110111) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1558 - 1510) + chr(111) + chr(2107 - 2054) + '\x31', 0o10), ehT0Px3KOsy9(chr(1004 - 956) + '\x6f' + chr(1965 - 1916) + chr(54) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10 + 0o60) + chr(51) + '\x37', 33164 - 33156), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2436 - 2385) + chr(0b101100 + 0o11) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(438 - 387) + '\065' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2191 - 2140) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7631 - 7520) + chr(1622 - 1572) + chr(703 - 648), 0o10), ehT0Px3KOsy9('\060' + chr(10410 - 10299) + '\063' + chr(52) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + '\063', 10758 - 10750), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(51) + '\x35' + chr(52), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(54) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100010 + 0o15) + chr(0b110001) + '\x35' + chr(0b1011 + 0o50), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10101 + 0o42) + chr(0b110001 + 0o6), 8), ehT0Px3KOsy9(chr(609 - 561) + chr(0b1011011 + 0o24) + chr(0b110001) + '\060' + chr(0b110011), 15646 - 15638), ehT0Px3KOsy9(chr(0b110000) + chr(0b0 + 0o157) + chr(1888 - 1839) + '\065', 60542 - 60534), ehT0Px3KOsy9(chr(254 - 206) + '\157' + chr(1167 - 1118) + '\x33' + chr(1922 - 1871), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(972 - 921) + chr(51) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(124 - 75) + chr(0b110111) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1101 + 0o45) + chr(0b10010 + 0o37) + '\064', 49121 - 49113), ehT0Px3KOsy9(chr(0b110000) + chr(0b11100 + 0o123) + '\061' + '\x32' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(806 - 756) + chr(0b10101 + 0o35) + '\062', 0b1000), ehT0Px3KOsy9('\x30' + chr(12317 - 12206) + '\x31' + '\064' + chr(2585 - 2530), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + chr(0b100110 + 0o14) + chr(50) + '\065', 63771 - 63763), ehT0Px3KOsy9(chr(583 - 535) + chr(11324 - 11213) + '\x32' + chr(1810 - 1757) + chr(1502 - 1449), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + chr(49) + chr(0b110110) + '\063', 8), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + chr(50) + '\x34' + chr(0b11110 + 0o24), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(1191 - 1138) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110111) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(951 - 903) + chr(0b101001 + 0o106) + chr(2259 - 2207) + chr(2254 - 2202), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111 + 0o0) + chr(0b10001 + 0o42) + chr(0b11101 + 0o25) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(779 - 731) + chr(0b1101111) + chr(2490 - 2439) + chr(51) + chr(2160 - 2106), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(4641 - 4530) + chr(0b110101) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'r'), '\x64' + chr(1107 - 1006) + chr(99) + chr(0b1100111 + 0o10) + chr(645 - 545) + chr(6518 - 6417))('\x75' + '\x74' + chr(102) + chr(75 - 30) + chr(627 - 571)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def tY99wE2IBtQ7(GlVrV0lc39s3, rV4_crPT4JCr=None): if not rV4_crPT4JCr: rV4_crPT4JCr = emR5olt05zs2 with xafqLlk3kkUe(IDJ2eXGCBCDu.Graph(), xafqLlk3kkUe(SXOLrMavuUCe(b'=\xd4W\x0c\xcd\xb7x\xa0S]'), chr(100) + '\x65' + '\143' + chr(111) + chr(0b1100100) + chr(0b110001 + 0o64))(chr(0b11000 + 0o135) + chr(6557 - 6441) + '\146' + chr(45) + chr(2405 - 2349)))(): xQt6gV9VfTO3 = IDJ2eXGCBCDu.data.TFRecordDataset(XmqMBK3UrkR5.readahead(oqhJDdMJfuwx.path.join(rV4_crPT4JCr, f8ka5ODOCyaO % GlVrV0lc39s3)), buffer_size=ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(50) + '\x30', 16814 - 16806) * ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(3013 - 2958) + '\x35' + chr(48), 56500 - 56492) * ehT0Px3KOsy9(chr(1065 - 1017) + chr(111) + chr(49) + chr(55) + '\065' + chr(900 - 852), 8)) def rPPPkPNVE2e6(ygBOqfVpfNF_): EEf4r9nUvta_ = {xafqLlk3kkUe(SXOLrMavuUCe(b')\xd5d'), '\x64' + chr(3246 - 3145) + '\x63' + '\157' + chr(0b1011111 + 0o5) + '\145')('\165' + '\x74' + chr(102) + '\x2d' + chr(3118 - 3062)): IDJ2eXGCBCDu.VarLenFeature(IDJ2eXGCBCDu.string), xafqLlk3kkUe(SXOLrMavuUCe(b'(\xce|\x04\xcd'), '\144' + chr(101) + '\x63' + '\x6f' + '\x64' + chr(580 - 479))('\x75' + '\164' + '\146' + '\x2d' + chr(2839 - 2783)): IDJ2eXGCBCDu.VarLenFeature(IDJ2eXGCBCDu.string), xafqLlk3kkUe(SXOLrMavuUCe(b'/\xc2k\x1c\xc1\xbew\x8aK@\x07\xf3\x89\x9b'), '\x64' + chr(0b1000000 + 0o45) + chr(99) + chr(0b110011 + 0o74) + chr(2051 - 1951) + chr(0b1110 + 0o127))(chr(0b10100 + 0o141) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b10 + 0o66)): IDJ2eXGCBCDu.VarLenFeature(IDJ2eXGCBCDu.string), xafqLlk3kkUe(SXOLrMavuUCe(b'/\xc2k\x1c\xc1\xbew\x8aKL\x0b\xeb\x9f'), chr(0b1100100) + chr(0b100110 + 0o77) + chr(1278 - 1179) + chr(111) + chr(100) + '\145')(chr(0b100001 + 0o124) + '\164' + '\x66' + chr(0b101101) + chr(56)): IDJ2eXGCBCDu.VarLenFeature(IDJ2eXGCBCDu.string)} DfdhY28yEwAF = IDJ2eXGCBCDu.parse_single_example(ygBOqfVpfNF_, EEf4r9nUvta_) for OolUPRJhRaJd in xafqLlk3kkUe(DfdhY28yEwAF, xafqLlk3kkUe(SXOLrMavuUCe(b'7\xc2q\x1b'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(100) + chr(101))('\x75' + '\x74' + '\x66' + chr(0b10110 + 0o27) + '\x38'))(): DfdhY28yEwAF[OolUPRJhRaJd] = DfdhY28yEwAF[OolUPRJhRaJd].SPnCNu54H1db DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b')\xd5d'), chr(8020 - 7920) + chr(5524 - 5423) + '\x63' + '\x6f' + chr(100) + chr(1979 - 1878))('\x75' + chr(13434 - 13318) + '\x66' + chr(348 - 303) + chr(0b110110 + 0o2))] = DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b')\xd5d'), '\x64' + chr(0b1000000 + 0o45) + '\x63' + chr(760 - 649) + '\144' + chr(7046 - 6945))('\x75' + chr(0b1110 + 0o146) + chr(102) + '\055' + '\x38')][ehT0Px3KOsy9('\060' + chr(5290 - 5179) + chr(902 - 854), 50016 - 50008)] DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'(\xce|\x04\xcd'), '\144' + chr(101) + '\143' + chr(0b1011011 + 0o24) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + '\070')] = DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'(\xce|\x04\xcd'), '\144' + chr(0b1100101) + chr(0b1010110 + 0o15) + chr(0b1010010 + 0o35) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1000100 + 0o60) + chr(1016 - 914) + chr(0b101101) + chr(56))][ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b110000), 8)] return DfdhY28yEwAF xQt6gV9VfTO3 = xQt6gV9VfTO3.map(rPPPkPNVE2e6, num_parallel_calls=ehT0Px3KOsy9('\x30' + '\157' + '\x34' + '\x30', 9216 - 9208)) xQt6gV9VfTO3 = xQt6gV9VfTO3.prefetch(ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(3740 - 3629) + chr(0b110001) + chr(52) + chr(0b110100), 0b1000)) MLtWQPVTIMiq = xQt6gV9VfTO3.make_one_shot_iterator().get_next() with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\xc2{\x1b\xc1\xbew'), chr(3845 - 3745) + '\145' + chr(0b1101 + 0o126) + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(5298 - 5182) + chr(5635 - 5533) + '\055' + chr(0b111000)))() as HVWCHjSQ2I35: while ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001), 0o10): try: DfdhY28yEwAF = HVWCHjSQ2I35.sgt5BU61bwZ2(MLtWQPVTIMiq) except xafqLlk3kkUe(IDJ2eXGCBCDu.errors, xafqLlk3kkUe(SXOLrMavuUCe(b"\x13\xd2|'\xce\x83x\xbbXL6\xed\x9e\x87h"), chr(100) + chr(101) + chr(0b1001110 + 0o25) + chr(0b1101111) + '\144' + chr(0b1011100 + 0o11))(chr(0b1110101) + '\164' + chr(2264 - 2162) + '\055' + chr(56))): break osRv5CFR3cO5 = [KxbMZe2dTdJz(title=nCRDzZ_Is9fz.to_unicode(IkttdaI0bGlA), text=nCRDzZ_Is9fz.to_unicode(Ah1rInvg48Hb)) for (IkttdaI0bGlA, Ah1rInvg48Hb) in pZ0NK2y6HRbn(DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'/\xc2k\x1c\xc1\xbew\x8aK@\x07\xf3\x89\x9b'), chr(0b1100100) + chr(335 - 234) + chr(0b1001101 + 0o26) + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(116) + '\146' + '\055' + '\x38')], DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'/\xc2k\x1c\xc1\xbew\x8aKL\x0b\xeb\x9f'), chr(1362 - 1262) + chr(740 - 639) + '\143' + chr(111) + chr(2464 - 2364) + '\145')('\165' + chr(0b101100 + 0o110) + chr(102) + chr(0b11000 + 0o25) + '\070')])] yield tQokyeyBKUTO(url=xafqLlk3kkUe(nCRDzZ_Is9fz, xafqLlk3kkUe(SXOLrMavuUCe(b'(\xc8W\x1d\xc6\xb8z\xba[L'), chr(0b1100100) + chr(101) + '\x63' + chr(10472 - 10361) + '\x64' + '\145')('\x75' + chr(890 - 774) + chr(2996 - 2894) + chr(938 - 893) + chr(0b100101 + 0o23)))(DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b')\xd5d'), chr(0b110011 + 0o61) + chr(242 - 141) + chr(2365 - 2266) + chr(0b1101 + 0o142) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\x2d' + '\x38')]), title=xafqLlk3kkUe(nCRDzZ_Is9fz, xafqLlk3kkUe(SXOLrMavuUCe(b'(\xc8W\x1d\xc6\xb8z\xba[L'), chr(100) + chr(6216 - 6115) + chr(2930 - 2831) + chr(10338 - 10227) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(56)))(DfdhY28yEwAF[xafqLlk3kkUe(SXOLrMavuUCe(b'(\xce|\x04\xcd'), chr(0b101110 + 0o66) + chr(0b1100101) + chr(7243 - 7144) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(12529 - 12412) + chr(0b1110100) + chr(0b1100010 + 0o4) + chr(45) + chr(3029 - 2973))]), sections=osRv5CFR3cO5)
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
rank_reference_paragraphs
def rank_reference_paragraphs(wiki_title, references_content, normalize=True): """Rank and return reference paragraphs by tf-idf score on title tokens.""" normalized_title = _normalize_text(wiki_title) title_tokens = _tokens_to_score( set(tokenizer.encode(text_encoder.native_to_unicode(normalized_title)))) ref_paragraph_info = [] doc_counts = collections.defaultdict(int) for ref in references_content: for paragraph in ref.split("\n"): normalized_paragraph = _normalize_text(paragraph) if cc_utils.filter_paragraph(normalized_paragraph): # Skip paragraph continue counts = _token_counts(normalized_paragraph, title_tokens) for token in title_tokens: if counts[token]: doc_counts[token] += 1 content = normalized_paragraph if normalize else paragraph info = {"content": content, "counts": counts} ref_paragraph_info.append(info) for info in ref_paragraph_info: score = 0. for token in title_tokens: term_frequency = info["counts"][token] inv_doc_frequency = ( float(len(ref_paragraph_info)) / max(doc_counts[token], 1)) score += term_frequency * math.log(inv_doc_frequency) info["score"] = score ref_paragraph_info.sort(key=lambda el: el["score"], reverse=True) return [info["content"] for info in ref_paragraph_info]
python
def rank_reference_paragraphs(wiki_title, references_content, normalize=True): """Rank and return reference paragraphs by tf-idf score on title tokens.""" normalized_title = _normalize_text(wiki_title) title_tokens = _tokens_to_score( set(tokenizer.encode(text_encoder.native_to_unicode(normalized_title)))) ref_paragraph_info = [] doc_counts = collections.defaultdict(int) for ref in references_content: for paragraph in ref.split("\n"): normalized_paragraph = _normalize_text(paragraph) if cc_utils.filter_paragraph(normalized_paragraph): # Skip paragraph continue counts = _token_counts(normalized_paragraph, title_tokens) for token in title_tokens: if counts[token]: doc_counts[token] += 1 content = normalized_paragraph if normalize else paragraph info = {"content": content, "counts": counts} ref_paragraph_info.append(info) for info in ref_paragraph_info: score = 0. for token in title_tokens: term_frequency = info["counts"][token] inv_doc_frequency = ( float(len(ref_paragraph_info)) / max(doc_counts[token], 1)) score += term_frequency * math.log(inv_doc_frequency) info["score"] = score ref_paragraph_info.sort(key=lambda el: el["score"], reverse=True) return [info["content"] for info in ref_paragraph_info]
[ "def", "rank_reference_paragraphs", "(", "wiki_title", ",", "references_content", ",", "normalize", "=", "True", ")", ":", "normalized_title", "=", "_normalize_text", "(", "wiki_title", ")", "title_tokens", "=", "_tokens_to_score", "(", "set", "(", "tokenizer", ".", "encode", "(", "text_encoder", ".", "native_to_unicode", "(", "normalized_title", ")", ")", ")", ")", "ref_paragraph_info", "=", "[", "]", "doc_counts", "=", "collections", ".", "defaultdict", "(", "int", ")", "for", "ref", "in", "references_content", ":", "for", "paragraph", "in", "ref", ".", "split", "(", "\"\\n\"", ")", ":", "normalized_paragraph", "=", "_normalize_text", "(", "paragraph", ")", "if", "cc_utils", ".", "filter_paragraph", "(", "normalized_paragraph", ")", ":", "# Skip paragraph", "continue", "counts", "=", "_token_counts", "(", "normalized_paragraph", ",", "title_tokens", ")", "for", "token", "in", "title_tokens", ":", "if", "counts", "[", "token", "]", ":", "doc_counts", "[", "token", "]", "+=", "1", "content", "=", "normalized_paragraph", "if", "normalize", "else", "paragraph", "info", "=", "{", "\"content\"", ":", "content", ",", "\"counts\"", ":", "counts", "}", "ref_paragraph_info", ".", "append", "(", "info", ")", "for", "info", "in", "ref_paragraph_info", ":", "score", "=", "0.", "for", "token", "in", "title_tokens", ":", "term_frequency", "=", "info", "[", "\"counts\"", "]", "[", "token", "]", "inv_doc_frequency", "=", "(", "float", "(", "len", "(", "ref_paragraph_info", ")", ")", "/", "max", "(", "doc_counts", "[", "token", "]", ",", "1", ")", ")", "score", "+=", "term_frequency", "*", "math", ".", "log", "(", "inv_doc_frequency", ")", "info", "[", "\"score\"", "]", "=", "score", "ref_paragraph_info", ".", "sort", "(", "key", "=", "lambda", "el", ":", "el", "[", "\"score\"", "]", ",", "reverse", "=", "True", ")", "return", "[", "info", "[", "\"content\"", "]", "for", "info", "in", "ref_paragraph_info", "]" ]
Rank and return reference paragraphs by tf-idf score on title tokens.
[ "Rank", "and", "return", "reference", "paragraphs", "by", "tf", "-", "idf", "score", "on", "title", "tokens", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L348-L379
train
Rank and return reference paragraphs by tf - idf score on title tokens.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n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22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + '\x34', 53035 - 53027), ehT0Px3KOsy9(chr(0b110000) + chr(9588 - 9477) + chr(0b0 + 0o61) + '\x36' + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(1663 - 1612) + chr(0b100 + 0o62), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11001 + 0o30) + chr(48) + chr(0b100000 + 0o21), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + chr(51), 1800 - 1792), ehT0Px3KOsy9(chr(1870 - 1822) + chr(0b1101111) + chr(857 - 807) + '\060' + '\x33', 0b1000), ehT0Px3KOsy9(chr(1787 - 1739) + '\x6f' + '\x31' + chr(0b100001 + 0o25) + chr(0b11010 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(130 - 80) + chr(0b11010 + 0o32) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100 + 0o57) + chr(0b110110) + chr(884 - 833), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(746 - 695) + chr(48) + chr(403 - 348), 3252 - 3244), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10 + 0o60) + '\062' + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(588 - 477) + '\x32' + chr(1988 - 1935) + chr(0b101101 + 0o3), 0o10), ehT0Px3KOsy9('\x30' + chr(2434 - 2323) + '\x32' + chr(292 - 240) + '\065', 31210 - 31202), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b11011 + 0o33) + chr(0b101111 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(2082 - 2033) + chr(0b110010 + 0o2) + chr(547 - 498), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + '\x33' + chr(0b110000) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b100000 + 0o117) + chr(0b110010) + '\062' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(2241 - 2193) + chr(0b1000011 + 0o54) + chr(0b111 + 0o54) + '\063' + chr(2202 - 2147), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b111111 + 0o60) + chr(0b110100) + chr(0b101100 + 0o13), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b11001 + 0o126) + '\066', 43374 - 43366), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\065' + '\061', 53185 - 53177), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(0b10 + 0o57) + chr(50) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110001) + '\x32', 0b1000), ehT0Px3KOsy9(chr(305 - 257) + chr(0b1101111) + chr(0b110101) + '\062', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + '\x33' + chr(176 - 126) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(960 - 905), 52495 - 52487), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b11000 + 0o30) + chr(1616 - 1568), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b11100 + 0o26) + chr(53) + chr(0b10001 + 0o41), 52323 - 52315), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000011 + 0o54) + '\x32' + '\x35' + chr(0b10010 + 0o40), 8), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + chr(0b110001) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1768 - 1716) + chr(0b1011 + 0o45), 48430 - 48422), ehT0Px3KOsy9('\060' + '\x6f' + '\x37' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100 + 0o153) + chr(49) + chr(54) + chr(801 - 753), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(0b110001) + '\062' + '\061', 51928 - 51920), ehT0Px3KOsy9(chr(2064 - 2016) + chr(111) + chr(50) + '\064' + '\065', 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(1984 - 1931) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1932 - 1881) + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(54) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(3614 - 3503) + '\x31' + chr(0b110101) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110100 + 0o1) + chr(0b1101 + 0o45), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(9831 - 9720) + chr(2418 - 2365) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x02'), chr(0b1100100) + chr(0b1010 + 0o133) + '\143' + chr(111) + chr(100) + '\x65')(chr(117) + chr(116) + chr(1653 - 1551) + chr(0b1101 + 0o40) + chr(93 - 37)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def e1XgXfrZ19NN(VPk0hpdHYFEp, iwWL9ApMg4My, IOBK62gJSlOh=ehT0Px3KOsy9('\060' + chr(111) + chr(0b1001 + 0o50), ord("\x08"))): vLDIvAFUQTpe = XEo4xAzhxnF1(VPk0hpdHYFEp) MhOgpjleFvNn = KUIkNSmFHNX8(MVEN8G6CxlvR(v6ZI_vRSLpRb.encode(nCRDzZ_Is9fz.native_to_unicode(vLDIvAFUQTpe)))) RS6FWtPd2oai = [] R2xiptfuapwv = FGhnnwoh1Dd8.defaultdict(ehT0Px3KOsy9) for X4s0pSydcnYR in iwWL9ApMg4My: for jxbOO5ZYnxlv in xafqLlk3kkUe(X4s0pSydcnYR, xafqLlk3kkUe(SXOLrMavuUCe(b'_\x07\xb2(G'), '\x64' + chr(0b1100101) + chr(0b1111 + 0o124) + chr(111) + '\144' + '\x65')(chr(0b1001010 + 0o53) + chr(0b1110100) + chr(0b1010111 + 0o17) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'&'), chr(100) + chr(0b1101 + 0o130) + chr(0b111110 + 0o45) + chr(0b1000000 + 0o57) + chr(0b1001000 + 0o34) + '\x65')(chr(117) + chr(0b1010111 + 0o35) + '\146' + chr(0b101010 + 0o3) + chr(0b101 + 0o63))): SxDaJ9v7C51L = XEo4xAzhxnF1(jxbOO5ZYnxlv) if xafqLlk3kkUe(XmqMBK3UrkR5, xafqLlk3kkUe(SXOLrMavuUCe(b'J\x1e\xb25V\xf1)\xd0\x92\xb5\xf3\xcf\xd7\x13\x11\xa8'), chr(3163 - 3063) + chr(0b110 + 0o137) + chr(5557 - 5458) + '\157' + chr(0b1100100) + '\145')(chr(1133 - 1016) + chr(0b1110100) + '\146' + chr(45) + chr(0b1000 + 0o60)))(SxDaJ9v7C51L): continue qaIx4JIwHiwL = C99xSHctd3PV(SxDaJ9v7C51L, MhOgpjleFvNn) for mTy3fac_AqJ5 in MhOgpjleFvNn: if qaIx4JIwHiwL[mTy3fac_AqJ5]: R2xiptfuapwv[mTy3fac_AqJ5] += ehT0Px3KOsy9('\060' + chr(908 - 797) + chr(0b110001), 8) VjgGQlDzfDa9 = SxDaJ9v7C51L if IOBK62gJSlOh else jxbOO5ZYnxlv S7Hxucg7jlZk = {xafqLlk3kkUe(SXOLrMavuUCe(b'O\x18\xb05V\xed\x02'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(0b111000)): VjgGQlDzfDa9, xafqLlk3kkUe(SXOLrMavuUCe(b'O\x18\xab/G\xf0'), chr(0b1100100) + chr(0b1001001 + 0o34) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(101))(chr(7287 - 7170) + '\164' + chr(0b1100110) + '\055' + '\070'): qaIx4JIwHiwL} xafqLlk3kkUe(RS6FWtPd2oai, xafqLlk3kkUe(SXOLrMavuUCe(b'M\x07\xae$]\xe7'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + chr(3710 - 3609))(chr(0b11011 + 0o132) + chr(12021 - 11905) + '\146' + '\x2d' + chr(0b111000)))(S7Hxucg7jlZk) for S7Hxucg7jlZk in RS6FWtPd2oai: n9fd4FsgoqFs = 0.0 for mTy3fac_AqJ5 in MhOgpjleFvNn: Uo4li6wHDbiq = S7Hxucg7jlZk[xafqLlk3kkUe(SXOLrMavuUCe(b'O\x18\xab/G\xf0'), chr(0b1100100) + chr(0b11110 + 0o107) + chr(4527 - 4428) + chr(0b1101111) + '\x64' + chr(9743 - 9642))(chr(117) + '\x74' + chr(0b1100110) + chr(1706 - 1661) + chr(56))][mTy3fac_AqJ5] GYYkjQdjFdaF = kkSX4ccExqw4(c2A0yzQpDQB3(RS6FWtPd2oai)) / tsdjvlgh9gDP(R2xiptfuapwv[mTy3fac_AqJ5], ehT0Px3KOsy9('\060' + chr(2545 - 2434) + chr(0b110001), 8)) n9fd4FsgoqFs += Uo4li6wHDbiq * yhiZVkosCjBm.log(GYYkjQdjFdaF) S7Hxucg7jlZk[xafqLlk3kkUe(SXOLrMavuUCe(b'_\x14\xb13V'), '\144' + chr(7245 - 7144) + chr(99) + chr(111) + chr(3865 - 3765) + '\145')(chr(0b1110101) + chr(0b111000 + 0o74) + '\x66' + chr(0b110 + 0o47) + chr(1356 - 1300))] = n9fd4FsgoqFs xafqLlk3kkUe(RS6FWtPd2oai, xafqLlk3kkUe(SXOLrMavuUCe(b'_\x18\xac5'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1011110 + 0o21) + chr(100) + chr(9913 - 9812))(chr(3955 - 3838) + chr(116) + '\x66' + chr(45) + chr(2529 - 2473)))(key=lambda cWbTN_IfhLP1: cWbTN_IfhLP1[xafqLlk3kkUe(SXOLrMavuUCe(b'_\x14\xb13V'), chr(100) + '\145' + '\x63' + '\x6f' + chr(100) + '\145')('\x75' + chr(0b1011001 + 0o33) + '\x66' + chr(1942 - 1897) + chr(0b11100 + 0o34))], reverse=ehT0Px3KOsy9(chr(0b110000) + chr(0b1000001 + 0o56) + chr(49), 8)) return [S7Hxucg7jlZk[xafqLlk3kkUe(SXOLrMavuUCe(b'O\x18\xb05V\xed\x02'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + '\144' + '\145')('\165' + chr(116) + '\x66' + chr(0b11011 + 0o22) + '\070')] for S7Hxucg7jlZk in RS6FWtPd2oai]
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
produce_examples
def produce_examples(shard_ids, wikis_dir, refs_dir, urls_dir, vocab_path, out_filepaths): """Produce examples from shard_ids to out_filepaths.""" # * Join the Wikipedia articles with their references # * Run Tf-idf to sort reference paragraphs # * Encode the Wikipedia and reference text with the vocabulary # * Write out TFRecords of tensorflow.Example tf.logging.info("Processing %d input shards into %d output files.", len(shard_ids), len(out_filepaths)) vocab = text_encoder.SubwordTextEncoder(vocab_path) eot_ids = vocab.encode(EOT) def example_generator(): """Generate Example dicts.""" stats = dict(total_original_wikis=0, total_original_refs=0, total_found_refs=0, ref_lengths=[], wiki_original_refs=[], wiki_found_refs=[], wikis_skipped_no_refs=0, wikis_skipped_short_lead=0, num_wikis_written=0) ref_files_by_shard = _references_files_by_shard(refs_dir) for shard_id in shard_ids: tf.logging.info("Processing shard %d", shard_id) wiki_urls = _wiki_urls_for_shard(shard_id, urls_dir) tf.logging.info("Loaded wiki URLs for shard") refs_content = _references_content(ref_files_by_shard[shard_id]) tf.logging.info("Loaded reference content for shard") for i, wiki in enumerate(_wiki_articles(shard_id, wikis_dir)): if not i % 1000: tf.logging.info("Processing wiki index %d for shard %d", i, shard_id) stats["total_original_wikis"] += 1 # Get reference content wiki_ref_content = [] ref_urls = wiki_urls[wiki.url]["refs"] stats["total_original_refs"] += len(ref_urls) stats_wiki_original_refs = len(ref_urls) stats_wiki_found_refs = 0 for ref_url in ref_urls: ref_content = refs_content.get(ref_url) if not ref_content: continue stats["total_found_refs"] += 1 stats["ref_lengths"].append(len(ref_content)) stats_wiki_found_refs += 1 wiki_ref_content.append(ref_content) stats["wiki_original_refs"].append(stats_wiki_original_refs) stats["wiki_found_refs"].append(stats_wiki_found_refs) if not wiki_ref_content or len(wiki_ref_content) < _MIN_REFS: # No/few refs were found stats["wikis_skipped_no_refs"] += 1 continue # Rank reference paragraphs with TFIDF wiki_title = _normalize_text(wiki.title) ranked_paragraphs = rank_reference_paragraphs(wiki_title, wiki_ref_content) # Construct inputs from Wiki title and references inputs = [] inputs.extend(vocab.encode(wiki_title)) inputs.extend(eot_ids) for paragraph in ranked_paragraphs: if len(inputs) >= 1e6: break paragraph += " " inputs.extend(vocab.encode(paragraph)) # Construct targets from article sections targets, section_boundaries = _encode_wiki_sections( wiki.sections, vocab) # Skip if lead section is too short if (not section_boundaries or section_boundaries[0] < _MIN_LEADSECTION_TOKENS): stats["wikis_skipped_short_lead"] += 1 continue inputs.append(text_encoder.EOS_ID) targets.append(text_encoder.EOS_ID) stats["num_wikis_written"] += 1 yield { "inputs": inputs, "targets": targets, "section_boundaries": section_boundaries, } tf.logging.info("Total: %d, Skipped: %d", stats["num_wikis_written"], stats["total_original_wikis"] - stats["num_wikis_written"]) tf.logging.info("Total refs: %d, Skipped refs: %d", stats["total_found_refs"], stats["total_original_refs"] - stats["total_found_refs"]) stats_fname = os.path.join(os.path.split(out_filepaths[0])[0], "stats.%d.json" % shard_ids[0]) with tf.gfile.Open(stats_fname, "w") as f: f.write(json.dumps(stats)) generator_utils.generate_files(example_generator(), out_filepaths)
python
def produce_examples(shard_ids, wikis_dir, refs_dir, urls_dir, vocab_path, out_filepaths): """Produce examples from shard_ids to out_filepaths.""" # * Join the Wikipedia articles with their references # * Run Tf-idf to sort reference paragraphs # * Encode the Wikipedia and reference text with the vocabulary # * Write out TFRecords of tensorflow.Example tf.logging.info("Processing %d input shards into %d output files.", len(shard_ids), len(out_filepaths)) vocab = text_encoder.SubwordTextEncoder(vocab_path) eot_ids = vocab.encode(EOT) def example_generator(): """Generate Example dicts.""" stats = dict(total_original_wikis=0, total_original_refs=0, total_found_refs=0, ref_lengths=[], wiki_original_refs=[], wiki_found_refs=[], wikis_skipped_no_refs=0, wikis_skipped_short_lead=0, num_wikis_written=0) ref_files_by_shard = _references_files_by_shard(refs_dir) for shard_id in shard_ids: tf.logging.info("Processing shard %d", shard_id) wiki_urls = _wiki_urls_for_shard(shard_id, urls_dir) tf.logging.info("Loaded wiki URLs for shard") refs_content = _references_content(ref_files_by_shard[shard_id]) tf.logging.info("Loaded reference content for shard") for i, wiki in enumerate(_wiki_articles(shard_id, wikis_dir)): if not i % 1000: tf.logging.info("Processing wiki index %d for shard %d", i, shard_id) stats["total_original_wikis"] += 1 # Get reference content wiki_ref_content = [] ref_urls = wiki_urls[wiki.url]["refs"] stats["total_original_refs"] += len(ref_urls) stats_wiki_original_refs = len(ref_urls) stats_wiki_found_refs = 0 for ref_url in ref_urls: ref_content = refs_content.get(ref_url) if not ref_content: continue stats["total_found_refs"] += 1 stats["ref_lengths"].append(len(ref_content)) stats_wiki_found_refs += 1 wiki_ref_content.append(ref_content) stats["wiki_original_refs"].append(stats_wiki_original_refs) stats["wiki_found_refs"].append(stats_wiki_found_refs) if not wiki_ref_content or len(wiki_ref_content) < _MIN_REFS: # No/few refs were found stats["wikis_skipped_no_refs"] += 1 continue # Rank reference paragraphs with TFIDF wiki_title = _normalize_text(wiki.title) ranked_paragraphs = rank_reference_paragraphs(wiki_title, wiki_ref_content) # Construct inputs from Wiki title and references inputs = [] inputs.extend(vocab.encode(wiki_title)) inputs.extend(eot_ids) for paragraph in ranked_paragraphs: if len(inputs) >= 1e6: break paragraph += " " inputs.extend(vocab.encode(paragraph)) # Construct targets from article sections targets, section_boundaries = _encode_wiki_sections( wiki.sections, vocab) # Skip if lead section is too short if (not section_boundaries or section_boundaries[0] < _MIN_LEADSECTION_TOKENS): stats["wikis_skipped_short_lead"] += 1 continue inputs.append(text_encoder.EOS_ID) targets.append(text_encoder.EOS_ID) stats["num_wikis_written"] += 1 yield { "inputs": inputs, "targets": targets, "section_boundaries": section_boundaries, } tf.logging.info("Total: %d, Skipped: %d", stats["num_wikis_written"], stats["total_original_wikis"] - stats["num_wikis_written"]) tf.logging.info("Total refs: %d, Skipped refs: %d", stats["total_found_refs"], stats["total_original_refs"] - stats["total_found_refs"]) stats_fname = os.path.join(os.path.split(out_filepaths[0])[0], "stats.%d.json" % shard_ids[0]) with tf.gfile.Open(stats_fname, "w") as f: f.write(json.dumps(stats)) generator_utils.generate_files(example_generator(), out_filepaths)
[ "def", "produce_examples", "(", "shard_ids", ",", "wikis_dir", ",", "refs_dir", ",", "urls_dir", ",", "vocab_path", ",", "out_filepaths", ")", ":", "# * Join the Wikipedia articles with their references", "# * Run Tf-idf to sort reference paragraphs", "# * Encode the Wikipedia and reference text with the vocabulary", "# * Write out TFRecords of tensorflow.Example", "tf", ".", "logging", ".", "info", "(", "\"Processing %d input shards into %d output files.\"", ",", "len", "(", "shard_ids", ")", ",", "len", "(", "out_filepaths", ")", ")", "vocab", "=", "text_encoder", ".", "SubwordTextEncoder", "(", "vocab_path", ")", "eot_ids", "=", "vocab", ".", "encode", "(", "EOT", ")", "def", "example_generator", "(", ")", ":", "\"\"\"Generate Example dicts.\"\"\"", "stats", "=", "dict", "(", "total_original_wikis", "=", "0", ",", "total_original_refs", "=", "0", ",", "total_found_refs", "=", "0", ",", "ref_lengths", "=", "[", "]", ",", "wiki_original_refs", "=", "[", "]", ",", "wiki_found_refs", "=", "[", "]", ",", "wikis_skipped_no_refs", "=", "0", ",", "wikis_skipped_short_lead", "=", "0", ",", "num_wikis_written", "=", "0", ")", "ref_files_by_shard", "=", "_references_files_by_shard", "(", "refs_dir", ")", "for", "shard_id", "in", "shard_ids", ":", "tf", ".", "logging", ".", "info", "(", "\"Processing shard %d\"", ",", "shard_id", ")", "wiki_urls", "=", "_wiki_urls_for_shard", "(", "shard_id", ",", "urls_dir", ")", "tf", ".", "logging", ".", "info", "(", "\"Loaded wiki URLs for shard\"", ")", "refs_content", "=", "_references_content", "(", "ref_files_by_shard", "[", "shard_id", "]", ")", "tf", ".", "logging", ".", "info", "(", "\"Loaded reference content for shard\"", ")", "for", "i", ",", "wiki", "in", "enumerate", "(", "_wiki_articles", "(", "shard_id", ",", "wikis_dir", ")", ")", ":", "if", "not", "i", "%", "1000", ":", "tf", ".", "logging", ".", "info", "(", "\"Processing wiki index %d for shard %d\"", ",", "i", ",", "shard_id", ")", "stats", "[", "\"total_original_wikis\"", "]", "+=", "1", "# Get reference content", "wiki_ref_content", "=", "[", "]", "ref_urls", "=", "wiki_urls", "[", "wiki", ".", "url", "]", "[", "\"refs\"", "]", "stats", "[", "\"total_original_refs\"", "]", "+=", "len", "(", "ref_urls", ")", "stats_wiki_original_refs", "=", "len", "(", "ref_urls", ")", "stats_wiki_found_refs", "=", "0", "for", "ref_url", "in", "ref_urls", ":", "ref_content", "=", "refs_content", ".", "get", "(", "ref_url", ")", "if", "not", "ref_content", ":", "continue", "stats", "[", "\"total_found_refs\"", "]", "+=", "1", "stats", "[", "\"ref_lengths\"", "]", ".", "append", "(", "len", "(", "ref_content", ")", ")", "stats_wiki_found_refs", "+=", "1", "wiki_ref_content", ".", "append", "(", "ref_content", ")", "stats", "[", "\"wiki_original_refs\"", "]", ".", "append", "(", "stats_wiki_original_refs", ")", "stats", "[", "\"wiki_found_refs\"", "]", ".", "append", "(", "stats_wiki_found_refs", ")", "if", "not", "wiki_ref_content", "or", "len", "(", "wiki_ref_content", ")", "<", "_MIN_REFS", ":", "# No/few refs were found", "stats", "[", "\"wikis_skipped_no_refs\"", "]", "+=", "1", "continue", "# Rank reference paragraphs with TFIDF", "wiki_title", "=", "_normalize_text", "(", "wiki", ".", "title", ")", "ranked_paragraphs", "=", "rank_reference_paragraphs", "(", "wiki_title", ",", "wiki_ref_content", ")", "# Construct inputs from Wiki title and references", "inputs", "=", "[", "]", "inputs", ".", "extend", "(", "vocab", ".", "encode", "(", "wiki_title", ")", ")", "inputs", ".", "extend", "(", "eot_ids", ")", "for", "paragraph", "in", "ranked_paragraphs", ":", "if", "len", "(", "inputs", ")", ">=", "1e6", ":", "break", "paragraph", "+=", "\" \"", "inputs", ".", "extend", "(", "vocab", ".", "encode", "(", "paragraph", ")", ")", "# Construct targets from article sections", "targets", ",", "section_boundaries", "=", "_encode_wiki_sections", "(", "wiki", ".", "sections", ",", "vocab", ")", "# Skip if lead section is too short", "if", "(", "not", "section_boundaries", "or", "section_boundaries", "[", "0", "]", "<", "_MIN_LEADSECTION_TOKENS", ")", ":", "stats", "[", "\"wikis_skipped_short_lead\"", "]", "+=", "1", "continue", "inputs", ".", "append", "(", "text_encoder", ".", "EOS_ID", ")", "targets", ".", "append", "(", "text_encoder", ".", "EOS_ID", ")", "stats", "[", "\"num_wikis_written\"", "]", "+=", "1", "yield", "{", "\"inputs\"", ":", "inputs", ",", "\"targets\"", ":", "targets", ",", "\"section_boundaries\"", ":", "section_boundaries", ",", "}", "tf", ".", "logging", ".", "info", "(", "\"Total: %d, Skipped: %d\"", ",", "stats", "[", "\"num_wikis_written\"", "]", ",", "stats", "[", "\"total_original_wikis\"", "]", "-", "stats", "[", "\"num_wikis_written\"", "]", ")", "tf", ".", "logging", ".", "info", "(", "\"Total refs: %d, Skipped refs: %d\"", ",", "stats", "[", "\"total_found_refs\"", "]", ",", "stats", "[", "\"total_original_refs\"", "]", "-", "stats", "[", "\"total_found_refs\"", "]", ")", "stats_fname", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "split", "(", "out_filepaths", "[", "0", "]", ")", "[", "0", "]", ",", "\"stats.%d.json\"", "%", "shard_ids", "[", "0", "]", ")", "with", "tf", ".", "gfile", ".", "Open", "(", "stats_fname", ",", "\"w\"", ")", "as", "f", ":", "f", ".", "write", "(", "json", ".", "dumps", "(", "stats", ")", ")", "generator_utils", ".", "generate_files", "(", "example_generator", "(", ")", ",", "out_filepaths", ")" ]
Produce examples from shard_ids to out_filepaths.
[ "Produce", "examples", "from", "shard_ids", "to", "out_filepaths", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L382-L481
train
Produce examples from shard_ids to out_filepaths.
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(0b110000) + '\x6f' + '\x32' + chr(1530 - 1480) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(54) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(5603 - 5492) + chr(0b100000 + 0o23) + chr(946 - 897) + '\x34', 0o10), ehT0Px3KOsy9(chr(897 - 849) + chr(0b111110 + 0o61) + '\061' + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011111 + 0o20) + chr(1732 - 1681) + chr(0b110100) + chr(1536 - 1485), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(841 - 792) + '\067' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1231 - 1183) + chr(0b1100111 + 0o10) + chr(0b10010 + 0o40) + chr(50) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(4660 - 4549) + chr(0b110 + 0o55) + chr(2251 - 2196) + '\061', 14344 - 14336), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b1101111) + '\061' + chr(0b10010 + 0o43) + chr(0b110101), 50214 - 50206), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(420 - 371) + chr(0b100011 + 0o16) + '\062', 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1000011 + 0o54) + chr(0b110110) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1953 - 1905) + '\x6f' + chr(1172 - 1123) + chr(0b1101 + 0o47) + chr(709 - 659), 50986 - 50978), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101100 + 0o5) + chr(0b110011) + chr(0b1100 + 0o45), 57028 - 57020), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110110) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(49) + chr(1287 - 1237) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(1431 - 1379) + chr(2115 - 2067), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b1001 + 0o47) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11000 + 0o32) + chr(453 - 401) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(437 - 389) + chr(0b10000 + 0o137) + chr(1380 - 1330), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + chr(878 - 827) + chr(54), 0o10), ehT0Px3KOsy9(chr(635 - 587) + chr(0b110 + 0o151) + '\062' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1987 - 1939) + '\x6f' + '\x33' + '\x31' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(1428 - 1374) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + '\061' + chr(0b11001 + 0o35) + chr(1477 - 1429), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110110) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + '\063' + '\x37' + chr(1938 - 1888), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1110 + 0o43) + chr(0b1100 + 0o53) + chr(2227 - 2174), 57405 - 57397), ehT0Px3KOsy9('\x30' + chr(6886 - 6775) + chr(0b100101 + 0o15) + chr(0b1010 + 0o54) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(676 - 628) + '\157' + chr(0b110010) + chr(0b100 + 0o62) + chr(0b1000 + 0o53), 23771 - 23763), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11 + 0o57) + chr(2443 - 2389) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110101 + 0o72) + chr(49) + '\066' + chr(2499 - 2445), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011 + 0o1) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b110000) + chr(0b1110 + 0o42), 32317 - 32309), ehT0Px3KOsy9(chr(48) + chr(9267 - 9156) + '\x33' + '\064' + chr(0b11101 + 0o27), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + chr(0b110100), 59511 - 59503), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + '\x32' + '\x34' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1010 + 0o51) + chr(875 - 822) + chr(0b110110), 6867 - 6859), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(50) + chr(0b1 + 0o57), 11807 - 11799), ehT0Px3KOsy9(chr(68 - 20) + chr(10921 - 10810) + '\x33' + chr(55) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3657 - 3546) + chr(50) + '\x30', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + chr(0b1000 + 0o50), 48561 - 48553)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\157' + chr(6082 - 5982) + chr(9606 - 9505))('\x75' + chr(0b1110100) + chr(102) + chr(0b1011 + 0o42) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NxASpKTCdvQP(XZ9siQVw3bD1, rV4_crPT4JCr, qLmyxt0mfJCP, qxmuzav3KxFS, rbbFI9rmibl3, BDf4LNLQyop3): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), chr(100) + '\x65' + chr(4862 - 4763) + chr(111) + '\144' + chr(0b1100100 + 0o1))('\165' + chr(116) + '\146' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x82\xa3o\x86\x08\xe0\x90\x03-\x15G=\xd5=\x8e\xb1\xd3v>`\xa3T\x02\xd2\x89]\xd9\xdd\xc5\x19\x07\xe5\x80$\xc8\x9b\xe4\x8fe\xe5\xd0\xaae\x8f\x1e\xe0\xd7'), chr(100) + chr(101) + chr(9312 - 9213) + chr(0b100110 + 0o111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(2400 - 2298) + chr(0b101101) + chr(0b0 + 0o70)), c2A0yzQpDQB3(XZ9siQVw3bD1), c2A0yzQpDQB3(BDf4LNLQyop3)) mSU6gEqYPk2T = nCRDzZ_Is9fz.SubwordTextEncoder(rbbFI9rmibl3) AAgm_FBnU146 = mSU6gEqYPk2T.encode(wFpvMbipo2yi) def nZtIZFekDpdL(): hkfs4IaeBuiq = wLqBDw8l0eIm(total_original_wikis=ehT0Px3KOsy9('\x30' + chr(11276 - 11165) + chr(587 - 539), 39167 - 39159), total_original_refs=ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + chr(103 - 55), 8), total_found_refs=ehT0Px3KOsy9('\060' + chr(111) + '\060', 8), ref_lengths=[], wiki_original_refs=[], wiki_found_refs=[], wikis_skipped_no_refs=ehT0Px3KOsy9(chr(515 - 467) + chr(0b1101111) + chr(48), 8), wikis_skipped_short_lead=ehT0Px3KOsy9(chr(1545 - 1497) + chr(111) + '\060', 8), num_wikis_written=ehT0Px3KOsy9('\060' + chr(5867 - 5756) + '\x30', 8)) RCiE7nJaNpWH = _ylyOeLshe1N(qLmyxt0mfJCP) for GlVrV0lc39s3 in XZ9siQVw3bD1: xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), '\x64' + chr(4995 - 4894) + '\x63' + chr(111) + '\144' + '\145')(chr(0b1001101 + 0o50) + chr(1118 - 1002) + chr(3028 - 2926) + chr(225 - 180) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x82\xa3o\x86\x08\xe0\x90\x03-\x15\x111\x94&\x84\xe1\x83f'), chr(0b1000010 + 0o42) + chr(0b1010 + 0o133) + chr(2045 - 1946) + chr(111) + chr(100) + '\145')('\165' + '\x74' + chr(3904 - 3802) + chr(0b101101) + '\070'), GlVrV0lc39s3) mWJgOHmA57Vq = zcBETxaM8VrH(GlVrV0lc39s3, qxmuzav3KxFS) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), chr(0b110 + 0o136) + '\x65' + chr(4979 - 4880) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(4797 - 4680) + '\164' + chr(0b1100110) + chr(45) + chr(0b111 + 0o61)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x9f\xadh\x86\x1f\xb3\x8e\x04!\\B\x0c\xa7\x18\x93\xe1\xc0ml3\xb8]\x11\xc4\x9e'), chr(7793 - 7693) + chr(0b1100101) + chr(0b100000 + 0o103) + chr(2896 - 2785) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(12965 - 12849) + chr(0b111100 + 0o52) + chr(0b101101) + '\070')) xUQtxWM5XGxV = aQxnzl9mHyjK(RCiE7nJaNpWH[GlVrV0lc39s3]) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), '\144' + chr(0b1000000 + 0o45) + chr(99) + chr(111) + chr(0b1001000 + 0o34) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(5189 - 5087) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x9f\xadh\x86\x1f\xb3\x8b\x08,P\x10<\x9b7\x85\xe1\xc5mpg\xae[\x04\x96\x9c\x12\xc2\x93\xc2\x1eF\xb2\x80'), chr(0b11000 + 0o114) + chr(0b1100101) + chr(9280 - 9181) + '\157' + '\x64' + '\x65')(chr(0b1001111 + 0o46) + chr(0b10 + 0o162) + chr(0b111 + 0o137) + chr(45) + chr(0b111000))) for (WVxHKyX45z_L, pyvOjsn0b3hh) in YlkZvXL8qwsX(tY99wE2IBtQ7(GlVrV0lc39s3, rV4_crPT4JCr)): if not WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b110001) + chr(0b1010 + 0o55) + '\065' + chr(1302 - 1254), 0o10): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(0b111011 + 0o52))('\165' + chr(0b1110100) + chr(8623 - 8521) + chr(1570 - 1525) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1\x82\xa3o\x86\x08\xe0\x90\x03-\x15\x150\x9e=\xc0\xa8\xc8f{k\xeb\x10\x14\x96\x9c\x12\xc2\x93\xc2\x1eF\xb2\x80$\x82\x8a'), '\x64' + chr(0b1000100 + 0o41) + '\143' + chr(8831 - 8720) + chr(100) + '\x65')('\x75' + chr(116) + '\x66' + '\055' + '\070'), WVxHKyX45z_L, GlVrV0lc39s3) hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xfc\x8b\x04-\\\x0c8\x99\x0b\x97\xa8\xcdkm'), chr(100) + chr(101) + chr(0b10001 + 0o122) + '\x6f' + chr(0b1100100) + chr(9395 - 9294))('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(331 - 275))] += ehT0Px3KOsy9(chr(48) + '\x6f' + chr(91 - 42), 0o10) AtX8jNRuXAgZ = [] TC516QjOgvVa = mWJgOHmA57Vq[pyvOjsn0b3hh.url][xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\x95\xaa\x7f'), chr(2658 - 2558) + chr(0b1100101) + chr(0b10111 + 0o114) + chr(0b1101111) + chr(0b1111 + 0o125) + '\145')(chr(0b1000101 + 0o60) + chr(1536 - 1420) + '\146' + '\x2d' + '\x38')] hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xfc\x8b\x04-\\\x0c8\x99\x0b\x92\xa4\xc0q'), chr(9224 - 9124) + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(101))(chr(0b100101 + 0o120) + chr(116) + '\x66' + '\055' + '\x38')] += c2A0yzQpDQB3(TC516QjOgvVa) jFd1BE8hcYEH = c2A0yzQpDQB3(TC516QjOgvVa) n0TlAvljvF8k = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x30', 8) for MSlxi_PkLL7m in TC516QjOgvVa: HAdeonHmfsru = xUQtxWM5XGxV.get(MSlxi_PkLL7m) if not HAdeonHmfsru: continue hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xf5\x96\x18$Q=+\x902\x93'), chr(0b1100001 + 0o3) + '\x65' + chr(8390 - 8291) + '\x6f' + chr(0b1100100) + chr(6952 - 6851))(chr(117) + chr(116) + chr(102) + '\x2d' + chr(0b100110 + 0o22))] += ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001), 8) xafqLlk3kkUe(hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\x95\xaaS\x8f\x1e\xfd\x9e\x19"F'), chr(0b11110 + 0o106) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(0b1000101 + 0o60) + chr(5909 - 5793) + '\146' + '\x2d' + chr(641 - 585))], xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), '\x64' + chr(101) + chr(0b1001011 + 0o30) + chr(7658 - 7547) + chr(6951 - 6851) + chr(0b1100101))(chr(0b10110 + 0o137) + chr(9531 - 9415) + chr(0b1100110) + chr(45) + '\070'))(c2A0yzQpDQB3(HAdeonHmfsru)) n0TlAvljvF8k += ehT0Px3KOsy9('\x30' + chr(0b101001 + 0o106) + '\061', 8) xafqLlk3kkUe(AtX8jNRuXAgZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), '\144' + chr(0b1010110 + 0o17) + chr(99) + chr(0b101000 + 0o107) + chr(0b1100100) + chr(240 - 139))(chr(5679 - 5562) + '\164' + chr(0b1100100 + 0o2) + chr(775 - 730) + '\070'))(HAdeonHmfsru) xafqLlk3kkUe(hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\x99\xa7e\xbc\x14\xe1\x90\n#[\x035\xaa&\x85\xa7\xd5'), chr(0b11101 + 0o107) + chr(0b10 + 0o143) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(4218 - 4101) + chr(0b1110100) + '\x66' + chr(0b11111 + 0o16) + chr(0b111000))], xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), '\x64' + chr(3600 - 3499) + chr(3490 - 3391) + '\157' + '\144' + chr(101))('\165' + chr(620 - 504) + chr(102) + '\055' + chr(0b11101 + 0o33)))(jFd1BE8hcYEH) xafqLlk3kkUe(hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b"\xe6\x99\xa7e\xbc\x1d\xfc\x8c\x03.j\x10<\x93'"), chr(0b1100100) + chr(101) + chr(0b1 + 0o142) + chr(1019 - 908) + chr(7666 - 7566) + chr(3775 - 3674))(chr(9429 - 9312) + '\x74' + chr(0b1011001 + 0o15) + chr(0b10010 + 0o33) + '\070')], xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), chr(0b110100 + 0o60) + chr(0b1101 + 0o130) + chr(7809 - 7710) + chr(111) + chr(0b1001001 + 0o33) + chr(101))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + '\x38'))(n0TlAvljvF8k) if not AtX8jNRuXAgZ or c2A0yzQpDQB3(AtX8jNRuXAgZ) < _zuCZ49TwmWi: hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\x99\xa7e\x90$\xe0\x92\x04:E\x07=\xaa:\x8f\x9e\xd4gx`'), chr(0b1100100) + '\145' + chr(3174 - 3075) + '\x6f' + '\144' + chr(0b1011010 + 0o13))(chr(0b1110101) + '\x74' + chr(0b1100101 + 0o1) + chr(360 - 315) + '\x38')] += ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(0b100101 + 0o14), 8) continue VPk0hpdHYFEp = XEo4xAzhxnF1(pyvOjsn0b3hh.title) B29743bRXwmx = e1XgXfrZ19NN(VPk0hpdHYFEp, AtX8jNRuXAgZ) vXoupepMtCXU = [] xafqLlk3kkUe(vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x88\xb8i\x8d\x1f'), chr(3201 - 3101) + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(mSU6gEqYPk2T, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x9e\xafc\x87\x1e'), chr(0b1100100) + chr(7039 - 6938) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(2540 - 2423) + chr(116) + '\146' + '\055' + chr(2300 - 2244)))(VPk0hpdHYFEp)) xafqLlk3kkUe(vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x88\xb8i\x8d\x1f'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(9586 - 9486) + chr(0b1100101))(chr(10538 - 10421) + '\x74' + chr(0b111001 + 0o55) + chr(45) + chr(2372 - 2316)))(AAgm_FBnU146) for jxbOO5ZYnxlv in B29743bRXwmx: if c2A0yzQpDQB3(vXoupepMtCXU) >= 1000000.0: break jxbOO5ZYnxlv += xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1'), '\x64' + '\x65' + '\x63' + chr(111) + chr(0b1101 + 0o127) + chr(0b110100 + 0o61))(chr(117) + '\x74' + chr(102) + '\055' + chr(0b111000)) xafqLlk3kkUe(vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x88\xb8i\x8d\x1f'), chr(0b1000001 + 0o43) + '\145' + chr(0b1100011) + chr(0b111010 + 0o65) + chr(3245 - 3145) + chr(0b1100101))('\165' + chr(0b1110 + 0o146) + '\146' + chr(85 - 40) + chr(2382 - 2326)))(xafqLlk3kkUe(mSU6gEqYPk2T, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x9e\xafc\x87\x1e'), chr(8511 - 8411) + '\x65' + chr(0b1010000 + 0o23) + '\157' + chr(669 - 569) + chr(101))(chr(12736 - 12619) + chr(0b1000000 + 0o64) + chr(102) + chr(0b1100 + 0o41) + chr(0b110101 + 0o3)))(jxbOO5ZYnxlv)) (xIEmRseySp3z, CdoSiK1OPWnH) = n60kvXzeG2Id(pyvOjsn0b3hh.sections, mSU6gEqYPk2T) if not CdoSiK1OPWnH or CdoSiK1OPWnH[ehT0Px3KOsy9(chr(48) + '\x6f' + chr(48), 8)] < lYCXscSF3S3g: hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b"\xe6\x99\xa7e\x90$\xe0\x92\x04:E\x07=\xaa'\x88\xae\xd4vA\x7f\xaeT\x14"), '\x64' + '\145' + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + '\146' + chr(0b101101) + chr(0b111000))] += ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(851 - 802), 8) continue xafqLlk3kkUe(vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), chr(1544 - 1444) + '\x65' + chr(0b1011001 + 0o12) + chr(0b10 + 0o155) + chr(0b1100100) + chr(9414 - 9313))(chr(0b1110101) + chr(0b1110100) + chr(5431 - 5329) + '\x2d' + '\x38'))(xafqLlk3kkUe(nCRDzZ_Is9fz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xbf\x9fS\xaa?'), '\144' + chr(101) + chr(3952 - 3853) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(0b100 + 0o64)))) xafqLlk3kkUe(xIEmRseySp3z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\x80\xbci\x8d\x1f'), chr(0b1100 + 0o130) + chr(0b1100101) + chr(0b1100011) + chr(10379 - 10268) + '\144' + '\x65')(chr(117) + chr(0b101001 + 0o113) + chr(0b1100110) + chr(45) + chr(2104 - 2048)))(xafqLlk3kkUe(nCRDzZ_Is9fz, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\xbf\x9fS\xaa?'), chr(0b1100100) + '\x65' + chr(0b110101 + 0o56) + chr(111) + chr(1320 - 1220) + chr(0b1100101))(chr(117) + chr(3040 - 2924) + chr(0b1100110) + '\x2d' + chr(56)))) hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\x85\xa1S\x94\x12\xf8\x90\x1e\x15B\x100\x81 \x85\xaf'), chr(0b1010111 + 0o15) + '\x65' + '\143' + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + '\x74' + chr(3049 - 2947) + chr(0b1010 + 0o43) + chr(1897 - 1841))] += ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + chr(49), 8) yield {xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x9e\xbcy\x97\x08'), '\x64' + chr(0b1100101) + chr(2537 - 2438) + chr(0b1011100 + 0o23) + chr(0b1100100) + chr(0b1100101))(chr(0b1101000 + 0o15) + chr(0b1001101 + 0o47) + chr(8411 - 8309) + '\055' + '\x38'): vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x91\xbek\x86\x0f\xe0'), chr(0b1100100) + chr(0b11 + 0o142) + chr(0b1100011) + chr(0b1101111) + '\144' + '\x65')(chr(0b0 + 0o165) + '\164' + chr(0b1010010 + 0o24) + '\055' + '\070'): xIEmRseySp3z, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2\x95\xafx\x8a\x14\xfd\xa6\x0f%@\x0c=\x94&\x89\xa4\xd5'), chr(0b10111 + 0o115) + chr(101) + chr(99) + chr(5062 - 4951) + chr(100) + '\x65')(chr(0b111011 + 0o72) + chr(116) + chr(0b1000011 + 0o43) + chr(142 - 97) + '\070'): CdoSiK1OPWnH} xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), chr(0b10001 + 0o123) + '\x65' + chr(99) + chr(111) + chr(100) + chr(0b111000 + 0o55))(chr(2826 - 2709) + chr(0b1010110 + 0o36) + chr(4343 - 4241) + chr(858 - 813) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\x9f\xb8m\x8fA\xb3\xdc\tf\x1512\x9c$\x90\xa4\xc28>6\xaf'), '\144' + '\145' + chr(3765 - 3666) + '\x6f' + chr(7625 - 7525) + chr(0b100 + 0o141))('\x75' + '\x74' + chr(557 - 455) + chr(492 - 447) + chr(0b111000)), hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\x85\xa1S\x94\x12\xf8\x90\x1e\x15B\x100\x81 \x85\xaf'), '\x64' + chr(0b111111 + 0o46) + chr(0b0 + 0o143) + '\157' + chr(0b110101 + 0o57) + chr(0b101111 + 0o66))(chr(117) + chr(3181 - 3065) + '\146' + chr(0b101101) + '\x38')], hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xfc\x8b\x04-\\\x0c8\x99\x0b\x97\xa8\xcdkm'), '\144' + chr(7362 - 7261) + '\143' + chr(111) + chr(4356 - 4256) + chr(2078 - 1977))('\x75' + '\x74' + chr(0b100011 + 0o103) + chr(45) + chr(56))] - hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\x85\xa1S\x94\x12\xf8\x90\x1e\x15B\x100\x81 \x85\xaf'), chr(1708 - 1608) + chr(8011 - 7910) + chr(7869 - 7770) + '\157' + chr(6632 - 6532) + chr(8779 - 8678))(chr(12012 - 11895) + chr(6888 - 6772) + '\x66' + chr(45) + chr(472 - 416))]) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2\xc7\x84t\x96\x18\xf4\xce\x07&o\t'), chr(1913 - 1813) + chr(0b1100101) + chr(9310 - 9211) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + '\x74' + '\x66' + chr(531 - 486) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\x9f\xb8m\x8f[\xe1\x9c\x0b9\x0fB|\x91x\xc0\x92\xcdknc\xaeQP\xc4\x9f\x1b\xc3\x89\x91SC'), '\144' + chr(0b101000 + 0o75) + chr(0b11101 + 0o106) + '\157' + chr(100) + '\x65')(chr(0b100111 + 0o116) + '\164' + chr(0b1010110 + 0o20) + '\055' + '\070'), hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xf5\x96\x18$Q=+\x902\x93'), '\x64' + chr(0b10011 + 0o122) + '\143' + chr(0b1100101 + 0o12) + chr(0b1010000 + 0o24) + '\145')('\165' + '\x74' + '\146' + chr(721 - 676) + chr(56))], hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xfc\x8b\x04-\\\x0c8\x99\x0b\x92\xa4\xc0q'), chr(0b1001011 + 0o31) + chr(0b1100101) + '\143' + '\157' + chr(0b1100100) + chr(101))(chr(5069 - 4952) + '\x74' + '\x66' + '\x2d' + chr(1620 - 1564))] - hkfs4IaeBuiq[xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\x9f\xb8m\x8f$\xf5\x96\x18$Q=+\x902\x93'), chr(100) + '\145' + chr(4659 - 4560) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(116) + chr(270 - 168) + '\055' + '\070')]) RjFFo2I7mqJ9 = oqhJDdMJfuwx.path.join(oqhJDdMJfuwx.path.split(BDf4LNLQyop3[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110000), 8)])[ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + '\060', 8)], xafqLlk3kkUe(SXOLrMavuUCe(b'\xe2\x84\xadx\x90U\xb6\x9dC F\r7'), chr(100) + chr(0b111100 + 0o51) + chr(0b101111 + 0o64) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(10715 - 10599) + chr(9379 - 9277) + '\x2d' + chr(0b111000)) % XZ9siQVw3bD1[ehT0Px3KOsy9('\x30' + chr(111) + chr(48), 8)]) with xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\xde\x80\xa9b'), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(245 - 146) + chr(0b1101111) + chr(5202 - 5102) + chr(5664 - 5563))(chr(594 - 477) + chr(10124 - 10008) + chr(0b1100110) + '\x2d' + chr(0b10100 + 0o44)))(RjFFo2I7mqJ9, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6'), '\x64' + chr(0b1100101) + chr(3265 - 3166) + chr(0b1101111) + chr(3533 - 3433) + chr(101))(chr(0b1110101) + chr(5529 - 5413) + chr(0b1100110) + chr(45) + '\070')) as EGyt1xfPT1P6: xafqLlk3kkUe(EGyt1xfPT1P6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\x82\xa5x\x86'), chr(1963 - 1863) + '\145' + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b111110 + 0o50) + '\055' + chr(56)))(xafqLlk3kkUe(fXk443epxtd5, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\x85\xa1|\x90'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))(chr(117) + chr(0b1110100) + chr(286 - 184) + chr(45) + chr(56)))(hkfs4IaeBuiq)) xafqLlk3kkUe(g1Z_RG9zP4cD, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\x95\xa2i\x91\x1a\xe7\x9c2,\\\x0e<\x86'), chr(100) + chr(0b1100101) + '\x63' + chr(111) + chr(2917 - 2817) + '\x65')('\165' + chr(116) + chr(8424 - 8322) + '\055' + '\x38'))(nZtIZFekDpdL(), BDf4LNLQyop3)
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
_encode_wiki_sections
def _encode_wiki_sections(sections, vocab): """Encodes sections with vocab. Returns ids and section boundaries.""" ids = [] section_boundaries = [] for i, section in enumerate(sections): if i > 0: # Skip including article title ids.extend(vocab.encode(_format_title(_normalize_text(section.title)))) ids.extend(vocab.encode(_normalize_text(section.text))) section_boundaries.append(len(ids)) return ids, section_boundaries
python
def _encode_wiki_sections(sections, vocab): """Encodes sections with vocab. Returns ids and section boundaries.""" ids = [] section_boundaries = [] for i, section in enumerate(sections): if i > 0: # Skip including article title ids.extend(vocab.encode(_format_title(_normalize_text(section.title)))) ids.extend(vocab.encode(_normalize_text(section.text))) section_boundaries.append(len(ids)) return ids, section_boundaries
[ "def", "_encode_wiki_sections", "(", "sections", ",", "vocab", ")", ":", "ids", "=", "[", "]", "section_boundaries", "=", "[", "]", "for", "i", ",", "section", "in", "enumerate", "(", "sections", ")", ":", "if", "i", ">", "0", ":", "# Skip including article title", "ids", ".", "extend", "(", "vocab", ".", "encode", "(", "_format_title", "(", "_normalize_text", "(", "section", ".", "title", ")", ")", ")", ")", "ids", ".", "extend", "(", "vocab", ".", "encode", "(", "_normalize_text", "(", "section", ".", "text", ")", ")", ")", "section_boundaries", ".", "append", "(", "len", "(", "ids", ")", ")", "return", "ids", ",", "section_boundaries" ]
Encodes sections with vocab. Returns ids and section boundaries.
[ "Encodes", "sections", "with", "vocab", ".", "Returns", "ids", "and", "section", "boundaries", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L488-L499
train
Encodes sections with vocab. Returns ids and section boundaries.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYv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fmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110011) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(687 - 639) + chr(12242 - 12131) + chr(0b10000 + 0o45) + chr(1179 - 1127), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + '\x35' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(801 - 753) + chr(5017 - 4906) + chr(0b1000 + 0o52) + '\067' + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b110000 + 0o77) + chr(0b11100 + 0o27) + chr(55) + chr(0b110110), 8344 - 8336), ehT0Px3KOsy9(chr(0b110000) + chr(5304 - 5193) + chr(244 - 192) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(12289 - 12178) + chr(50) + '\064' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(0b110111) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(823 - 775) + chr(0b1000010 + 0o55) + chr(50) + chr(0b110011) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\061' + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b101100 + 0o4) + chr(0b110111), 12191 - 12183), ehT0Px3KOsy9(chr(126 - 78) + '\157' + chr(374 - 325) + chr(50) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100000 + 0o22) + chr(0b110010) + chr(0b110101), 44447 - 44439), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11010 + 0o31) + '\064', 19210 - 19202), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11110 + 0o23) + chr(0b101101 + 0o7) + chr(0b101110 + 0o4), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\067' + chr(2368 - 2318), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b11000 + 0o127) + '\062' + chr(0b110001) + '\064', 39422 - 39414), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\061' + chr(0b0 + 0o62), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(48) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(134 - 86) + chr(5502 - 5391) + chr(50) + '\067' + '\x31', 0b1000), ehT0Px3KOsy9(chr(742 - 694) + '\x6f' + '\061' + '\063', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(0b110010) + '\060' + chr(0b101101 + 0o12), 39231 - 39223), ehT0Px3KOsy9('\060' + '\x6f' + '\065' + chr(2248 - 2199), 17080 - 17072), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(980 - 869) + chr(0b110110) + chr(672 - 618), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4324 - 4213) + chr(1087 - 1037) + '\x34' + chr(53), 8435 - 8427), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + '\x31' + chr(0b110000) + chr(0b11101 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + chr(0b11100 + 0o27), 0o10), ehT0Px3KOsy9('\x30' + chr(0b101000 + 0o107) + '\062' + '\x34' + chr(2388 - 2334), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7738 - 7627) + '\062' + chr(0b10 + 0o60) + chr(1607 - 1552), 14920 - 14912), ehT0Px3KOsy9(chr(2293 - 2245) + chr(111) + '\x33' + chr(0b110010), 56758 - 56750), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(548 - 498), 65494 - 65486), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\063' + chr(1357 - 1306) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o22) + chr(0b100111 + 0o14) + '\x32', 42186 - 42178), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31', 9158 - 9150), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(50) + '\x36' + '\064', 4752 - 4744), ehT0Px3KOsy9('\060' + chr(11091 - 10980) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\x34' + '\x35', 39031 - 39023), ehT0Px3KOsy9('\060' + '\157' + chr(1900 - 1850) + chr(1952 - 1903) + chr(2103 - 2050), 42015 - 42007)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(751 - 640) + '\x35' + chr(514 - 466), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), chr(100) + chr(1203 - 1102) + chr(0b101 + 0o136) + chr(0b100011 + 0o114) + chr(4028 - 3928) + '\145')('\165' + '\164' + chr(689 - 587) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def n60kvXzeG2Id(osRv5CFR3cO5, mSU6gEqYPk2T): zdjj2pRemk_P = [] CdoSiK1OPWnH = [] for (WVxHKyX45z_L, zhibvHFgaDZW) in YlkZvXL8qwsX(osRv5CFR3cO5): if WVxHKyX45z_L > ehT0Px3KOsy9(chr(630 - 582) + chr(7808 - 7697) + chr(48), 11712 - 11704): xafqLlk3kkUe(zdjj2pRemk_P, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfeT\xd8\xde\x90F'), chr(295 - 195) + chr(0b1100101) + '\143' + '\x6f' + chr(100) + '\145')(chr(117) + '\164' + chr(102) + chr(427 - 382) + '\x38'))(xafqLlk3kkUe(mSU6gEqYPk2T, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfeB\xcf\xd4\x9aG'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(0b1011010 + 0o12) + '\145')('\165' + '\x74' + '\x66' + chr(0b101101) + '\x38'))(MEpsYNnJuien(XEo4xAzhxnF1(xafqLlk3kkUe(zhibvHFgaDZW, xafqLlk3kkUe(SXOLrMavuUCe(b'\xefE\xd8\xd7\x9b'), '\144' + chr(101) + chr(99) + chr(0b1101111 + 0o0) + chr(3303 - 3203) + chr(101))('\165' + chr(0b1110100) + '\x66' + '\x2d' + '\070')))))) xafqLlk3kkUe(zdjj2pRemk_P, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfeT\xd8\xde\x90F'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(117) + chr(0b1110100) + chr(4424 - 4322) + chr(793 - 748) + chr(56)))(xafqLlk3kkUe(mSU6gEqYPk2T, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfeB\xcf\xd4\x9aG'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101000 + 0o7) + '\x64' + '\145')(chr(117) + '\164' + chr(6720 - 6618) + '\055' + '\070'))(XEo4xAzhxnF1(xafqLlk3kkUe(zhibvHFgaDZW, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdaD\x9d\xc9\xb7LK\xc4O\xa5\x87\xa5'), chr(0b1 + 0o143) + '\x65' + '\x63' + '\x6f' + chr(0b1 + 0o143) + '\145')(chr(392 - 275) + chr(0b1110100) + chr(102) + '\055' + chr(56)))))) xafqLlk3kkUe(CdoSiK1OPWnH, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa\\\xdc\xde\x90F'), chr(100) + chr(0b1100101) + chr(3651 - 3552) + '\157' + '\144' + '\x65')(chr(117) + '\164' + '\x66' + chr(45) + '\x38'))(c2A0yzQpDQB3(zdjj2pRemk_P)) return (zdjj2pRemk_P, CdoSiK1OPWnH)
tensorflow/tensor2tensor
tensor2tensor/data_generators/wikisum/wikisum.py
extract_references_from_wets
def extract_references_from_wets(wet_files, metadata_dir, out_dir, tmp_dir=None): """Extract references from WET files into sharded output files.""" # Setup output files shard_files = make_ref_shard_files(out_dir) num_refs = 0 for i, wet_file in enumerate(wet_files): num_refs_in_wet = 0 tf.logging.info("Processing file %d", i) # Read metadata file metadata_fname = os.path.join( metadata_dir, os.path.basename(wet_file)) + cc_utils.METADTA_SUFFIX with tf.gfile.Open(cc_utils.readahead(metadata_fname)) as f: wet_metadata = json.loads(f.read()) if not wet_metadata: # No references in this WET file continue if wet_file.startswith("http"): # download if not tmp_dir: tmp_dir = tempfile.gettempdir() record_gen = cc_utils.wet_records_from_url(wet_file, tmp_dir) else: # local record_gen = cc_utils.wet_records_from_file_obj( cc_utils.gzip_memfile(wet_file), take_ownership=True) for wet_record in record_gen: shard_ids = wet_metadata.get(wet_record.url) if not shard_ids: # URL not in dataset continue # Serialize and write out ex = _make_example_from_record(wet_record) ex_str = ex.SerializeToString() for shard_id in shard_ids: shard_files[shard_id].write(ex_str) num_refs += 1 num_refs_in_wet += 1 tf.logging.info("Wrote out %d references for this WET", num_refs_in_wet) tf.logging.info("Wrote out %d references total", num_refs) # Cleanup for shard_file in shard_files: shard_file.close()
python
def extract_references_from_wets(wet_files, metadata_dir, out_dir, tmp_dir=None): """Extract references from WET files into sharded output files.""" # Setup output files shard_files = make_ref_shard_files(out_dir) num_refs = 0 for i, wet_file in enumerate(wet_files): num_refs_in_wet = 0 tf.logging.info("Processing file %d", i) # Read metadata file metadata_fname = os.path.join( metadata_dir, os.path.basename(wet_file)) + cc_utils.METADTA_SUFFIX with tf.gfile.Open(cc_utils.readahead(metadata_fname)) as f: wet_metadata = json.loads(f.read()) if not wet_metadata: # No references in this WET file continue if wet_file.startswith("http"): # download if not tmp_dir: tmp_dir = tempfile.gettempdir() record_gen = cc_utils.wet_records_from_url(wet_file, tmp_dir) else: # local record_gen = cc_utils.wet_records_from_file_obj( cc_utils.gzip_memfile(wet_file), take_ownership=True) for wet_record in record_gen: shard_ids = wet_metadata.get(wet_record.url) if not shard_ids: # URL not in dataset continue # Serialize and write out ex = _make_example_from_record(wet_record) ex_str = ex.SerializeToString() for shard_id in shard_ids: shard_files[shard_id].write(ex_str) num_refs += 1 num_refs_in_wet += 1 tf.logging.info("Wrote out %d references for this WET", num_refs_in_wet) tf.logging.info("Wrote out %d references total", num_refs) # Cleanup for shard_file in shard_files: shard_file.close()
[ "def", "extract_references_from_wets", "(", "wet_files", ",", "metadata_dir", ",", "out_dir", ",", "tmp_dir", "=", "None", ")", ":", "# Setup output files", "shard_files", "=", "make_ref_shard_files", "(", "out_dir", ")", "num_refs", "=", "0", "for", "i", ",", "wet_file", "in", "enumerate", "(", "wet_files", ")", ":", "num_refs_in_wet", "=", "0", "tf", ".", "logging", ".", "info", "(", "\"Processing file %d\"", ",", "i", ")", "# Read metadata file", "metadata_fname", "=", "os", ".", "path", ".", "join", "(", "metadata_dir", ",", "os", ".", "path", ".", "basename", "(", "wet_file", ")", ")", "+", "cc_utils", ".", "METADTA_SUFFIX", "with", "tf", ".", "gfile", ".", "Open", "(", "cc_utils", ".", "readahead", "(", "metadata_fname", ")", ")", "as", "f", ":", "wet_metadata", "=", "json", ".", "loads", "(", "f", ".", "read", "(", ")", ")", "if", "not", "wet_metadata", ":", "# No references in this WET file", "continue", "if", "wet_file", ".", "startswith", "(", "\"http\"", ")", ":", "# download", "if", "not", "tmp_dir", ":", "tmp_dir", "=", "tempfile", ".", "gettempdir", "(", ")", "record_gen", "=", "cc_utils", ".", "wet_records_from_url", "(", "wet_file", ",", "tmp_dir", ")", "else", ":", "# local", "record_gen", "=", "cc_utils", ".", "wet_records_from_file_obj", "(", "cc_utils", ".", "gzip_memfile", "(", "wet_file", ")", ",", "take_ownership", "=", "True", ")", "for", "wet_record", "in", "record_gen", ":", "shard_ids", "=", "wet_metadata", ".", "get", "(", "wet_record", ".", "url", ")", "if", "not", "shard_ids", ":", "# URL not in dataset", "continue", "# Serialize and write out", "ex", "=", "_make_example_from_record", "(", "wet_record", ")", "ex_str", "=", "ex", ".", "SerializeToString", "(", ")", "for", "shard_id", "in", "shard_ids", ":", "shard_files", "[", "shard_id", "]", ".", "write", "(", "ex_str", ")", "num_refs", "+=", "1", "num_refs_in_wet", "+=", "1", "tf", ".", "logging", ".", "info", "(", "\"Wrote out %d references for this WET\"", ",", "num_refs_in_wet", ")", "tf", ".", "logging", ".", "info", "(", "\"Wrote out %d references total\"", ",", "num_refs", ")", "# Cleanup", "for", "shard_file", "in", "shard_files", ":", "shard_file", ".", "close", "(", ")" ]
Extract references from WET files into sharded output files.
[ "Extract", "references", "from", "WET", "files", "into", "sharded", "output", "files", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wikisum/wikisum.py#L506-L557
train
Extract references from WET files into sharded output files.
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,cW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dqgHmVpI,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(1335 - 1287) + '\157' + chr(0b110101) + chr(1722 - 1667), 24812 - 24804), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\065' + '\067', 23260 - 23252), ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(0b110110) + chr(2297 - 2244), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101000 + 0o11) + chr(0b11100 + 0o26) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3106 - 2995) + chr(729 - 680) + chr(51) + chr(657 - 609), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(0b100111 + 0o13) + chr(1331 - 1283) + chr(0b1101 + 0o44), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2375 - 2324) + chr(52) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(2795 - 2684) + chr(125 - 70) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b11111 + 0o22) + chr(722 - 670) + chr(0b110110), 46656 - 46648), ehT0Px3KOsy9('\x30' + chr(4519 - 4408) + '\x31' + chr(1789 - 1736) + chr(48), 0b1000), ehT0Px3KOsy9(chr(536 - 488) + chr(111) + chr(0b100100 + 0o16) + chr(55) + chr(1852 - 1799), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(230 - 180), 41027 - 41019), ehT0Px3KOsy9('\x30' + '\157' + '\x37' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1011 + 0o52) + '\061', 0b1000), ehT0Px3KOsy9(chr(71 - 23) + chr(111) + chr(2575 - 2524) + '\065' + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b0 + 0o157) + '\062' + chr(1197 - 1145) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(7935 - 7824) + chr(1692 - 1643) + chr(0b101 + 0o54) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(1805 - 1750) + chr(1974 - 1924), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2033 - 1982) + '\062' + chr(1609 - 1556), 0b1000), ehT0Px3KOsy9(chr(1329 - 1281) + chr(111) + '\061' + '\x35' + chr(53), 45641 - 45633), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(0b0 + 0o62) + chr(0b110100) + chr(495 - 444), 9197 - 9189), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10110 + 0o36) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + chr(0b1001 + 0o53) + chr(0b10100 + 0o42), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(2437 - 2385) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\067' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(1828 - 1775), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110 + 0o54) + chr(54) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6880 - 6769) + chr(0b100110 + 0o16) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(1908 - 1858) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111110 + 0o61) + chr(51) + chr(367 - 313) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + chr(779 - 729) + chr(359 - 304), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100 + 0o143) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\061' + chr(54) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101000 + 0o11) + chr(54) + chr(0b110000), 8), ehT0Px3KOsy9(chr(1496 - 1448) + chr(0b1011110 + 0o21) + chr(2294 - 2245) + chr(0b10111 + 0o37) + chr(2817 - 2762), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(1341 - 1290) + chr(1036 - 988) + chr(0b10100 + 0o36), 0b1000), ehT0Px3KOsy9(chr(1538 - 1490) + '\x6f' + chr(2483 - 2433) + chr(0b10110 + 0o36) + '\x30', 8), ehT0Px3KOsy9(chr(857 - 809) + '\157' + chr(0b110001) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(5249 - 5138) + '\063' + '\x30' + '\064', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(156 - 108) + chr(0b1 + 0o156) + chr(0b11 + 0o62) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x01'), chr(3504 - 3404) + chr(0b1100101 + 0o0) + '\x63' + chr(111) + chr(337 - 237) + '\x65')(chr(0b1000111 + 0o56) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def mScrTEwj_DeO(sWMMKbfcZoi6, puuGPEjQSLYy, fd1Es8BcupHw, JsZ36NJUqtml=None): vh5rjzOTztSy = BsqwSPL7jVuK(fd1Es8BcupHw) lDKv3SsMva_B = ehT0Px3KOsy9(chr(48) + chr(4505 - 4394) + chr(1597 - 1549), 45950 - 45942) for (WVxHKyX45z_L, rmenhByCfD5S) in YlkZvXL8qwsX(sWMMKbfcZoi6): Xj3_qjXqTPgd = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110000), 8) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xd8}.-\xe2\x85\x0b\x0c\x04\xe7a'), chr(100) + '\145' + '\x63' + '\x6f' + chr(100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(1705 - 1649)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f\x9dZ5=\xf2\x91U\x08\x0f\x9dlVE\x88\x87i^'), '\144' + '\145' + '\143' + chr(0b1100101 + 0o12) + chr(0b0 + 0o144) + chr(0b1100101))(chr(2793 - 2676) + chr(0b1110100) + '\x66' + chr(1742 - 1697) + '\x38'), WVxHKyX45z_L) EsIYMxNV3jSR = oqhJDdMJfuwx.path.join(puuGPEjQSLYy, oqhJDdMJfuwx.path.basename(rmenhByCfD5S)) + XmqMBK3UrkR5.METADTA_SUFFIX with xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'`\x9fP8'), chr(100) + '\x65' + '\x63' + chr(0b1000111 + 0o50) + chr(0b10 + 0o142) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + chr(1967 - 1922) + chr(56)))(xafqLlk3kkUe(XmqMBK3UrkR5, xafqLlk3kkUe(SXOLrMavuUCe(b']\x8aT29\xe9\x87]\x02'), '\144' + chr(0b1100101) + '\143' + '\157' + '\144' + chr(0b1000000 + 0o45))(chr(281 - 164) + chr(0b1000111 + 0o55) + '\x66' + chr(45) + chr(203 - 147)))(EsIYMxNV3jSR)) as EGyt1xfPT1P6: bTD2Z9JXcD30 = fXk443epxtd5.loads(EGyt1xfPT1P6.U6MiWrhuCi2Y()) if not bTD2Z9JXcD30: continue if xafqLlk3kkUe(rmenhByCfD5S, xafqLlk3kkUe(SXOLrMavuUCe(b'\\\x9bT$,\xf2\x95U\x12\x00'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'G\x9bA&'), chr(0b1100100) + chr(101) + chr(1143 - 1044) + chr(111) + chr(3348 - 3248) + '\145')(chr(0b1001100 + 0o51) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56))): if not JsZ36NJUqtml: JsZ36NJUqtml = IvD8hQuFpT7c.gettempdir() sqm1RuU42C82 = XmqMBK3UrkR5.wet_records_from_url(rmenhByCfD5S, JsZ36NJUqtml) else: sqm1RuU42C82 = XmqMBK3UrkR5.wet_records_from_file_obj(XmqMBK3UrkR5.gzip_memfile(rmenhByCfD5S), take_ownership=ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + '\061', ord("\x08"))) for kGMeuMGqZIX4 in sqm1RuU42C82: XZ9siQVw3bD1 = bTD2Z9JXcD30.get(kGMeuMGqZIX4.url) if not XZ9siQVw3bD1: continue DfdhY28yEwAF = rqIg_PZ7BksT(kGMeuMGqZIX4) vi7bj1mjgMZU = DfdhY28yEwAF.SerializeToString() for GlVrV0lc39s3 in XZ9siQVw3bD1: xafqLlk3kkUe(vh5rjzOTztSy[GlVrV0lc39s3], xafqLlk3kkUe(SXOLrMavuUCe(b'X\x9d\\"='), chr(100) + chr(0b100 + 0o141) + chr(0b1100011) + chr(0b1001110 + 0o41) + chr(8483 - 8383) + '\x65')('\x75' + chr(0b100010 + 0o122) + chr(102) + chr(0b100100 + 0o11) + chr(56)))(vi7bj1mjgMZU) lDKv3SsMva_B += ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001), 8) Xj3_qjXqTPgd += ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061', 8) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xd8}.-\xe2\x85\x0b\x0c\x04\xe7a'), chr(2434 - 2334) + chr(0b110100 + 0o61) + chr(3071 - 2972) + chr(9326 - 9215) + chr(100) + chr(101))('\x75' + chr(116) + chr(1738 - 1636) + chr(0b1011 + 0o42) + chr(1597 - 1541)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\x9dZ"=\xa1\x8dI\x12H\x98n\x1f[\x88\xc1)H\xb0\x03\xc0BU\x80\x98z\xc0\x03b\x9b\xfeqPn5#'), chr(4961 - 4861) + chr(2280 - 2179) + chr(99) + chr(0b1101111) + '\x64' + chr(8248 - 8147))('\165' + chr(0b1110100) + chr(0b1100000 + 0o6) + chr(0b101101) + chr(0b11011 + 0o35)), Xj3_qjXqTPgd) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xd8}.-\xe2\x85\x0b\x0c\x04\xe7a'), '\x64' + chr(7191 - 7090) + chr(0b1100011) + chr(0b1101111) + chr(0b1010001 + 0o23) + chr(230 - 129))(chr(0b10100 + 0o141) + '\164' + chr(1844 - 1742) + chr(0b1100 + 0o41) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\x9dZ"=\xa1\x8dI\x12H\x98n\x1f[\x88\xc1)H\xb0\x03\xc0BU\x80\x8az\xc6Bz'), chr(4545 - 4445) + chr(0b0 + 0o145) + '\x63' + '\157' + '\144' + '\145')('\x75' + chr(0b1110100) + '\146' + '\055' + chr(0b111000)), lDKv3SsMva_B) for ELpyS6BsS4yK in vh5rjzOTztSy: xafqLlk3kkUe(ELpyS6BsS4yK, xafqLlk3kkUe(SXOLrMavuUCe(b'L\x83Z%='), chr(0b1100100) + chr(9261 - 9160) + '\143' + chr(0b111010 + 0o65) + '\x64' + chr(101))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(0b11 + 0o65)))()
tensorflow/tensor2tensor
tensor2tensor/data_generators/wiki.py
_dump_to_pages
def _dump_to_pages(dump): """Extract pages from an xml dump. Args: dump: a unicode string Returns: a list of unicode strings """ pos = 0 ret = [] start_tag = u"<page>\n" end_tag = u"</page>\n" while True: start_pos = dump.find(start_tag, pos) if start_pos == -1: break start_pos += len(start_tag) end_pos = dump.find(end_tag, start_pos) if end_pos == -1: break ret.append(dump[start_pos:end_pos]) pos = end_pos + len(end_tag) return ret
python
def _dump_to_pages(dump): """Extract pages from an xml dump. Args: dump: a unicode string Returns: a list of unicode strings """ pos = 0 ret = [] start_tag = u"<page>\n" end_tag = u"</page>\n" while True: start_pos = dump.find(start_tag, pos) if start_pos == -1: break start_pos += len(start_tag) end_pos = dump.find(end_tag, start_pos) if end_pos == -1: break ret.append(dump[start_pos:end_pos]) pos = end_pos + len(end_tag) return ret
[ "def", "_dump_to_pages", "(", "dump", ")", ":", "pos", "=", "0", "ret", "=", "[", "]", "start_tag", "=", "u\"<page>\\n\"", "end_tag", "=", "u\"</page>\\n\"", "while", "True", ":", "start_pos", "=", "dump", ".", "find", "(", "start_tag", ",", "pos", ")", "if", "start_pos", "==", "-", "1", ":", "break", "start_pos", "+=", "len", "(", "start_tag", ")", "end_pos", "=", "dump", ".", "find", "(", "end_tag", ",", "start_pos", ")", "if", "end_pos", "==", "-", "1", ":", "break", "ret", ".", "append", "(", "dump", "[", "start_pos", ":", "end_pos", "]", ")", "pos", "=", "end_pos", "+", "len", "(", "end_tag", ")", "return", "ret" ]
Extract pages from an xml dump. Args: dump: a unicode string Returns: a list of unicode strings
[ "Extract", "pages", "from", "an", "xml", "dump", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wiki.py#L245-L267
train
Extract pages from an xml dump. Returns a list of unicode strings Arguments : dump a unicode string Returns : a list of unicode strings
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0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C9iu2kLpS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(420 - 372) + '\157' + chr(0b100101 + 0o14) + chr(0b1100 + 0o50) + chr(1457 - 1408), 17473 - 17465), ehT0Px3KOsy9(chr(1939 - 1891) + '\x6f' + '\x31' + chr(55) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + '\x32' + chr(51) + '\066', 2064 - 2056), ehT0Px3KOsy9('\060' + '\157' + chr(0b10010 + 0o45), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3422 - 3311) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + chr(2477 - 2426) + chr(53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(0b10010 + 0o45) + chr(1013 - 965), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + chr(0b110001) + chr(1352 - 1304) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b100101 + 0o22) + chr(2087 - 2039), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(55) + chr(1608 - 1560), 8), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\060' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(336 - 288) + chr(111) + chr(2478 - 2428) + chr(49) + '\x30', 0o10), ehT0Px3KOsy9('\060' + chr(10713 - 10602) + chr(0b110011) + '\064' + '\x34', 0o10), ehT0Px3KOsy9(chr(663 - 615) + chr(2181 - 2070) + chr(818 - 769) + chr(0b110110) + chr(2415 - 2361), 34467 - 34459), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(92 - 41) + '\060' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110101) + chr(1828 - 1775), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b110100) + chr(0b11010 + 0o34), 31512 - 31504), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + chr(308 - 257) + chr(1547 - 1498) + chr(662 - 607), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(1589 - 1539) + chr(51), 58171 - 58163), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1079 - 1028) + chr(49) + chr(0b111 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(6021 - 5910) + chr(0b110011) + chr(0b100 + 0o60) + '\x36', 8), ehT0Px3KOsy9('\060' + chr(0b1001000 + 0o47) + chr(2313 - 2261) + chr(172 - 122), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9993 - 9882) + '\062' + '\064' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(4817 - 4706) + chr(0b110010) + '\x35' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(0b110010) + chr(54) + chr(53), 63006 - 62998), ehT0Px3KOsy9('\060' + chr(10657 - 10546) + '\x32' + '\x34' + chr(0b1111 + 0o47), 29648 - 29640), ehT0Px3KOsy9(chr(1912 - 1864) + '\x6f' + chr(51) + '\067' + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110010) + chr(0b110110), 7727 - 7719), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + '\062' + '\062' + chr(0b1001 + 0o47), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(872 - 822) + chr(462 - 410) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6884 - 6773) + chr(53) + '\x33', 0o10), ehT0Px3KOsy9(chr(1053 - 1005) + '\x6f' + chr(0b110001) + chr(1946 - 1891) + chr(1302 - 1254), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001011 + 0o44) + '\062' + '\x30' + chr(0b110101), 9537 - 9529), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(1351 - 1303) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(52) + chr(150 - 98), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\066' + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(915 - 860), 0o10), ehT0Px3KOsy9(chr(1631 - 1583) + chr(0b111011 + 0o64) + '\061' + '\064' + chr(2505 - 2452), 0o10), ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + chr(0b100101 + 0o13), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2162 - 2112) + chr(1923 - 1869) + chr(0b110000), 6046 - 6038)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(429 - 376) + chr(0b110000 + 0o0), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'O'), chr(100) + '\x65' + chr(0b1001011 + 0o30) + chr(0b1101111) + chr(100) + chr(0b101100 + 0o71))('\x75' + chr(1572 - 1456) + '\146' + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def zHCD2c50xG55(XsRuywm9RqIP): NXd0aqYJd4lK = ehT0Px3KOsy9('\060' + '\x6f' + chr(48), 8) VHn4CV4Ymrei = [] s3YL5j0e2Qjz = xafqLlk3kkUe(SXOLrMavuUCe(b']\x0f\xff`v\xd6\xb2'), '\144' + chr(101) + chr(0b1100011) + chr(722 - 611) + chr(0b10101 + 0o117) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(1383 - 1338) + chr(56)) qyOSPuET048v = xafqLlk3kkUe(SXOLrMavuUCe(b']P\xeeft\x8d\x86M'), '\144' + chr(0b1100001 + 0o4) + chr(99) + chr(9954 - 9843) + chr(0b1100100) + chr(101))(chr(0b1011110 + 0o27) + chr(116) + chr(4028 - 3926) + chr(0b10111 + 0o26) + '\070') while ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001), 0b1000): hDRa8Mx_sca6 = XsRuywm9RqIP.find(s3YL5j0e2Qjz, NXd0aqYJd4lK) if hDRa8Mx_sca6 == -ehT0Px3KOsy9(chr(1168 - 1120) + chr(0b1100100 + 0o13) + chr(49), 8): break hDRa8Mx_sca6 += c2A0yzQpDQB3(s3YL5j0e2Qjz) QlnLpa5TXz3x = XsRuywm9RqIP.find(qyOSPuET048v, hDRa8Mx_sca6) if QlnLpa5TXz3x == -ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 8): break xafqLlk3kkUe(VHn4CV4Ymrei, xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\x0f\xeeb}\x8c'), chr(100) + chr(4782 - 4681) + chr(0b1011 + 0o130) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(8611 - 8495) + '\146' + chr(0b101101) + '\070'))(XsRuywm9RqIP[hDRa8Mx_sca6:QlnLpa5TXz3x]) NXd0aqYJd4lK = QlnLpa5TXz3x + c2A0yzQpDQB3(qyOSPuET048v) return VHn4CV4Ymrei
tensorflow/tensor2tensor
tensor2tensor/data_generators/wiki.py
_page_to_title
def _page_to_title(page): """Extract the title from a page. Args: page: a unicode string Returns: a unicode string """ # print("page=%s" % page) start_tag = u"<title>" end_tag = u"</title>" start_pos = page.find(start_tag) end_pos = page.find(end_tag) assert start_pos != -1 assert end_pos != -1 start_pos += len(start_tag) return page[start_pos:end_pos]
python
def _page_to_title(page): """Extract the title from a page. Args: page: a unicode string Returns: a unicode string """ # print("page=%s" % page) start_tag = u"<title>" end_tag = u"</title>" start_pos = page.find(start_tag) end_pos = page.find(end_tag) assert start_pos != -1 assert end_pos != -1 start_pos += len(start_tag) return page[start_pos:end_pos]
[ "def", "_page_to_title", "(", "page", ")", ":", "# print(\"page=%s\" % page)", "start_tag", "=", "u\"<title>\"", "end_tag", "=", "u\"</title>\"", "start_pos", "=", "page", ".", "find", "(", "start_tag", ")", "end_pos", "=", "page", ".", "find", "(", "end_tag", ")", "assert", "start_pos", "!=", "-", "1", "assert", "end_pos", "!=", "-", "1", "start_pos", "+=", "len", "(", "start_tag", ")", "return", "page", "[", "start_pos", ":", "end_pos", "]" ]
Extract the title from a page. Args: page: a unicode string Returns: a unicode string
[ "Extract", "the", "title", "from", "a", "page", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wiki.py#L270-L286
train
Extract the title from a page.
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,hO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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(1771 - 1723) + '\x6f' + chr(2427 - 2377) + chr(2379 - 2327) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1010110 + 0o31) + chr(49) + '\063' + '\x37', 9684 - 9676), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + chr(0b101010 + 0o10) + chr(966 - 912) + '\x30', 48979 - 48971), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + chr(0b110010) + chr(1938 - 1888) + '\063', 55225 - 55217), ehT0Px3KOsy9(chr(1220 - 1172) + chr(0b1101111) + chr(874 - 825) + '\063' + chr(49), 59886 - 59878), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\x32' + chr(0b110001) + chr(0b100 + 0o55), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(206 - 156) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(50) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(50) + '\x37' + chr(0b11110 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(1038 - 989) + chr(1272 - 1222), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x31' + chr(55), 0b1000), ehT0Px3KOsy9(chr(448 - 400) + chr(10802 - 10691) + chr(0b100010 + 0o21) + chr(51) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(1440 - 1392) + chr(9859 - 9748) + chr(1104 - 1053), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(51) + chr(48) + chr(0b110001 + 0o2), 25426 - 25418), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(49) + chr(0b100100 + 0o20) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x33' + chr(0b110110), 42233 - 42225), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(2836 - 2725) + chr(671 - 620) + '\061' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(54) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + chr(2125 - 2074) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(0b10 + 0o60) + '\066', 0b1000), ehT0Px3KOsy9(chr(1597 - 1549) + chr(0b1001 + 0o146) + '\061' + chr(0b1011 + 0o50) + chr(281 - 227), 8), ehT0Px3KOsy9(chr(0b110000) + chr(8299 - 8188) + chr(0b100011 + 0o16) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(1617 - 1569) + '\x6f' + chr(0b10010 + 0o41) + '\x36' + chr(0b10100 + 0o34), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b110111) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(6387 - 6276) + chr(51) + chr(926 - 877) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2591 - 2540) + chr(54) + chr(2656 - 2604), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(50) + chr(0b10001 + 0o41) + chr(0b101001 + 0o13), 3645 - 3637), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(628 - 577) + chr(0b110111), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110001) + '\064', 25885 - 25877), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1463 - 1414) + '\061' + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(3365 - 3254) + chr(0b111 + 0o52) + '\x35' + chr(0b110000), 15929 - 15921), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b110011 + 0o1) + chr(1661 - 1610), 0b1000), ehT0Px3KOsy9('\060' + chr(4479 - 4368) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1010101 + 0o32) + chr(0b110111) + chr(0b11110 + 0o24), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\x36' + '\x37', 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b1010110 + 0o31) + chr(51) + chr(49) + chr(52), 8), ehT0Px3KOsy9(chr(1079 - 1031) + chr(0b100000 + 0o117) + chr(0b110011) + chr(0b110110) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(799 - 744) + chr(1342 - 1290), 8), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + '\066', 8), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + chr(50) + chr(0b110110) + chr(1889 - 1837), 34205 - 34197)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\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'\x8f'), chr(9043 - 8943) + chr(101) + chr(2967 - 2868) + chr(0b1101111) + chr(0b101 + 0o137) + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def HWbZ55RGWqi3(Voe3WRW7deL_): s3YL5j0e2Qjz = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d+\xd9\xe75\xec-'), chr(3403 - 3303) + chr(0b1001000 + 0o35) + chr(0b1001000 + 0o33) + chr(0b110101 + 0o72) + '\x64' + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(910 - 865) + '\x38') qyOSPuET048v = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9dp\xc4\xfa-\xe5v\xa8'), chr(222 - 122) + chr(101) + chr(0b111100 + 0o47) + chr(0b1101111) + '\144' + '\x65')('\x75' + '\164' + '\146' + chr(0b101 + 0o50) + '\070') hDRa8Mx_sca6 = Voe3WRW7deL_.find(s3YL5j0e2Qjz) QlnLpa5TXz3x = Voe3WRW7deL_.find(qyOSPuET048v) assert hDRa8Mx_sca6 != -ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061', 40331 - 40323) assert QlnLpa5TXz3x != -ehT0Px3KOsy9(chr(48) + chr(10611 - 10500) + '\x31', 8) hDRa8Mx_sca6 += c2A0yzQpDQB3(s3YL5j0e2Qjz) return Voe3WRW7deL_[hDRa8Mx_sca6:QlnLpa5TXz3x]
tensorflow/tensor2tensor
tensor2tensor/data_generators/wiki.py
_page_to_text
def _page_to_text(page): """Extract the text from a page. Args: page: a unicode string Returns: a unicode string """ # text start tag looks like "<text ..otherstuff>" start_pos = page.find(u"<text") assert start_pos != -1 end_tag_pos = page.find(u">", start_pos) assert end_tag_pos != -1 end_tag_pos += len(u">") end_pos = page.find(u"</text>") if end_pos == -1: return u"" return page[end_tag_pos:end_pos]
python
def _page_to_text(page): """Extract the text from a page. Args: page: a unicode string Returns: a unicode string """ # text start tag looks like "<text ..otherstuff>" start_pos = page.find(u"<text") assert start_pos != -1 end_tag_pos = page.find(u">", start_pos) assert end_tag_pos != -1 end_tag_pos += len(u">") end_pos = page.find(u"</text>") if end_pos == -1: return u"" return page[end_tag_pos:end_pos]
[ "def", "_page_to_text", "(", "page", ")", ":", "# text start tag looks like \"<text ..otherstuff>\"", "start_pos", "=", "page", ".", "find", "(", "u\"<text\"", ")", "assert", "start_pos", "!=", "-", "1", "end_tag_pos", "=", "page", ".", "find", "(", "u\">\"", ",", "start_pos", ")", "assert", "end_tag_pos", "!=", "-", "1", "end_tag_pos", "+=", "len", "(", "u\">\"", ")", "end_pos", "=", "page", ".", "find", "(", "u\"</text>\"", ")", "if", "end_pos", "==", "-", "1", ":", "return", "u\"\"", "return", "page", "[", "end_tag_pos", ":", "end_pos", "]" ]
Extract the text from a page. Args: page: a unicode string Returns: a unicode string
[ "Extract", "the", "text", "from", "a", "page", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wiki.py#L289-L306
train
Extract the text from a page.
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,_bikzMu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WE,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(9421 - 9310) + '\x33' + '\x37' + '\x33', 37092 - 37084), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(571 - 460) + '\061' + '\x36' + chr(913 - 860), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\x36' + chr(0b100101 + 0o22), 51320 - 51312), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10010 + 0o44) + chr(220 - 170), 59515 - 59507), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(215 - 166) + chr(0b101 + 0o57), 37904 - 37896), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + '\x33' + chr(0b101010 + 0o10) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + '\x35', 41362 - 41354), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x33' + chr(0b110101), 49759 - 49751), ehT0Px3KOsy9('\060' + chr(0b1001101 + 0o42) + chr(0b100101 + 0o15) + '\x30' + '\x35', 0b1000), ehT0Px3KOsy9(chr(1066 - 1018) + chr(111) + chr(0b1101 + 0o45) + chr(0b11000 + 0o34) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o42) + chr(0b110010) + chr(0b110100 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31' + chr(1663 - 1612) + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + '\x32' + chr(0b110101 + 0o2), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100000 + 0o117) + '\x33' + chr(49) + '\x36', 30446 - 30438), ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + '\x32' + chr(0b110100) + '\x36', 58273 - 58265), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b0 + 0o67) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(50) + chr(53), 35101 - 35093), ehT0Px3KOsy9(chr(1693 - 1645) + '\157' + '\063' + chr(0b11110 + 0o26) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(569 - 516) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001 + 0o146) + chr(1529 - 1480) + chr(0b110111) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011 + 0o144) + chr(0b10011 + 0o36) + chr(55) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + '\061' + '\x30' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10101 + 0o132) + chr(1487 - 1437) + '\x30' + chr(158 - 110), 0o10), ehT0Px3KOsy9(chr(1855 - 1807) + chr(10189 - 10078) + '\x32' + chr(2431 - 2377) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1015 - 964) + chr(0b110001) + chr(0b11100 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(6831 - 6720) + chr(0b101100 + 0o7) + chr(1951 - 1896) + '\x33', 8), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + '\x33' + chr(0b10 + 0o56) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b10110 + 0o35) + chr(0b110010) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(52) + '\066', 41026 - 41018), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\066' + chr(0b1011 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(48) + '\060', 54991 - 54983), ehT0Px3KOsy9('\060' + chr(111) + chr(1161 - 1111) + '\067' + '\067', 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(9171 - 9060) + chr(60 - 10) + chr(0b110110) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(10741 - 10630) + chr(0b110011) + chr(0b101100 + 0o7) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1696 - 1648) + chr(4304 - 4193) + chr(979 - 930) + chr(521 - 473) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + '\060' + chr(827 - 777), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b101100 + 0o7) + chr(0b10010 + 0o36), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1010 + 0o51) + chr(51) + chr(1467 - 1418), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1 + 0o60) + chr(2479 - 2429) + chr(0b110101), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1589 - 1536) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5'), chr(100) + chr(1973 - 1872) + chr(99) + chr(362 - 251) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b110001 + 0o103) + chr(0b1100110) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def JbDnrQKYtMs3(Voe3WRW7deL_): hDRa8Mx_sca6 = Voe3WRW7deL_.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\x01\x12J\xf8'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(0b1100011) + chr(3607 - 3496) + chr(100) + chr(0b1010010 + 0o23))(chr(0b1110101) + '\x74' + '\146' + chr(45) + '\070')) assert hDRa8Mx_sca6 != -ehT0Px3KOsy9(chr(48) + '\157' + chr(49), 0o10) EZoNezFj9PBQ = Voe3WRW7deL_.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5'), '\x64' + chr(0b1000111 + 0o36) + chr(5572 - 5473) + chr(10678 - 10567) + '\x64' + chr(101))(chr(0b1110101) + chr(0b11001 + 0o133) + '\x66' + chr(0b1 + 0o54) + chr(0b1111 + 0o51)), hDRa8Mx_sca6) assert EZoNezFj9PBQ != -ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(543 - 494), 8) EZoNezFj9PBQ += c2A0yzQpDQB3(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5'), chr(0b1100100) + chr(0b100111 + 0o76) + '\143' + chr(2133 - 2022) + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000))) QlnLpa5TXz3x = Voe3WRW7deL_.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7Z\x03W\xf4l\xe9'), chr(100) + chr(763 - 662) + '\143' + chr(3019 - 2908) + chr(0b1 + 0o143) + chr(0b11110 + 0o107))(chr(0b1110101) + chr(116) + chr(0b10111 + 0o117) + '\x2d' + chr(2211 - 2155))) if QlnLpa5TXz3x == -ehT0Px3KOsy9('\x30' + chr(10479 - 10368) + chr(0b110001), 8): return xafqLlk3kkUe(SXOLrMavuUCe(b''), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(0b111011 + 0o52))(chr(4178 - 4061) + chr(6359 - 6243) + '\146' + chr(748 - 703) + '\070') return Voe3WRW7deL_[EZoNezFj9PBQ:QlnLpa5TXz3x]
tensorflow/tensor2tensor
tensor2tensor/data_generators/wiki.py
_find_and_replace
def _find_and_replace(text, start_string, end_string, replace_fn): """Remove everything found between instances of start_string and end_string. Replace each such instance with replace_fn(removed_text) e.g. _find_and_replace(u"the [[fat]] cat [[sat]]", u"[[", u"]]", lambda x: x) = u"the fat cat sat" Args: text: a unicode string start_string: a unicode string end_string: a unicode string replace_fn: a unary function from unicode string to unicode string Returns: a string """ ret = u"" current_pos = 0 while True: start_pos = text.find(start_string, current_pos) if start_pos == -1: ret += text[current_pos:] break ret += text[current_pos:start_pos] end_pos = text.find(end_string, start_pos + len(start_string)) if end_pos == -1: break ret += replace_fn(text[start_pos + len(start_string):end_pos]) current_pos = end_pos + len(end_string) return ret
python
def _find_and_replace(text, start_string, end_string, replace_fn): """Remove everything found between instances of start_string and end_string. Replace each such instance with replace_fn(removed_text) e.g. _find_and_replace(u"the [[fat]] cat [[sat]]", u"[[", u"]]", lambda x: x) = u"the fat cat sat" Args: text: a unicode string start_string: a unicode string end_string: a unicode string replace_fn: a unary function from unicode string to unicode string Returns: a string """ ret = u"" current_pos = 0 while True: start_pos = text.find(start_string, current_pos) if start_pos == -1: ret += text[current_pos:] break ret += text[current_pos:start_pos] end_pos = text.find(end_string, start_pos + len(start_string)) if end_pos == -1: break ret += replace_fn(text[start_pos + len(start_string):end_pos]) current_pos = end_pos + len(end_string) return ret
[ "def", "_find_and_replace", "(", "text", ",", "start_string", ",", "end_string", ",", "replace_fn", ")", ":", "ret", "=", "u\"\"", "current_pos", "=", "0", "while", "True", ":", "start_pos", "=", "text", ".", "find", "(", "start_string", ",", "current_pos", ")", "if", "start_pos", "==", "-", "1", ":", "ret", "+=", "text", "[", "current_pos", ":", "]", "break", "ret", "+=", "text", "[", "current_pos", ":", "start_pos", "]", "end_pos", "=", "text", ".", "find", "(", "end_string", ",", "start_pos", "+", "len", "(", "start_string", ")", ")", "if", "end_pos", "==", "-", "1", ":", "break", "ret", "+=", "replace_fn", "(", "text", "[", "start_pos", "+", "len", "(", "start_string", ")", ":", "end_pos", "]", ")", "current_pos", "=", "end_pos", "+", "len", "(", "end_string", ")", "return", "ret" ]
Remove everything found between instances of start_string and end_string. Replace each such instance with replace_fn(removed_text) e.g. _find_and_replace(u"the [[fat]] cat [[sat]]", u"[[", u"]]", lambda x: x) = u"the fat cat sat" Args: text: a unicode string start_string: a unicode string end_string: a unicode string replace_fn: a unary function from unicode string to unicode string Returns: a string
[ "Remove", "everything", "found", "between", "instances", "of", "start_string", "and", "end_string", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wiki.py#L309-L339
train
Find and replace all occurrences of start_string and end_string.
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,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IVCGgtAN,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(0b110001) + '\063' + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(1254 - 1143) + '\x34' + chr(0b110100 + 0o2), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + chr(0b110001) + '\x36' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x35' + chr(1790 - 1739), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(0b11 + 0o64) + chr(914 - 859), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b100 + 0o54) + chr(54), 40507 - 40499), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1001001 + 0o46) + chr(2464 - 2414) + chr(0b10011 + 0o36) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101000 + 0o11) + chr(0b10011 + 0o41) + chr(797 - 747), 57674 - 57666), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1 + 0o156) + chr(51) + chr(50) + '\x35', 36131 - 36123), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(10188 - 10077) + chr(2271 - 2221) + '\x34' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + chr(1549 - 1498) + chr(48) + chr(51), 0o10), ehT0Px3KOsy9(chr(324 - 276) + '\157' + chr(0b110010) + chr(0b11101 + 0o24) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(2393 - 2338) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1570 - 1522) + '\x6f' + chr(0b110010) + chr(269 - 221) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(54) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(8081 - 7970) + chr(0b1000 + 0o53) + '\067' + chr(0b110101 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(0b100111 + 0o13) + '\x32' + '\x37', 15867 - 15859), ehT0Px3KOsy9(chr(2200 - 2152) + chr(111) + chr(0b110101) + '\063', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b10011 + 0o42) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(55) + chr(0b110011), 12685 - 12677), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b100000 + 0o22) + '\x31' + chr(188 - 139), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8125 - 8014) + '\x31' + chr(0b101010 + 0o6) + '\063', 62921 - 62913), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(4297 - 4186) + '\063' + chr(1478 - 1429), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + '\x32' + chr(0b110111) + chr(0b101000 + 0o13), 1406 - 1398), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(762 - 713) + '\064' + chr(0b100010 + 0o17), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + '\x33' + chr(50) + chr(2945 - 2890), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1896 - 1846) + chr(0b10001 + 0o40) + chr(0b101010 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + '\061' + chr(1150 - 1101) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(54) + chr(590 - 539), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + chr(50) + '\x34' + chr(0b11001 + 0o30), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + chr(50) + chr(48), 7870 - 7862), ehT0Px3KOsy9(chr(749 - 701) + '\157' + '\x32' + chr(0b110011) + chr(2484 - 2432), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(8230 - 8119) + '\x32' + chr(0b110011 + 0o0) + chr(52), 8), ehT0Px3KOsy9(chr(703 - 655) + chr(7197 - 7086) + '\x33' + chr(1483 - 1434) + chr(0b110010 + 0o3), 65033 - 65025), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + '\063' + chr(0b110110) + chr(0b11101 + 0o24), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b110010 + 0o5) + chr(0b101011 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(9795 - 9684) + chr(1042 - 990) + chr(2424 - 2370), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(50) + chr(55), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(1031 - 980) + '\x36', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(0b101001 + 0o12) + chr(529 - 480), 13519 - 13511)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b1011 + 0o52) + '\x30', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b's'), '\x64' + chr(9007 - 8906) + '\x63' + chr(4735 - 4624) + chr(100) + chr(101))(chr(0b1011110 + 0o27) + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ucNTzAPznJfB(Ah1rInvg48Hb, UH_FGzZ7e4wc, vO9WT4sy9M9j, Gm1GU6Po19i9): VHn4CV4Ymrei = xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(100) + chr(101) + chr(7499 - 7400) + '\157' + '\x64' + chr(0b1100101))('\x75' + chr(0b1000110 + 0o56) + chr(4045 - 3943) + chr(45) + chr(0b111000)) ZnCbILVVYDXi = ehT0Px3KOsy9('\x30' + chr(7150 - 7039) + chr(1670 - 1622), 50455 - 50447) while ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(674 - 625), 0o10): hDRa8Mx_sca6 = Ah1rInvg48Hb.find(UH_FGzZ7e4wc, ZnCbILVVYDXi) if hDRa8Mx_sca6 == -ehT0Px3KOsy9(chr(0b110000) + chr(4379 - 4268) + '\061', 8): VHn4CV4Ymrei += Ah1rInvg48Hb[ZnCbILVVYDXi:] break VHn4CV4Ymrei += Ah1rInvg48Hb[ZnCbILVVYDXi:hDRa8Mx_sca6] QlnLpa5TXz3x = Ah1rInvg48Hb.find(vO9WT4sy9M9j, hDRa8Mx_sca6 + c2A0yzQpDQB3(UH_FGzZ7e4wc)) if QlnLpa5TXz3x == -ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49), 8): break VHn4CV4Ymrei += Gm1GU6Po19i9(Ah1rInvg48Hb[hDRa8Mx_sca6 + c2A0yzQpDQB3(UH_FGzZ7e4wc):QlnLpa5TXz3x]) ZnCbILVVYDXi = QlnLpa5TXz3x + c2A0yzQpDQB3(vO9WT4sy9M9j) return VHn4CV4Ymrei
tensorflow/tensor2tensor
tensor2tensor/data_generators/wiki.py
_remove_double_brackets
def _remove_double_brackets(text): """Remove double brackets (internal links) but leave the viewable text. Args: text: a unicode string Returns: a unicode string """ def replacement_fn(s): if u":" in s: # this is probably a category or something like that. return "" # keep the part after the bar. bar_pos = s.find(u"|") if bar_pos == -1: return s return s[bar_pos + 1:] return _find_and_replace(text, u"[[", u"]]", replacement_fn)
python
def _remove_double_brackets(text): """Remove double brackets (internal links) but leave the viewable text. Args: text: a unicode string Returns: a unicode string """ def replacement_fn(s): if u":" in s: # this is probably a category or something like that. return "" # keep the part after the bar. bar_pos = s.find(u"|") if bar_pos == -1: return s return s[bar_pos + 1:] return _find_and_replace(text, u"[[", u"]]", replacement_fn)
[ "def", "_remove_double_brackets", "(", "text", ")", ":", "def", "replacement_fn", "(", "s", ")", ":", "if", "u\":\"", "in", "s", ":", "# this is probably a category or something like that.", "return", "\"\"", "# keep the part after the bar.", "bar_pos", "=", "s", ".", "find", "(", "u\"|\"", ")", "if", "bar_pos", "==", "-", "1", ":", "return", "s", "return", "s", "[", "bar_pos", "+", "1", ":", "]", "return", "_find_and_replace", "(", "text", ",", "u\"[[\"", ",", "u\"]]\"", ",", "replacement_fn", ")" ]
Remove double brackets (internal links) but leave the viewable text. Args: text: a unicode string Returns: a unicode string
[ "Remove", "double", "brackets", "(", "internal", "links", ")", "but", "leave", "the", "viewable", "text", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/wiki.py#L352-L369
train
Remove double brackets and leave the viewable text.
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,yROw0HWBk0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,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(0b11000 + 0o30) + '\x6f' + chr(50) + chr(48) + chr(1611 - 1562), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x34', 13311 - 13303), ehT0Px3KOsy9('\060' + '\x6f' + '\x36' + chr(2699 - 2644), 0o10), ehT0Px3KOsy9(chr(1063 - 1015) + chr(0b1101111) + chr(2231 - 2182) + '\x31' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(76 - 26) + chr(2523 - 2470), 0b1000), ehT0Px3KOsy9(chr(1001 - 953) + '\157' + '\x31' + chr(0b11110 + 0o27) + chr(0b110111), 49420 - 49412), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(0b101010 + 0o7) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101010 + 0o10) + chr(0b110111) + chr(108 - 56), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + '\063' + chr(0b110010) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(6394 - 6283) + chr(2361 - 2312) + chr(1652 - 1604), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + chr(1586 - 1535) + '\x31' + '\063', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(48) + '\x33', 12386 - 12378), ehT0Px3KOsy9(chr(0b110000) + chr(871 - 760) + chr(49) + chr(0b110111) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3166 - 3055) + '\x36' + chr(54), 6582 - 6574), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(2166 - 2115) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + '\062' + chr(0b110100) + chr(0b110010 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1110 + 0o45) + chr(0b111 + 0o51) + chr(49), 0b1000), ehT0Px3KOsy9(chr(1791 - 1743) + chr(813 - 702) + chr(51) + chr(0b110110) + chr(2908 - 2854), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2204 - 2093) + chr(0b110011) + '\x35' + chr(1160 - 1108), 0b1000), ehT0Px3KOsy9(chr(1305 - 1257) + chr(0b1111 + 0o140) + '\063' + chr(48) + chr(0b110001), 8), ehT0Px3KOsy9(chr(1647 - 1599) + '\157' + chr(0b101100 + 0o5) + chr(49) + chr(664 - 612), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + chr(50) + chr(55) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(0b100 + 0o63) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1100101 + 0o12) + chr(54), 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(50) + chr(53) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(64 - 16) + chr(0b1101111) + chr(166 - 117) + '\x37' + chr(0b100100 + 0o17), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b10000 + 0o46) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11427 - 11316) + chr(0b110010) + chr(0b100010 + 0o16) + chr(0b110111), 61306 - 61298), ehT0Px3KOsy9(chr(0b110000) + chr(6249 - 6138) + chr(1710 - 1661) + chr(49) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(75 - 27) + chr(6230 - 6119) + '\061' + chr(1797 - 1743) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100000 + 0o22) + chr(0b101110 + 0o4) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1110 + 0o141) + '\x36' + chr(0b1101 + 0o45), 5011 - 5003), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + '\x33' + chr(48) + chr(1664 - 1613), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110000 + 0o77) + chr(0b110011) + chr(0b101101 + 0o11) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\065' + chr(1420 - 1372), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1100110 + 0o11) + chr(49) + chr(1154 - 1103) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1000 + 0o53) + chr(0b110011) + '\x37', 15617 - 15609), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + chr(0b100010 + 0o21) + chr(0b100 + 0o57) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x37' + '\x30', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(1561 - 1450) + chr(0b101 + 0o60) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xaf'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(0b1011110 + 0o26) + '\146' + chr(0b101 + 0o50) + chr(2670 - 2614)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def EMN8iX3Akl_0(Ah1rInvg48Hb): def LWQGjVDvsaNj(vGrByMSYMp9h): if xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb'), '\x64' + '\x65' + chr(0b1101 + 0o126) + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(0b11110 + 0o126) + '\146' + chr(45) + chr(0b111000)) in vGrByMSYMp9h: return xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b101100 + 0o70) + '\145' + chr(7000 - 6901) + chr(12270 - 12159) + '\x64' + chr(5456 - 5355))('\x75' + chr(116) + '\x66' + chr(1904 - 1859) + chr(0b110010 + 0o6)) IB2T8ScbPjSa = vGrByMSYMp9h.find(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), chr(0b110010 + 0o62) + '\145' + '\x63' + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b1010 + 0o56))) if IB2T8ScbPjSa == -ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(0b110001), 9497 - 9489): return vGrByMSYMp9h return vGrByMSYMp9h[IB2T8ScbPjSa + ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49), 8):] return ucNTzAPznJfB(Ah1rInvg48Hb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xda_'), chr(8720 - 8620) + chr(614 - 513) + chr(2700 - 2601) + chr(0b1101111) + '\144' + chr(101))(chr(0b1010 + 0o153) + chr(0b111010 + 0o72) + chr(0b1100110) + '\x2d' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcY'), chr(100) + chr(0b1011100 + 0o11) + '\x63' + '\157' + chr(0b1100100) + '\145')(chr(0b1011110 + 0o27) + chr(0b1110100) + chr(1232 - 1130) + chr(484 - 439) + chr(0b111000)), LWQGjVDvsaNj)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
image_encoder
def image_encoder(image_feat, hparams, name="image_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = image_feat image_hidden_size = hparams.image_hidden_size or hparams.hidden_size image_filter_size = hparams.image_filter_size or hparams.filter_size with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, None, hparams.attention_key_channels or image_hidden_size, hparams.attention_value_channels or image_hidden_size, image_hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.image_self_attention_type, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "image_feat_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "image_feat_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), image_filter_size, image_hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "image_feat_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "image_feat_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
python
def image_encoder(image_feat, hparams, name="image_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = image_feat image_hidden_size = hparams.image_hidden_size or hparams.hidden_size image_filter_size = hparams.image_filter_size or hparams.filter_size with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, None, hparams.attention_key_channels or image_hidden_size, hparams.attention_value_channels or image_hidden_size, image_hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.image_self_attention_type, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "image_feat_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "image_feat_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), image_filter_size, image_hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "image_feat_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "image_feat_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
[ "def", "image_encoder", "(", "image_feat", ",", "hparams", ",", "name", "=", "\"image_encoder\"", ",", "save_weights_to", "=", "None", ",", "make_image_summary", "=", "True", ")", ":", "x", "=", "image_feat", "image_hidden_size", "=", "hparams", ".", "image_hidden_size", "or", "hparams", ".", "hidden_size", "image_filter_size", "=", "hparams", ".", "image_filter_size", "or", "hparams", ".", "filter_size", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "for", "layer", "in", "range", "(", "hparams", ".", "num_encoder_layers", "or", "hparams", ".", "num_hidden_layers", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"layer_%d\"", "%", "layer", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"self_attention\"", ")", ":", "y", "=", "vqa_layers", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "None", ",", "None", ",", "hparams", ".", "attention_key_channels", "or", "image_hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "image_hidden_size", ",", "image_hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "attention_type", "=", "hparams", ".", "image_self_attention_type", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", "scale_dotproduct", "=", "hparams", ".", "scale_dotproduct", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"image_feat_self_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"image_feat_self_attention_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "with", "tf", ".", "variable_scope", "(", "\"ffn\"", ")", ":", "y", "=", "common_layers", ".", "dense_relu_dense", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "image_filter_size", ",", "image_hidden_size", ",", "dropout", "=", "hparams", ".", "relu_dropout", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"image_feat_ffn_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"image_feat_ffn_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "# if normalization is done in layer_preprocess, then it should also be done", "# on the output, since the output can grow very large, being the sum of", "# a whole stack of unnormalized layer outputs.", "return", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")" ]
A stack of self attention layers.
[ "A", "stack", "of", "self", "attention", "layers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L262-L313
train
A stack of self - attention and fermipy - dense layers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0Zk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Pdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + chr(111) + chr(902 - 851) + '\066' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(53) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(1298 - 1250) + chr(0b1101011 + 0o4) + chr(0b100001 + 0o21) + chr(1801 - 1746) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b101101 + 0o10) + chr(0b11111 + 0o30), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(0b110010) + chr(1836 - 1782), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b1110 + 0o46) + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(6752 - 6641) + '\063' + chr(51) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(805 - 757) + '\x6f' + chr(2258 - 2207) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x36' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1111 + 0o45) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101011 + 0o104) + chr(0b110011) + chr(0b101101 + 0o7) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(0b100101 + 0o14) + '\x35', 968 - 960), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(1904 - 1849) + chr(0b100011 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6236 - 6125) + chr(0b100 + 0o56) + chr(49) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(2112 - 2064) + chr(8000 - 7889) + chr(51) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o11) + chr(510 - 460) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6192 - 6081) + chr(912 - 862) + '\x32' + chr(162 - 112), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + chr(0b110011) + chr(0b110100) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(193 - 143) + '\x33' + chr(0b110101), 26109 - 26101), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(51) + chr(0b101101 + 0o5) + chr(0b11110 + 0o23), 0o10), ehT0Px3KOsy9('\060' + chr(3787 - 3676) + chr(2304 - 2253) + chr(51), 6767 - 6759), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b10100 + 0o133) + chr(0b110011) + chr(0b1111 + 0o45) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\063' + chr(0b110110), 8018 - 8010), ehT0Px3KOsy9(chr(48) + chr(7957 - 7846) + '\x33' + '\x31' + chr(2706 - 2651), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(341 - 290) + chr(0b110011) + chr(222 - 173), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b110010) + chr(0b1 + 0o63), 11122 - 11114), ehT0Px3KOsy9(chr(2085 - 2037) + chr(111) + '\062' + chr(0b110000) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x37' + '\063', 0b1000), ehT0Px3KOsy9(chr(554 - 506) + chr(8774 - 8663) + chr(0b101100 + 0o6) + '\063' + chr(54), 8), ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + chr(238 - 187) + chr(48) + chr(0b11101 + 0o30), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(52) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11101 + 0o122) + '\063' + chr(0b110000) + chr(53), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\x35' + chr(2162 - 2111), 51129 - 51121), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b10101 + 0o42) + chr(1469 - 1421), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11011 + 0o26) + chr(1842 - 1788) + chr(2667 - 2613), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4946 - 4835) + chr(1048 - 998) + chr(0b1 + 0o62) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(52) + chr(1295 - 1241), 11629 - 11621), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b110000) + '\061', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(7031 - 6920) + chr(0b1100 + 0o51) + chr(0b10100 + 0o34), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9'), '\x64' + chr(0b1100101) + chr(0b110100 + 0o57) + '\157' + chr(0b1000011 + 0o41) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b11101 + 0o33)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def BXbuAGLms8Uz(UKiMPArCVK05, n4ljua2gi1Pr, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e|I\xdc\n\x89\x00\xb4y\x99C\x80\x7f'), chr(4421 - 4321) + chr(10080 - 9979) + chr(0b1011110 + 0o5) + chr(0b1010100 + 0o33) + '\144' + '\x65')(chr(11034 - 10917) + '\x74' + chr(8886 - 8784) + '\x2d' + '\x38'), zWaF_2VBEDjk=None, NC2xHNLwzxcH=ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\x31', 0o10)): OeWW0F1dBPRQ = UKiMPArCVK05 l_vU2o7JF9Al = n4ljua2gi1Pr.image_hidden_size or n4ljua2gi1Pr.qzoyXN3kdhDL G9R_X6zhQ28U = n4ljua2gi1Pr.image_filter_size or n4ljua2gi1Pr.filter_size with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81pZ\xd2\x0e\xb4\t\xbfE\x85D\x8a}\xdf'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b11010 + 0o112) + chr(101))('\165' + '\164' + chr(4132 - 4030) + chr(0b11101 + 0o20) + chr(56)))(AIvJRzLdDfgF): for wgamNHppspXj in vQr8gNKaIaWE(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x99dE\xe4\n\xb8\x06\xb5~\x93U\xbaa\xdb\xf0ik\xe7'), chr(493 - 393) + '\145' + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(116) + chr(102) + '\055' + '\x38')) or xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9dK@\x8e0\xa6)\x8fu\xb9H\xbf'), chr(0b100110 + 0o76) + '\x65' + chr(0b100011 + 0o100) + chr(111) + '\144' + '\x65')(chr(0b100111 + 0o116) + chr(116) + chr(1875 - 1773) + '\x2d' + '\070'))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81pZ\xd2\x0e\xb4\t\xbfE\x85D\x8a}\xdf'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(6002 - 5901))('\x75' + '\164' + chr(8444 - 8342) + '\x2d' + chr(0b1 + 0o67)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9bpQ\xde\x1d\x89@\xbe'), chr(0b1100100) + '\145' + chr(0b1000110 + 0o35) + chr(4118 - 4007) + '\x64' + '\145')(chr(1974 - 1857) + chr(4390 - 4274) + chr(102) + chr(824 - 779) + chr(2558 - 2502)) % wgamNHppspXj): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81pZ\xd2\x0e\xb4\t\xbfE\x85D\x8a}\xdf'), '\144' + '\145' + chr(6963 - 6864) + '\157' + chr(0b1100100) + '\x65')(chr(10903 - 10786) + chr(0b100011 + 0o121) + chr(0b1100110) + '\055' + chr(0b1001 + 0o57)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x84tD\xdd0\xb7\x11\xae\x7f\x98S\x8cb\xd4'), '\144' + chr(9154 - 9053) + chr(0b1100011) + chr(5982 - 5871) + chr(8815 - 8715) + '\x65')('\x75' + '\164' + '\146' + chr(0b100110 + 0o7) + chr(2215 - 2159))): SqiSOtYOqOJH = HD_xNZzVlWnR.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), None, None, n4ljua2gi1Pr.attention_key_channels or l_vU2o7JF9Al, n4ljua2gi1Pr.attention_value_channels or l_vU2o7JF9Al, l_vU2o7JF9Al, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, attention_type=n4ljua2gi1Pr.image_self_attention_type, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH, scale_dotproduct=n4ljua2gi1Pr.scale_dotproduct) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94~D\xd7\n\xb5\x11\x85t\x97J\x80i\xe5\xe6ym\xe4\xe7\x95\xee'), chr(100) + chr(5458 - 5357) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1011111 + 0o7) + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x99~Z\xd6\x1c'), chr(0b101000 + 0o74) + '\x65' + '\143' + '\157' + '\x64' + '\145')(chr(0b1110101) + '\164' + chr(0b111101 + 0o51) + chr(0b10011 + 0o32) + chr(0b11111 + 0o31)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e|I\xdc\n\x89\x03\xbf{\x82x\x96h\xd6\xefSx\xe0\xe6\x84\xf3\xa5r\x8c\xf0\x90\xfcp'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(7778 - 7677))('\165' + '\164' + chr(102) + chr(0b101101) + chr(0b100 + 0o64)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92Eg\xcc \x8e\x17\xb9q\xa7I\x96'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + '\164' + chr(0b1100110) + '\x2d' + chr(0b110001 + 0o7)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(514 - 466) + chr(0b101001 + 0o106) + '\x31', 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94~D\xd7\n\xb5\x11\x85t\x97J\x80i\xe5\xe6ym\xe4\xe7\x95\xee'), chr(0b1100100) + '\x65' + '\143' + chr(111) + chr(1286 - 1186) + chr(0b1100101))(chr(0b1110101) + chr(0b110000 + 0o104) + chr(8372 - 8270) + '\x2d' + chr(731 - 675)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x99~Z\xd6\x1c'), '\144' + chr(0b1100000 + 0o5) + chr(99) + '\x6f' + chr(0b111101 + 0o47) + '\x65')(chr(0b1110101) + chr(836 - 720) + chr(0b1001000 + 0o36) + chr(45) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e|I\xdc\n\x89\x03\xbf{\x82x\x96h\xd6\xefSx\xe0\xe6\x84\xf3\xa5r\x8c\xf0\x90\xa9{\xf7O\xee\xb7L\xa6\x0e\x0b\x05\xc6\x83\xe5'), chr(0b1100100) + chr(0b1001011 + 0o32) + chr(99) + chr(0b110 + 0o151) + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(0b11110 + 0o110) + chr(45) + chr(2170 - 2114)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92Eg\xcc \x8e\x17\xb9q\xa7I\x96'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(9991 - 9875) + chr(0b1001110 + 0o30) + chr(0b101101) + '\070'))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9('\060' + '\157' + chr(49), 8))) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x81pZ\xd2\x0e\xb4\t\xbfE\x85D\x8a}\xdf'), chr(2710 - 2610) + chr(0b101010 + 0o73) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(9207 - 9105) + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x91wF'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(117) + chr(116) + '\x66' + chr(45) + '\070')): SqiSOtYOqOJH = jSKPaHwSAfVv.dense_relu_dense(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), G9R_X6zhQ28U, l_vU2o7JF9Al, dropout=n4ljua2gi1Pr.PJc0PNdBnSag) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94~D\xd7\n\xb5\x11\x85t\x97J\x80i\xe5\xe6ym\xe4\xe7\x95\xee'), chr(9006 - 8906) + chr(0b1110 + 0o127) + '\x63' + '\x6f' + chr(100) + chr(3778 - 3677))('\165' + chr(2650 - 2534) + '\146' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x99~Z\xd6\x1c'), chr(6563 - 6463) + chr(0b1100101) + chr(0b1000100 + 0o37) + chr(0b1101111) + '\144' + chr(503 - 402))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e|I\xdc\n\x89\x03\xbf{\x82x\x83k\xd4\xd6)}'), chr(100) + chr(0b1100101) + chr(9619 - 9520) + chr(0b11 + 0o154) + '\144' + chr(5612 - 5511))(chr(0b1110001 + 0o4) + chr(116) + chr(0b101 + 0o141) + chr(45) + chr(0b110011 + 0o5)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92Eg\xcc \x8e\x17\xb9q\xa7I\x96'), chr(2050 - 1950) + '\145' + chr(924 - 825) + chr(0b1001010 + 0o45) + '\x64' + chr(0b1100101))('\165' + '\164' + chr(0b1011011 + 0o13) + '\x2d' + chr(0b111000)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b10100 + 0o133) + chr(1761 - 1712), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x94~D\xd7\n\xb5\x11\x85t\x97J\x80i\xe5\xe6ym\xe4\xe7\x95\xee'), '\144' + '\145' + '\x63' + chr(0b11000 + 0o127) + chr(0b1100100) + chr(1281 - 1180))(chr(7970 - 7853) + chr(0b1100101 + 0o17) + '\146' + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x99~Z\xd6\x1c'), chr(0b1011011 + 0o11) + chr(101) + '\143' + chr(10283 - 10172) + '\x64' + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b1110 + 0o52)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e|I\xdc\n\x89\x03\xbf{\x82x\x83k\xd4\xd6|v\xe7\xe6\x91\xef\xbex\x86\xed\xbc\x861\xe0'), '\144' + '\x65' + chr(0b10111 + 0o114) + '\157' + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1010011 + 0o23) + chr(45) + chr(0b111000)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x92Eg\xcc \x8e\x17\xb9q\xa7I\x96'), chr(100) + '\145' + '\x63' + chr(111) + '\144' + chr(0b1010010 + 0o23))('\165' + chr(0b100011 + 0o121) + chr(3631 - 3529) + chr(45) + chr(1077 - 1021)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100110 + 0o13), 8))) return xafqLlk3kkUe(jSKPaHwSAfVv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9bpQ\xde\x1d\x89\x15\xa8\x7f\x86U\x8an\xdf\xfa\x7f'), '\144' + '\145' + '\143' + chr(0b1101111) + '\144' + chr(2990 - 2889))('\165' + chr(6173 - 6057) + chr(0b1100110) + chr(45) + '\070'))(OeWW0F1dBPRQ, n4ljua2gi1Pr)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
prepare_question_encoder
def prepare_question_encoder(inputs, hparams): """Prepare question encoder. Args: inputs: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention """ encoder_input = inputs # Usual case - not a packed dataset. encoder_padding = common_attention.embedding_to_padding(encoder_input) ignore_padding = common_attention.attention_bias_ignore_padding( encoder_padding) encoder_self_attention_bias = ignore_padding if hparams.pos == "timing": encoder_input = common_attention.add_timing_signal_1d(encoder_input) elif hparams.pos == "emb": encoder_input = common_attention.add_positional_embedding( encoder_input, hparams.max_length, "inputs_positional_embedding", None) return (encoder_input, encoder_self_attention_bias)
python
def prepare_question_encoder(inputs, hparams): """Prepare question encoder. Args: inputs: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention """ encoder_input = inputs # Usual case - not a packed dataset. encoder_padding = common_attention.embedding_to_padding(encoder_input) ignore_padding = common_attention.attention_bias_ignore_padding( encoder_padding) encoder_self_attention_bias = ignore_padding if hparams.pos == "timing": encoder_input = common_attention.add_timing_signal_1d(encoder_input) elif hparams.pos == "emb": encoder_input = common_attention.add_positional_embedding( encoder_input, hparams.max_length, "inputs_positional_embedding", None) return (encoder_input, encoder_self_attention_bias)
[ "def", "prepare_question_encoder", "(", "inputs", ",", "hparams", ")", ":", "encoder_input", "=", "inputs", "# Usual case - not a packed dataset.", "encoder_padding", "=", "common_attention", ".", "embedding_to_padding", "(", "encoder_input", ")", "ignore_padding", "=", "common_attention", ".", "attention_bias_ignore_padding", "(", "encoder_padding", ")", "encoder_self_attention_bias", "=", "ignore_padding", "if", "hparams", ".", "pos", "==", "\"timing\"", ":", "encoder_input", "=", "common_attention", ".", "add_timing_signal_1d", "(", "encoder_input", ")", "elif", "hparams", ".", "pos", "==", "\"emb\"", ":", "encoder_input", "=", "common_attention", ".", "add_positional_embedding", "(", "encoder_input", ",", "hparams", ".", "max_length", ",", "\"inputs_positional_embedding\"", ",", "None", ")", "return", "(", "encoder_input", ",", "encoder_self_attention_bias", ")" ]
Prepare question encoder. Args: inputs: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention
[ "Prepare", "question", "encoder", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L316-L339
train
Prepare question encoder.
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,cW7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qgHmVpI,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) + '\062' + chr(0b111 + 0o54) + chr(0b101010 + 0o11), ord("\x08")), ehT0Px3KOsy9(chr(1009 - 961) + '\157' + '\x33' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(211 - 162) + chr(55) + chr(0b110000 + 0o0), 49581 - 49573), ehT0Px3KOsy9('\060' + chr(3503 - 3392) + '\061' + '\060' + chr(91 - 37), 0b1000), ehT0Px3KOsy9('\060' + chr(12202 - 12091) + chr(49) + '\x37' + '\x35', 0b1000), ehT0Px3KOsy9(chr(1648 - 1600) + '\x6f' + chr(0b1111 + 0o44) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b11111 + 0o120) + chr(0b11010 + 0o27) + chr(2109 - 2058) + chr(0b10110 + 0o35), 2466 - 2458), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b101111 + 0o100) + '\061' + '\064' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + '\x31' + chr(0b0 + 0o67) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b111 + 0o60) + chr(1537 - 1486), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\061' + chr(0b111 + 0o57), 59157 - 59149), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11101 + 0o25) + '\066' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + '\062' + chr(0b11 + 0o56) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(9140 - 9029) + chr(51) + chr(0b0 + 0o65) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(55) + chr(0b100010 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(259 - 211) + '\157' + chr(50) + chr(0b110100) + chr(0b10101 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + chr(0b11000 + 0o31) + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110000) + '\x36', 8), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\x32' + chr(0b110010 + 0o4) + '\062', 28488 - 28480), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(228 - 177) + chr(49) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100000 + 0o22) + chr(1734 - 1684) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b100100 + 0o15) + chr(2467 - 2414) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1364 - 1316) + '\x6f' + '\061' + chr(2010 - 1960) + '\x33', 3298 - 3290), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + chr(0b1 + 0o65) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(623 - 575) + chr(6335 - 6224) + '\x31' + chr(55) + chr(777 - 725), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111100 + 0o63) + chr(0b11000 + 0o31) + chr(0b100000 + 0o25) + chr(48), 8), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + '\x33' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(1353 - 1305) + chr(111) + chr(50) + chr(1594 - 1540) + chr(0b101 + 0o53), 21684 - 21676), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(244 - 195) + '\x35' + '\064', 15761 - 15753), ehT0Px3KOsy9(chr(1833 - 1785) + chr(0b110 + 0o151) + '\x31' + chr(52) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(12038 - 11927) + chr(658 - 608) + chr(1339 - 1290) + chr(0b11110 + 0o22), 8), ehT0Px3KOsy9(chr(631 - 583) + chr(0b1101111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(55), 39058 - 39050), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\060' + '\x30', 0o10), ehT0Px3KOsy9(chr(970 - 922) + chr(111) + chr(0b10001 + 0o41) + chr(50) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(1248 - 1197) + chr(165 - 116) + chr(0b11000 + 0o36), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\066' + chr(1118 - 1070), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + '\066' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(312 - 264) + chr(0b1101111) + '\x34' + chr(0b101000 + 0o17), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(2157 - 2109), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5'), chr(100) + chr(101) + chr(0b100011 + 0o100) + chr(0b1101010 + 0o5) + chr(0b1000100 + 0o40) + chr(0b1100101))('\165' + '\x74' + '\146' + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FQpi2gqrBhvm(vXoupepMtCXU, n4ljua2gi1Pr): LDEM1Zag9l0P = vXoupepMtCXU n61t3r1Cu3zB = WOnrfm4dlYcf.embedding_to_padding(LDEM1Zag9l0P) VSBEc2df2qeY = WOnrfm4dlYcf.attention_bias_ignore_padding(n61t3r1Cu3zB) cMrr2bkEBgTQ = VSBEc2df2qeY if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5F\x1cv\x1ck\x02.\x1f\x8f\xa2\xf8'), chr(9820 - 9720) + '\x65' + chr(0b1000100 + 0o37) + chr(3883 - 3772) + chr(0b1100100) + chr(0b101101 + 0o70))('\x75' + '\164' + '\146' + chr(0b101101) + chr(0b111000))) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xefw\x15/\x13}'), chr(0b111111 + 0o45) + '\145' + '\143' + chr(0b1101111) + chr(6817 - 6717) + '\x65')(chr(117) + '\164' + '\146' + chr(45) + chr(0b111000)): LDEM1Zag9l0P = WOnrfm4dlYcf.add_timing_signal_1d(LDEM1Zag9l0P) elif xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd5F\x1cv\x1ck\x02.\x1f\x8f\xa2\xf8'), '\x64' + '\145' + '\143' + chr(111) + chr(100) + chr(0b10110 + 0o117))(chr(117) + '\x74' + chr(3289 - 3187) + '\x2d' + '\070')) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xfes\x1a'), chr(0b10100 + 0o120) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + '\x2d' + chr(0b111000)): LDEM1Zag9l0P = WOnrfm4dlYcf.add_positional_embedding(LDEM1Zag9l0P, n4ljua2gi1Pr._o7pVXAdOCRy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2p\x083\ti\x04\x14\x14\xc8\xa7\xc7\xe1x\x84\x9b\xcbS#\xdf\xad\xf1\x0c7Z\x12\x0f'), chr(2217 - 2117) + chr(101) + '\x63' + '\x6f' + chr(4074 - 3974) + '\145')('\x75' + '\x74' + chr(0b11000 + 0o116) + '\x2d' + '\x38'), None) return (LDEM1Zag9l0P, cMrr2bkEBgTQ)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
question_encoder
def question_encoder(question, question_self_attention_bias, hparams, name="question_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = question with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, question_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.question_self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "query_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "query_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "query_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "query_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
python
def question_encoder(question, question_self_attention_bias, hparams, name="question_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = question with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, question_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.question_self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "query_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "query_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "query_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "query_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
[ "def", "question_encoder", "(", "question", ",", "question_self_attention_bias", ",", "hparams", ",", "name", "=", "\"question_encoder\"", ",", "save_weights_to", "=", "None", ",", "make_image_summary", "=", "True", ")", ":", "x", "=", "question", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "for", "layer", "in", "range", "(", "hparams", ".", "num_encoder_layers", "or", "hparams", ".", "num_hidden_layers", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"layer_%d\"", "%", "layer", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"self_attention\"", ")", ":", "y", "=", "vqa_layers", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "None", ",", "question_self_attention_bias", ",", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "attention_type", "=", "hparams", ".", "question_self_attention_type", ",", "block_length", "=", "hparams", ".", "block_length", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", "scale_dotproduct", "=", "hparams", ".", "scale_dotproduct", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"query_self_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"query_self_attention_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "with", "tf", ".", "variable_scope", "(", "\"ffn\"", ")", ":", "y", "=", "common_layers", ".", "dense_relu_dense", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "hparams", ".", "filter_size", ",", "hparams", ".", "hidden_size", ",", "dropout", "=", "hparams", ".", "relu_dropout", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"query_ffn_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"query_ffn_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "# if normalization is done in layer_preprocess, then it should also be done", "# on the output, since the output can grow very large, being the sum of", "# a whole stack of unnormalized layer outputs.", "return", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")" ]
A stack of self attention layers.
[ "A", "stack", "of", "self", "attention", "layers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L342-L392
train
A stack of self - attention and ferminal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RZiUMA3VWp,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(0b1100100 + 0o13) + chr(50) + chr(0b110000) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(0b11 + 0o63) + chr(0b111 + 0o56), 19347 - 19339), ehT0Px3KOsy9('\060' + chr(7480 - 7369) + chr(0b10000 + 0o42), ord("\x08")), ehT0Px3KOsy9(chr(1878 - 1830) + '\157' + '\062' + chr(2082 - 2034) + chr(0b101101 + 0o6), 6516 - 6508), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(48) + chr(0b100100 + 0o23), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\066' + chr(208 - 160), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(0b110100 + 0o3) + chr(0b100101 + 0o21), 2174 - 2166), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b101 + 0o152) + chr(50) + chr(0b110000 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6735 - 6624) + chr(0b10011 + 0o36) + chr(52) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\065' + chr(55), 0o10), ehT0Px3KOsy9(chr(279 - 231) + chr(111) + '\063' + chr(417 - 367) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(763 - 652) + '\061' + chr(2397 - 2348) + '\063', 55005 - 54997), ehT0Px3KOsy9('\x30' + chr(7762 - 7651) + '\x31' + '\064' + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\065' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1217 - 1169) + chr(0b100001 + 0o116) + chr(2340 - 2289) + chr(0b110101) + chr(848 - 793), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b100111 + 0o12) + chr(48) + '\x36', 38051 - 38043), ehT0Px3KOsy9('\x30' + chr(2435 - 2324) + chr(0b1010 + 0o51) + chr(0b110001) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\061' + chr(1541 - 1487), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1001000 + 0o47) + '\061' + chr(1515 - 1467) + chr(535 - 483), 26078 - 26070), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b1100 + 0o50) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(0b11010 + 0o27) + chr(0b110001) + chr(0b110010), 34353 - 34345), ehT0Px3KOsy9('\x30' + chr(111) + '\067', 51486 - 51478), ehT0Px3KOsy9(chr(419 - 371) + chr(0b1010001 + 0o36) + '\x31' + '\060' + chr(50), 32298 - 32290), ehT0Px3KOsy9('\060' + '\x6f' + chr(1087 - 1037) + chr(501 - 452) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b110111) + chr(908 - 857), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10539 - 10428) + chr(638 - 585) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110001 + 0o76) + chr(0b110101) + chr(0b10110 + 0o32), 31777 - 31769), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(1507 - 1457) + chr(50), 8), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\x33' + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + '\061' + chr(0b1101 + 0o44) + chr(2272 - 2222), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(602 - 551) + '\065' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + chr(49) + '\066' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1100010 + 0o15) + chr(49) + chr(52) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(1791 - 1743) + '\x6f' + chr(0b1111 + 0o42) + '\064' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(930 - 880) + chr(0b110010 + 0o5) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1699 - 1651) + chr(0b111010 + 0o65) + chr(436 - 387) + chr(0b11011 + 0o32) + chr(1839 - 1785), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(1366 - 1315) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\062' + chr(1085 - 1036) + '\x32', 56633 - 56625), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2034 - 1983) + '\060' + chr(51), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(0b110101) + chr(0b110 + 0o52), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8'), '\144' + '\x65' + chr(99) + chr(10367 - 10256) + chr(0b1100100) + '\x65')('\165' + chr(6270 - 6154) + chr(0b1000001 + 0o45) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def bI2fyTM52NTU(hiLkQHDHvP4B, i5Aj5A5Fhh2L, n4ljua2gi1Pr, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc0g\xf03\x19\xd1|?\n\xba(\rK\x8a4'), '\144' + chr(5388 - 5287) + chr(0b110100 + 0o57) + chr(6521 - 6410) + chr(0b1100100) + chr(5781 - 5680))('\x75' + '\164' + chr(102) + chr(0b101101) + chr(0b111000)), zWaF_2VBEDjk=None, NC2xHNLwzxcH=ehT0Px3KOsy9(chr(2287 - 2239) + chr(111) + '\x31', 55213 - 55205)): OeWW0F1dBPRQ = hiLkQHDHvP4B with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xd4p\xea&\x12\xd2w?\x1c\xb7$\x12J'), chr(0b1100100) + chr(0b1100101) + chr(1641 - 1542) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + '\x74' + chr(102) + '\055' + '\070'))(AIvJRzLdDfgF): for wgamNHppspXj in vQr8gNKaIaWE(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xc0o\xdc"\x1e\xdd}\x04\n\xa6\x14\x0eN\x96#\xb8\xfd'), chr(0b10110 + 0o116) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1101110 + 0o6) + chr(3782 - 3680) + chr(0b101101) + chr(0b111000))) or xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\xefj\xb6\x18\x00\xf2G\x0f \xbb\x11'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b110001 + 0o64))('\165' + chr(6610 - 6494) + chr(102) + '\055' + chr(0b110111 + 0o1)))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xd4p\xea&\x12\xd2w?\x1c\xb7$\x12J'), '\x64' + chr(4652 - 4551) + chr(0b1100011) + chr(0b1 + 0o156) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b1101 + 0o53)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xd4{\xe65/\x9bv'), '\144' + chr(279 - 178) + '\x63' + chr(0b1101111) + chr(988 - 888) + chr(0b110111 + 0o56))(chr(0b1110101) + chr(0b1000001 + 0o63) + chr(102) + chr(0b10011 + 0o32) + '\x38') % wgamNHppspXj): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xd4p\xea&\x12\xd2w?\x1c\xb7$\x12J'), chr(9539 - 9439) + chr(0b1100101) + chr(99) + chr(11840 - 11729) + chr(0b1010000 + 0o24) + chr(0b1100101))('\165' + chr(1200 - 1084) + '\146' + chr(0b11010 + 0o23) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf5\xd0n\xe5\x18\x11\xcaf\x05\x01\xa0"\rA'), chr(0b11101 + 0o107) + chr(1339 - 1238) + '\143' + chr(8131 - 8020) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1011100 + 0o30) + chr(0b1100110) + '\055' + chr(1086 - 1030))): SqiSOtYOqOJH = HD_xNZzVlWnR.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), None, i5Aj5A5Fhh2L, n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, attention_type=n4ljua2gi1Pr.question_self_attention_type, block_length=n4ljua2gi1Pr.block_length, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH, scale_dotproduct=n4ljua2gi1Pr.scale_dotproduct) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xdan\xef"\x13\xcaM\x0e\x0e\xb9.\x06p\x803\xbe\xfe1W9'), chr(7984 - 7884) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(7201 - 7101) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xdap\xee4'), chr(0b1100100) + '\x65' + chr(5765 - 5666) + '\157' + chr(259 - 159) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(2681 - 2625)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc0g\xf1>/\xcdw\x0c\t\x8b*\x16[\x8a(\xbe\xe7+M\x15"&'), chr(100) + chr(0b1010101 + 0o20) + chr(0b1100011) + '\x6f' + chr(0b101110 + 0o66) + chr(101))('\165' + '\164' + chr(102) + chr(45) + chr(592 - 536)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xe1M\xf4\x08(\xccq\x0b>\xba8'), '\144' + chr(2050 - 1949) + '\143' + '\157' + chr(7327 - 7227) + '\x65')(chr(3582 - 3465) + chr(116) + '\x66' + chr(411 - 366) + chr(0b11011 + 0o35)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(48) + chr(1047 - 936) + chr(49), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xdan\xef"\x13\xcaM\x0e\x0e\xb9.\x06p\x803\xbe\xfe1W9'), chr(9218 - 9118) + '\x65' + chr(0b1100011) + chr(111) + chr(9584 - 9484) + '\145')(chr(117) + chr(0b1100000 + 0o24) + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xdap\xee4'), chr(9350 - 9250) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(4982 - 4865) + '\x74' + '\x66' + chr(1502 - 1457) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc0g\xf1>/\xcdw\x0c\t\x8b*\x16[\x8a(\xbe\xe7+M\x15w-\xff\x8f\\Z}8/\x99\x01vA\x03'), '\144' + chr(0b1100101) + chr(0b100111 + 0o74) + chr(2574 - 2463) + '\144' + '\x65')('\x75' + chr(11727 - 11611) + chr(5861 - 5759) + '\x2d' + '\x38') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xe1M\xf4\x08(\xccq\x0b>\xba8'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(5542 - 5442) + '\x65')(chr(13430 - 13313) + chr(0b1011101 + 0o27) + '\x66' + chr(0b100101 + 0o10) + chr(0b1011 + 0o55)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9('\060' + '\157' + chr(852 - 803), 8))) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf0\xd4p\xea&\x12\xd2w?\x1c\xb7$\x12J'), chr(100) + chr(6988 - 6887) + chr(8597 - 8498) + chr(0b1101111) + chr(0b1100100) + chr(0b111101 + 0o50))(chr(9134 - 9017) + chr(0b111010 + 0o72) + chr(0b1100110) + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\xd3l'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(6247 - 6146))('\x75' + chr(0b1110100) + chr(102) + '\055' + chr(56))): SqiSOtYOqOJH = jSKPaHwSAfVv.dense_relu_dense(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), n4ljua2gi1Pr.filter_size, n4ljua2gi1Pr.qzoyXN3kdhDL, dropout=n4ljua2gi1Pr.PJc0PNdBnSag) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xdan\xef"\x13\xcaM\x0e\x0e\xb9.\x06p\x803\xbe\xfe1W9'), chr(7161 - 7061) + '\x65' + '\x63' + chr(0b101100 + 0o103) + '\x64' + chr(101))(chr(0b1110101) + chr(10000 - 9884) + '\146' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xdap\xee4'), '\144' + '\x65' + '\143' + chr(0b1000010 + 0o55) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b101100 + 0o72) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc0g\xf1>/\xd8t\x0e0\xf1/'), chr(3373 - 3273) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1010 + 0o132) + '\145')(chr(2985 - 2868) + '\x74' + chr(0b1001001 + 0o35) + chr(0b101101) + '\070') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xe1M\xf4\x08(\xccq\x0b>\xba8'), '\x64' + chr(0b1001101 + 0o30) + '\x63' + chr(0b11010 + 0o125) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(3235 - 3133) + chr(45) + chr(1506 - 1450)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9('\x30' + chr(0b101110 + 0o101) + '\061', 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe5\xdan\xef"\x13\xcaM\x0e\x0e\xb9.\x06p\x803\xbe\xfe1W9'), '\x64' + chr(0b1100011 + 0o2) + chr(0b1100011) + '\157' + '\144' + chr(8896 - 8795))(chr(6224 - 6107) + chr(2310 - 2194) + chr(102) + chr(786 - 741) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe8\xdap\xee4'), chr(0b10010 + 0o122) + chr(0b1100101) + '\143' + chr(0b10001 + 0o136) + chr(100) + '\145')('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(1045 - 989)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\xc0g\xf1>/\xd8t\x0e0\xa4$\x11[\x9f4\xa5\xed!P9Xg\xe8'), '\x64' + '\x65' + '\143' + '\157' + chr(8624 - 8524) + chr(0b110 + 0o137))(chr(2402 - 2285) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3\xe1M\xf4\x08(\xccq\x0b>\xba8'), chr(0b1100100) + '\145' + '\x63' + chr(0b111110 + 0o61) + '\144' + chr(6519 - 6418))(chr(0b1100001 + 0o24) + '\164' + '\146' + '\055' + chr(56)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 8))) return xafqLlk3kkUe(jSKPaHwSAfVv, xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xd4{\xe65/\xce`\x05\x1f\xa6$\x01J\x9c5'), chr(985 - 885) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(10817 - 10700) + chr(7129 - 7013) + chr(102) + '\x2d' + chr(56)))(OeWW0F1dBPRQ, n4ljua2gi1Pr)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
attn
def attn(image_feat, query, hparams, name="attn", save_weights_to=None, make_image_summary=True): """Attention on image feature with question as query.""" with tf.variable_scope(name, "attn", values=[image_feat, query]): total_key_depth = hparams.attention_key_channels or hparams.hidden_size total_value_depth = hparams.attention_value_channels or hparams.hidden_size num_heads = hparams.num_heads query = tf.expand_dims(query, 1) q, k, v = common_attention.compute_qkv( query, image_feat, total_key_depth, total_value_depth, ) q = common_attention.split_heads(q, num_heads) k = common_attention.split_heads(k, num_heads) v = common_attention.split_heads(v, num_heads) if hparams.scale_dotproduct: key_depth_per_head = total_key_depth // num_heads q *= key_depth_per_head**-0.5 # image_feat is input as v x = common_attention.dot_product_attention( q, k, v, None, dropout_rate=hparams.attention_dropout, image_shapes=None, save_weights_to=save_weights_to, make_image_summary=make_image_summary) x = common_attention.combine_heads(x) return tf.squeeze(x, axis=1)
python
def attn(image_feat, query, hparams, name="attn", save_weights_to=None, make_image_summary=True): """Attention on image feature with question as query.""" with tf.variable_scope(name, "attn", values=[image_feat, query]): total_key_depth = hparams.attention_key_channels or hparams.hidden_size total_value_depth = hparams.attention_value_channels or hparams.hidden_size num_heads = hparams.num_heads query = tf.expand_dims(query, 1) q, k, v = common_attention.compute_qkv( query, image_feat, total_key_depth, total_value_depth, ) q = common_attention.split_heads(q, num_heads) k = common_attention.split_heads(k, num_heads) v = common_attention.split_heads(v, num_heads) if hparams.scale_dotproduct: key_depth_per_head = total_key_depth // num_heads q *= key_depth_per_head**-0.5 # image_feat is input as v x = common_attention.dot_product_attention( q, k, v, None, dropout_rate=hparams.attention_dropout, image_shapes=None, save_weights_to=save_weights_to, make_image_summary=make_image_summary) x = common_attention.combine_heads(x) return tf.squeeze(x, axis=1)
[ "def", "attn", "(", "image_feat", ",", "query", ",", "hparams", ",", "name", "=", "\"attn\"", ",", "save_weights_to", "=", "None", ",", "make_image_summary", "=", "True", ")", ":", "with", "tf", ".", "variable_scope", "(", "name", ",", "\"attn\"", ",", "values", "=", "[", "image_feat", ",", "query", "]", ")", ":", "total_key_depth", "=", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", "total_value_depth", "=", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", "num_heads", "=", "hparams", ".", "num_heads", "query", "=", "tf", ".", "expand_dims", "(", "query", ",", "1", ")", "q", ",", "k", ",", "v", "=", "common_attention", ".", "compute_qkv", "(", "query", ",", "image_feat", ",", "total_key_depth", ",", "total_value_depth", ",", ")", "q", "=", "common_attention", ".", "split_heads", "(", "q", ",", "num_heads", ")", "k", "=", "common_attention", ".", "split_heads", "(", "k", ",", "num_heads", ")", "v", "=", "common_attention", ".", "split_heads", "(", "v", ",", "num_heads", ")", "if", "hparams", ".", "scale_dotproduct", ":", "key_depth_per_head", "=", "total_key_depth", "//", "num_heads", "q", "*=", "key_depth_per_head", "**", "-", "0.5", "# image_feat is input as v", "x", "=", "common_attention", ".", "dot_product_attention", "(", "q", ",", "k", ",", "v", ",", "None", ",", "dropout_rate", "=", "hparams", ".", "attention_dropout", ",", "image_shapes", "=", "None", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ")", "x", "=", "common_attention", ".", "combine_heads", "(", "x", ")", "return", "tf", ".", "squeeze", "(", "x", ",", "axis", "=", "1", ")" ]
Attention on image feature with question as query.
[ "Attention", "on", "image", "feature", "with", "question", "as", "query", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L395-L430
train
Attention on image feature with question as query.
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('\060' + chr(111) + chr(0b110011) + chr(53) + '\x33', 12304 - 12296), ehT0Px3KOsy9(chr(48) + chr(0b111 + 0o150) + chr(0b10 + 0o61) + chr(53), 19662 - 19654), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b110000 + 0o2), 0b1000), ehT0Px3KOsy9(chr(48) + chr(5112 - 5001) + chr(1612 - 1560) + chr(810 - 762), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1001 + 0o52) + chr(52) + chr(0b111 + 0o52), 13361 - 13353), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(1720 - 1670) + '\060', 51865 - 51857), ehT0Px3KOsy9('\x30' + chr(0b11 + 0o154) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2020 - 1970) + '\x34' + chr(52), 49016 - 49008), ehT0Px3KOsy9(chr(0b110000) + chr(5038 - 4927) + '\065' + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(9573 - 9462) + '\063' + chr(51) + chr(1676 - 1624), ord("\x08")), ehT0Px3KOsy9(chr(2211 - 2163) + chr(0b1100011 + 0o14) + chr(0b110010) + chr(50) + '\064', 25153 - 25145), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2028 - 1974), 20786 - 20778), ehT0Px3KOsy9('\x30' + chr(111) + chr(670 - 621) + chr(0b10100 + 0o40) + chr(55), 23232 - 23224), ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + chr(0b100101 + 0o15) + '\x36' + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2227 - 2176), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1590 - 1540) + '\x31' + chr(1293 - 1240), 37716 - 37708), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(1009 - 958) + chr(1591 - 1536), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(1287 - 1176) + chr(0b110011) + chr(2459 - 2406) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(0b100111 + 0o12) + chr(0b110111) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(498 - 450) + chr(0b1101101 + 0o2) + chr(0b110011) + chr(0b110000) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6656 - 6545) + chr(50) + chr(0b100 + 0o63) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100000 + 0o17) + '\x31' + chr(49) + chr(0b10101 + 0o36), 29356 - 29348), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(2228 - 2176) + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100101 + 0o12) + chr(0b110001) + '\060' + chr(0b11010 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(1500 - 1451) + chr(0b10110 + 0o40) + chr(0b11100 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(541 - 493) + '\x6f' + chr(51) + '\x35' + '\067', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(0b10000 + 0o42) + chr(1053 - 998) + chr(0b111 + 0o54), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x30' + '\061', 8), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(49) + chr(0b110000) + chr(1761 - 1710), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100110 + 0o13) + '\062' + chr(0b100101 + 0o15), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(50) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + '\061' + '\x34' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(4881 - 4770) + chr(2066 - 2016) + chr(0b110 + 0o53) + chr(0b110010 + 0o1), 0o10), ehT0Px3KOsy9('\060' + chr(2537 - 2426) + chr(2141 - 2091) + '\062' + chr(0b110000 + 0o3), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b110011) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000001 + 0o56) + chr(0b110010) + chr(49) + chr(2626 - 2574), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(665 - 616) + chr(0b110011) + chr(2229 - 2178), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(0b10 + 0o57) + '\x37' + chr(48), 0o10), ehT0Px3KOsy9(chr(1151 - 1103) + chr(111) + chr(51) + chr(0b101100 + 0o10) + chr(49), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1415 - 1367) + chr(0b1101111) + chr(2013 - 1960) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5'), chr(100) + chr(0b111111 + 0o46) + '\143' + chr(111) + chr(100) + chr(0b1100101))('\x75' + chr(3734 - 3618) + '\x66' + chr(45) + chr(0b1100 + 0o54)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def LC5ZZ0hS8TJB(UKiMPArCVK05, MgmdEYXEleNe, n4ljua2gi1Pr, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\x8aifN'), chr(1379 - 1279) + chr(0b1011 + 0o132) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(488 - 372) + chr(6570 - 6468) + chr(0b100 + 0o51) + chr(3037 - 2981)), zWaF_2VBEDjk=None, NC2xHNLwzxcH=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10001 + 0o40), ord("\x08"))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d|`I\x802i\xc1ti\xbf\xfbv\x02'), chr(2142 - 2042) + chr(101) + chr(2568 - 2469) + chr(0b1101111) + '\144' + chr(101))(chr(633 - 516) + chr(0b1110100) + '\x66' + chr(45) + chr(708 - 652)))(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8aifN'), '\x64' + '\x65' + chr(99) + '\x6f' + '\144' + '\145')('\x75' + chr(116) + chr(8111 - 8009) + chr(0b11 + 0o52) + '\x38'), values=[UKiMPArCVK05, MgmdEYXEleNe]): _jxqy0P17UFy = n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL F9lUBuHPQMmX = n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL vRVqPOZ1hUG7 = n4ljua2gi1Pr.vRVqPOZ1hUG7 MgmdEYXEleNe = IDJ2eXGCBCDu.expand_dims(MgmdEYXEleNe, ehT0Px3KOsy9(chr(48) + chr(4859 - 4748) + chr(0b110001), 8)) (WtwjCI_b3w8O, OolUPRJhRaJd, cMbll0QYhULo) = WOnrfm4dlYcf.compute_qkv(MgmdEYXEleNe, UKiMPArCVK05, _jxqy0P17UFy, F9lUBuHPQMmX) WtwjCI_b3w8O = WOnrfm4dlYcf.split_heads(WtwjCI_b3w8O, vRVqPOZ1hUG7) OolUPRJhRaJd = WOnrfm4dlYcf.split_heads(OolUPRJhRaJd, vRVqPOZ1hUG7) cMbll0QYhULo = WOnrfm4dlYcf.split_heads(cMbll0QYhULo, vRVqPOZ1hUG7) if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98~sL\x84\x0fa\xcb_j\xae\xfbb\x12\xd4w'), chr(0b1100100) + chr(101) + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1001110 + 0o47) + chr(116) + '\x66' + chr(0b10011 + 0o32) + '\070')): SwYdOFe3xV4H = _jxqy0P17UFy // vRVqPOZ1hUG7 WtwjCI_b3w8O *= SwYdOFe3xV4H ** (-0.5) OeWW0F1dBPRQ = WOnrfm4dlYcf.dot_product_attention(WtwjCI_b3w8O, OolUPRJhRaJd, cMbll0QYhULo, None, dropout_rate=n4ljua2gi1Pr.RdMRr3qkYioQ, image_shapes=None, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH) OeWW0F1dBPRQ = WOnrfm4dlYcf.combine_heads(OeWW0F1dBPRQ) return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98lgE\x84*`'), '\x64' + chr(0b101000 + 0o75) + '\143' + chr(111) + chr(7303 - 7203) + chr(8830 - 8729))(chr(1776 - 1659) + chr(2844 - 2728) + chr(3498 - 3396) + '\x2d' + chr(0b111000)))(OeWW0F1dBPRQ, axis=ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(8572 - 8461) + '\061', 8))
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
mlp
def mlp(feature, hparams, name="mlp"): """Multi layer perceptron with dropout and relu activation.""" with tf.variable_scope(name, "mlp", values=[feature]): num_mlp_layers = hparams.num_mlp_layers mlp_size = hparams.mlp_size for _ in range(num_mlp_layers): feature = common_layers.dense(feature, mlp_size, activation=None) utils.collect_named_outputs("norms", "mlp_feature", tf.norm(feature, axis=-1)) feature = common_layers.layer_norm(feature) feature = tf.nn.relu(feature) feature = tf.nn.dropout(feature, keep_prob=1.-hparams.dropout) return feature
python
def mlp(feature, hparams, name="mlp"): """Multi layer perceptron with dropout and relu activation.""" with tf.variable_scope(name, "mlp", values=[feature]): num_mlp_layers = hparams.num_mlp_layers mlp_size = hparams.mlp_size for _ in range(num_mlp_layers): feature = common_layers.dense(feature, mlp_size, activation=None) utils.collect_named_outputs("norms", "mlp_feature", tf.norm(feature, axis=-1)) feature = common_layers.layer_norm(feature) feature = tf.nn.relu(feature) feature = tf.nn.dropout(feature, keep_prob=1.-hparams.dropout) return feature
[ "def", "mlp", "(", "feature", ",", "hparams", ",", "name", "=", "\"mlp\"", ")", ":", "with", "tf", ".", "variable_scope", "(", "name", ",", "\"mlp\"", ",", "values", "=", "[", "feature", "]", ")", ":", "num_mlp_layers", "=", "hparams", ".", "num_mlp_layers", "mlp_size", "=", "hparams", ".", "mlp_size", "for", "_", "in", "range", "(", "num_mlp_layers", ")", ":", "feature", "=", "common_layers", ".", "dense", "(", "feature", ",", "mlp_size", ",", "activation", "=", "None", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"mlp_feature\"", ",", "tf", ".", "norm", "(", "feature", ",", "axis", "=", "-", "1", ")", ")", "feature", "=", "common_layers", ".", "layer_norm", "(", "feature", ")", "feature", "=", "tf", ".", "nn", ".", "relu", "(", "feature", ")", "feature", "=", "tf", ".", "nn", ".", "dropout", "(", "feature", ",", "keep_prob", "=", "1.", "-", "hparams", ".", "dropout", ")", "return", "feature" ]
Multi layer perceptron with dropout and relu activation.
[ "Multi", "layer", "perceptron", "with", "dropout", "and", "relu", "activation", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L433-L445
train
Multi layer perceptron with dropout and relu activation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVW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ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1145 - 1097) + '\157' + chr(0b110010) + '\x34' + '\066', 7279 - 7271), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\062', 43798 - 43790), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + chr(0b11011 + 0o27) + chr(0b110001 + 0o6) + '\066', 20172 - 20164), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(111) + '\x33' + '\065' + chr(52), 8155 - 8147), ehT0Px3KOsy9('\060' + chr(833 - 722) + '\x31' + chr(0b110100) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\x6f' + '\x33' + chr(2448 - 2397) + '\060', 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + '\x31' + chr(1375 - 1322) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\x6f' + '\061' + '\x32' + chr(0b101001 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\x31' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + chr(0b10110 + 0o34) + chr(49) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\063' + chr(0b1110 + 0o42), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(52) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(1288 - 1236) + chr(2311 - 2260), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(0b110110), 36308 - 36300), ehT0Px3KOsy9(chr(2187 - 2139) + '\x6f' + chr(0b1001 + 0o55) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(1872 - 1824) + chr(111) + chr(51) + chr(0b110100) + chr(0b11001 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(694 - 646) + chr(111) + chr(1745 - 1695) + chr(0b1001 + 0o53) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(2935 - 2824) + chr(0b10010 + 0o40) + chr(49) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(8472 - 8361) + chr(51) + chr(0b11011 + 0o30) + chr(2216 - 2168), 8), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(0b0 + 0o63), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(1154 - 1100) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(2136 - 2088) + chr(7463 - 7352) + chr(1484 - 1433) + chr(0b110101) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1582 - 1534) + chr(0b1100111 + 0o10) + chr(49) + '\067' + chr(968 - 913), 47204 - 47196), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101110 + 0o3) + chr(0b10101 + 0o37) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11011 + 0o30) + chr(0b110110) + chr(0b1000 + 0o52), 52685 - 52677), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b101100 + 0o11) + chr(50), 7319 - 7311), ehT0Px3KOsy9(chr(1143 - 1095) + '\157' + chr(0b110010) + '\x31' + chr(733 - 684), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(51) + '\063' + chr(0b111 + 0o52), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(48) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6867 - 6756) + chr(0b110010) + chr(710 - 655) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110100) + chr(0b101010 + 0o11), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(0b110001) + chr(1142 - 1090), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1011011 + 0o24) + '\x31' + chr(55) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2257 - 2146) + chr(0b11011 + 0o26) + '\064' + chr(0b10101 + 0o36), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + '\063' + chr(2734 - 2681), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + '\063' + '\066' + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110000 + 0o77) + chr(51) + '\061' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(0b100111 + 0o12) + chr(55) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x36', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x88'), chr(100) + chr(4146 - 4045) + '\143' + chr(0b1101111) + '\144' + chr(0b110111 + 0o56))('\165' + '\x74' + chr(8651 - 8549) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def J5VLRlHnOa0g(fVxZREPfp9Oo, n4ljua2gi1Pr, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb~\xce'), chr(100) + '\x65' + chr(99) + chr(1425 - 1314) + chr(100) + '\145')('\x75' + '\164' + '\x66' + '\055' + chr(56))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0s\xcc\x85\x02\xba\x050\x97\xfc\xbb\x8a\x13\xab'), chr(100) + chr(101) + chr(3236 - 3137) + chr(111) + chr(0b1100100) + chr(0b1100000 + 0o5))(chr(117) + '\164' + '\x66' + chr(0b100000 + 0o15) + chr(0b101010 + 0o16)))(AIvJRzLdDfgF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb~\xce'), chr(0b1100100) + '\145' + chr(0b1001001 + 0o32) + chr(0b1111 + 0o140) + '\144' + chr(101))('\x75' + chr(9865 - 9749) + chr(0b1100110) + chr(45) + chr(0b101110 + 0o12)), values=[fVxZREPfp9Oo]): rUEG44JtyB2E = n4ljua2gi1Pr.num_mlp_layers TjoY0l5qQXOl = n4ljua2gi1Pr.mlp_size for VNGQdHSFPrso in vQr8gNKaIaWE(rUEG44JtyB2E): fVxZREPfp9Oo = jSKPaHwSAfVv.dense(fVxZREPfp9Oo, TjoY0l5qQXOl, activation=None) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5}\xd2\x80\x06\xbb\x1d\n\xa6\xee\xb5\x80\x07\x91];\x90\xd3\xff\xacp'), chr(0b1010011 + 0o21) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\164' + '\x66' + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc8}\xcc\x81\x10'), '\x64' + chr(0b1100101) + '\x63' + chr(12273 - 12162) + '\x64' + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(300 - 244)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xcb~\xce\xb3\x05\xbd\x08!\xbd\xfd\xbd'), chr(100) + chr(1353 - 1252) + chr(99) + '\x6f' + chr(0b1100100) + '\145')('\165' + '\164' + chr(7975 - 7873) + chr(430 - 385) + '\x38'), xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3F\xf1\x9b,\x80\x1b6\xa3\xde\xb6\x96'), '\144' + chr(2757 - 2656) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(11826 - 11709) + chr(116) + '\146' + chr(0b101001 + 0o4) + '\x38'))(fVxZREPfp9Oo, axis=-ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(718 - 607) + chr(2087 - 2038), 897 - 889))) fVxZREPfp9Oo = jSKPaHwSAfVv.layer_norm(fVxZREPfp9Oo) fVxZREPfp9Oo = IDJ2eXGCBCDu.nn.relu(fVxZREPfp9Oo) fVxZREPfp9Oo = IDJ2eXGCBCDu.nn.ag0mwEgWzjYv(fVxZREPfp9Oo, keep_prob=1.0 - n4ljua2gi1Pr.ag0mwEgWzjYv) return fVxZREPfp9Oo
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
prepare_image_question_encoder
def prepare_image_question_encoder(image_feat, question, hparams): """Prepare encoder. Args: image_feat: a Tensor. question: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention """ encoder_input = tf.concat([image_feat, question], axis=1) encoder_padding = common_attention.embedding_to_padding(encoder_input) ignore_padding = common_attention.attention_bias_ignore_padding( encoder_padding) encoder_self_attention_bias = ignore_padding encoder_decoder_attention_bias = ignore_padding # Usual case - not a packed dataset. if hparams.pos == "timing": question = common_attention.add_timing_signal_1d(question) elif hparams.pos == "emb": question = common_attention.add_positional_embedding( question, hparams.max_length, "inputs_positional_embedding", None) encoder_input = tf.concat([image_feat, question], axis=1) return (encoder_input, encoder_self_attention_bias, encoder_decoder_attention_bias)
python
def prepare_image_question_encoder(image_feat, question, hparams): """Prepare encoder. Args: image_feat: a Tensor. question: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention """ encoder_input = tf.concat([image_feat, question], axis=1) encoder_padding = common_attention.embedding_to_padding(encoder_input) ignore_padding = common_attention.attention_bias_ignore_padding( encoder_padding) encoder_self_attention_bias = ignore_padding encoder_decoder_attention_bias = ignore_padding # Usual case - not a packed dataset. if hparams.pos == "timing": question = common_attention.add_timing_signal_1d(question) elif hparams.pos == "emb": question = common_attention.add_positional_embedding( question, hparams.max_length, "inputs_positional_embedding", None) encoder_input = tf.concat([image_feat, question], axis=1) return (encoder_input, encoder_self_attention_bias, encoder_decoder_attention_bias)
[ "def", "prepare_image_question_encoder", "(", "image_feat", ",", "question", ",", "hparams", ")", ":", "encoder_input", "=", "tf", ".", "concat", "(", "[", "image_feat", ",", "question", "]", ",", "axis", "=", "1", ")", "encoder_padding", "=", "common_attention", ".", "embedding_to_padding", "(", "encoder_input", ")", "ignore_padding", "=", "common_attention", ".", "attention_bias_ignore_padding", "(", "encoder_padding", ")", "encoder_self_attention_bias", "=", "ignore_padding", "encoder_decoder_attention_bias", "=", "ignore_padding", "# Usual case - not a packed dataset.", "if", "hparams", ".", "pos", "==", "\"timing\"", ":", "question", "=", "common_attention", ".", "add_timing_signal_1d", "(", "question", ")", "elif", "hparams", ".", "pos", "==", "\"emb\"", ":", "question", "=", "common_attention", ".", "add_positional_embedding", "(", "question", ",", "hparams", ".", "max_length", ",", "\"inputs_positional_embedding\"", ",", "None", ")", "encoder_input", "=", "tf", ".", "concat", "(", "[", "image_feat", ",", "question", "]", ",", "axis", "=", "1", ")", "return", "(", "encoder_input", ",", "encoder_self_attention_bias", ",", "encoder_decoder_attention_bias", ")" ]
Prepare encoder. Args: image_feat: a Tensor. question: a Tensor. hparams: run hyperparameters Returns: encoder_input: a Tensor, bottom of encoder stack encoder_self_attention_bias: a bias tensor for use in encoder self-attention
[ "Prepare", "encoder", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L448-L477
train
Prepare encoder.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLm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s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(55), 0b1000), ehT0Px3KOsy9(chr(2242 - 2194) + chr(111) + '\063' + '\064' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(51) + chr(0b100010 + 0o22) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\067' + chr(0b100001 + 0o21), 736 - 728), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\157' + '\066' + chr(0b11110 + 0o22), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110110) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(10290 - 10179) + chr(0b110011) + chr(52) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b100111 + 0o12) + chr(1522 - 1474) + chr(952 - 904), 0o10), ehT0Px3KOsy9(chr(335 - 287) + chr(0b111001 + 0o66) + chr(0b110100 + 0o2) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b110000 + 0o4) + chr(2677 - 2624), ord("\x08")), ehT0Px3KOsy9(chr(1642 - 1594) + chr(111) + chr(0b101100 + 0o7) + chr(0b110110) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(54) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x32' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(505 - 457) + chr(111) + chr(2063 - 2013) + chr(0b110000) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(808 - 760) + chr(0b1010010 + 0o35) + chr(1914 - 1865) + chr(840 - 788) + chr(1648 - 1595), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10000 + 0o137) + '\061' + chr(55) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110100) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(466 - 415) + chr(1434 - 1384) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\157' + chr(0b1101 + 0o44) + chr(2007 - 1959), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101001 + 0o6) + chr(1179 - 1128) + '\060' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1073 - 1022), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1010 + 0o51) + '\063' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(564 - 516) + chr(8513 - 8402) + chr(1008 - 959) + chr(0b110010 + 0o5) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(486 - 375) + chr(51) + chr(0b110001) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2127 - 2077) + chr(0b10 + 0o57) + '\x35', 61799 - 61791), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(1401 - 1350) + chr(2002 - 1951) + chr(0b10010 + 0o45), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + '\x31', 42856 - 42848), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1100111 + 0o10) + chr(0b110010) + chr(329 - 281) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9(chr(1491 - 1443) + chr(0b1101111) + '\061' + '\x32' + chr(50), 50176 - 50168), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110111) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(4931 - 4820) + chr(0b11001 + 0o30) + chr(0b110011) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101000 + 0o14) + chr(851 - 802), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + '\061' + chr(0b10010 + 0o41) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(867 - 819) + chr(0b1101111) + chr(0b110001 + 0o0) + chr(48) + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101111 + 0o100) + chr(0b110001) + '\x31' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1001101 + 0o42) + chr(0b110001) + chr(0b10111 + 0o33), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + chr(669 - 620) + '\067' + '\067', 8), ehT0Px3KOsy9(chr(920 - 872) + chr(0b1101101 + 0o2) + '\062' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(2112 - 2064) + chr(3428 - 3317) + chr(0b110001) + chr(0b110100) + chr(0b11010 + 0o30), 37524 - 37516), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(52) + chr(537 - 487), 52632 - 52624)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\x35' + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\t'), chr(100) + chr(0b110011 + 0o62) + chr(0b1100011) + '\x6f' + chr(0b1000010 + 0o42) + '\145')('\165' + '\x74' + chr(1144 - 1042) + chr(854 - 809) + chr(0b100001 + 0o27)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wZau4mFBiyBi(UKiMPArCVK05, hiLkQHDHvP4B, n4ljua2gi1Pr): LDEM1Zag9l0P = IDJ2eXGCBCDu.concat([UKiMPArCVK05, hiLkQHDHvP4B], axis=ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061', 0b1000)) n61t3r1Cu3zB = WOnrfm4dlYcf.embedding_to_padding(LDEM1Zag9l0P) VSBEc2df2qeY = WOnrfm4dlYcf.attention_bias_ignore_padding(n61t3r1Cu3zB) cMrr2bkEBgTQ = VSBEc2df2qeY iuvkQfeRHfn5 = VSBEc2df2qeY if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'i\xb9\x87\nQB\xbb\nS\x91\x9c{'), chr(100) + '\x65' + chr(6279 - 6180) + chr(0b100110 + 0o111) + chr(0b101101 + 0o67) + '\145')(chr(7843 - 7726) + chr(4183 - 4067) + chr(5656 - 5554) + '\055' + '\070')) == xafqLlk3kkUe(SXOLrMavuUCe(b'S\x88\x8eS^T'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(100) + chr(101))('\165' + chr(4167 - 4051) + '\146' + '\055' + '\070'): hiLkQHDHvP4B = WOnrfm4dlYcf.add_timing_signal_1d(hiLkQHDHvP4B) elif xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'i\xb9\x87\nQB\xbb\nS\x91\x9c{'), chr(0b1001110 + 0o26) + chr(0b101101 + 0o70) + chr(162 - 63) + '\x6f' + '\144' + '\x65')(chr(117) + chr(9269 - 9153) + '\x66' + chr(45) + '\070')) == xafqLlk3kkUe(SXOLrMavuUCe(b'B\x8c\x81'), chr(7842 - 7742) + chr(0b100010 + 0o103) + chr(5370 - 5271) + chr(111) + chr(0b1100100) + chr(0b1011001 + 0o14))('\x75' + chr(0b111101 + 0o67) + chr(102) + chr(45) + '\x38'): hiLkQHDHvP4B = WOnrfm4dlYcf.add_positional_embedding(hiLkQHDHvP4B, n4ljua2gi1Pr._o7pVXAdOCRy, xafqLlk3kkUe(SXOLrMavuUCe(b'N\x8f\x93OD@\xbd0X\xd6\x99D\xba\xef\x0b\x1e\x08\x8em\xaaa\xbd\x1d\xab\xe4\xb1v'), chr(0b110111 + 0o55) + chr(9623 - 9522) + chr(99) + chr(2370 - 2259) + '\x64' + chr(0b101111 + 0o66))(chr(0b1000011 + 0o62) + chr(1878 - 1762) + chr(102) + '\x2d' + '\x38'), None) LDEM1Zag9l0P = IDJ2eXGCBCDu.concat([UKiMPArCVK05, hiLkQHDHvP4B], axis=ehT0Px3KOsy9(chr(48) + '\157' + chr(634 - 585), 8)) return (LDEM1Zag9l0P, cMrr2bkEBgTQ, iuvkQfeRHfn5)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
image_question_encoder
def image_question_encoder(encoder_inputs, encoder_self_attention_bias, hparams, query=None, name="image_question_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = encoder_inputs with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, encoder_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "encoder_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) if query is not None: with tf.variable_scope("encdec_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), query, None, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "encoder_decoder_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_decoder_attention_post_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "encoder_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
python
def image_question_encoder(encoder_inputs, encoder_self_attention_bias, hparams, query=None, name="image_question_encoder", save_weights_to=None, make_image_summary=True): """A stack of self attention layers.""" x = encoder_inputs with tf.variable_scope(name): for layer in range(hparams.num_encoder_layers or hparams.num_hidden_layers): with tf.variable_scope("layer_%d" % layer): with tf.variable_scope("self_attention"): y = vqa_layers.multihead_attention( common_layers.layer_preprocess(x, hparams), None, encoder_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "encoder_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_self_attention_postprocess_%d"%(layer), tf.norm(x, axis=-1)) if query is not None: with tf.variable_scope("encdec_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), query, None, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, block_length=hparams.block_length, save_weights_to=save_weights_to, make_image_summary=make_image_summary, scale_dotproduct=hparams.scale_dotproduct, ) utils.collect_named_outputs( "norms", "encoder_decoder_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_decoder_attention_post_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs( "norms", "encoder_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "encoder_ffn_postprocess_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
[ "def", "image_question_encoder", "(", "encoder_inputs", ",", "encoder_self_attention_bias", ",", "hparams", ",", "query", "=", "None", ",", "name", "=", "\"image_question_encoder\"", ",", "save_weights_to", "=", "None", ",", "make_image_summary", "=", "True", ")", ":", "x", "=", "encoder_inputs", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "for", "layer", "in", "range", "(", "hparams", ".", "num_encoder_layers", "or", "hparams", ".", "num_hidden_layers", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"layer_%d\"", "%", "layer", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"self_attention\"", ")", ":", "y", "=", "vqa_layers", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "None", ",", "encoder_self_attention_bias", ",", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "attention_type", "=", "hparams", ".", "self_attention_type", ",", "block_length", "=", "hparams", ".", "block_length", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", "scale_dotproduct", "=", "hparams", ".", "scale_dotproduct", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_self_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_self_attention_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "if", "query", "is", "not", "None", ":", "with", "tf", ".", "variable_scope", "(", "\"encdec_attention\"", ")", ":", "y", "=", "common_attention", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "query", ",", "None", ",", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "attention_type", "=", "hparams", ".", "self_attention_type", ",", "block_length", "=", "hparams", ".", "block_length", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", "scale_dotproduct", "=", "hparams", ".", "scale_dotproduct", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_decoder_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_decoder_attention_post_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "with", "tf", ".", "variable_scope", "(", "\"ffn\"", ")", ":", "y", "=", "common_layers", ".", "dense_relu_dense", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "hparams", ".", "filter_size", ",", "hparams", ".", "hidden_size", ",", "dropout", "=", "hparams", ".", "relu_dropout", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_ffn_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"encoder_ffn_postprocess_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "# if normalization is done in layer_preprocess, then it should also be done", "# on the output, since the output can grow very large, being the sum of", "# a whole stack of unnormalized layer outputs.", "return", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")" ]
A stack of self attention layers.
[ "A", "stack", "of", "self", "attention", "layers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L480-L557
train
A stack of self - attention layers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,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(0b1010 + 0o46) + chr(111) + chr(658 - 608) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(48) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(48), 1196 - 1188), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b110111) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1111 + 0o43) + chr(0b110101) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(52) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8476 - 8365) + chr(0b110001) + '\x37' + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\065' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\x31' + '\x32' + chr(1588 - 1538), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(50), 40846 - 40838), ehT0Px3KOsy9(chr(48) + chr(6152 - 6041) + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(205 - 157) + '\157' + chr(1015 - 964) + chr(0b100010 + 0o25) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b110000) + chr(909 - 859), 13469 - 13461), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110100) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(2133 - 2085) + '\157' + chr(1474 - 1424) + chr(48) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1322 - 1274) + chr(7846 - 7735) + chr(1381 - 1330) + '\x31' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3081 - 2970) + '\063' + '\064' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(0b110010) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(5720 - 5609) + chr(1775 - 1724) + chr(1187 - 1136) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(665 - 613) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110010) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11110 + 0o24) + '\060' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\061' + chr(0b10 + 0o56) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10011 + 0o37) + '\066' + chr(0b11100 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(919 - 870) + chr(0b0 + 0o67) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(50) + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(50) + chr(2219 - 2165), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110100) + '\067', 63681 - 63673), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2272 - 2223) + chr(0b1001 + 0o47) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(452 - 398), 24214 - 24206), ehT0Px3KOsy9(chr(48) + chr(111) + chr(874 - 825) + chr(50) + '\x31', 37324 - 37316), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(971 - 919) + chr(0b1101 + 0o51), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(1337 - 1288) + chr(53) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(770 - 722) + chr(111) + chr(0b100000 + 0o23) + '\x35' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(49) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\063' + '\x33' + chr(216 - 163), 13366 - 13358), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\066' + chr(438 - 388), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(166 - 118) + '\157' + '\061' + chr(0b110001) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\x30' + '\065', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(183 - 135), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'8'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b11 + 0o141) + '\x65')(chr(0b1110101) + chr(0b101 + 0o157) + chr(0b100000 + 0o106) + chr(1196 - 1151) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def m1_nPu7YvfHI(hQsc7i_B37tz, cMrr2bkEBgTQ, n4ljua2gi1Pr, MgmdEYXEleNe=None, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f\xac\xf1\x9e\xcc9\x0b\x1f7qW\x94-\x0e\xdd\xae\x8f3\xb0\xc7\xb6\xf1'), chr(100) + '\145' + chr(0b1100011) + chr(0b100010 + 0o115) + '\x64' + '\145')('\x75' + chr(11916 - 11800) + chr(0b1100110) + chr(0b0 + 0o55) + chr(56)), zWaF_2VBEDjk=None, NC2xHNLwzxcH=ehT0Px3KOsy9(chr(257 - 209) + chr(0b1101111) + '\061', 0b1000)): OeWW0F1dBPRQ = hQsc7i_B37tz with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'`\xa0\xe2\x90\xc8\x04\x16\x0f\rq@\x922\x05'), chr(0b100101 + 0o77) + chr(101) + chr(6205 - 6106) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1100010 + 0o23) + '\x74' + chr(0b11000 + 0o116) + '\055' + '\070'))(AIvJRzLdDfgF): for wgamNHppspXj in vQr8gNKaIaWE(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'x\xb4\xfd\xa6\xcc\x08\x19\x056gQ\xa2.\x01\xfb\xae\x93#'), chr(0b1100000 + 0o4) + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(760 - 659))(chr(2954 - 2837) + '\164' + chr(0b1100110 + 0o0) + chr(0b10100 + 0o31) + chr(1067 - 1011))) or xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'|\x9b\xf8\xcc\xf6\x166?=ML\xa7'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(9699 - 9599) + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + chr(2186 - 2130)))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'`\xa0\xe2\x90\xc8\x04\x16\x0f\rq@\x922\x05'), chr(100) + chr(8104 - 8003) + chr(0b100011 + 0o100) + chr(111) + '\x64' + '\145')(chr(117) + '\164' + chr(102) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'z\xa0\xe9\x9c\xdb9_\x0e'), '\x64' + '\145' + chr(99) + chr(111) + chr(0b110100 + 0o60) + '\x65')(chr(7892 - 7775) + '\x74' + '\146' + chr(45) + '\070') % wgamNHppspXj): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'`\xa0\xe2\x90\xc8\x04\x16\x0f\rq@\x922\x05'), chr(100) + chr(0b11 + 0o142) + chr(99) + '\157' + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b11101 + 0o20) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'e\xa4\xfc\x9f\xf6\x07\x0e\x1e7lW\x94-\x0e'), '\x64' + chr(0b1100101 + 0o0) + chr(99) + chr(111) + '\144' + chr(0b100110 + 0o77))(chr(117) + '\x74' + chr(9790 - 9688) + chr(0b10101 + 0o30) + chr(56))): SqiSOtYOqOJH = HD_xNZzVlWnR.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), None, cMrr2bkEBgTQ, n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, attention_type=n4ljua2gi1Pr.self_attention_type, block_length=n4ljua2gi1Pr.block_length, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH, scale_dotproduct=n4ljua2gi1Pr.scale_dotproduct) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), chr(100) + chr(0b1010011 + 0o22) + chr(0b1100011) + chr(11899 - 11788) + '\144' + chr(0b1100101))(chr(0b1101010 + 0o13) + '\164' + chr(6255 - 6153) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), chr(0b101011 + 0o71) + chr(101) + chr(5330 - 5231) + chr(0b1101111) + chr(0b101 + 0o137) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(2051 - 1949) + chr(0b11100 + 0o21) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x085!gO\x9b\x1d\x01\xf6\xbf\x84>\xab\xca\xbc\xed\x1c\x95\x1a'), '\x64' + chr(0b1100101) + '\143' + chr(111) + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + '\070') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), chr(3976 - 3876) + chr(0b1100101) + '\x63' + '\157' + chr(0b101100 + 0o70) + '\x65')(chr(0b1011010 + 0o33) + chr(0b1011 + 0o151) + chr(102) + chr(0b1010 + 0o43) + chr(0b111000)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(5747 - 5636) + chr(0b100000 + 0o21), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), chr(0b0 + 0o144) + chr(0b1100101) + chr(0b1010110 + 0o15) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), chr(0b1100100) + chr(101) + chr(0b1 + 0o142) + chr(0b1010101 + 0o32) + chr(4534 - 4434) + '\145')(chr(0b1001101 + 0o50) + chr(1091 - 975) + chr(0b111000 + 0o56) + chr(45) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x085!gO\x9b\x1d\x01\xf6\xbf\x84>\xab\xca\xbc\xed\x1c\xc0\x11\xa3"\x174q2\x83\x1c\x99\x96\xf8\xd6'), chr(5239 - 5139) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(9094 - 8993))(chr(8347 - 8230) + chr(6572 - 6456) + '\x66' + chr(0b1101 + 0o40) + '\x38') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), chr(0b1100100) + chr(9408 - 9307) + chr(905 - 806) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(4346 - 4244) + chr(45) + chr(0b100111 + 0o21)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(283 - 234), 8))) if MgmdEYXEleNe is not None: with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'`\xa0\xe2\x90\xc8\x04\x16\x0f\rq@\x922\x05'), chr(100) + '\145' + chr(5817 - 5718) + chr(2560 - 2449) + chr(0b11000 + 0o114) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(2570 - 2468) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x9d\xcc\x05%\x0b&vF\x936\t\xed\xa5'), '\x64' + chr(770 - 669) + '\x63' + '\x6f' + chr(100) + '\145')('\165' + '\164' + chr(0b1100110) + chr(45) + '\x38')): SqiSOtYOqOJH = WOnrfm4dlYcf.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), MgmdEYXEleNe, None, n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, attention_type=n4ljua2gi1Pr.self_attention_type, block_length=n4ljua2gi1Pr.block_length, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH, scale_dotproduct=n4ljua2gi1Pr.scale_dotproduct) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(3225 - 3125) + chr(101))(chr(1162 - 1045) + '\x74' + chr(102) + '\055' + chr(0b101001 + 0o17)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), '\x64' + chr(101) + chr(99) + chr(111) + chr(1658 - 1558) + chr(9472 - 9371))(chr(0b1000001 + 0o64) + chr(116) + '\x66' + '\055' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x0856g@\x92&\x05\xf0\x94\x80$\xab\xc6\xbd\xf7*\xdf\x10\x8fs\x03'), '\x64' + chr(9609 - 9508) + '\143' + chr(111) + chr(8179 - 8079) + chr(101))(chr(0b1110101) + chr(5868 - 5752) + '\146' + chr(45) + '\070') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), chr(0b1100100) + chr(2244 - 2143) + chr(7337 - 7238) + chr(0b111001 + 0o66) + chr(0b1001101 + 0o27) + '\x65')('\x75' + chr(1430 - 1314) + chr(9672 - 9570) + chr(353 - 308) + '\x38'))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), chr(0b1100100) + chr(7024 - 6923) + chr(0b1100011) + chr(0b1101000 + 0o7) + chr(0b1100100) + chr(101))(chr(117) + '\x74' + chr(0b1100101 + 0o1) + chr(1304 - 1259) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), '\144' + chr(0b1100101) + chr(0b1010001 + 0o22) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1000110 + 0o56) + '\146' + '\055' + chr(1195 - 1139)), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x0856g@\x92&\x05\xf0\x94\x80$\xab\xc6\xbd\xf7*\xdf\x10\x8f&\x085j\x0e\xc3\x0b'), '\x64' + chr(101) + chr(0b1100011) + chr(9964 - 9853) + chr(1334 - 1234) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(1787 - 1731)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), '\x64' + chr(0b1000000 + 0o45) + chr(0b111010 + 0o51) + chr(0b1101111) + chr(0b1100100) + chr(0b100110 + 0o77))(chr(0b10000 + 0o145) + '\x74' + chr(0b1100110) + chr(0b10111 + 0o26) + chr(1463 - 1407)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061', 8))) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'`\xa0\xe2\x90\xc8\x04\x16\x0f\rq@\x922\x05'), chr(0b110001 + 0o63) + chr(0b110110 + 0o57) + chr(0b1100011) + '\157' + chr(0b1001110 + 0o26) + '\145')(chr(117) + '\164' + chr(7953 - 7851) + chr(0b10011 + 0o32) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'p\xa7\xfe'), chr(0b1100100) + chr(4536 - 4435) + chr(0b1100011) + chr(0b1100101 + 0o12) + chr(0b1100100) + chr(7182 - 7081))(chr(0b100000 + 0o125) + '\x74' + '\146' + chr(0b11001 + 0o24) + chr(56))): SqiSOtYOqOJH = jSKPaHwSAfVv.dense_relu_dense(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), n4ljua2gi1Pr.filter_size, n4ljua2gi1Pr.qzoyXN3kdhDL, dropout=n4ljua2gi1Pr.PJc0PNdBnSag) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), '\144' + chr(0b1100010 + 0o3) + chr(9265 - 9166) + chr(5479 - 5368) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), chr(100) + '\x65' + '\x63' + chr(0b11101 + 0o122) + chr(100) + '\145')(chr(11875 - 11758) + chr(0b1110100) + chr(0b1100110) + chr(0b10 + 0o53) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x0854dM\xa2g\x04'), chr(0b100100 + 0o100) + chr(101) + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(2494 - 2377) + '\x74' + '\146' + '\055' + chr(2510 - 2454)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(1872 - 1772) + chr(0b11101 + 0o110))('\x75' + chr(2829 - 2713) + chr(102) + chr(45) + chr(56)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9('\060' + '\157' + chr(49), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'u\xae\xfc\x95\xcc\x05\x0e5<cN\x98&?\xed\xbe\x95 \xaa\xd7\xa0'), chr(0b1100001 + 0o3) + '\145' + '\143' + chr(2798 - 2687) + '\x64' + '\x65')(chr(11790 - 11673) + chr(116) + chr(0b1100110) + chr(45) + chr(1827 - 1771)))(xafqLlk3kkUe(SXOLrMavuUCe(b'x\xae\xe2\x94\xda'), '\144' + '\145' + chr(0b110111 + 0o54) + chr(111) + '\144' + '\x65')(chr(0b1101111 + 0o6) + '\x74' + chr(8242 - 8140) + '\055' + chr(0b1010 + 0o56)), xafqLlk3kkUe(SXOLrMavuUCe(b's\xaf\xf3\x96\xcd\x03\x0854dM\xa22\x0f\xf1\xbf\x91"\xb0\xc0\xb6\xf00\xef[\xb4'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(100) + chr(101))(chr(9012 - 8895) + chr(4752 - 4636) + '\x66' + '\x2d' + chr(1181 - 1125)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b's\x95\xdf\x8e\xe6>\x08\t9SM\x8e'), chr(6498 - 6398) + chr(0b1100101) + chr(0b111011 + 0o50) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(0b10110 + 0o42)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + chr(49), 8))) return xafqLlk3kkUe(jSKPaHwSAfVv, xafqLlk3kkUe(SXOLrMavuUCe(b'z\xa0\xe9\x9c\xdb9\n\x187rQ\x92!\x05\xf1\xb8'), chr(0b1100100) + '\x65' + chr(8375 - 8276) + chr(0b1101111) + chr(100) + '\145')(chr(117) + '\x74' + chr(102) + chr(45) + '\x38'))(OeWW0F1dBPRQ, n4ljua2gi1Pr)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
decoder
def decoder(decoder_input, encoder_output, decoder_self_attention_bias, encoder_decoder_attention_bias, hparams, name="decoder", save_weights_to=None, make_image_summary=True,): """A stack of transformer layers. Args: decoder_input: a Tensor encoder_output: a Tensor decoder_self_attention_bias: bias Tensor for self-attention (see common_attention.attention_bias()) encoder_decoder_attention_bias: bias Tensor for encoder-decoder attention (see common_attention.attention_bias()) hparams: hyperparameters for model name: a string save_weights_to: an optional dictionary to capture attention weights for visualization; the weights tensor will be appended there under a string key created from the variable scope (including name). make_image_summary: Whether to make an attention image summary. Returns: y: a Tensors """ x = decoder_input with tf.variable_scope(name): for layer in range(hparams.num_decoder_layers or hparams.num_hidden_layers): layer_name = "layer_%d" % layer with tf.variable_scope(layer_name): with tf.variable_scope("self_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), None, decoder_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, save_weights_to=save_weights_to, make_image_summary=make_image_summary, ) utils.collect_named_outputs("norms", "decoder_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs("norms", "decoder_self_attention_post_%d"%(layer), tf.norm(x, axis=-1)) if encoder_output is not None: with tf.variable_scope("encdec_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), encoder_output, encoder_decoder_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, save_weights_to=save_weights_to, make_image_summary=make_image_summary, ) utils.collect_named_outputs( "norms", "decoder_encoder_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "decoder_encoder_attention_post_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs("norms", "decoder_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs("norms", "decoder_ffn_post_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
python
def decoder(decoder_input, encoder_output, decoder_self_attention_bias, encoder_decoder_attention_bias, hparams, name="decoder", save_weights_to=None, make_image_summary=True,): """A stack of transformer layers. Args: decoder_input: a Tensor encoder_output: a Tensor decoder_self_attention_bias: bias Tensor for self-attention (see common_attention.attention_bias()) encoder_decoder_attention_bias: bias Tensor for encoder-decoder attention (see common_attention.attention_bias()) hparams: hyperparameters for model name: a string save_weights_to: an optional dictionary to capture attention weights for visualization; the weights tensor will be appended there under a string key created from the variable scope (including name). make_image_summary: Whether to make an attention image summary. Returns: y: a Tensors """ x = decoder_input with tf.variable_scope(name): for layer in range(hparams.num_decoder_layers or hparams.num_hidden_layers): layer_name = "layer_%d" % layer with tf.variable_scope(layer_name): with tf.variable_scope("self_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), None, decoder_self_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, attention_type=hparams.self_attention_type, save_weights_to=save_weights_to, make_image_summary=make_image_summary, ) utils.collect_named_outputs("norms", "decoder_self_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs("norms", "decoder_self_attention_post_%d"%(layer), tf.norm(x, axis=-1)) if encoder_output is not None: with tf.variable_scope("encdec_attention"): y = common_attention.multihead_attention( common_layers.layer_preprocess(x, hparams), encoder_output, encoder_decoder_attention_bias, hparams.attention_key_channels or hparams.hidden_size, hparams.attention_value_channels or hparams.hidden_size, hparams.hidden_size, hparams.num_heads, hparams.attention_dropout, save_weights_to=save_weights_to, make_image_summary=make_image_summary, ) utils.collect_named_outputs( "norms", "decoder_encoder_attention_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs( "norms", "decoder_encoder_attention_post_%d"%(layer), tf.norm(x, axis=-1)) with tf.variable_scope("ffn"): y = common_layers.dense_relu_dense( common_layers.layer_preprocess(x, hparams), hparams.filter_size, hparams.hidden_size, dropout=hparams.relu_dropout, ) utils.collect_named_outputs("norms", "decoder_ffn_%d"%(layer), tf.norm(y, axis=-1)) x = common_layers.layer_postprocess(x, y, hparams) utils.collect_named_outputs("norms", "decoder_ffn_post_%d"%(layer), tf.norm(x, axis=-1)) # if normalization is done in layer_preprocess, then it should also be done # on the output, since the output can grow very large, being the sum of # a whole stack of unnormalized layer outputs. return common_layers.layer_preprocess(x, hparams)
[ "def", "decoder", "(", "decoder_input", ",", "encoder_output", ",", "decoder_self_attention_bias", ",", "encoder_decoder_attention_bias", ",", "hparams", ",", "name", "=", "\"decoder\"", ",", "save_weights_to", "=", "None", ",", "make_image_summary", "=", "True", ",", ")", ":", "x", "=", "decoder_input", "with", "tf", ".", "variable_scope", "(", "name", ")", ":", "for", "layer", "in", "range", "(", "hparams", ".", "num_decoder_layers", "or", "hparams", ".", "num_hidden_layers", ")", ":", "layer_name", "=", "\"layer_%d\"", "%", "layer", "with", "tf", ".", "variable_scope", "(", "layer_name", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"self_attention\"", ")", ":", "y", "=", "common_attention", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "None", ",", "decoder_self_attention_bias", ",", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "attention_type", "=", "hparams", ".", "self_attention_type", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_self_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_self_attention_post_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "if", "encoder_output", "is", "not", "None", ":", "with", "tf", ".", "variable_scope", "(", "\"encdec_attention\"", ")", ":", "y", "=", "common_attention", ".", "multihead_attention", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "encoder_output", ",", "encoder_decoder_attention_bias", ",", "hparams", ".", "attention_key_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "attention_value_channels", "or", "hparams", ".", "hidden_size", ",", "hparams", ".", "hidden_size", ",", "hparams", ".", "num_heads", ",", "hparams", ".", "attention_dropout", ",", "save_weights_to", "=", "save_weights_to", ",", "make_image_summary", "=", "make_image_summary", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_encoder_attention_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_encoder_attention_post_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "with", "tf", ".", "variable_scope", "(", "\"ffn\"", ")", ":", "y", "=", "common_layers", ".", "dense_relu_dense", "(", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")", ",", "hparams", ".", "filter_size", ",", "hparams", ".", "hidden_size", ",", "dropout", "=", "hparams", ".", "relu_dropout", ",", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_ffn_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "y", ",", "axis", "=", "-", "1", ")", ")", "x", "=", "common_layers", ".", "layer_postprocess", "(", "x", ",", "y", ",", "hparams", ")", "utils", ".", "collect_named_outputs", "(", "\"norms\"", ",", "\"decoder_ffn_post_%d\"", "%", "(", "layer", ")", ",", "tf", ".", "norm", "(", "x", ",", "axis", "=", "-", "1", ")", ")", "# if normalization is done in layer_preprocess, then it should also be done", "# on the output, since the output can grow very large, being the sum of", "# a whole stack of unnormalized layer outputs.", "return", "common_layers", ".", "layer_preprocess", "(", "x", ",", "hparams", ")" ]
A stack of transformer layers. Args: decoder_input: a Tensor encoder_output: a Tensor decoder_self_attention_bias: bias Tensor for self-attention (see common_attention.attention_bias()) encoder_decoder_attention_bias: bias Tensor for encoder-decoder attention (see common_attention.attention_bias()) hparams: hyperparameters for model name: a string save_weights_to: an optional dictionary to capture attention weights for visualization; the weights tensor will be appended there under a string key created from the variable scope (including name). make_image_summary: Whether to make an attention image summary. Returns: y: a Tensors
[ "A", "stack", "of", "transformer", "layers", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L560-L651
train
A stack of transformer layers.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdY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Error,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(51) + chr(54) + '\x30', 62141 - 62133), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + '\x37', 0b1000), ehT0Px3KOsy9(chr(1320 - 1272) + chr(111) + chr(1563 - 1514) + chr(0b110001) + chr(1809 - 1759), 0b1000), ehT0Px3KOsy9(chr(887 - 839) + chr(0b1101111) + chr(0b110001) + '\x31' + chr(0b100011 + 0o22), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(52) + chr(0b110010 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + '\062' + chr(52) + chr(0b11010 + 0o35), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10011 + 0o36) + chr(1003 - 952) + chr(0b101011 + 0o11), 0b1000), ehT0Px3KOsy9(chr(1440 - 1392) + chr(0b1000001 + 0o56) + '\062' + chr(860 - 808) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + '\x31' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(54) + chr(0b1100 + 0o52), 0b1000), ehT0Px3KOsy9(chr(2143 - 2095) + chr(0b1101111) + '\061' + chr(0b11001 + 0o35) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + chr(0b10101 + 0o35) + chr(0b110010) + chr(0b11101 + 0o32), 23509 - 23501), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + chr(0b1111 + 0o44) + '\x37' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(887 - 839) + '\157' + chr(0b110001) + chr(49) + chr(0b110011), 46231 - 46223), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(111 - 57), 0o10), ehT0Px3KOsy9('\060' + chr(10144 - 10033) + chr(50) + '\x35' + chr(0b11011 + 0o25), 0o10), ehT0Px3KOsy9('\x30' + chr(8193 - 8082) + '\x32' + '\x30' + chr(0b11110 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + '\x33' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(54) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b0 + 0o66) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10100 + 0o35) + chr(0b110010) + chr(0b101 + 0o55), 63713 - 63705), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(4076 - 3965) + chr(49) + chr(410 - 358) + chr(48), 60300 - 60292), ehT0Px3KOsy9('\060' + chr(10336 - 10225) + chr(0b11010 + 0o32) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1330 - 1280) + chr(463 - 414), 24749 - 24741), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\060' + chr(1815 - 1765), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + '\x36' + chr(0b10011 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(4969 - 4858) + chr(50) + '\063', 46519 - 46511), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1835 - 1784) + chr(2668 - 2615) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(782 - 732) + '\062' + chr(55), 8), ehT0Px3KOsy9(chr(383 - 335) + '\157' + chr(336 - 281) + chr(0b1000 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x33' + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + chr(0b110011) + chr(2572 - 2518) + chr(0b110011), 61679 - 61671), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(7061 - 6950) + chr(435 - 384) + chr(382 - 334) + chr(1087 - 1036), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(6206 - 6095) + chr(51) + chr(48) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4957 - 4846) + chr(0b110111) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(1890 - 1842) + chr(0b1100010 + 0o15) + chr(1078 - 1028) + chr(0b10111 + 0o40) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + chr(55) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(51) + chr(53) + chr(49), 17551 - 17543), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(48) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6229 - 6118) + '\x31' + '\x36' + '\064', 3661 - 3653)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(8833 - 8722) + chr(2214 - 2161) + chr(0b1011 + 0o45), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xde'), chr(100) + '\x65' + chr(0b101011 + 0o70) + chr(111) + chr(463 - 363) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(3295 - 3193) + chr(0b100101 + 0o10) + chr(2838 - 2782)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def tLRvilnXU7wb(t5Jz9byuSQ65, NE_S2zAzN4PI, Z0c2rFCFDCFc, iuvkQfeRHfn5, n4ljua2gi1Pr, AIvJRzLdDfgF=xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.'), chr(9166 - 9066) + chr(101) + chr(0b1000111 + 0o34) + '\157' + '\144' + chr(101))(chr(0b1001100 + 0o51) + '\164' + chr(0b1100110) + chr(1186 - 1141) + chr(2840 - 2784)), zWaF_2VBEDjk=None, NC2xHNLwzxcH=ehT0Px3KOsy9(chr(0b110000) + chr(0b1100100 + 0o13) + '\061', 0o10)): OeWW0F1dBPRQ = t5Jz9byuSQ65 with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86~8$E\xc50\xc5QE\x13\xf8\x8f.'), chr(100) + chr(0b100000 + 0o105) + chr(0b1100011) + chr(8703 - 8592) + chr(3515 - 3415) + chr(101))('\x75' + '\x74' + chr(5715 - 5613) + chr(137 - 92) + '\070'))(AIvJRzLdDfgF): for wgamNHppspXj in vQr8gNKaIaWE(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x9ej'\x12@\xc2?\xcfjS\x02\xc8\x93*\x7f\xcd\xf7k"), chr(0b1100100) + chr(0b1011011 + 0o12) + '\x63' + '\x6f' + chr(0b1100100) + chr(0b10111 + 0o116))(chr(0b10010 + 0o143) + chr(116) + chr(0b1001001 + 0o35) + chr(45) + chr(0b111000))) or xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9aE"x{\xd7\x10\xf5ay\x1f\xcd'), chr(100) + '\145' + chr(99) + chr(8397 - 8286) + chr(100) + chr(0b110 + 0o137))(chr(12028 - 11911) + '\x74' + chr(102) + chr(0b101101) + '\x38'))): YzJBPucQyDh2 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c~3(V\xf8y\xc4'), '\144' + '\145' + chr(0b101101 + 0o66) + chr(4514 - 4403) + chr(1906 - 1806) + chr(101))(chr(0b101110 + 0o107) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b101001 + 0o17)) % wgamNHppspXj with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86~8$E\xc50\xc5QE\x13\xf8\x8f.'), chr(6223 - 6123) + chr(0b1100101) + '\x63' + chr(12003 - 11892) + chr(100) + chr(0b10 + 0o143))(chr(10795 - 10678) + chr(0b1110100) + '\146' + '\055' + chr(2701 - 2645)))(YzJBPucQyDh2): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86~8$E\xc50\xc5QE\x13\xf8\x8f.'), chr(0b1100100) + chr(0b1100101) + chr(0b1010010 + 0o21) + chr(4240 - 4129) + chr(100) + chr(5721 - 5620))('\165' + chr(116) + '\x66' + chr(337 - 292) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x83z&+{\xc6(\xd4kX\x04\xfe\x90%'), chr(0b1100100) + '\145' + chr(6535 - 6436) + chr(8852 - 8741) + chr(100) + chr(4720 - 4619))(chr(0b1010 + 0o153) + '\164' + chr(102) + chr(45) + chr(0b11110 + 0o32))): SqiSOtYOqOJH = WOnrfm4dlYcf.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), None, Z0c2rFCFDCFc, n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, attention_type=n4ljua2gi1Pr.self_attention_type, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), '\144' + chr(101) + '\143' + chr(0b1010100 + 0o33) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(8992 - 8890) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(0b100001 + 0o103) + '\145' + '\143' + '\157' + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(1071 - 1026) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xff}S\x1c\xf1\xa0*r\xdc\xe0v\xc1\x1a=\x0e\x7f4&'), '\144' + chr(8223 - 8122) + '\143' + '\x6f' + '\x64' + chr(0b100 + 0o141))(chr(403 - 286) + chr(0b101101 + 0o107) + chr(102) + '\055' + chr(0b111000)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), '\144' + chr(101) + '\x63' + chr(0b1000010 + 0o55) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(1171 - 1115)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9(chr(0b110000) + chr(7463 - 7352) + chr(1965 - 1916), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), '\x64' + '\145' + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(8973 - 8856) + chr(0b1110100) + chr(0b1100110) + chr(0b1000 + 0o45) + chr(0b100001 + 0o27)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(4317 - 4217) + chr(0b1100101) + chr(0b11001 + 0o112) + chr(3056 - 2945) + '\144' + '\145')('\165' + chr(0b1110100) + chr(102) + chr(255 - 210) + chr(0b110011 + 0o5)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xff}S\x1c\xf1\xa0*r\xdc\xe0v\xc1\x1a=\x0e\x7fa-\xc0g\xb5\xb2^'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1010100 + 0o33) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(0b11111 + 0o16) + '\x38') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), '\x64' + '\145' + chr(0b1010100 + 0o17) + chr(0b1101111) + chr(100) + chr(6143 - 6042))(chr(117) + chr(116) + chr(0b1100 + 0o132) + chr(1092 - 1047) + chr(0b111000)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9('\060' + chr(111) + '\061', 8))) if NE_S2zAzN4PI is not None: with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86~8$E\xc50\xc5QE\x13\xf8\x8f.'), '\144' + chr(10028 - 9927) + chr(0b11011 + 0o110) + chr(0b11101 + 0o122) + chr(0b1100100) + chr(6260 - 6159))(chr(117) + chr(116) + '\146' + '\055' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x95q))A\xc4\x03\xc1zB\x15\xf9\x8b"i\xc6'), '\144' + chr(101) + chr(0b1111 + 0o124) + chr(111) + chr(0b1100100) + chr(101))('\x75' + '\x74' + '\x66' + '\055' + '\x38')): SqiSOtYOqOJH = WOnrfm4dlYcf.multihead_attention(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), NE_S2zAzN4PI, iuvkQfeRHfn5, n4ljua2gi1Pr.attention_key_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.attention_value_channels or n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.qzoyXN3kdhDL, n4ljua2gi1Pr.vRVqPOZ1hUG7, n4ljua2gi1Pr.RdMRr3qkYioQ, save_weights_to=zWaF_2VBEDjk, make_image_summary=NC2xHNLwzxcH) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), chr(0b110100 + 0o60) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(0b1100100) + '\145' + '\143' + chr(1494 - 1383) + chr(0b111110 + 0o46) + '\145')(chr(0b110011 + 0o102) + '\164' + chr(0b1011111 + 0o7) + '\055' + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xffkX\x13\xf8\x9b.t\xf7\xe4l\xc1\x16<\x14I~,\xec6\x8e'), chr(7120 - 7020) + chr(6868 - 6767) + '\143' + chr(1436 - 1325) + chr(100) + '\145')(chr(0b1011000 + 0o35) + '\x74' + '\146' + '\x2d' + chr(56)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), chr(0b10001 + 0o123) + '\145' + chr(0b1100011) + chr(0b101010 + 0o105) + '\x64' + chr(101))(chr(0b1010001 + 0o44) + chr(116) + chr(102) + '\055' + chr(0b111000)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9('\x30' + chr(11530 - 11419) + '\x31', 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), '\144' + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(116) + '\x66' + chr(45) + chr(0b1011 + 0o55)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(0b1010101 + 0o17) + '\x65' + chr(99) + chr(1978 - 1867) + chr(0b1100100) + chr(0b101001 + 0o74))('\165' + chr(12213 - 12097) + '\146' + chr(45) + chr(0b101000 + 0o20)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xffkX\x13\xf8\x9b.t\xf7\xe4l\xc1\x16<\x14I~,\xecc\x85\xe4N\xc0\xd6\xa7'), chr(9676 - 9576) + '\145' + chr(99) + '\157' + chr(100) + '\x65')('\x75' + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), chr(9284 - 9184) + chr(3758 - 3657) + chr(0b110100 + 0o57) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1101100 + 0o11) + chr(116) + chr(0b1100001 + 0o5) + chr(0b101101) + '\070'))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9('\060' + chr(911 - 800) + chr(0b110001), 8))) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x86~8$E\xc50\xc5QE\x13\xf8\x8f.'), '\144' + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(0b111011 + 0o52))(chr(117) + '\x74' + chr(0b1100110) + chr(774 - 729) + chr(0b11010 + 0o36)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x96y$'), chr(8506 - 8406) + chr(101) + chr(9356 - 9257) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b10100 + 0o141) + chr(131 - 15) + chr(10092 - 9990) + '\x2d' + chr(858 - 802))): SqiSOtYOqOJH = jSKPaHwSAfVv.dense_relu_dense(jSKPaHwSAfVv.layer_preprocess(OeWW0F1dBPRQ, n4ljua2gi1Pr), n4ljua2gi1Pr.filter_size, n4ljua2gi1Pr.qzoyXN3kdhDL, dropout=n4ljua2gi1Pr.PJc0PNdBnSag) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\144' + chr(3838 - 3737))(chr(117) + chr(0b1110100) + chr(8130 - 8028) + chr(0b101101) + chr(1157 - 1101)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(0b1100100) + '\145' + chr(99) + chr(111) + chr(100) + '\145')(chr(0b1101110 + 0o7) + chr(0b1110100) + chr(0b100101 + 0o101) + '\055' + chr(0b1101 + 0o53)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xffhP\x1e\xc8\xda/'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(0b111000 + 0o55))('\x75' + '\164' + chr(102) + chr(989 - 944) + chr(2697 - 2641)) % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), chr(5841 - 5741) + chr(0b1001000 + 0o35) + chr(99) + chr(111) + chr(100) + chr(0b1100101))(chr(0b111100 + 0o71) + '\164' + '\146' + chr(0b111 + 0o46) + chr(1466 - 1410)))(SqiSOtYOqOJH, axis=-ehT0Px3KOsy9('\060' + chr(0b1000000 + 0o57) + chr(49), 8))) OeWW0F1dBPRQ = jSKPaHwSAfVv.layer_postprocess(OeWW0F1dBPRQ, SqiSOtYOqOJH, n4ljua2gi1Pr) xafqLlk3kkUe(bdVxKm4tezOp, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93p&!A\xc4(\xff`W\x1d\xf2\x9b\x14i\xdd\xf1h\xc0\x07!'), chr(100) + chr(0b1100101) + chr(99) + chr(6646 - 6535) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9ep8 W'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(219 - 118))('\165' + chr(10949 - 10833) + '\x66' + chr(45) + chr(1852 - 1796)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x94z)"@\xc2.\xffhP\x1e\xc8\x8f$u\xdc\xda=\xd1'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(3024 - 2924) + '\145')(chr(1519 - 1402) + chr(116) + '\146' + chr(1304 - 1259) + '\x38') % wgamNHppspXj, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x95K\x05:k\xff.\xc3eg\x1e\xe4'), chr(0b1001111 + 0o25) + '\145' + chr(0b1011001 + 0o12) + chr(0b1101001 + 0o6) + chr(8287 - 8187) + '\x65')(chr(117) + chr(1158 - 1042) + '\x66' + '\x2d' + chr(0b101001 + 0o17)))(OeWW0F1dBPRQ, axis=-ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + '\x31', 8))) return xafqLlk3kkUe(jSKPaHwSAfVv, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c~3(V\xf8,\xd2kF\x02\xf8\x9c.u\xdb'), chr(100) + chr(5548 - 5447) + '\143' + chr(0b111100 + 0o63) + chr(0b111001 + 0o53) + chr(0b1100101))(chr(0b1100101 + 0o20) + chr(0b1010011 + 0o41) + '\146' + chr(0b101101) + chr(0b111000)))(OeWW0F1dBPRQ, n4ljua2gi1Pr)
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
iterative_encoder_decoder
def iterative_encoder_decoder(encoder_input, encoder_self_attention_bias, encoder_decoder_attention_bias, query, hparams): """Iterative encoder decoder.""" for _ in range(hparams.num_rec_steps): with tf.variable_scope("step", reuse=tf.AUTO_REUSE): encoder_output = image_question_encoder( encoder_input, encoder_self_attention_bias, hparams, query) decoder_output = decoder( query, encoder_output, None, encoder_decoder_attention_bias, hparams) encoder_input = encoder_output query = decoder_output return decoder_output
python
def iterative_encoder_decoder(encoder_input, encoder_self_attention_bias, encoder_decoder_attention_bias, query, hparams): """Iterative encoder decoder.""" for _ in range(hparams.num_rec_steps): with tf.variable_scope("step", reuse=tf.AUTO_REUSE): encoder_output = image_question_encoder( encoder_input, encoder_self_attention_bias, hparams, query) decoder_output = decoder( query, encoder_output, None, encoder_decoder_attention_bias, hparams) encoder_input = encoder_output query = decoder_output return decoder_output
[ "def", "iterative_encoder_decoder", "(", "encoder_input", ",", "encoder_self_attention_bias", ",", "encoder_decoder_attention_bias", ",", "query", ",", "hparams", ")", ":", "for", "_", "in", "range", "(", "hparams", ".", "num_rec_steps", ")", ":", "with", "tf", ".", "variable_scope", "(", "\"step\"", ",", "reuse", "=", "tf", ".", "AUTO_REUSE", ")", ":", "encoder_output", "=", "image_question_encoder", "(", "encoder_input", ",", "encoder_self_attention_bias", ",", "hparams", ",", "query", ")", "decoder_output", "=", "decoder", "(", "query", ",", "encoder_output", ",", "None", ",", "encoder_decoder_attention_bias", ",", "hparams", ")", "encoder_input", "=", "encoder_output", "query", "=", "decoder_output", "return", "decoder_output" ]
Iterative encoder decoder.
[ "Iterative", "encoder", "decoder", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L654-L678
train
Iterative encoder decoder.
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,_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,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(219 - 171) + chr(111) + chr(51) + chr(0b110101) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1330 - 1219) + chr(1191 - 1138) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(553 - 442) + '\x31' + chr(0b110000) + '\067', 29970 - 29962), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\x36' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(1861 - 1813) + '\x6f' + '\060', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b100011 + 0o17) + chr(0b110010) + chr(0b1010 + 0o52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b0 + 0o62) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110000) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(3652 - 3541) + '\062' + chr(2917 - 2862), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1005 - 956) + chr(1008 - 955) + '\x35', 39389 - 39381), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(889 - 839) + chr(0b111 + 0o51) + chr(0b10010 + 0o37), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(2061 - 1950) + chr(2287 - 2232) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + chr(0b110010) + chr(50) + '\066', 7946 - 7938), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(11245 - 11134) + '\x33' + chr(232 - 181) + chr(0b110010), 62810 - 62802), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(49) + chr(0b10010 + 0o42) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(126 - 78) + chr(0b101000 + 0o107) + '\062' + '\064' + '\066', 59634 - 59626), ehT0Px3KOsy9(chr(1678 - 1630) + '\157' + '\061' + '\x37' + chr(0b1011 + 0o47), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x34' + chr(0b10001 + 0o37), 39237 - 39229), ehT0Px3KOsy9(chr(600 - 552) + chr(0b1101111) + '\062' + chr(533 - 480) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + '\x33' + chr(49) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(10845 - 10734) + chr(0b10010 + 0o37) + chr(0b111 + 0o51) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11101 + 0o23), 8), ehT0Px3KOsy9(chr(1168 - 1120) + chr(111) + '\064' + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(5611 - 5500) + chr(0b110011) + '\x32' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11050 - 10939) + '\x33' + '\x35' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2323 - 2273) + chr(0b110111) + chr(361 - 311), 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(3848 - 3737) + chr(0b110010) + chr(1854 - 1803) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(63 - 13) + chr(52) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(52) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1625 - 1574) + chr(880 - 829) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(144 - 93) + chr(0b110111) + chr(1456 - 1404), 0o10), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b10010 + 0o40) + '\x37' + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + chr(0b110001) + chr(54) + chr(0b110001), 59995 - 59987), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + chr(0b110010) + '\x33' + chr(2338 - 2284), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o12) + chr(0b101111 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\x32' + '\x33' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(52) + chr(795 - 742), 8), ehT0Px3KOsy9(chr(1847 - 1799) + chr(111) + '\061' + chr(0b110011) + chr(0b110101), 55185 - 55177), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + '\062' + chr(2722 - 2667) + '\062', 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + chr(0b10100 + 0o34), 41831 - 41823)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc2'), chr(0b100100 + 0o100) + chr(3400 - 3299) + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(0b1001011 + 0o51) + chr(102) + chr(955 - 910) + chr(2265 - 2209)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def m6B_k6p4EzWq(LDEM1Zag9l0P, cMrr2bkEBgTQ, iuvkQfeRHfn5, MgmdEYXEleNe, n4ljua2gi1Pr): for VNGQdHSFPrso in vQr8gNKaIaWE(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x82_*\xedr\xf1q\xd8d\x19\xe4H\xe5'), chr(3810 - 3710) + '\x65' + chr(0b110 + 0o135) + '\157' + '\144' + chr(0b1 + 0o144))(chr(0b1110 + 0o147) + chr(0b111011 + 0o71) + chr(0b1100110) + chr(45) + '\070'))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9aK5\xdba\xf6~\xe2H\x1e\xe2W\xe6\xbf'), '\x64' + '\145' + chr(99) + chr(0b1101111) + chr(100) + chr(7520 - 7419))('\x75' + chr(0b1101 + 0o147) + chr(10185 - 10083) + '\055' + chr(2197 - 2141)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f^"\xc2'), chr(5941 - 5841) + chr(0b1011011 + 0o12) + chr(99) + '\157' + chr(0b1100100) + chr(101))(chr(7899 - 7782) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000)), reuse=xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xad\x7f\x13\xfd_\xc6W\xd2D('), '\x64' + chr(4024 - 3923) + chr(99) + '\x6f' + '\144' + chr(101))('\x75' + chr(0b1101111 + 0o5) + chr(102) + chr(1456 - 1411) + chr(1584 - 1528)))): NE_S2zAzN4PI = m1_nPu7YvfHI(LDEM1Zag9l0P, cMrr2bkEBgTQ, n4ljua2gi1Pr, MgmdEYXEleNe) JU9Bzy7FPp94 = tLRvilnXU7wb(MgmdEYXEleNe, NE_S2zAzN4PI, None, iuvkQfeRHfn5, n4ljua2gi1Pr) LDEM1Zag9l0P = NE_S2zAzN4PI MgmdEYXEleNe = JU9Bzy7FPp94 return JU9Bzy7FPp94
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
vqa_self_attention_base
def vqa_self_attention_base(): """VQA attention baseline hparams.""" hparams = common_hparams.basic_params1() hparams.batch_size = 128 hparams.use_fixed_batch_size = True, hparams.optimizer = "adam" hparams.optimizer_adam_beta1 = 0.9 hparams.optimizer_adam_beta2 = 0.997 hparams.optimizer_adam_epsilon = 1e-9 hparams.weight_decay = 0. hparams.clip_grad_norm = 0. hparams.initializer = "xavier" hparams.learning_rate_schedule = ( "constant*linear_warmup*rsqrt_normalized_decay") hparams.learning_rate_warmup_steps = 8000 hparams.learning_rate_constant = 1e-3 hparams.learning_rate_decay_rate = 0.5 hparams.learning_rate_decay_steps = 50000 hparams.dropout = 0.5 hparams.summarize_grads = True hparams.summarize_vars = True # not used hparams hparams.label_smoothing = 0. hparams.multiply_embedding_mode = "sqrt_depth" # add new hparams # use raw image as input hparams.add_hparam("image_input_type", "image") hparams.add_hparam("image_model_fn", "resnet_v1_152") hparams.add_hparam("resize_side", 512) hparams.add_hparam("height", 448) hparams.add_hparam("width", 448) hparams.add_hparam("distort", True) hparams.add_hparam("train_resnet", False) # image parts hparams.add_hparam("image_feat_preprocess_proj", True) hparams.add_hparam("image_feat_preprocess_layernorm", True) hparams.add_hparam("image_feat_encode", True) hparams.add_hparam("image_hidden_size", 0) # default to hidden_size hparams.add_hparam("image_filter_size", 0) # defaults to filter_size # question hidden size hparams.hidden_size = 512 hparams.filter_size = 1024 hparams.num_hidden_layers = 4 hparams.add_hparam("multimodal_combine", "concat") hparams.add_hparam("num_mlp_layers", 1) hparams.add_hparam("mlp_size", 1024) # self attention parts hparams.norm_type = "layer" hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" hparams.layer_prepostprocess_dropout = 0.1 hparams.attention_dropout = 0.1 hparams.relu_dropout = 0.1 hparams.add_hparam("pos", "timing") hparams.add_hparam("num_encoder_layers", 0) hparams.add_hparam("num_decoder_layers", 0) hparams.add_hparam("num_heads", 8) hparams.add_hparam("attention_key_channels", 0) hparams.add_hparam("attention_value_channels", 0) hparams.add_hparam("self_attention_type", "dot_product") hparams.add_hparam("image_self_attention_type", "dot_product") hparams.add_hparam("question_self_attention_type", "dot_product") hparams.add_hparam("block_length", 1) hparams.add_hparam("scale_dotproduct", True) # iterative part hparams.add_hparam("num_rec_steps", 3) return hparams
python
def vqa_self_attention_base(): """VQA attention baseline hparams.""" hparams = common_hparams.basic_params1() hparams.batch_size = 128 hparams.use_fixed_batch_size = True, hparams.optimizer = "adam" hparams.optimizer_adam_beta1 = 0.9 hparams.optimizer_adam_beta2 = 0.997 hparams.optimizer_adam_epsilon = 1e-9 hparams.weight_decay = 0. hparams.clip_grad_norm = 0. hparams.initializer = "xavier" hparams.learning_rate_schedule = ( "constant*linear_warmup*rsqrt_normalized_decay") hparams.learning_rate_warmup_steps = 8000 hparams.learning_rate_constant = 1e-3 hparams.learning_rate_decay_rate = 0.5 hparams.learning_rate_decay_steps = 50000 hparams.dropout = 0.5 hparams.summarize_grads = True hparams.summarize_vars = True # not used hparams hparams.label_smoothing = 0. hparams.multiply_embedding_mode = "sqrt_depth" # add new hparams # use raw image as input hparams.add_hparam("image_input_type", "image") hparams.add_hparam("image_model_fn", "resnet_v1_152") hparams.add_hparam("resize_side", 512) hparams.add_hparam("height", 448) hparams.add_hparam("width", 448) hparams.add_hparam("distort", True) hparams.add_hparam("train_resnet", False) # image parts hparams.add_hparam("image_feat_preprocess_proj", True) hparams.add_hparam("image_feat_preprocess_layernorm", True) hparams.add_hparam("image_feat_encode", True) hparams.add_hparam("image_hidden_size", 0) # default to hidden_size hparams.add_hparam("image_filter_size", 0) # defaults to filter_size # question hidden size hparams.hidden_size = 512 hparams.filter_size = 1024 hparams.num_hidden_layers = 4 hparams.add_hparam("multimodal_combine", "concat") hparams.add_hparam("num_mlp_layers", 1) hparams.add_hparam("mlp_size", 1024) # self attention parts hparams.norm_type = "layer" hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" hparams.layer_prepostprocess_dropout = 0.1 hparams.attention_dropout = 0.1 hparams.relu_dropout = 0.1 hparams.add_hparam("pos", "timing") hparams.add_hparam("num_encoder_layers", 0) hparams.add_hparam("num_decoder_layers", 0) hparams.add_hparam("num_heads", 8) hparams.add_hparam("attention_key_channels", 0) hparams.add_hparam("attention_value_channels", 0) hparams.add_hparam("self_attention_type", "dot_product") hparams.add_hparam("image_self_attention_type", "dot_product") hparams.add_hparam("question_self_attention_type", "dot_product") hparams.add_hparam("block_length", 1) hparams.add_hparam("scale_dotproduct", True) # iterative part hparams.add_hparam("num_rec_steps", 3) return hparams
[ "def", "vqa_self_attention_base", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "hparams", ".", "batch_size", "=", "128", "hparams", ".", "use_fixed_batch_size", "=", "True", ",", "hparams", ".", "optimizer", "=", "\"adam\"", "hparams", ".", "optimizer_adam_beta1", "=", "0.9", "hparams", ".", "optimizer_adam_beta2", "=", "0.997", "hparams", ".", "optimizer_adam_epsilon", "=", "1e-9", "hparams", ".", "weight_decay", "=", "0.", "hparams", ".", "clip_grad_norm", "=", "0.", "hparams", ".", "initializer", "=", "\"xavier\"", "hparams", ".", "learning_rate_schedule", "=", "(", "\"constant*linear_warmup*rsqrt_normalized_decay\"", ")", "hparams", ".", "learning_rate_warmup_steps", "=", "8000", "hparams", ".", "learning_rate_constant", "=", "1e-3", "hparams", ".", "learning_rate_decay_rate", "=", "0.5", "hparams", ".", "learning_rate_decay_steps", "=", "50000", "hparams", ".", "dropout", "=", "0.5", "hparams", ".", "summarize_grads", "=", "True", "hparams", ".", "summarize_vars", "=", "True", "# not used hparams", "hparams", ".", "label_smoothing", "=", "0.", "hparams", ".", "multiply_embedding_mode", "=", "\"sqrt_depth\"", "# add new hparams", "# use raw image as input", "hparams", ".", "add_hparam", "(", "\"image_input_type\"", ",", "\"image\"", ")", "hparams", ".", "add_hparam", "(", "\"image_model_fn\"", ",", "\"resnet_v1_152\"", ")", "hparams", ".", "add_hparam", "(", "\"resize_side\"", ",", "512", ")", "hparams", ".", "add_hparam", "(", "\"height\"", ",", "448", ")", "hparams", ".", "add_hparam", "(", "\"width\"", ",", "448", ")", "hparams", ".", "add_hparam", "(", "\"distort\"", ",", "True", ")", "hparams", ".", "add_hparam", "(", "\"train_resnet\"", ",", "False", ")", "# image parts", "hparams", ".", "add_hparam", "(", "\"image_feat_preprocess_proj\"", ",", "True", ")", "hparams", ".", "add_hparam", "(", "\"image_feat_preprocess_layernorm\"", ",", "True", ")", "hparams", ".", "add_hparam", "(", "\"image_feat_encode\"", ",", "True", ")", "hparams", ".", "add_hparam", "(", "\"image_hidden_size\"", ",", "0", ")", "# default to hidden_size", "hparams", ".", "add_hparam", "(", "\"image_filter_size\"", ",", "0", ")", "# defaults to filter_size", "# question hidden size", "hparams", ".", "hidden_size", "=", "512", "hparams", ".", "filter_size", "=", "1024", "hparams", ".", "num_hidden_layers", "=", "4", "hparams", ".", "add_hparam", "(", "\"multimodal_combine\"", ",", "\"concat\"", ")", "hparams", ".", "add_hparam", "(", "\"num_mlp_layers\"", ",", "1", ")", "hparams", ".", "add_hparam", "(", "\"mlp_size\"", ",", "1024", ")", "# self attention parts", "hparams", ".", "norm_type", "=", "\"layer\"", "hparams", ".", "layer_preprocess_sequence", "=", "\"n\"", "hparams", ".", "layer_postprocess_sequence", "=", "\"da\"", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.1", "hparams", ".", "attention_dropout", "=", "0.1", "hparams", ".", "relu_dropout", "=", "0.1", "hparams", ".", "add_hparam", "(", "\"pos\"", ",", "\"timing\"", ")", "hparams", ".", "add_hparam", "(", "\"num_encoder_layers\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"num_decoder_layers\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"num_heads\"", ",", "8", ")", "hparams", ".", "add_hparam", "(", "\"attention_key_channels\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"attention_value_channels\"", ",", "0", ")", "hparams", ".", "add_hparam", "(", "\"self_attention_type\"", ",", "\"dot_product\"", ")", "hparams", ".", "add_hparam", "(", "\"image_self_attention_type\"", ",", "\"dot_product\"", ")", "hparams", ".", "add_hparam", "(", "\"question_self_attention_type\"", ",", "\"dot_product\"", ")", "hparams", ".", "add_hparam", "(", "\"block_length\"", ",", "1", ")", "hparams", ".", "add_hparam", "(", "\"scale_dotproduct\"", ",", "True", ")", "# iterative part", "hparams", ".", "add_hparam", "(", "\"num_rec_steps\"", ",", "3", ")", "return", "hparams" ]
VQA attention baseline hparams.
[ "VQA", "attention", "baseline", "hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L682-L756
train
VQA attention base hparams.
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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zQpDQB3,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(0b10000 + 0o40) + '\x6f' + chr(0b110011) + chr(0b100111 + 0o13) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110001) + chr(0b11 + 0o61), 2256 - 2248), ehT0Px3KOsy9(chr(2194 - 2146) + chr(0b1101111) + chr(0b111 + 0o53) + chr(53) + chr(0b10 + 0o56), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101100 + 0o3) + chr(0b110011) + chr(55) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1134 - 1085) + '\067' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b110111) + chr(0b11110 + 0o31), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110110) + chr(417 - 366), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b110011) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + '\x33' + chr(0b110000) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100100 + 0o15) + '\064' + '\067', 29870 - 29862), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(4115 - 4004) + chr(1276 - 1226) + '\065' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(0b10101 + 0o42) + chr(642 - 587), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\064' + '\x36', 0o10), ehT0Px3KOsy9(chr(1071 - 1023) + '\x6f' + chr(49) + chr(2320 - 2267) + chr(331 - 276), 0b1000), ehT0Px3KOsy9(chr(1335 - 1287) + chr(0b10 + 0o155) + chr(1015 - 966) + chr(0b110111) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(0b110 + 0o54) + '\x30' + chr(0b10001 + 0o43), 42501 - 42493), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(1766 - 1655) + chr(49) + chr(0b101111 + 0o5) + chr(0b101010 + 0o10), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1100 + 0o46) + '\x37' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(767 - 717) + chr(0b110110), 11897 - 11889), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + '\063' + chr(0b110011) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(8073 - 7962) + chr(49) + chr(782 - 727) + chr(0b0 + 0o63), 0o10), ehT0Px3KOsy9(chr(1115 - 1067) + chr(111) + '\x33' + '\x37' + chr(779 - 731), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1836 - 1786) + '\x34' + chr(49), 0o10), ehT0Px3KOsy9(chr(227 - 179) + '\x6f' + chr(50) + chr(931 - 880) + '\x37', 18762 - 18754), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + chr(52) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10110 + 0o34) + '\x30' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2045 - 1934) + chr(51) + chr(0b110111) + '\060', 8), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + chr(2485 - 2434) + '\x32' + chr(1198 - 1150), 52907 - 52899), ehT0Px3KOsy9(chr(1342 - 1294) + chr(0b110010 + 0o75) + chr(0b110010) + chr(0b101010 + 0o14) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11101 + 0o122) + '\x37' + chr(0b11110 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(50) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101 + 0o55) + chr(48) + chr(982 - 930), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(600 - 550) + chr(0b100001 + 0o23) + chr(1248 - 1195), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(1903 - 1854), 0o10), ehT0Px3KOsy9(chr(427 - 379) + chr(111) + '\x31' + chr(470 - 420) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101101 + 0o5) + '\066' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(51) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(11767 - 11656) + chr(0b100111 + 0o12) + chr(1466 - 1413) + chr(0b101 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(54) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110101) + chr(0b110001), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110 + 0o57) + chr(2176 - 2128), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfa'), chr(0b1011101 + 0o7) + chr(7056 - 6955) + '\143' + chr(399 - 288) + chr(0b1001011 + 0o31) + chr(101))('\165' + chr(3550 - 3434) + '\x66' + chr(0b101101 + 0o0) + chr(0b1101 + 0o53)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def UDU9DitVzNHP(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(847 - 799) + '\157' + '\x32' + chr(48) + '\x30', ord("\x08")) n4ljua2gi1Pr.V9YwhDsFOlGK = (ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31', 0b1000),) n4ljua2gi1Pr.XdKNcYRObPK3 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xc9\x92'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + chr(7696 - 7595))('\165' + '\164' + '\146' + chr(0b10111 + 0o26) + chr(0b111000)) n4ljua2gi1Pr.GcOjyd7zcDH8 = 0.9 n4ljua2gi1Pr.CBOVKNT0M9cG = 0.997 n4ljua2gi1Pr.o17O_bIptWdl = 1e-09 n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0 n4ljua2gi1Pr.SdNSZNVkVjLh = 0.0 n4ljua2gi1Pr.kwfuYzkY5C57 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xad\xde\x96\x19\x8d'), chr(0b10 + 0o142) + '\145' + chr(99) + '\x6f' + '\144' + chr(0b1100101))('\165' + '\x74' + '\146' + chr(1638 - 1593) + chr(2203 - 2147)) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xa3\xc6\x8c\x08\x9e\x1dj\xe9\x0b\xc4\x11\x83\x0e\x0b\xdb\x15\xda$\xb3\x0e\x88\x8b\xed\xd5\xf6\x8a\xa4\xeeR|\xf6\xc8x<\xda\xe0\r\x90\xf6\xb0\xa9\xcb\x9e\x05'), chr(0b111000 + 0o54) + chr(101) + chr(0b1001000 + 0o33) + chr(794 - 683) + chr(0b110010 + 0o62) + chr(0b1101 + 0o130))(chr(0b1100101 + 0o20) + '\x74' + chr(102) + chr(0b1 + 0o54) + chr(56)) n4ljua2gi1Pr.fHyhoyGmdvM9 = ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(2639 - 2584) + chr(53) + chr(48) + chr(1609 - 1561), ord("\x08")) n4ljua2gi1Pr.Ot9HUjnkxXA_ = 0.001 n4ljua2gi1Pr.cp7EqSq4klv1 = 0.5 n4ljua2gi1Pr.YBAB1XyoxOc5 = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\064' + chr(49) + chr(1928 - 1875) + '\062' + chr(0b110000), ord("\x08")) n4ljua2gi1Pr.ag0mwEgWzjYv = 0.5 n4ljua2gi1Pr.g1CKJR0X4YHm = ehT0Px3KOsy9(chr(48) + chr(9928 - 9817) + '\061', 8) n4ljua2gi1Pr.rMHVOllrHaoo = ehT0Px3KOsy9(chr(442 - 394) + '\157' + chr(0b11000 + 0o31), 8) n4ljua2gi1Pr.FSjUgdaczzRk = 0.0 n4ljua2gi1Pr.q5UEpHM7ZIlT = xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xbd\xda\x8b#\x9b\x16n\xb7\x0f'), chr(0b1100100) + chr(0b1011001 + 0o14) + chr(99) + chr(111) + '\144' + '\x65')(chr(6994 - 6877) + chr(116) + chr(0b1011000 + 0o16) + chr(45) + chr(2251 - 2195)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(0b11 + 0o142) + '\x63' + chr(0b1100000 + 0o17) + chr(0b1100000 + 0o4) + chr(0b101001 + 0o74))(chr(0b1110101) + chr(0b1110100) + chr(9940 - 9838) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x1ap\xb3\x12\xd9 \x92\x16\t\xe1'), '\x64' + chr(101) + chr(0b1001001 + 0o32) + chr(1054 - 943) + '\x64' + chr(0b1100101))(chr(0b111000 + 0o75) + chr(0b1011000 + 0o34) + '\146' + chr(107 - 62) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(9351 - 9251) + '\145')(chr(1783 - 1666) + '\164' + chr(0b1011101 + 0o11) + '\055' + '\070')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + '\x65' + '\x63' + '\157' + chr(100) + '\x65')(chr(7137 - 7020) + chr(0b1010001 + 0o43) + '\x66' + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x1eq\xa7\x02\xc1 \x80\x01'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1111 + 0o125) + chr(101))('\165' + '\164' + chr(0b1101 + 0o131) + chr(0b101101) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6\xa9\xdb\x91\x19\x8b,h\xf28\x9cJ\xd4'), chr(4557 - 4457) + chr(0b1100101) + chr(0b1100011) + chr(2961 - 2850) + chr(100) + chr(0b1010001 + 0o24))('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(0b10000 + 0o50))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\144' + '\145' + chr(0b1010001 + 0o22) + chr(0b1101111) + '\144' + chr(0b101 + 0o140))('\x75' + chr(1440 - 1324) + '\146' + chr(1711 - 1666) + chr(0b11100 + 0o34)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa6\xa9\xdb\x96\x06\x9a,m\xaa\x03\xc8'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(7816 - 7716) + '\145')('\165' + '\x74' + '\x66' + '\x2d' + chr(1285 - 1229)), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\060' + chr(0b101010 + 0o6) + chr(0b110000), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(0b1001010 + 0o33) + '\143' + chr(111) + chr(3457 - 3357) + chr(0b1100101))(chr(0b100110 + 0o117) + '\164' + chr(102) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xa9\xc1\x98\x14\x8b'), chr(4183 - 4083) + chr(0b1100101) + chr(0b100010 + 0o101) + chr(0b1001111 + 0o40) + chr(0b1100100) + chr(2004 - 1903))(chr(0b1110101) + chr(7458 - 7342) + chr(0b1100110) + chr(0b1000 + 0o45) + chr(2777 - 2721)), ehT0Px3KOsy9(chr(454 - 406) + chr(0b1011 + 0o144) + '\x37' + '\060' + chr(0b101110 + 0o2), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1000110 + 0o36) + chr(101) + '\143' + chr(0b1101111) + chr(100) + chr(6848 - 6747))('\x75' + chr(0b110110 + 0o76) + '\x66' + '\055' + chr(2576 - 2520)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\xa5\xcc\x8b\x14'), '\144' + '\145' + '\x63' + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + chr(116) + '\146' + chr(45) + chr(0b111000)), ehT0Px3KOsy9('\x30' + chr(6533 - 6422) + chr(2017 - 1962) + '\060' + '\x30', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + '\145' + chr(0b1100011 + 0o0) + chr(0b1101111) + '\x64' + chr(0b1010111 + 0o16))(chr(0b1001110 + 0o47) + '\164' + chr(5418 - 5316) + chr(45) + chr(0b11010 + 0o36)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xa5\xdb\x8b\x13\x8d\x07'), '\x64' + '\145' + chr(0b10111 + 0o114) + chr(4966 - 4855) + chr(100) + chr(230 - 129))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + chr(0b101110 + 0o12)), ehT0Px3KOsy9(chr(48) + chr(8990 - 8879) + chr(1838 - 1789), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(0b101111 + 0o65) + '\x65')(chr(0b110 + 0o157) + chr(116) + chr(0b100011 + 0o103) + chr(45) + chr(3083 - 3027)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\xbe\xc9\x96\x12\xa0\x01{\xb0\t\xc8\x0b'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1000101 + 0o37) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(126 - 81) + '\070'), ehT0Px3KOsy9(chr(2184 - 2136) + '\x6f' + chr(1620 - 1572), 53970 - 53962)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(4372 - 4271) + '\143' + chr(0b111000 + 0o67) + chr(0b1000110 + 0o36) + '\145')(chr(0b1101100 + 0o11) + chr(116) + chr(440 - 338) + chr(1965 - 1920) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x15{\xa2\x13\xf2\x0f\x94\n\t\xf6\r\xd83\xad\x08\xa7\xd1\xed\xc9\xed'), chr(731 - 631) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\165' + chr(3198 - 3082) + chr(102) + chr(45) + '\070'), ehT0Px3KOsy9(chr(48) + chr(111) + '\061', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b101110 + 0o66) + '\x65' + '\143' + '\x6f' + chr(924 - 824) + chr(101))('\x75' + chr(0b110001 + 0o103) + '\146' + chr(1142 - 1097) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x15{\xa2\x13\xf2\x0f\x94\n\t\xf6\r\xd83\xad\x08\xa7\xcd\xfe\xdf\xe2\x8a\xbe\xdeN~'), '\x64' + '\145' + chr(99) + chr(0b100110 + 0o111) + chr(100) + chr(8992 - 8891))(chr(0b111000 + 0o75) + chr(6734 - 6618) + '\x66' + '\055' + chr(56)), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101110 + 0o3), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1010111 + 0o15) + chr(101) + chr(3079 - 2980) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x15{\xa2\x13\xf2\x1a\x88\x0c\x16\xe0\x07'), chr(100) + chr(6954 - 6853) + chr(0b1100011) + chr(111) + chr(100) + chr(2555 - 2454))(chr(0b1110101) + '\164' + chr(6434 - 6332) + '\055' + chr(0b11000 + 0o40)), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(461 - 412), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b110010 + 0o75) + chr(7043 - 6943) + chr(101))('\x75' + chr(116) + '\146' + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x1bw\xa7\x03\xc8\x11\xb9\x1c\x10\xfe\x07'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(9642 - 9541))(chr(247 - 130) + chr(11634 - 11518) + chr(0b1011000 + 0o16) + '\x2d' + chr(56)), ehT0Px3KOsy9(chr(0b110000) + chr(6526 - 6415) + chr(0b1011 + 0o45), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(7093 - 6993) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(117) + chr(4430 - 4314) + chr(0b1100110) + chr(0b10110 + 0o27) + chr(0b100110 + 0o22)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x15w\xaf\x13\xc8\r\xb9\x1c\x10\xfe\x07'), chr(1472 - 1372) + chr(1622 - 1521) + chr(99) + '\157' + '\x64' + chr(7710 - 7609))('\x75' + '\x74' + '\146' + chr(1536 - 1491) + '\070'), ehT0Px3KOsy9('\x30' + chr(10629 - 10518) + chr(0b110000), 8)) n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9('\x30' + chr(11064 - 10953) + '\x31' + chr(48) + chr(0b110000) + '\x30', 8) n4ljua2gi1Pr.deybX8NJ0oEI = ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b11110 + 0o22) + chr(0b1000 + 0o50) + chr(0b110000), ord("\x08")) n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9('\060' + '\157' + chr(0b1000 + 0o54), 0b1000) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(4933 - 4833) + chr(2097 - 1996))(chr(2334 - 2217) + chr(116) + chr(0b11101 + 0o111) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\xb9\xc4\x8b\x15\x92\x1cz\xa2\x0b\xf2\x1c\x89\x02\x1b\xed\x0c\xde'), '\x64' + chr(0b110000 + 0o65) + '\x63' + '\x6f' + chr(0b1001010 + 0o32) + '\145')(chr(7782 - 7665) + '\164' + '\x66' + chr(0b10111 + 0o26) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xa3\xc6\x9c\x1d\x8b'), '\x64' + '\145' + chr(0b1100011) + '\157' + '\x64' + chr(101))(chr(3397 - 3280) + chr(0b1000100 + 0o60) + chr(0b1100100 + 0o2) + chr(45) + '\x38')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\144' + '\145' + chr(9371 - 9272) + '\x6f' + chr(8007 - 7907) + '\x65')(chr(117) + '\164' + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb9\xc5\xa0\x11\x93\x03A\xaf\x06\xd4\x1a\x94\x1c'), chr(0b1110 + 0o126) + '\x65' + chr(0b1100011) + chr(0b100110 + 0o111) + chr(0b1010000 + 0o24) + chr(0b11 + 0o142))(chr(3511 - 3394) + '\x74' + '\146' + chr(0b101101) + '\070'), ehT0Px3KOsy9(chr(765 - 717) + chr(1990 - 1879) + '\061', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(8761 - 8661) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b111 + 0o135) + chr(101))(chr(11259 - 11142) + '\164' + '\x66' + chr(0b1000 + 0o45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\xa0\xd8\xa0\x0f\x96\t{'), chr(0b1100100) + chr(101) + '\x63' + chr(5523 - 5412) + '\144' + '\145')(chr(0b1110101) + chr(0b1100010 + 0o22) + '\x66' + chr(0b100001 + 0o14) + chr(0b1110 + 0o52)), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(0b110000) + chr(1389 - 1341) + '\060', 8)) n4ljua2gi1Pr.LE5Fu6Tcl7nw = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb8\xad\xd1\x9a\x0e'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(8751 - 8640) + chr(0b1011000 + 0o14) + chr(0b1101 + 0o130))(chr(0b1111 + 0o146) + chr(4402 - 4286) + chr(102) + chr(45) + chr(0b111000)) n4ljua2gi1Pr.WjY1aZ7lwLOu = xafqLlk3kkUe(SXOLrMavuUCe(b'\xba'), chr(7284 - 7184) + chr(0b10100 + 0o121) + chr(99) + '\157' + '\x64' + chr(0b1001000 + 0o35))(chr(117) + chr(0b1110100) + '\x66' + chr(0b11101 + 0o20) + chr(0b111000)) n4ljua2gi1Pr.s6T_PoakASTI = xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xad'), chr(0b110 + 0o136) + '\x65' + chr(0b1 + 0o142) + chr(0b1011110 + 0o21) + chr(100) + '\x65')(chr(0b1000100 + 0o61) + '\164' + '\x66' + chr(967 - 922) + '\070') n4ljua2gi1Pr.RW_xSzp18UeS = 0.1 n4ljua2gi1Pr.RdMRr3qkYioQ = 0.1 n4ljua2gi1Pr.PJc0PNdBnSag = 0.1 xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + '\145' + chr(7525 - 7426) + chr(0b1101101 + 0o2) + chr(0b100 + 0o140) + '\145')('\165' + chr(116) + '\x66' + chr(0b101011 + 0o2) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4\xa3\xdb'), '\x64' + chr(101) + '\x63' + chr(111) + chr(100) + chr(0b1011011 + 0o12))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(1513 - 1468) + chr(2182 - 2126)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0\xa5\xc5\x96\x12\x98'), chr(6822 - 6722) + chr(101) + chr(99) + chr(6806 - 6695) + chr(0b1100100) + chr(101))('\x75' + chr(116) + '\x66' + chr(663 - 618) + chr(56))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\144' + chr(101) + chr(99) + '\157' + '\144' + chr(0b11010 + 0o113))(chr(0b111100 + 0o71) + chr(7069 - 6953) + chr(102) + '\x2d' + chr(78 - 22)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb9\xc5\xa0\x19\x91\x10q\xa7\x02\xdf \x8a\x0e\x00\xe1\x10\xc8'), chr(0b1011011 + 0o11) + chr(5612 - 5511) + chr(99) + chr(3555 - 3444) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + chr(0b11101 + 0o20) + chr(0b1110 + 0o52)), ehT0Px3KOsy9('\060' + chr(10069 - 9958) + chr(0b11110 + 0o22), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + chr(3176 - 3075) + chr(0b1100011) + chr(3914 - 3803) + '\144' + chr(101))(chr(0b1110101) + chr(0b1011001 + 0o33) + chr(0b1100110) + chr(0b100011 + 0o12) + chr(0b10001 + 0o47)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb9\xc5\xa0\x18\x9a\x10q\xa7\x02\xdf \x8a\x0e\x00\xe1\x10\xc8'), chr(0b11100 + 0o110) + chr(0b110101 + 0o60) + chr(0b11110 + 0o105) + '\x6f' + chr(9810 - 9710) + chr(0b110 + 0o137))(chr(9397 - 9280) + chr(116) + chr(0b100100 + 0o102) + chr(1402 - 1357) + chr(56)), ehT0Px3KOsy9('\060' + '\157' + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b100110 + 0o77))(chr(0b1101 + 0o150) + chr(116) + '\146' + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb9\xc5\xa0\x14\x9a\x12z\xb0'), chr(0b1100100) + '\x65' + chr(9370 - 9271) + chr(0b1101111) + chr(4237 - 4137) + chr(101))('\x75' + chr(2071 - 1955) + chr(0b1100110) + chr(0b101101) + chr(1022 - 966)), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(49) + chr(0b110000), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(0b1100100) + chr(101) + chr(9266 - 9167) + chr(0b1101010 + 0o5) + chr(100) + chr(101))('\165' + chr(116) + chr(7652 - 7550) + '\x2d' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xb8\xdc\x9a\x12\x8b\x1aq\xad8\xc6\x1a\x9f0\x1a\xec\x03\xd58\xbb\x17\x8b'), chr(100) + '\145' + chr(5656 - 5557) + '\157' + '\x64' + chr(9808 - 9707))('\165' + chr(116) + chr(0b1100110) + chr(45) + chr(56)), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + chr(48), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xb8\xdc\x9a\x12\x8b\x1aq\xad8\xdb\x1e\x8a\x1a\x1c\xdb\x01\xd37\xb0\x15\x9d\xcd\xec'), '\x64' + '\x65' + chr(99) + chr(0b1011000 + 0o27) + chr(0b1001011 + 0o31) + chr(1235 - 1134))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101 + 0o50) + chr(0b111000)), ehT0Px3KOsy9('\060' + chr(2423 - 2312) + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(9865 - 9765) + chr(0b11 + 0o142) + '\143' + '\x6f' + '\x64' + '\145')('\x75' + chr(116) + '\x66' + chr(0b1100 + 0o41) + chr(775 - 719)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xa9\xc4\x99#\x9e\x07j\xa6\t\xd9\x16\x89\x01&\xf0\x1b\xcb3'), '\x64' + chr(0b1111 + 0o126) + chr(99) + chr(0b1011111 + 0o20) + chr(0b1001010 + 0o32) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xa3\xdc\xa0\x0c\x8d\x1cz\xb6\x04\xd9'), chr(4716 - 4616) + chr(0b1100101) + chr(99) + '\157' + chr(102 - 2) + chr(0b1000000 + 0o45))('\x75' + '\164' + '\x66' + chr(0b101101) + '\070')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\x64' + chr(0b1100101) + '\143' + chr(0b1100010 + 0o15) + chr(0b1100100) + chr(0b1100101))(chr(7351 - 7234) + '\164' + '\146' + '\x2d' + chr(0b11 + 0o65)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\xa1\xc9\x98\x19\xa0\x00{\xaf\x01\xf2\x1e\x92\x1b\x1c\xea\x16\xd29\xb0$\x8c\xd8\xef\xc3'), chr(100) + chr(0b1010 + 0o133) + chr(0b1011100 + 0o7) + chr(0b1100110 + 0o11) + chr(4842 - 4742) + '\145')('\165' + '\x74' + '\x66' + chr(45) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xa3\xdc\xa0\x0c\x8d\x1cz\xb6\x04\xd9'), chr(0b1100100) + chr(0b11100 + 0o111) + chr(991 - 892) + chr(0b1101100 + 0o3) + chr(0b1100100) + '\x65')(chr(0b1101011 + 0o12) + '\164' + chr(0b1100110) + chr(1513 - 1468) + chr(2275 - 2219))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b100101 + 0o100))('\x75' + chr(0b1110100) + chr(4446 - 4344) + '\x2d' + chr(1074 - 1018)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa5\xb9\xcd\x8c\x08\x96\x1cp\x9c\x14\xc8\x13\x800\x18\xf0\x16\xde8\xaa\x12\x97\xcf\xc0\xd2\xfe\x88\xb5'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + chr(0b1010010 + 0o22) + chr(101))(chr(0b1110101) + chr(116) + chr(6459 - 6357) + chr(45) + chr(2208 - 2152)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xa3\xdc\xa0\x0c\x8d\x1cz\xb6\x04\xd9'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(0b111101 + 0o47) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1112 - 1067) + chr(0b1110 + 0o52))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + '\x65' + chr(0b1001001 + 0o32) + chr(0b1110 + 0o141) + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + '\146' + '\x2d' + chr(0b101000 + 0o20)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xa0\xc7\x9c\x17\xa0\x1f{\xad\x00\xd9\x17'), '\x64' + '\145' + chr(0b1001110 + 0o25) + '\157' + chr(0b1100100) + chr(4359 - 4258))('\165' + chr(0b1110100) + chr(0b101111 + 0o67) + '\x2d' + chr(1968 - 1912)), ehT0Px3KOsy9('\060' + '\x6f' + '\x31', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), '\144' + chr(9323 - 9222) + chr(2625 - 2526) + chr(0b100 + 0o153) + '\144' + '\x65')(chr(0b100 + 0o161) + chr(116) + '\x66' + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xaf\xc9\x93\x19\xa0\x17q\xb7\x17\xdf\x10\x82\x1a\x1a\xf0'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(965 - 865) + chr(101))(chr(1023 - 906) + '\164' + '\146' + '\x2d' + '\070'), ehT0Px3KOsy9('\060' + '\x6f' + chr(49), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb5\xa8\xcc\xa0\x14\x8f\x12l\xa2\n'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(100) + chr(9996 - 9895))(chr(117) + '\164' + chr(0b111111 + 0o47) + chr(1136 - 1091) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb9\xc5\xa0\x0e\x9a\x10A\xb0\x13\xc8\x0f\x95'), '\144' + chr(6561 - 6460) + '\x63' + chr(111) + chr(0b1100100) + chr(0b100 + 0o141))(chr(117) + chr(0b1110100) + chr(0b1000 + 0o136) + chr(237 - 192) + chr(1370 - 1314)), ehT0Px3KOsy9(chr(48) + chr(111) + '\063', 0b1000)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/vqa_self_attention.py
vqa_self_attention_feature_batch1024_big
def vqa_self_attention_feature_batch1024_big(): """Big model.""" hparams = vqa_self_attention_feature_batch1024() hparams.learning_rate_constant = 7e-4 hparams.batch_size = 256 hparams.hidden_size = 1024 hparams.filter_size = 4096 hparams.num_heads = 16 hparams.layer_prepostprocess_dropout = 0.3 hparams.attention_dropout = 0.3 hparams.relu_dropout = 0.3 return hparams
python
def vqa_self_attention_feature_batch1024_big(): """Big model.""" hparams = vqa_self_attention_feature_batch1024() hparams.learning_rate_constant = 7e-4 hparams.batch_size = 256 hparams.hidden_size = 1024 hparams.filter_size = 4096 hparams.num_heads = 16 hparams.layer_prepostprocess_dropout = 0.3 hparams.attention_dropout = 0.3 hparams.relu_dropout = 0.3 return hparams
[ "def", "vqa_self_attention_feature_batch1024_big", "(", ")", ":", "hparams", "=", "vqa_self_attention_feature_batch1024", "(", ")", "hparams", ".", "learning_rate_constant", "=", "7e-4", "hparams", ".", "batch_size", "=", "256", "hparams", ".", "hidden_size", "=", "1024", "hparams", ".", "filter_size", "=", "4096", "hparams", ".", "num_heads", "=", "16", "hparams", ".", "layer_prepostprocess_dropout", "=", "0.3", "hparams", ".", "attention_dropout", "=", "0.3", "hparams", ".", "relu_dropout", "=", "0.3", "return", "hparams" ]
Big model.
[ "Big", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/vqa_self_attention.py#L774-L785
train
Big model.
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(chr(48) + chr(5617 - 5506) + chr(0b110001) + '\060' + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000 + 0o147) + chr(1576 - 1525) + chr(51) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + chr(0b110011) + chr(55) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b10001 + 0o42) + '\065' + chr(0b1000 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(1812 - 1701) + chr(51) + chr(2332 - 2279) + '\x32', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110110) + chr(0b110000), 59277 - 59269), ehT0Px3KOsy9(chr(48) + chr(2168 - 2057) + chr(50) + chr(0b11110 + 0o31), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b101111 + 0o3) + '\066', 40380 - 40372), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2107 - 2058) + chr(53) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o26) + chr(0b11010 + 0o31), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10111 + 0o33) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1862 - 1814) + '\x6f' + chr(0b100011 + 0o16) + chr(0b1101 + 0o52) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\064' + chr(48), 10009 - 10001), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\064' + chr(2576 - 2521), 4056 - 4048), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + '\062' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(711 - 663) + chr(0b1101111) + '\x33' + chr(0b1111 + 0o41) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1010000 + 0o37) + '\063' + chr(0b1111 + 0o46) + chr(51), 60704 - 60696), ehT0Px3KOsy9(chr(0b110000) + chr(4500 - 4389) + chr(49) + chr(55) + chr(853 - 805), 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1010101 + 0o32) + '\061' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + '\x33' + chr(451 - 402) + '\x33', 63863 - 63855), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(596 - 546) + '\x36' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(10144 - 10033) + chr(0b101111 + 0o2) + chr(53) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + chr(1617 - 1565) + chr(0b0 + 0o67), 15779 - 15771), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x37' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1341 - 1293) + '\x6f' + chr(1222 - 1172) + chr(0b110000) + chr(0b11 + 0o62), 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\x33' + chr(2588 - 2533) + chr(0b100 + 0o54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3064 - 2953) + chr(634 - 586), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110110) + chr(1030 - 979), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + chr(54) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + '\x34' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(54) + chr(0b11011 + 0o27), 0o10), ehT0Px3KOsy9(chr(2061 - 2013) + chr(111) + chr(626 - 572) + chr(54), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1704 - 1653) + chr(0b1010 + 0o53) + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + chr(4268 - 4157) + '\062' + chr(0b10110 + 0o41) + chr(2094 - 2042), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b101110 + 0o3) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(51) + chr(0b110011 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(2111 - 2063) + chr(0b1101111) + chr(0b1010 + 0o47) + chr(53) + '\x36', 8), ehT0Px3KOsy9(chr(1931 - 1883) + '\x6f' + '\063' + chr(179 - 130) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1198 - 1087) + chr(54) + chr(2623 - 2570), 10107 - 10099)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(492 - 381) + '\x35' + chr(48), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'n'), '\x64' + chr(101) + chr(1216 - 1117) + chr(0b1010100 + 0o33) + chr(0b1000001 + 0o43) + '\x65')(chr(0b1110101) + '\x74' + chr(0b11011 + 0o113) + '\x2d' + chr(0b100101 + 0o23)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def tC7qgZQFW5Jc(): n4ljua2gi1Pr = R4s_54RmQzCB() n4ljua2gi1Pr.Ot9HUjnkxXA_ = 0.0007 n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110100) + '\x30' + chr(1389 - 1341), 0b1000) n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(1070 - 959) + chr(0b100100 + 0o16) + '\060' + '\060' + '\060', 5393 - 5385) n4ljua2gi1Pr.deybX8NJ0oEI = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(1610 - 1562) + chr(0b0 + 0o60) + chr(48) + '\x30', 17464 - 17456) n4ljua2gi1Pr.vRVqPOZ1hUG7 = ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(48), 0b1000) n4ljua2gi1Pr.RW_xSzp18UeS = 0.3 n4ljua2gi1Pr.RdMRr3qkYioQ = 0.3 n4ljua2gi1Pr.PJc0PNdBnSag = 0.3 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/utils/data_reader.py
_bucket_boundaries
def _bucket_boundaries(max_length, min_length=8, length_bucket_step=1.1): """A default set of length-bucket boundaries.""" assert length_bucket_step > 1.0 x = min_length boundaries = [] while x < max_length: boundaries.append(x) x = max(x + 1, int(x * length_bucket_step)) return boundaries
python
def _bucket_boundaries(max_length, min_length=8, length_bucket_step=1.1): """A default set of length-bucket boundaries.""" assert length_bucket_step > 1.0 x = min_length boundaries = [] while x < max_length: boundaries.append(x) x = max(x + 1, int(x * length_bucket_step)) return boundaries
[ "def", "_bucket_boundaries", "(", "max_length", ",", "min_length", "=", "8", ",", "length_bucket_step", "=", "1.1", ")", ":", "assert", "length_bucket_step", ">", "1.0", "x", "=", "min_length", "boundaries", "=", "[", "]", "while", "x", "<", "max_length", ":", "boundaries", ".", "append", "(", "x", ")", "x", "=", "max", "(", "x", "+", "1", ",", "int", "(", "x", "*", "length_bucket_step", ")", ")", "return", "boundaries" ]
A default set of length-bucket boundaries.
[ "A", "default", "set", "of", "length", "-", "bucket", "boundaries", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/data_reader.py#L69-L77
train
A default set of length - bucket boundaries.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMd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eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2267 - 2218) + chr(50), 46260 - 46252), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(2183 - 2133) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + chr(50) + chr(51) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + '\x34' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(517 - 467) + chr(0b101100 + 0o7) + chr(0b10000 + 0o45), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(199 - 150) + chr(2229 - 2177) + chr(0b10000 + 0o43), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110100 + 0o73) + '\062' + chr(1852 - 1797) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(998 - 950) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011011 + 0o24) + chr(51) + '\061' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10 + 0o155) + '\062' + chr(0b10 + 0o64) + chr(2338 - 2283), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + '\x31' + chr(0b100110 + 0o21) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(282 - 234) + '\x6f' + '\062' + chr(0b1100 + 0o50), 49104 - 49096), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110110) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b11101 + 0o30) + chr(1777 - 1725), ord("\x08")), ehT0Px3KOsy9(chr(535 - 487) + chr(0b1100011 + 0o14) + '\x32' + '\060' + chr(1563 - 1512), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b10110 + 0o33) + chr(0b10101 + 0o42) + '\063', 8), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + chr(0b110010) + '\x30' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(51) + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(8344 - 8233) + '\x31' + chr(2124 - 2072) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110000) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + chr(1641 - 1592) + '\066' + chr(0b110110), 64770 - 64762), ehT0Px3KOsy9('\x30' + chr(111) + chr(54) + chr(0b10000 + 0o47), 16348 - 16340), ehT0Px3KOsy9(chr(48) + '\x6f' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(1475 - 1424), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110000 + 0o1) + '\066' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\066' + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b110111) + chr(1390 - 1337), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110101) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\064' + '\x32', 28841 - 28833), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(2777 - 2723) + chr(0b100011 + 0o22), 0b1000), ehT0Px3KOsy9(chr(1851 - 1803) + chr(0b110010 + 0o75) + chr(0b1101 + 0o46) + '\x34' + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11100 + 0o25) + '\x30' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(52) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(55) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(48) + chr(0b10001 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1001001 + 0o46) + chr(0b1111 + 0o43) + '\067' + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110 + 0o55) + chr(49) + chr(1854 - 1805), 22208 - 22200), ehT0Px3KOsy9(chr(2004 - 1956) + chr(2093 - 1982) + '\x32' + '\x35' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b10000 + 0o137) + chr(2244 - 2194) + chr(500 - 450), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11001 + 0o126) + chr(1835 - 1784) + chr(0b1100 + 0o50), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(2294 - 2246) + '\x6f' + chr(53) + chr(0b110000), 44374 - 44366)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'$'), chr(100) + chr(0b1011010 + 0o13) + chr(7187 - 7088) + chr(4753 - 4642) + '\144' + chr(101))(chr(4461 - 4344) + chr(5856 - 5740) + '\x66' + chr(681 - 636) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ROkDWlkxeifz(_o7pVXAdOCRy, SDxUbeIkMIyl=ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110000), 9809 - 9801), YrP9QNmDwTmM=1.1): assert YrP9QNmDwTmM > 1.0 OeWW0F1dBPRQ = SDxUbeIkMIyl n7rrZRZYkBNq = [] while OeWW0F1dBPRQ < _o7pVXAdOCRy: xafqLlk3kkUe(n7rrZRZYkBNq, xafqLlk3kkUe(SXOLrMavuUCe(b'k"\xedE\xf3\x07'), '\144' + '\x65' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))('\165' + chr(1868 - 1752) + chr(0b1100110) + '\x2d' + chr(0b111000)))(OeWW0F1dBPRQ) OeWW0F1dBPRQ = tsdjvlgh9gDP(OeWW0F1dBPRQ + ehT0Px3KOsy9('\060' + '\x6f' + '\x31', 0o10), ehT0Px3KOsy9(OeWW0F1dBPRQ * YrP9QNmDwTmM)) return n7rrZRZYkBNq
tensorflow/tensor2tensor
tensor2tensor/utils/data_reader.py
batching_scheme
def batching_scheme(batch_size, max_length, min_length_bucket, length_bucket_step, drop_long_sequences=False, shard_multiplier=1, length_multiplier=1, min_length=0): """A batching scheme based on model hyperparameters. Every batch contains a number of sequences divisible by `shard_multiplier`. Args: batch_size: int, total number of tokens in a batch. max_length: int, sequences longer than this will be skipped. Defaults to batch_size. min_length_bucket: int length_bucket_step: float greater than 1.0 drop_long_sequences: bool, if True, then sequences longer than `max_length` are dropped. This prevents generating batches with more than the usual number of tokens, which can cause out-of-memory errors. shard_multiplier: an integer increasing the batch_size to suit splitting across datashards. length_multiplier: an integer multiplier that is used to increase the batch sizes and sequence length tolerance. min_length: int, sequences shorter than this will be skipped. Returns: A dictionary with parameters that can be passed to input_pipeline: * boundaries: list of bucket boundaries * batch_sizes: list of batch sizes for each length bucket * max_length: int, maximum length of an example Raises: ValueError: If min_length > max_length """ max_length = max_length or batch_size if max_length < min_length: raise ValueError("max_length must be greater or equal to min_length") boundaries = _bucket_boundaries(max_length, min_length_bucket, length_bucket_step) boundaries = [boundary * length_multiplier for boundary in boundaries] max_length *= length_multiplier batch_sizes = [ max(1, batch_size // length) for length in boundaries + [max_length] ] max_batch_size = max(batch_sizes) # Since the Datasets API only allows a single constant for window_size, # and it needs divide all bucket_batch_sizes, we pick a highly-composite # window size and then round down all batch sizes to divisors of that window # size, so that a window can always be divided evenly into batches. # TODO(noam): remove this when Dataset API improves. highly_composite_numbers = [ 1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 7560, 10080, 15120, 20160, 25200, 27720, 45360, 50400, 55440, 83160, 110880, 166320, 221760, 277200, 332640, 498960, 554400, 665280, 720720, 1081080, 1441440, 2162160, 2882880, 3603600, 4324320, 6486480, 7207200, 8648640, 10810800, 14414400, 17297280, 21621600, 32432400, 36756720, 43243200, 61261200, 73513440, 110270160 ] window_size = max( [i for i in highly_composite_numbers if i <= 3 * max_batch_size]) divisors = [i for i in range(1, window_size + 1) if window_size % i == 0] batch_sizes = [max([d for d in divisors if d <= bs]) for bs in batch_sizes] window_size *= shard_multiplier batch_sizes = [bs * shard_multiplier for bs in batch_sizes] # The Datasets API splits one window into multiple batches, which # produces runs of many consecutive batches of the same size. This # is bad for training. To solve this, we will shuffle the batches # using a queue which must be several times as large as the maximum # number of batches per window. max_batches_per_window = window_size // min(batch_sizes) shuffle_queue_size = max_batches_per_window * 3 ret = { "boundaries": boundaries, "batch_sizes": batch_sizes, "min_length": min_length, "max_length": (max_length if drop_long_sequences else 10**9), "shuffle_queue_size": shuffle_queue_size, } return ret
python
def batching_scheme(batch_size, max_length, min_length_bucket, length_bucket_step, drop_long_sequences=False, shard_multiplier=1, length_multiplier=1, min_length=0): """A batching scheme based on model hyperparameters. Every batch contains a number of sequences divisible by `shard_multiplier`. Args: batch_size: int, total number of tokens in a batch. max_length: int, sequences longer than this will be skipped. Defaults to batch_size. min_length_bucket: int length_bucket_step: float greater than 1.0 drop_long_sequences: bool, if True, then sequences longer than `max_length` are dropped. This prevents generating batches with more than the usual number of tokens, which can cause out-of-memory errors. shard_multiplier: an integer increasing the batch_size to suit splitting across datashards. length_multiplier: an integer multiplier that is used to increase the batch sizes and sequence length tolerance. min_length: int, sequences shorter than this will be skipped. Returns: A dictionary with parameters that can be passed to input_pipeline: * boundaries: list of bucket boundaries * batch_sizes: list of batch sizes for each length bucket * max_length: int, maximum length of an example Raises: ValueError: If min_length > max_length """ max_length = max_length or batch_size if max_length < min_length: raise ValueError("max_length must be greater or equal to min_length") boundaries = _bucket_boundaries(max_length, min_length_bucket, length_bucket_step) boundaries = [boundary * length_multiplier for boundary in boundaries] max_length *= length_multiplier batch_sizes = [ max(1, batch_size // length) for length in boundaries + [max_length] ] max_batch_size = max(batch_sizes) # Since the Datasets API only allows a single constant for window_size, # and it needs divide all bucket_batch_sizes, we pick a highly-composite # window size and then round down all batch sizes to divisors of that window # size, so that a window can always be divided evenly into batches. # TODO(noam): remove this when Dataset API improves. highly_composite_numbers = [ 1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720, 840, 1260, 1680, 2520, 5040, 7560, 10080, 15120, 20160, 25200, 27720, 45360, 50400, 55440, 83160, 110880, 166320, 221760, 277200, 332640, 498960, 554400, 665280, 720720, 1081080, 1441440, 2162160, 2882880, 3603600, 4324320, 6486480, 7207200, 8648640, 10810800, 14414400, 17297280, 21621600, 32432400, 36756720, 43243200, 61261200, 73513440, 110270160 ] window_size = max( [i for i in highly_composite_numbers if i <= 3 * max_batch_size]) divisors = [i for i in range(1, window_size + 1) if window_size % i == 0] batch_sizes = [max([d for d in divisors if d <= bs]) for bs in batch_sizes] window_size *= shard_multiplier batch_sizes = [bs * shard_multiplier for bs in batch_sizes] # The Datasets API splits one window into multiple batches, which # produces runs of many consecutive batches of the same size. This # is bad for training. To solve this, we will shuffle the batches # using a queue which must be several times as large as the maximum # number of batches per window. max_batches_per_window = window_size // min(batch_sizes) shuffle_queue_size = max_batches_per_window * 3 ret = { "boundaries": boundaries, "batch_sizes": batch_sizes, "min_length": min_length, "max_length": (max_length if drop_long_sequences else 10**9), "shuffle_queue_size": shuffle_queue_size, } return ret
[ "def", "batching_scheme", "(", "batch_size", ",", "max_length", ",", "min_length_bucket", ",", "length_bucket_step", ",", "drop_long_sequences", "=", "False", ",", "shard_multiplier", "=", "1", ",", "length_multiplier", "=", "1", ",", "min_length", "=", "0", ")", ":", "max_length", "=", "max_length", "or", "batch_size", "if", "max_length", "<", "min_length", ":", "raise", "ValueError", "(", "\"max_length must be greater or equal to min_length\"", ")", "boundaries", "=", "_bucket_boundaries", "(", "max_length", ",", "min_length_bucket", ",", "length_bucket_step", ")", "boundaries", "=", "[", "boundary", "*", "length_multiplier", "for", "boundary", "in", "boundaries", "]", "max_length", "*=", "length_multiplier", "batch_sizes", "=", "[", "max", "(", "1", ",", "batch_size", "//", "length", ")", "for", "length", "in", "boundaries", "+", "[", "max_length", "]", "]", "max_batch_size", "=", "max", "(", "batch_sizes", ")", "# Since the Datasets API only allows a single constant for window_size,", "# and it needs divide all bucket_batch_sizes, we pick a highly-composite", "# window size and then round down all batch sizes to divisors of that window", "# size, so that a window can always be divided evenly into batches.", "# TODO(noam): remove this when Dataset API improves.", "highly_composite_numbers", "=", "[", "1", ",", "2", ",", "4", ",", "6", ",", "12", ",", "24", ",", "36", ",", "48", ",", "60", ",", "120", ",", "180", ",", "240", ",", "360", ",", "720", ",", "840", ",", "1260", ",", "1680", ",", "2520", ",", "5040", ",", "7560", ",", "10080", ",", "15120", ",", "20160", ",", "25200", ",", "27720", ",", "45360", ",", "50400", ",", "55440", ",", "83160", ",", "110880", ",", "166320", ",", "221760", ",", "277200", ",", "332640", ",", "498960", ",", "554400", ",", "665280", ",", "720720", ",", "1081080", ",", "1441440", ",", "2162160", ",", "2882880", ",", "3603600", ",", "4324320", ",", "6486480", ",", "7207200", ",", "8648640", ",", "10810800", ",", "14414400", ",", "17297280", ",", "21621600", ",", "32432400", ",", "36756720", ",", "43243200", ",", "61261200", ",", "73513440", ",", "110270160", "]", "window_size", "=", "max", "(", "[", "i", "for", "i", "in", "highly_composite_numbers", "if", "i", "<=", "3", "*", "max_batch_size", "]", ")", "divisors", "=", "[", "i", "for", "i", "in", "range", "(", "1", ",", "window_size", "+", "1", ")", "if", "window_size", "%", "i", "==", "0", "]", "batch_sizes", "=", "[", "max", "(", "[", "d", "for", "d", "in", "divisors", "if", "d", "<=", "bs", "]", ")", "for", "bs", "in", "batch_sizes", "]", "window_size", "*=", "shard_multiplier", "batch_sizes", "=", "[", "bs", "*", "shard_multiplier", "for", "bs", "in", "batch_sizes", "]", "# The Datasets API splits one window into multiple batches, which", "# produces runs of many consecutive batches of the same size. This", "# is bad for training. To solve this, we will shuffle the batches", "# using a queue which must be several times as large as the maximum", "# number of batches per window.", "max_batches_per_window", "=", "window_size", "//", "min", "(", "batch_sizes", ")", "shuffle_queue_size", "=", "max_batches_per_window", "*", "3", "ret", "=", "{", "\"boundaries\"", ":", "boundaries", ",", "\"batch_sizes\"", ":", "batch_sizes", ",", "\"min_length\"", ":", "min_length", ",", "\"max_length\"", ":", "(", "max_length", "if", "drop_long_sequences", "else", "10", "**", "9", ")", ",", "\"shuffle_queue_size\"", ":", "shuffle_queue_size", ",", "}", "return", "ret" ]
A batching scheme based on model hyperparameters. Every batch contains a number of sequences divisible by `shard_multiplier`. Args: batch_size: int, total number of tokens in a batch. max_length: int, sequences longer than this will be skipped. Defaults to batch_size. min_length_bucket: int length_bucket_step: float greater than 1.0 drop_long_sequences: bool, if True, then sequences longer than `max_length` are dropped. This prevents generating batches with more than the usual number of tokens, which can cause out-of-memory errors. shard_multiplier: an integer increasing the batch_size to suit splitting across datashards. length_multiplier: an integer multiplier that is used to increase the batch sizes and sequence length tolerance. min_length: int, sequences shorter than this will be skipped. Returns: A dictionary with parameters that can be passed to input_pipeline: * boundaries: list of bucket boundaries * batch_sizes: list of batch sizes for each length bucket * max_length: int, maximum length of an example Raises: ValueError: If min_length > max_length
[ "A", "batching", "scheme", "based", "on", "model", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/data_reader.py#L80-L164
train
A batching scheme based on model hyperparameters.
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,sbc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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(5280 - 5169) + chr(49) + chr(0b110011 + 0o3) + chr(638 - 586), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\x6f' + chr(628 - 578) + chr(0b110011) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b111111 + 0o60) + chr(50) + chr(297 - 248), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\x34', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1110 + 0o44) + '\063' + chr(49), 8), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + '\065' + chr(0b100001 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(0b110001) + '\062' + chr(2064 - 2014), 0o10), ehT0Px3KOsy9('\060' + chr(0b100011 + 0o114) + chr(0b110100) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\065' + chr(0b11010 + 0o26), 24259 - 24251), ehT0Px3KOsy9('\x30' + '\157' + chr(297 - 247) + chr(1622 - 1569) + chr(0b11111 + 0o24), 20853 - 20845), ehT0Px3KOsy9('\x30' + chr(9296 - 9185) + chr(0b101011 + 0o11) + chr(2356 - 2305), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7581 - 7470) + chr(0b100001 + 0o21) + chr(0b110000) + chr(1287 - 1234), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(547 - 494) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(48) + chr(1002 - 891) + chr(0b110011) + '\065' + chr(831 - 778), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + '\062' + chr(0b11010 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(8081 - 7970) + chr(1657 - 1606) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(1505 - 1394) + chr(789 - 735) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5235 - 5124) + chr(0b100011 + 0o17) + chr(0b101001 + 0o11) + chr(0b110111), 23193 - 23185), ehT0Px3KOsy9(chr(48) + chr(0b1100010 + 0o15) + chr(50) + chr(1795 - 1740) + chr(54), 0o10), ehT0Px3KOsy9(chr(1880 - 1832) + chr(9001 - 8890) + chr(1502 - 1450) + chr(0b100111 + 0o17), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2473 - 2423) + chr(54) + chr(53), 51716 - 51708), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b110000 + 0o77) + chr(0b110001) + '\065' + '\x30', 22636 - 22628), ehT0Px3KOsy9('\060' + '\x6f' + '\067' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(644 - 594) + chr(0b110111) + chr(0b100111 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100000 + 0o21) + '\060' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2598 - 2547) + '\x34' + chr(0b10001 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b100010 + 0o24) + chr(0b1101 + 0o47), 0b1000), ehT0Px3KOsy9(chr(2140 - 2092) + chr(0b110111 + 0o70) + '\061' + chr(1301 - 1251) + chr(0b1011 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101011 + 0o104) + chr(0b110100) + '\064', 0b1000), ehT0Px3KOsy9(chr(1113 - 1065) + '\x6f' + '\063' + chr(0b110010) + chr(1788 - 1737), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\x32' + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(1581 - 1531) + chr(48) + '\066', 0b1000), ehT0Px3KOsy9(chr(2029 - 1981) + chr(0b1101111) + chr(0b110100) + chr(0b11011 + 0o31), 8), ehT0Px3KOsy9(chr(1901 - 1853) + chr(111) + '\x31' + chr(2066 - 2016) + '\062', 8), ehT0Px3KOsy9('\060' + chr(0b101 + 0o152) + '\063' + chr(52) + chr(0b110000 + 0o5), 34889 - 34881), ehT0Px3KOsy9('\x30' + chr(0b1101001 + 0o6) + '\x32' + chr(0b110110) + chr(460 - 409), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x35' + chr(0b1101 + 0o44), 31379 - 31371), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(2213 - 2162) + chr(249 - 199), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(174 - 126), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'Z'), chr(9842 - 9742) + chr(0b1101 + 0o130) + chr(0b11011 + 0o110) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1011101 + 0o30) + chr(0b1110100) + chr(4033 - 3931) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def JGwSmyHKQnp6(ix9dZyeAmUxY, _o7pVXAdOCRy, lhJm4Z32JlM2, YrP9QNmDwTmM, IEeQFspKnx61=ehT0Px3KOsy9('\060' + chr(111) + '\x30', 54844 - 54836), Bm1NEEhi0X9x=ehT0Px3KOsy9(chr(1869 - 1821) + chr(0b1011111 + 0o20) + chr(49), 44429 - 44421), aDkRd93pNhGr=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49), 8), SDxUbeIkMIyl=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(48), 8)): _o7pVXAdOCRy = _o7pVXAdOCRy or ix9dZyeAmUxY if _o7pVXAdOCRy < SDxUbeIkMIyl: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\xf8iS\xf5K<A\\\xc3\x03\xe8^_\x99#q\x7f\x15\xf0\xccC\xd4\x1c[\xcda\x8b\x86uA\xa2\xe2\xe7Hr\x91\xdc\xc97\x1d\xf7N`\xfc@5R@'), '\x64' + chr(101) + chr(1309 - 1210) + chr(111) + chr(9766 - 9666) + chr(5067 - 4966))('\x75' + chr(116) + chr(0b1100110) + chr(1423 - 1378) + '\x38')) n7rrZRZYkBNq = ROkDWlkxeifz(_o7pVXAdOCRy, lhJm4Z32JlM2, YrP9QNmDwTmM) n7rrZRZYkBNq = [btzPOzjO3_Wq * aDkRd93pNhGr for btzPOzjO3_Wq in n7rrZRZYkBNq] _o7pVXAdOCRy *= aDkRd93pNhGr vUD9kCH9I6mb = [tsdjvlgh9gDP(ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(0b10111 + 0o32), 8), ix9dZyeAmUxY // CHAOgk5VCHH_) for CHAOgk5VCHH_ in n7rrZRZYkBNq + [_o7pVXAdOCRy]] Ogd0geqVEHbN = tsdjvlgh9gDP(vUD9kCH9I6mb) TrEMLZbmZwIs = [ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2419 - 2369), 0b1000), ehT0Px3KOsy9(chr(809 - 761) + chr(0b1101111) + chr(1234 - 1182), 20751 - 20743), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(1135 - 1087), 58262 - 58254), ehT0Px3KOsy9('\x30' + '\157' + '\064' + chr(52), 8), ehT0Px3KOsy9(chr(1078 - 1030) + chr(111) + '\x36' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1833 - 1785) + chr(10542 - 10431) + chr(0b110001) + '\067' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1011100 + 0o23) + chr(2157 - 2107) + chr(54) + chr(0b110100), 36499 - 36491), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1010100 + 0o33) + chr(0b100101 + 0o16) + chr(589 - 535) + chr(0b110 + 0o52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9580 - 9469) + '\x35' + chr(0b110101) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(737 - 689) + chr(0b1101111) + chr(49) + chr(1464 - 1413) + chr(0b110000 + 0o2) + chr(0b101110 + 0o2), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2349 - 2300) + chr(2096 - 2043) + '\x31' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(1460 - 1412) + '\157' + chr(484 - 434) + '\x33' + '\065' + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(2368 - 2317) + chr(1883 - 1833) + chr(1453 - 1403) + chr(0b10011 + 0o35), 29443 - 29435), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(55) + chr(2391 - 2340) + '\x30', 41006 - 40998), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(49) + chr(0b110110) + chr(0b101111 + 0o7) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(1128 - 1074) + '\x36' + chr(0b101000 + 0o11) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b111 + 0o53) + chr(0b100001 + 0o22) + '\x35' + '\x34' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b100110 + 0o17) + '\064' + chr(0b11110 + 0o24) + chr(0b1 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\064' + chr(2614 - 2559) + chr(0b110011) + '\x30' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b11010 + 0o125) + '\x36' + '\x31' + '\061' + '\066' + chr(0b101110 + 0o2), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x36' + '\066' + '\x31' + chr(0b110001) + '\060', 21542 - 21534), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(49) + chr(0b1101 + 0o46) + '\x30' + chr(0b110100) + chr(2473 - 2419) + chr(0b1010 + 0o46), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1091 - 1042) + chr(52) + chr(0b110010) + chr(51) + chr(0b100110 + 0o16) + '\x30', 31911 - 31903), ehT0Px3KOsy9(chr(0b110000) + chr(7795 - 7684) + '\x31' + '\065' + chr(547 - 495) + chr(50) + '\x32' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4593 - 4482) + chr(1882 - 1832) + chr(0b110100) + '\x32' + chr(0b110000 + 0o3) + chr(920 - 869) + chr(0b101101 + 0o3), 0b1000), ehT0Px3KOsy9('\060' + chr(4188 - 4077) + '\x33' + chr(1323 - 1272) + '\060' + chr(0b101 + 0o57) + '\064' + '\x30', 58129 - 58121), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1959 - 1906) + '\x30' + '\064' + chr(0b110110) + chr(1653 - 1599) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + '\066' + chr(0b100100 + 0o22) + chr(0b110001) + chr(0b100011 + 0o16) + chr(0b110000) + chr(0b1001 + 0o47), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100111 + 0o12) + '\x30' + chr(0b1001 + 0o52) + '\065' + chr(0b110011) + chr(0b11111 + 0o23) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2106 - 2057) + chr(0b11011 + 0o27) + chr(213 - 164) + '\061' + '\x35' + chr(2483 - 2431) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5052 - 4941) + '\x31' + chr(0b110111) + '\x31' + '\066' + chr(52) + chr(0b100 + 0o56) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(331 - 283) + chr(0b100110 + 0o111) + chr(790 - 740) + chr(0b101000 + 0o10) + '\x37' + chr(0b110010) + chr(0b1111 + 0o47) + chr(0b10010 + 0o42) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1627 - 1577) + chr(0b110100) + '\x32' + '\063' + chr(0b1011 + 0o50) + chr(48) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + '\x32' + chr(0b11 + 0o62) + chr(0b110111) + chr(2577 - 2522) + chr(0b100100 + 0o21) + chr(0b110010) + chr(0b110 + 0o52), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(0b110100) + '\060' + '\x37' + chr(55) + '\063' + chr(55) + chr(0b110000), 33328 - 33320), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(0b110101) + '\063' + chr(0b110 + 0o61) + '\x37' + chr(0b11101 + 0o25) + '\064' + chr(1504 - 1456), 14518 - 14510), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\x31' + chr(0b110000) + chr(0b110001) + '\067' + chr(1163 - 1109) + '\x37' + chr(0b110110) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b10011 + 0o134) + chr(49) + '\x32' + chr(0b110100 + 0o3) + '\067' + chr(0b11011 + 0o33) + chr(511 - 458) + '\x30' + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(53) + chr(0b101101 + 0o10) + '\x37' + '\066' + chr(0b110010) + '\x32' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(370 - 322) + '\157' + '\x32' + chr(1207 - 1159) + chr(500 - 449) + chr(278 - 223) + '\x35' + chr(0b110111) + chr(52) + chr(48), 53562 - 53554), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + '\x30' + chr(53) + chr(0b110111) + chr(52) + chr(55) + '\x32' + chr(554 - 506), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(51) + chr(2484 - 2433) + '\067' + chr(0b110 + 0o56) + chr(2570 - 2518) + chr(0b110100) + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(52) + chr(0b100011 + 0o15) + chr(55) + chr(0b110111) + '\063' + '\067' + '\x30' + '\x30', 0o10), ehT0Px3KOsy9(chr(1040 - 992) + chr(111) + '\065' + chr(49) + '\061' + chr(2522 - 2467) + chr(0b110010) + '\066' + '\x36' + chr(0b10000 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110 + 0o60) + '\x36' + '\067' + chr(0b110010 + 0o5) + chr(49) + chr(0b100000 + 0o21) + chr(0b110 + 0o52) + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(4149 - 4038) + chr(867 - 818) + chr(377 - 329) + chr(49) + chr(1422 - 1367) + chr(1931 - 1877) + chr(55) + chr(54) + '\x30' + '\060', 41427 - 41419), ehT0Px3KOsy9('\060' + '\157' + chr(156 - 107) + chr(50) + '\062' + chr(0b1111 + 0o44) + chr(0b100010 + 0o24) + chr(53) + chr(0b11000 + 0o35) + chr(1705 - 1653) + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(55) + chr(51) + '\x35' + chr(0b100000 + 0o26) + chr(0b110000) + chr(52) + chr(0b0 + 0o62) + '\x30', 43581 - 43573), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100 + 0o56) + '\061' + chr(52) + chr(0b101 + 0o54) + chr(0b100011 + 0o22) + chr(0b1011 + 0o53) + chr(51) + '\066' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(50) + '\064' + chr(0b100010 + 0o22) + chr(55) + chr(2513 - 2460) + '\063' + chr(0b11111 + 0o24) + '\x30' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(3683 - 3572) + chr(51) + chr(0b110101) + '\061' + '\x35' + chr(0b100110 + 0o16) + chr(0b110010) + chr(54) + chr(0b100001 + 0o21) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(8859 - 8748) + chr(0b100 + 0o60) + chr(0b100000 + 0o23) + '\x30' + chr(2317 - 2266) + chr(471 - 420) + chr(0b110100) + chr(55) + chr(1323 - 1271) + chr(48), 3595 - 3587), ehT0Px3KOsy9('\x30' + '\157' + chr(54) + chr(0b110000 + 0o4) + chr(0b101000 + 0o14) + chr(0b110000 + 0o5) + chr(0b10111 + 0o32) + chr(0b110011) + chr(51) + chr(0b100111 + 0o13) + chr(48), 0b1000)] zk_9FDxvu_Qq = tsdjvlgh9gDP([WVxHKyX45z_L for WVxHKyX45z_L in TrEMLZbmZwIs if WVxHKyX45z_L <= ehT0Px3KOsy9('\x30' + chr(7061 - 6950) + chr(0b110011), 8) * Ogd0geqVEHbN]) BkcYY7IUSj6x = [WVxHKyX45z_L for WVxHKyX45z_L in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(50 - 2) + chr(0b1101111) + '\061', 8), zk_9FDxvu_Qq + ehT0Px3KOsy9('\060' + '\157' + '\061', 8)) if zk_9FDxvu_Qq % WVxHKyX45z_L == ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\060', 8)] vUD9kCH9I6mb = [tsdjvlgh9gDP([pd3lxn9vqWxp for pd3lxn9vqWxp in BkcYY7IUSj6x if pd3lxn9vqWxp <= SfegzJB3EFQO]) for SfegzJB3EFQO in vUD9kCH9I6mb] zk_9FDxvu_Qq *= Bm1NEEhi0X9x vUD9kCH9I6mb = [SfegzJB3EFQO * Bm1NEEhi0X9x for SfegzJB3EFQO in vUD9kCH9I6mb] CF4wAtP5_zgE = zk_9FDxvu_Qq // Dx22bkKPdt5d(vUD9kCH9I6mb) LRrId69QxzKu = CF4wAtP5_zgE * ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51), 8) VHn4CV4Ymrei = {xafqLlk3kkUe(SXOLrMavuUCe(b'\x16\xf6db\xfdO OM\xd8'), '\144' + chr(101) + chr(0b1100011) + chr(8003 - 7892) + chr(100) + chr(0b100111 + 0o76))(chr(0b1110101) + chr(0b1101111 + 0o5) + chr(0b1001100 + 0o32) + chr(0b1 + 0o54) + chr(0b1001 + 0o57)): n7rrZRZYkBNq, xafqLlk3kkUe(SXOLrMavuUCe(b'\x16\xf8eo\xf1q!OR\xceP'), '\144' + chr(101) + chr(0b1100011) + chr(111) + '\x64' + chr(3284 - 3183))(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)): vUD9kCH9I6mb, xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\xf0\x7fS\xf5K<A\\\xc3'), chr(0b1100100) + chr(101) + '\143' + chr(9291 - 9180) + chr(946 - 846) + '\145')(chr(0b1001110 + 0o47) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111 + 0o61)): SDxUbeIkMIyl, xafqLlk3kkUe(SXOLrMavuUCe(b'\x19\xf8iS\xf5K<A\\\xc3'), '\144' + chr(7606 - 7505) + chr(0b1100011) + chr(0b1011 + 0o144) + chr(0b100001 + 0o103) + chr(0b1100101))(chr(0b1010001 + 0o44) + '\x74' + chr(0b1000100 + 0o42) + chr(45) + '\070'): _o7pVXAdOCRy if IEeQFspKnx61 else ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + '\x31' + chr(1676 - 1626), 0o10) ** ehT0Px3KOsy9(chr(48) + chr(11925 - 11814) + '\061' + chr(0b10110 + 0o33), 11673 - 11665), xafqLlk3kkUe(SXOLrMavuUCe(b'\x07\xf1dj\xffB7yY\xdeF\xf0Ns\x9eji\x7f'), chr(2838 - 2738) + '\x65' + chr(0b1001111 + 0o24) + chr(8534 - 8423) + chr(3272 - 3172) + '\x65')(chr(12786 - 12669) + '\164' + '\x66' + chr(0b101101) + chr(0b101011 + 0o15)): LRrId69QxzKu} return VHn4CV4Ymrei