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/data_generators/allen_brain.py
_generator
def _generator(tmp_dir, training, size=_BASE_EXAMPLE_IMAGE_SIZE, training_fraction=0.95): """Base problem example generator for Allen Brain Atlas problems. Args: tmp_dir: str, a directory where raw example input data has been stored. training: bool, whether the mode of operation is training (or, alternatively, evaluation), determining whether examples in tmp_dir prefixed with train or dev will be used. size: int, the image size to add to the example annotation. training_fraction: float, the fraction of the sub-image path list to consider as the basis for training examples. Yields: A dictionary representing the images with the following fields: * image/encoded: The string encoding the image as JPEG. * image/format: The string "jpeg" indicating the image format. * image/height: The integer indicating the image height. * image/width: The integer indicating the image height. """ maybe_download_image_dataset(_IMAGE_IDS, tmp_dir) image_files = _get_case_file_paths(tmp_dir=tmp_dir, case=training, training_fraction=training_fraction) image_obj = PIL_Image() tf.logging.info("Loaded case file paths (n=%s)" % len(image_files)) height = size width = size for input_path in image_files: img = image_obj.open(input_path) img = np.float32(img) shape = np.shape(img) for h_index in range(0, int(math.floor(shape[0]/size))): h_offset = h_index * size h_end = h_offset + size - 1 for v_index in range(0, int(math.floor(shape[1]/size))): v_offset = v_index * size v_end = v_offset + size - 1 # Extract a sub-image tile. subimage = np.uint8(img[h_offset:h_end, v_offset:v_end]) # pylint: disable=invalid-sequence-index # Filter images that are likely background (not tissue). if np.amax(subimage) < 230: continue subimage = image_obj.fromarray(subimage) buff = BytesIO() subimage.save(buff, format="JPEG") subimage_encoded = buff.getvalue() yield { "image/encoded": [subimage_encoded], "image/format": ["jpeg"], "image/height": [height], "image/width": [width] }
python
def _generator(tmp_dir, training, size=_BASE_EXAMPLE_IMAGE_SIZE, training_fraction=0.95): """Base problem example generator for Allen Brain Atlas problems. Args: tmp_dir: str, a directory where raw example input data has been stored. training: bool, whether the mode of operation is training (or, alternatively, evaluation), determining whether examples in tmp_dir prefixed with train or dev will be used. size: int, the image size to add to the example annotation. training_fraction: float, the fraction of the sub-image path list to consider as the basis for training examples. Yields: A dictionary representing the images with the following fields: * image/encoded: The string encoding the image as JPEG. * image/format: The string "jpeg" indicating the image format. * image/height: The integer indicating the image height. * image/width: The integer indicating the image height. """ maybe_download_image_dataset(_IMAGE_IDS, tmp_dir) image_files = _get_case_file_paths(tmp_dir=tmp_dir, case=training, training_fraction=training_fraction) image_obj = PIL_Image() tf.logging.info("Loaded case file paths (n=%s)" % len(image_files)) height = size width = size for input_path in image_files: img = image_obj.open(input_path) img = np.float32(img) shape = np.shape(img) for h_index in range(0, int(math.floor(shape[0]/size))): h_offset = h_index * size h_end = h_offset + size - 1 for v_index in range(0, int(math.floor(shape[1]/size))): v_offset = v_index * size v_end = v_offset + size - 1 # Extract a sub-image tile. subimage = np.uint8(img[h_offset:h_end, v_offset:v_end]) # pylint: disable=invalid-sequence-index # Filter images that are likely background (not tissue). if np.amax(subimage) < 230: continue subimage = image_obj.fromarray(subimage) buff = BytesIO() subimage.save(buff, format="JPEG") subimage_encoded = buff.getvalue() yield { "image/encoded": [subimage_encoded], "image/format": ["jpeg"], "image/height": [height], "image/width": [width] }
[ "def", "_generator", "(", "tmp_dir", ",", "training", ",", "size", "=", "_BASE_EXAMPLE_IMAGE_SIZE", ",", "training_fraction", "=", "0.95", ")", ":", "maybe_download_image_dataset", "(", "_IMAGE_IDS", ",", "tmp_dir", ")", "image_files", "=", "_get_case_file_paths", "(", "tmp_dir", "=", "tmp_dir", ",", "case", "=", "training", ",", "training_fraction", "=", "training_fraction", ")", "image_obj", "=", "PIL_Image", "(", ")", "tf", ".", "logging", ".", "info", "(", "\"Loaded case file paths (n=%s)\"", "%", "len", "(", "image_files", ")", ")", "height", "=", "size", "width", "=", "size", "for", "input_path", "in", "image_files", ":", "img", "=", "image_obj", ".", "open", "(", "input_path", ")", "img", "=", "np", ".", "float32", "(", "img", ")", "shape", "=", "np", ".", "shape", "(", "img", ")", "for", "h_index", "in", "range", "(", "0", ",", "int", "(", "math", ".", "floor", "(", "shape", "[", "0", "]", "/", "size", ")", ")", ")", ":", "h_offset", "=", "h_index", "*", "size", "h_end", "=", "h_offset", "+", "size", "-", "1", "for", "v_index", "in", "range", "(", "0", ",", "int", "(", "math", ".", "floor", "(", "shape", "[", "1", "]", "/", "size", ")", ")", ")", ":", "v_offset", "=", "v_index", "*", "size", "v_end", "=", "v_offset", "+", "size", "-", "1", "# Extract a sub-image tile.", "subimage", "=", "np", ".", "uint8", "(", "img", "[", "h_offset", ":", "h_end", ",", "v_offset", ":", "v_end", "]", ")", "# pylint: disable=invalid-sequence-index", "# Filter images that are likely background (not tissue).", "if", "np", ".", "amax", "(", "subimage", ")", "<", "230", ":", "continue", "subimage", "=", "image_obj", ".", "fromarray", "(", "subimage", ")", "buff", "=", "BytesIO", "(", ")", "subimage", ".", "save", "(", "buff", ",", "format", "=", "\"JPEG\"", ")", "subimage_encoded", "=", "buff", ".", "getvalue", "(", ")", "yield", "{", "\"image/encoded\"", ":", "[", "subimage_encoded", "]", ",", "\"image/format\"", ":", "[", "\"jpeg\"", "]", ",", "\"image/height\"", ":", "[", "height", "]", ",", "\"image/width\"", ":", "[", "width", "]", "}" ]
Base problem example generator for Allen Brain Atlas problems. Args: tmp_dir: str, a directory where raw example input data has been stored. training: bool, whether the mode of operation is training (or, alternatively, evaluation), determining whether examples in tmp_dir prefixed with train or dev will be used. size: int, the image size to add to the example annotation. training_fraction: float, the fraction of the sub-image path list to consider as the basis for training examples. Yields: A dictionary representing the images with the following fields: * image/encoded: The string encoding the image as JPEG. * image/format: The string "jpeg" indicating the image format. * image/height: The integer indicating the image height. * image/width: The integer indicating the image height.
[ "Base", "problem", "example", "generator", "for", "Allen", "Brain", "Atlas", "problems", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/allen_brain.py#L192-L260
train
Base problem example generator for Allen Brain Atlas problems.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60dj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KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1732 - 1684) + '\157' + '\061' + chr(55) + '\x35', 48810 - 48802), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(50) + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7488 - 7377) + chr(0b110010) + chr(0b10001 + 0o43), 0b1000), ehT0Px3KOsy9(chr(48) + chr(12189 - 12078) + chr(53) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(51) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b101 + 0o56) + '\064', 0b1000), ehT0Px3KOsy9(chr(1080 - 1032) + chr(111) + '\x33' + chr(0b110111) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(12068 - 11957) + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x30' + chr(1323 - 1272), 0b1000), ehT0Px3KOsy9(chr(48) + chr(9352 - 9241) + chr(49) + chr(0b110110) + '\065', 0o10), ehT0Px3KOsy9(chr(399 - 351) + chr(0b11111 + 0o120) + chr(0b100111 + 0o14) + chr(0b110111) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(1892 - 1781) + chr(53) + '\065', 40556 - 40548), ehT0Px3KOsy9('\x30' + '\157' + '\064' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + chr(249 - 200) + chr(667 - 618) + chr(49), 32210 - 32202), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001100 + 0o43) + chr(49) + '\060', 0b1000), ehT0Px3KOsy9(chr(681 - 633) + chr(0b1010 + 0o145) + chr(0b1111 + 0o43) + chr(53) + chr(0b11011 + 0o33), 12911 - 12903), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(54) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x36' + chr(0b101111 + 0o7), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110101) + chr(55), 9697 - 9689), ehT0Px3KOsy9('\060' + chr(695 - 584) + chr(0b110011 + 0o0) + chr(0b100111 + 0o12) + chr(2545 - 2491), 0b1000), ehT0Px3KOsy9(chr(428 - 380) + '\x6f' + '\x32' + chr(0b110000) + '\066', 43538 - 43530), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(51) + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(0b11000 + 0o36) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10110 + 0o35) + chr(0b110101) + chr(992 - 938), ord("\x08")), ehT0Px3KOsy9(chr(965 - 917) + chr(111) + chr(0b100101 + 0o17) + '\x30', 35640 - 35632), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10 + 0o61) + chr(2131 - 2081) + '\062', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b11110 + 0o26) + chr(1364 - 1309), ord("\x08")), ehT0Px3KOsy9(chr(1748 - 1700) + chr(5882 - 5771) + chr(1373 - 1323) + chr(0b1100 + 0o53) + chr(0b110110), 981 - 973), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(49) + chr(984 - 934) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(2265 - 2217) + '\157' + chr(0b110001 + 0o0) + '\x34' + chr(0b101 + 0o54), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b1100 + 0o47) + '\x37', 0o10), ehT0Px3KOsy9('\060' + chr(9016 - 8905) + chr(0b10000 + 0o43) + chr(0b110101) + chr(0b100 + 0o56), 0b1000), ehT0Px3KOsy9(chr(345 - 297) + chr(111) + chr(1540 - 1489) + '\064' + chr(0b11101 + 0o31), 41753 - 41745), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\067' + chr(48), 17200 - 17192), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(49), 12549 - 12541), ehT0Px3KOsy9(chr(0b110000) + chr(0b11111 + 0o120) + '\x33' + chr(0b110001) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\064' + '\x37', 6078 - 6070), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(0b101100 + 0o12) + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37' + chr(0b10 + 0o65), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(53) + chr(0b11001 + 0o27), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'S'), chr(1408 - 1308) + chr(4163 - 4062) + chr(99) + '\157' + '\144' + '\x65')('\165' + '\164' + '\x66' + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FAKj7wPme4Wo(JsZ36NJUqtml, H15mhcYcioqz, NLcc3BCJnQka=oMBrcMVj92fR, bM5jErhnx_32=0.95): V8TdwwQpfSS6(SjlHr40MZSAK, JsZ36NJUqtml) sxe9ObnmYNO9 = LvAmu1wvJMQp(tmp_dir=JsZ36NJUqtml, case=H15mhcYcioqz, training_fraction=bM5jErhnx_32) gkdN0e0SHrfU = RHAaDRV020yY() xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'.\xe2\\Vs:;\xc8N//\x91'), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(7405 - 7305) + '\x65')(chr(117) + chr(116) + '\146' + chr(555 - 510) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'1\xbauJc=|\x9cE0\x10\xdaKL%m\x8eA\xd7\x1b\xa6\xf5y\x9d\x80\x1d\xf7\x14\x97'), chr(559 - 459) + '\x65' + chr(0b110010 + 0o61) + chr(10958 - 10847) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(2225 - 2169)) % c2A0yzQpDQB3(sxe9ObnmYNO9)) ehbUULKuygfC = NLcc3BCJnQka mPx09rBTrGXR = NLcc3BCJnQka for f4VmsQ86qYDJ in sxe9ObnmYNO9: s63jeLEbd8fs = gkdN0e0SHrfU.open(f4VmsQ86qYDJ) s63jeLEbd8fs = WqUC3KWvYVup.float32(s63jeLEbd8fs) nauYfLglTpcb = WqUC3KWvYVup.nauYfLglTpcb(s63jeLEbd8fs) for lvLtgjXuSksc in vQr8gNKaIaWE(ehT0Px3KOsy9('\x30' + '\157' + '\060', 0b1000), ehT0Px3KOsy9(xafqLlk3kkUe(yhiZVkosCjBm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xb9{At'), '\144' + chr(101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))('\165' + chr(116) + chr(102) + chr(1693 - 1648) + chr(1490 - 1434)))(nauYfLglTpcb[ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110000), 8)] / NLcc3BCJnQka))): mwaDpJIIBnGE = lvLtgjXuSksc * NLcc3BCJnQka asisnP5GtOWB = mwaDpJIIBnGE + NLcc3BCJnQka - ehT0Px3KOsy9(chr(167 - 119) + chr(4557 - 4446) + chr(0b10000 + 0o41), 8) for MOJ9EZ6QCHjP in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(971 - 923) + '\x6f' + chr(48), 8), ehT0Px3KOsy9(xafqLlk3kkUe(yhiZVkosCjBm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xb9{At'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(101))(chr(10823 - 10706) + chr(0b1110100) + chr(0b11010 + 0o114) + '\055' + chr(2345 - 2289)))(nauYfLglTpcb[ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31', 8)] / NLcc3BCJnQka))): DvWMQ1wPwKM2 = MOJ9EZ6QCHjP * NLcc3BCJnQka J_bmu_m_hpiH = DvWMQ1wPwKM2 + NLcc3BCJnQka - ehT0Px3KOsy9(chr(1400 - 1352) + chr(3569 - 3458) + '\061', 8) uUTAAP1pVenM = WqUC3KWvYVup.uint8(s63jeLEbd8fs[mwaDpJIIBnGE:asisnP5GtOWB, DvWMQ1wPwKM2:J_bmu_m_hpiH]) if xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\xb8uV'), '\x64' + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(1709 - 1608))('\x75' + '\x74' + chr(0b10001 + 0o125) + '\055' + '\x38'))(uUTAAP1pVenM) < ehT0Px3KOsy9('\x30' + '\157' + chr(0b10 + 0o61) + chr(0b110100) + chr(1129 - 1075), 8): continue uUTAAP1pVenM = gkdN0e0SHrfU.fromarray(uUTAAP1pVenM) c0oC7XMBxwn9 = f9L_Rzl5SCCf() xafqLlk3kkUe(uUTAAP1pVenM, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xb4bK'), chr(2270 - 2170) + '\x65' + chr(0b101110 + 0o65) + chr(10852 - 10741) + '\x64' + '\x65')(chr(0b100010 + 0o123) + chr(0b1011000 + 0o34) + '\146' + chr(45) + chr(0b111000)))(c0oC7XMBxwn9, format=xafqLlk3kkUe(SXOLrMavuUCe(b'7\x85Qi'), '\144' + chr(101) + '\143' + chr(0b1001 + 0o146) + chr(9857 - 9757) + chr(0b1100101))(chr(117) + '\164' + chr(102) + '\055' + chr(0b111000))) OLHbtteNkclm = c0oC7XMBxwn9.getvalue() yield {xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\xb8uIcv9\x91G,\x11\x9fI'), '\x64' + chr(0b1 + 0o144) + chr(99) + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(2228 - 2112) + chr(4059 - 3957) + chr(160 - 115) + '\070'): [OLHbtteNkclm], xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\xb8uIcv:\x90V.\x14\x8e'), chr(0b1100100) + chr(101) + chr(4669 - 4570) + chr(0b100101 + 0o112) + chr(0b1100100) + chr(101))('\165' + '\164' + '\x66' + chr(45) + chr(1280 - 1224)): [xafqLlk3kkUe(SXOLrMavuUCe(b'\x17\xa5qI'), chr(886 - 786) + chr(0b1010110 + 0o17) + chr(0b11100 + 0o107) + chr(111) + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(2573 - 2471) + '\055' + chr(748 - 692))], xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\xb8uIcv4\x9aM$\x1d\x8e'), chr(100) + chr(101) + chr(9027 - 8928) + chr(0b1011111 + 0o20) + '\x64' + chr(5607 - 5506))('\x75' + '\164' + chr(6486 - 6384) + chr(1439 - 1394) + '\x38'): [ehbUULKuygfC], xafqLlk3kkUe(SXOLrMavuUCe(b'\x14\xb8uIcv+\x96@7\x1d'), chr(0b1100 + 0o130) + chr(9872 - 9771) + '\143' + '\x6f' + '\144' + '\145')('\x75' + chr(6160 - 6044) + chr(8143 - 8041) + chr(45) + '\070'): [mPx09rBTrGXR]}
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_moe.py
transformer_moe_base
def transformer_moe_base(): """Set of hyperparameters.""" hparams = common_hparams.basic_params1() hparams.norm_type = "layer" hparams.hidden_size = 512 hparams.batch_size = 4096 hparams.max_length = 2001 hparams.max_input_seq_length = 2000 hparams.max_target_seq_length = 2000 hparams.dropout = 0.0 hparams.clip_grad_norm = 0. # i.e. no gradient clipping hparams.optimizer_adam_epsilon = 1e-9 hparams.learning_rate_decay_scheme = "noam" hparams.learning_rate = 0.1 hparams.learning_rate_warmup_steps = 2000 hparams.initializer_gain = 1.0 hparams.num_hidden_layers = 5 hparams.initializer = "uniform_unit_scaling" hparams.weight_decay = 0.0 hparams.optimizer_adam_beta1 = 0.9 hparams.optimizer_adam_beta2 = 0.98 hparams.num_sampled_classes = 0 hparams.label_smoothing = 0.0 hparams.shared_embedding_and_softmax_weights = True # According to noam, ("n", "da") seems better for harder-to-learn models hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" # Hparams used by transformer_prepare_decoder() function hparams.add_hparam("pos", "timing") # timing, none hparams.add_hparam("proximity_bias", False) hparams.add_hparam("causal_decoder_self_attention", True) hparams = common_attention.add_standard_attention_hparams(hparams) # Decoder layers type. If set, num_decoder_layers parameter will be ignored # and the number of decoder layer will be deduced from the string # See top file comment for example of usage hparams.add_hparam("layer_types", "") # Default attention type (ex: a, loc, red,...) and feed-forward type (ex: fc, # sep, moe,...) hparams.add_hparam("default_att", "a") hparams.add_hparam("default_ff", "fc") return hparams
python
def transformer_moe_base(): """Set of hyperparameters.""" hparams = common_hparams.basic_params1() hparams.norm_type = "layer" hparams.hidden_size = 512 hparams.batch_size = 4096 hparams.max_length = 2001 hparams.max_input_seq_length = 2000 hparams.max_target_seq_length = 2000 hparams.dropout = 0.0 hparams.clip_grad_norm = 0. # i.e. no gradient clipping hparams.optimizer_adam_epsilon = 1e-9 hparams.learning_rate_decay_scheme = "noam" hparams.learning_rate = 0.1 hparams.learning_rate_warmup_steps = 2000 hparams.initializer_gain = 1.0 hparams.num_hidden_layers = 5 hparams.initializer = "uniform_unit_scaling" hparams.weight_decay = 0.0 hparams.optimizer_adam_beta1 = 0.9 hparams.optimizer_adam_beta2 = 0.98 hparams.num_sampled_classes = 0 hparams.label_smoothing = 0.0 hparams.shared_embedding_and_softmax_weights = True # According to noam, ("n", "da") seems better for harder-to-learn models hparams.layer_preprocess_sequence = "n" hparams.layer_postprocess_sequence = "da" # Hparams used by transformer_prepare_decoder() function hparams.add_hparam("pos", "timing") # timing, none hparams.add_hparam("proximity_bias", False) hparams.add_hparam("causal_decoder_self_attention", True) hparams = common_attention.add_standard_attention_hparams(hparams) # Decoder layers type. If set, num_decoder_layers parameter will be ignored # and the number of decoder layer will be deduced from the string # See top file comment for example of usage hparams.add_hparam("layer_types", "") # Default attention type (ex: a, loc, red,...) and feed-forward type (ex: fc, # sep, moe,...) hparams.add_hparam("default_att", "a") hparams.add_hparam("default_ff", "fc") return hparams
[ "def", "transformer_moe_base", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "hparams", ".", "norm_type", "=", "\"layer\"", "hparams", ".", "hidden_size", "=", "512", "hparams", ".", "batch_size", "=", "4096", "hparams", ".", "max_length", "=", "2001", "hparams", ".", "max_input_seq_length", "=", "2000", "hparams", ".", "max_target_seq_length", "=", "2000", "hparams", ".", "dropout", "=", "0.0", "hparams", ".", "clip_grad_norm", "=", "0.", "# i.e. no gradient clipping", "hparams", ".", "optimizer_adam_epsilon", "=", "1e-9", "hparams", ".", "learning_rate_decay_scheme", "=", "\"noam\"", "hparams", ".", "learning_rate", "=", "0.1", "hparams", ".", "learning_rate_warmup_steps", "=", "2000", "hparams", ".", "initializer_gain", "=", "1.0", "hparams", ".", "num_hidden_layers", "=", "5", "hparams", ".", "initializer", "=", "\"uniform_unit_scaling\"", "hparams", ".", "weight_decay", "=", "0.0", "hparams", ".", "optimizer_adam_beta1", "=", "0.9", "hparams", ".", "optimizer_adam_beta2", "=", "0.98", "hparams", ".", "num_sampled_classes", "=", "0", "hparams", ".", "label_smoothing", "=", "0.0", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "True", "# According to noam, (\"n\", \"da\") seems better for harder-to-learn models", "hparams", ".", "layer_preprocess_sequence", "=", "\"n\"", "hparams", ".", "layer_postprocess_sequence", "=", "\"da\"", "# Hparams used by transformer_prepare_decoder() function", "hparams", ".", "add_hparam", "(", "\"pos\"", ",", "\"timing\"", ")", "# timing, none", "hparams", ".", "add_hparam", "(", "\"proximity_bias\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"causal_decoder_self_attention\"", ",", "True", ")", "hparams", "=", "common_attention", ".", "add_standard_attention_hparams", "(", "hparams", ")", "# Decoder layers type. If set, num_decoder_layers parameter will be ignored", "# and the number of decoder layer will be deduced from the string", "# See top file comment for example of usage", "hparams", ".", "add_hparam", "(", "\"layer_types\"", ",", "\"\"", ")", "# Default attention type (ex: a, loc, red,...) and feed-forward type (ex: fc,", "# sep, moe,...)", "hparams", ".", "add_hparam", "(", "\"default_att\"", ",", "\"a\"", ")", "hparams", ".", "add_hparam", "(", "\"default_ff\"", ",", "\"fc\"", ")", "return", "hparams" ]
Set of hyperparameters.
[ "Set", "of", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_moe.py#L267-L311
train
Hparams used by transformer_moe_base.
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(146 - 98) + chr(0b1101111) + '\067' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(1149 - 1101) + chr(111) + chr(0b100000 + 0o22) + chr(708 - 657) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + '\063' + chr(49), 29585 - 29577), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + chr(0b10 + 0o60) + chr(52) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1010 + 0o50) + '\x30' + chr(1971 - 1916), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1439 - 1390) + '\x34' + chr(0b1111 + 0o44), 25107 - 25099), ehT0Px3KOsy9(chr(556 - 508) + chr(11809 - 11698) + chr(49) + '\067' + chr(920 - 865), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b110111) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(665 - 617) + chr(111) + chr(0b100011 + 0o17) + '\062' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(446 - 398) + chr(0b1000111 + 0o50) + chr(491 - 440) + chr(0b110111) + chr(53), 0o10), ehT0Px3KOsy9(chr(1955 - 1907) + '\157' + chr(0b1111 + 0o43) + chr(48) + chr(2878 - 2823), 8), ehT0Px3KOsy9(chr(516 - 468) + '\157' + '\x32' + chr(0b110001) + '\x34', 0o10), ehT0Px3KOsy9(chr(49 - 1) + chr(0b1101111) + '\x32' + chr(0b101110 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(1219 - 1171) + chr(0b11001 + 0o126) + chr(0b110011) + chr(52) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111010 + 0o65) + chr(685 - 634) + chr(0b110001) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(48) + chr(2151 - 2101), 0b1000), ehT0Px3KOsy9(chr(450 - 402) + '\x6f' + chr(498 - 443) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(49) + chr(0b110010 + 0o0) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\x31' + chr(0b10110 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4488 - 4377) + '\061' + chr(2515 - 2463) + chr(0b10 + 0o56), 0b1000), ehT0Px3KOsy9(chr(997 - 949) + '\x6f' + '\062' + '\x36' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5330 - 5219) + chr(0b110011) + chr(0b110011) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1290 - 1241) + chr(50) + chr(0b11010 + 0o26), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011 + 0o2) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(48) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x36' + chr(1414 - 1364), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\x37' + chr(217 - 162), 5049 - 5041), ehT0Px3KOsy9('\060' + chr(0b101011 + 0o104) + chr(50) + chr(0b110100) + chr(683 - 633), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\x36' + chr(0b10011 + 0o36), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + chr(1862 - 1809) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(51) + '\060', 28749 - 28741), ehT0Px3KOsy9('\x30' + chr(0b111100 + 0o63) + '\x32' + '\x34' + chr(0b101010 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + '\x31' + chr(55) + '\x31', 0o10), ehT0Px3KOsy9(chr(113 - 65) + chr(8862 - 8751) + chr(50) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110000 + 0o6) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1240 - 1192) + '\157' + chr(0b11000 + 0o33) + chr(0b110110) + chr(2489 - 2436), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x33' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(430 - 382) + chr(11887 - 11776) + '\x36' + chr(1874 - 1824), 790 - 782), ehT0Px3KOsy9(chr(48) + chr(6783 - 6672) + chr(0b1101 + 0o46) + '\060', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2475 - 2422) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x11'), chr(8984 - 8884) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b111100 + 0o50) + chr(0b1100101))(chr(11121 - 11004) + chr(0b1110100) + chr(9432 - 9330) + '\055' + chr(0b110001 + 0o7)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def yfR9zFcofdDv(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() n4ljua2gi1Pr.LE5Fu6Tcl7nw = xafqLlk3kkUe(SXOLrMavuUCe(b'S\xfd\xa0\xc6\xf5'), chr(3486 - 3386) + chr(0b1100101) + '\143' + chr(5526 - 5415) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b101 + 0o141) + '\055' + chr(0b110001 + 0o7)) n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(48) + chr(1149 - 1101) + chr(0b100011 + 0o15), ord("\x08")) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\061' + chr(0b110000) + '\x30' + chr(0b100 + 0o54) + chr(1381 - 1333), 18228 - 18220) n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b100100 + 0o113) + '\x33' + chr(0b110111) + chr(0b101110 + 0o4) + chr(0b110001), 36514 - 36506) n4ljua2gi1Pr.xa50HGLsAIaS = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(55) + chr(0b110010) + chr(1693 - 1645), 0b1000) n4ljua2gi1Pr.uJutLB5DfPmB = ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1100 + 0o47) + chr(2123 - 2068) + chr(0b11111 + 0o23) + chr(0b110000), 8) n4ljua2gi1Pr.ag0mwEgWzjYv = 0.0 n4ljua2gi1Pr.SdNSZNVkVjLh = 0.0 n4ljua2gi1Pr.o17O_bIptWdl = 1e-09 n4ljua2gi1Pr.v3ZnJE9Hdub1 = xafqLlk3kkUe(SXOLrMavuUCe(b'Q\xf3\xb8\xce'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(5214 - 5103) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(0b100110 + 0o7) + '\x38') n4ljua2gi1Pr.QGSIpd_yUNzU = 0.1 n4ljua2gi1Pr.fHyhoyGmdvM9 = ehT0Px3KOsy9(chr(303 - 255) + '\x6f' + chr(0b110011) + chr(55) + chr(0b101101 + 0o5) + chr(48), 8) n4ljua2gi1Pr.S1SbCBXLapw8 = 1.0 n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110101), 0b1000) n4ljua2gi1Pr.kwfuYzkY5C57 = xafqLlk3kkUe(SXOLrMavuUCe(b'J\xf2\xb0\xc5\xe8\x11\x12"\xe7\x93\xee\xf8N\x96\xa9#V?\xa2g'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b111001 + 0o53) + chr(0b110001 + 0o64))('\x75' + '\164' + chr(0b1011110 + 0o10) + '\x2d' + chr(0b111000)) n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0 n4ljua2gi1Pr.GcOjyd7zcDH8 = 0.9 n4ljua2gi1Pr.CBOVKNT0M9cG = 0.98 n4ljua2gi1Pr.Syf38YGTPvuw = ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11101 + 0o23), 8) n4ljua2gi1Pr.FSjUgdaczzRk = 0.0 n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9('\x30' + '\x6f' + '\061', ord("\x08")) n4ljua2gi1Pr.WjY1aZ7lwLOu = xafqLlk3kkUe(SXOLrMavuUCe(b'Q'), chr(8809 - 8709) + '\x65' + '\x63' + chr(0b1101111) + '\144' + chr(0b10111 + 0o116))(chr(117) + chr(10093 - 9977) + chr(5110 - 5008) + chr(0b101101) + chr(0b101010 + 0o16)) n4ljua2gi1Pr.s6T_PoakASTI = xafqLlk3kkUe(SXOLrMavuUCe(b'[\xfd'), chr(0b1010000 + 0o24) + '\x65' + chr(0b1100011) + '\157' + '\x64' + chr(0b1001 + 0o134))('\x75' + chr(0b1110100) + chr(713 - 611) + '\x2d' + '\070') xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), chr(0b1100100) + chr(101) + chr(99) + '\157' + '\144' + '\x65')(chr(6494 - 6377) + chr(0b1101001 + 0o13) + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'O\xf3\xaa'), '\x64' + chr(0b1010111 + 0o16) + '\143' + chr(0b111011 + 0o64) + '\x64' + chr(0b1011011 + 0o12))(chr(0b1110101) + chr(6532 - 6416) + chr(5397 - 5295) + chr(251 - 206) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'K\xf5\xb4\xca\xe9\x04'), chr(0b11010 + 0o112) + chr(101) + chr(0b1 + 0o142) + '\x6f' + chr(100) + chr(0b11110 + 0o107))(chr(117) + chr(212 - 96) + '\146' + '\055' + chr(306 - 250))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(101))(chr(117) + chr(9325 - 9209) + chr(0b1100101 + 0o1) + chr(0b101101) + chr(0b110011 + 0o5)))(xafqLlk3kkUe(SXOLrMavuUCe(b'O\xee\xb6\xdb\xee\x0e\x16\t\xeb\xa2\xe5\xe5p\x96'), chr(0b1001111 + 0o25) + chr(0b10 + 0o143) + chr(0b1010100 + 0o17) + chr(1037 - 926) + chr(100) + chr(0b1100101))('\x75' + chr(0b1011010 + 0o32) + '\146' + '\055' + chr(1512 - 1456)), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(0b100 + 0o54), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), chr(3369 - 3269) + '\x65' + '\x63' + chr(6669 - 6558) + chr(4600 - 4500) + chr(0b10011 + 0o122))(chr(117) + chr(116) + '\x66' + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\\\xfd\xac\xd0\xe6\x0f \x19\xf7\x9e\xe8\xe8t\x97\x951_:\xaa_\x01\xc4\xaf5E0\x9b\xd0\xcc'), chr(100) + chr(101) + chr(0b100111 + 0o74) + chr(0b11100 + 0o123) + '\144' + chr(1493 - 1392))(chr(0b1110101) + chr(2754 - 2638) + chr(0b10000 + 0o126) + chr(45) + chr(0b111000)), ehT0Px3KOsy9('\x30' + '\157' + '\x31', 8)) n4ljua2gi1Pr = WOnrfm4dlYcf.add_standard_attention_hparams(n4ljua2gi1Pr) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), '\x64' + '\145' + chr(99) + chr(1476 - 1365) + chr(100) + '\x65')(chr(1267 - 1150) + chr(0b1110100) + chr(102) + chr(45) + chr(851 - 795)))(xafqLlk3kkUe(SXOLrMavuUCe(b'S\xfd\xa0\xc6\xf5<\x0b\x04\xe2\x98\xf4'), '\x64' + chr(0b1010000 + 0o25) + chr(0b1100011) + '\157' + '\144' + chr(101))('\x75' + '\164' + chr(0b11010 + 0o114) + '\055' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(5409 - 5309) + chr(7715 - 7614) + chr(0b11 + 0o140) + '\x6f' + '\x64' + chr(0b1011001 + 0o14))(chr(0b110101 + 0o100) + '\x74' + '\146' + '\055' + chr(0b111000))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), chr(100) + '\x65' + '\143' + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b100011 + 0o12) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'[\xf9\xbf\xc2\xf2\x0f\x0b"\xf3\x89\xf3'), chr(0b1100100) + chr(8437 - 8336) + chr(6591 - 6492) + chr(0b11001 + 0o126) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(7030 - 6928) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'^'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b10011 + 0o142) + chr(11262 - 11146) + '\x66' + '\055' + chr(0b111000))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xf8\xbd\xfc\xef\x13\x1e\x0f\xf3\x90'), chr(100) + chr(101) + chr(197 - 98) + chr(0b101010 + 0o105) + chr(8733 - 8633) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(116) + '\146' + chr(0b101101) + chr(0b10101 + 0o43)))(xafqLlk3kkUe(SXOLrMavuUCe(b'[\xf9\xbf\xc2\xf2\x0f\x0b"\xf4\x9b'), chr(0b110011 + 0o61) + chr(2405 - 2304) + chr(99) + chr(111) + chr(100) + chr(0b1100101))(chr(5651 - 5534) + '\x74' + chr(0b10011 + 0o123) + chr(0b11001 + 0o24) + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xff'), chr(4483 - 4383) + '\145' + '\x63' + '\157' + chr(0b101101 + 0o67) + chr(0b1100101))(chr(0b1100011 + 0o22) + chr(12110 - 11994) + '\x66' + '\x2d' + chr(0b111000))) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_moe.py
transformer_moe_8k
def transformer_moe_8k(): """Hyper parameters specifics for long sequence generation.""" hparams = transformer_moe_base() hparams.batch_size = 8192 hparams.max_length = 0 # max_length == batch_size hparams.eval_drop_long_sequences = True hparams.min_length_bucket = 256 # Avoid cyclic problems for big batches hparams.default_ff = "sep" hparams.hidden_size = 1024 return hparams
python
def transformer_moe_8k(): """Hyper parameters specifics for long sequence generation.""" hparams = transformer_moe_base() hparams.batch_size = 8192 hparams.max_length = 0 # max_length == batch_size hparams.eval_drop_long_sequences = True hparams.min_length_bucket = 256 # Avoid cyclic problems for big batches hparams.default_ff = "sep" hparams.hidden_size = 1024 return hparams
[ "def", "transformer_moe_8k", "(", ")", ":", "hparams", "=", "transformer_moe_base", "(", ")", "hparams", ".", "batch_size", "=", "8192", "hparams", ".", "max_length", "=", "0", "# max_length == batch_size", "hparams", ".", "eval_drop_long_sequences", "=", "True", "hparams", ".", "min_length_bucket", "=", "256", "# Avoid cyclic problems for big batches", "hparams", ".", "default_ff", "=", "\"sep\"", "hparams", ".", "hidden_size", "=", "1024", "return", "hparams" ]
Hyper parameters specifics for long sequence generation.
[ "Hyper", "parameters", "specifics", "for", "long", "sequence", "generation", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_moe.py#L315-L327
train
Hyper parameters specifics for long sequence generation.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV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YI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110010) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9256 - 9145) + chr(110 - 61) + chr(0b100010 + 0o24) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b11001 + 0o31) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(947 - 899) + chr(111) + chr(424 - 374) + chr(0b1010 + 0o46) + '\061', 38483 - 38475), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(135 - 80) + chr(49), 0o10), ehT0Px3KOsy9(chr(490 - 442) + '\x6f' + '\x32' + '\x35' + chr(367 - 317), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(0b110110) + chr(0b110101), 62426 - 62418), ehT0Px3KOsy9('\060' + '\157' + chr(333 - 283) + chr(49) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(308 - 260) + chr(11784 - 11673) + '\061' + chr(0b10000 + 0o46) + chr(971 - 917), 8), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(0b101000 + 0o16) + chr(0b110000 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(2280 - 2232) + chr(5519 - 5408) + chr(0b110010) + chr(0b110001) + '\062', 8040 - 8032), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(52) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(52) + chr(681 - 633), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101101 + 0o6) + chr(0b110000) + chr(0b11011 + 0o25), 0b1000), ehT0Px3KOsy9('\x30' + chr(7333 - 7222) + '\x32' + chr(50) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(5045 - 4934) + '\x31' + chr(0b110111) + chr(52), 42539 - 42531), ehT0Px3KOsy9(chr(1174 - 1126) + chr(10803 - 10692) + chr(1540 - 1490) + chr(54) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + '\061' + chr(0b110001 + 0o3) + chr(629 - 581), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(2819 - 2708) + chr(1454 - 1401) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(6891 - 6780) + chr(51) + '\x32' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\065' + chr(0b100000 + 0o24), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4906 - 4795) + chr(0b110011) + chr(0b110110) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\066' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100011 + 0o20) + chr(1223 - 1170) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1939 - 1891) + chr(0b1101111) + chr(0b10010 + 0o41) + chr(0b110010) + chr(1887 - 1834), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3232 - 3121) + chr(0b110011) + chr(49) + chr(0b11011 + 0o30), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(52) + chr(49), 13896 - 13888), ehT0Px3KOsy9(chr(48) + chr(111) + '\x34' + '\060', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\067' + '\062', 26683 - 26675), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1100000 + 0o17) + '\x33' + chr(0b1011 + 0o50) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(0b110110) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + chr(7070 - 6959) + chr(675 - 624) + '\x33' + chr(50), 59537 - 59529), ehT0Px3KOsy9(chr(146 - 98) + '\x6f' + chr(50) + '\062' + chr(529 - 476), 8), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + '\x33' + chr(0b101111 + 0o10) + '\x36', 14152 - 14144), ehT0Px3KOsy9('\x30' + chr(3380 - 3269) + chr(0b1000 + 0o52) + chr(1497 - 1445), 35441 - 35433), ehT0Px3KOsy9(chr(1489 - 1441) + chr(9518 - 9407) + chr(464 - 413) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2199 - 2150) + chr(0b110111) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x35', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(470 - 422) + '\x6f' + chr(388 - 335) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'}'), chr(100) + chr(0b1100101) + chr(0b1001101 + 0o26) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(116) + chr(0b1001111 + 0o27) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NEDOknpnkK6Z(): n4ljua2gi1Pr = yfR9zFcofdDv() n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(791 - 743) + '\x6f' + chr(50) + '\x30' + chr(48) + '\x30' + chr(0b11100 + 0o24), ord("\x08")) n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(943 - 832) + chr(0b1111 + 0o41), ord("\x08")) n4ljua2gi1Pr.n5sZSNr92T7V = ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 8) n4ljua2gi1Pr.lhJm4Z32JlM2 = ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + chr(539 - 487) + chr(0b110000) + '\060', 0o10) n4ljua2gi1Pr.hswBUaH2luQ0 = xafqLlk3kkUe(SXOLrMavuUCe(b" \x13'"), '\144' + '\x65' + chr(0b1010101 + 0o16) + chr(111) + chr(8545 - 8445) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + '\x38') n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9('\060' + chr(9674 - 9563) + chr(50) + '\060' + chr(0b110000) + chr(0b10111 + 0o31), 49728 - 49720) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_moe.py
transformer_moe_2k
def transformer_moe_2k(): """Base transformers model with moe. Will have the following architecture: * No encoder. * Layer 0: a - sep (self-attention - unmasked separable convolutions) * Layer 1: a - sep * Layer 2: a - sep * Layer 3: a - sep * Layer 4: a - sep * Decoder architecture: * Layer 0: a - a - sepm (self-attention - enco/deco-attention - masked sep) * Layer 1: a - a - sepm * Layer 2: a - a - moe (mixture of expert layers in the middle) * Layer 3: a - a - sepm * Layer 4: a - a - sepm Returns: hparams """ hparams = transformer_moe_8k() hparams.batch_size = 2048 hparams.default_ff = "sep" # hparams.layer_types contains the network architecture: encoder_archi = "a/a/a/a/a" decoder_archi = "a-sepm/a-sepm/a-moe/a-sepm/a-sepm" hparams.layer_types = "{}#{}".format(encoder_archi, decoder_archi) return hparams
python
def transformer_moe_2k(): """Base transformers model with moe. Will have the following architecture: * No encoder. * Layer 0: a - sep (self-attention - unmasked separable convolutions) * Layer 1: a - sep * Layer 2: a - sep * Layer 3: a - sep * Layer 4: a - sep * Decoder architecture: * Layer 0: a - a - sepm (self-attention - enco/deco-attention - masked sep) * Layer 1: a - a - sepm * Layer 2: a - a - moe (mixture of expert layers in the middle) * Layer 3: a - a - sepm * Layer 4: a - a - sepm Returns: hparams """ hparams = transformer_moe_8k() hparams.batch_size = 2048 hparams.default_ff = "sep" # hparams.layer_types contains the network architecture: encoder_archi = "a/a/a/a/a" decoder_archi = "a-sepm/a-sepm/a-moe/a-sepm/a-sepm" hparams.layer_types = "{}#{}".format(encoder_archi, decoder_archi) return hparams
[ "def", "transformer_moe_2k", "(", ")", ":", "hparams", "=", "transformer_moe_8k", "(", ")", "hparams", ".", "batch_size", "=", "2048", "hparams", ".", "default_ff", "=", "\"sep\"", "# hparams.layer_types contains the network architecture:", "encoder_archi", "=", "\"a/a/a/a/a\"", "decoder_archi", "=", "\"a-sepm/a-sepm/a-moe/a-sepm/a-sepm\"", "hparams", ".", "layer_types", "=", "\"{}#{}\"", ".", "format", "(", "encoder_archi", ",", "decoder_archi", ")", "return", "hparams" ]
Base transformers model with moe. Will have the following architecture: * No encoder. * Layer 0: a - sep (self-attention - unmasked separable convolutions) * Layer 1: a - sep * Layer 2: a - sep * Layer 3: a - sep * Layer 4: a - sep * Decoder architecture: * Layer 0: a - a - sepm (self-attention - enco/deco-attention - masked sep) * Layer 1: a - a - sepm * Layer 2: a - a - moe (mixture of expert layers in the middle) * Layer 3: a - a - sepm * Layer 4: a - a - sepm Returns: hparams
[ "Base", "transformers", "model", "with", "moe", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_moe.py#L365-L395
train
Base transformers model with moe. Will have the following architecture.
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,TLbJ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2An,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(0b1001111 + 0o40) + '\x31' + chr(0b110000) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\x32' + chr(0b110010) + '\x36', 46481 - 46473), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b110011 + 0o3) + '\x32', 59489 - 59481), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(55) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\x37' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + chr(0b110010 + 0o2) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(54) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(0b10101 + 0o36) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(461 - 412) + '\062' + chr(0b110001), 46362 - 46354), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(0b110011) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1146 - 1035) + chr(49) + '\x32' + '\063', 0b1000), ehT0Px3KOsy9(chr(693 - 645) + chr(111) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\x31' + chr(0b1000 + 0o57) + '\063', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b110100) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(54) + chr(0b11010 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(1340 - 1292) + chr(0b11010 + 0o125) + chr(0b10 + 0o60) + chr(52) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10000 + 0o42) + chr(55), 55617 - 55609), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + '\x33' + chr(0b10110 + 0o36) + chr(0b10100 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(4941 - 4830) + chr(237 - 187) + chr(2678 - 2626) + chr(126 - 72), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1736 - 1682) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1100001 + 0o16) + chr(0b100001 + 0o20) + '\065' + chr(2344 - 2291), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b1110 + 0o50) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(0b10100 + 0o37) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(410 - 362) + chr(0b10001 + 0o136) + chr(151 - 100) + chr(54) + chr(0b1100 + 0o44), 13125 - 13117), ehT0Px3KOsy9(chr(1904 - 1856) + chr(0b10100 + 0o133) + chr(51) + '\066', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100100 + 0o15) + '\063' + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(2519 - 2468) + '\061', 8), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(0b110110) + chr(0b1111 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(279 - 230) + chr(0b110100) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(346 - 297) + '\064' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b10011 + 0o40) + chr(0b100111 + 0o13), 51958 - 51950), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b111111 + 0o60) + '\x33' + '\060' + chr(0b10100 + 0o41), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\x32' + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + chr(0b10001 + 0o42) + '\067' + '\064', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b110001) + '\064' + '\x34', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1000 + 0o51) + chr(2082 - 2032) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(49) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(274 - 226) + '\x6f' + '\x33' + chr(0b110011) + '\x35', 49434 - 49426), ehT0Px3KOsy9('\060' + chr(2977 - 2866) + chr(0b110011), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b101101 + 0o102) + '\065' + chr(0b101111 + 0o1), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'k'), '\x64' + chr(101) + '\x63' + '\x6f' + chr(0b1010001 + 0o23) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(3086 - 3030)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def GY8TIXMMnuBF(): n4ljua2gi1Pr = NEDOknpnkK6Z() n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(520 - 472) + '\x6f' + chr(52) + chr(48) + chr(0b101010 + 0o6) + '\x30', 0o10) n4ljua2gi1Pr.hswBUaH2luQ0 = xafqLlk3kkUe(SXOLrMavuUCe(b'6\xf3\x02'), chr(9293 - 9193) + chr(101) + '\143' + chr(2504 - 2393) + chr(100) + chr(0b1011 + 0o132))('\165' + '\x74' + chr(8204 - 8102) + '\x2d' + chr(0b110001 + 0o7)) jYpgYoeGw9DH = xafqLlk3kkUe(SXOLrMavuUCe(b'$\xb9\x13\xd0\x9b\x0fP10'), chr(6676 - 6576) + '\145' + chr(99) + chr(1103 - 992) + chr(0b111101 + 0o47) + chr(0b10011 + 0o122))(chr(117) + '\164' + '\146' + '\x2d' + '\x38') o2OclGjNcjN0 = xafqLlk3kkUe(SXOLrMavuUCe(b'$\xbb\x01\x9a\x8aM\x1e\x7f|\xac6u\x16\x8bR\x8az\x8c\xc3\x1a\x0c\xdbj\x95n3=x\x9b\x14\x06*\xa8'), '\x64' + chr(0b1100101) + chr(0b1010100 + 0o17) + chr(6421 - 6310) + chr(0b1000111 + 0o35) + chr(101))('\165' + '\164' + chr(0b111111 + 0o47) + chr(1471 - 1426) + chr(56)) n4ljua2gi1Pr.WIsPk5v9ylnD = xafqLlk3kkUe(SXOLrMavuUCe(b'>\xebQ\x84\x87'), chr(2872 - 2772) + '\145' + chr(4320 - 4221) + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + chr(5271 - 5169) + '\055' + chr(2324 - 2268)).V4roHaS3Ppej(jYpgYoeGw9DH, o2OclGjNcjN0) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_moe.py
transformer_moe_prepend_8k
def transformer_moe_prepend_8k(): """Model which formulate a seq2seq problem as language modeling.""" hparams = transformer_moe_8k() hparams.prepend_mode = "prepend_inputs_masked_attention" hparams.eval_drop_long_sequences = False hparams.max_input_seq_length = 7500 hparams.default_ff = "sepm" hparams.layer_types = "locm/redm/locm-moe/redm/locm" hparams.moe_num_experts = 256 return hparams
python
def transformer_moe_prepend_8k(): """Model which formulate a seq2seq problem as language modeling.""" hparams = transformer_moe_8k() hparams.prepend_mode = "prepend_inputs_masked_attention" hparams.eval_drop_long_sequences = False hparams.max_input_seq_length = 7500 hparams.default_ff = "sepm" hparams.layer_types = "locm/redm/locm-moe/redm/locm" hparams.moe_num_experts = 256 return hparams
[ "def", "transformer_moe_prepend_8k", "(", ")", ":", "hparams", "=", "transformer_moe_8k", "(", ")", "hparams", ".", "prepend_mode", "=", "\"prepend_inputs_masked_attention\"", "hparams", ".", "eval_drop_long_sequences", "=", "False", "hparams", ".", "max_input_seq_length", "=", "7500", "hparams", ".", "default_ff", "=", "\"sepm\"", "hparams", ".", "layer_types", "=", "\"locm/redm/locm-moe/redm/locm\"", "hparams", ".", "moe_num_experts", "=", "256", "return", "hparams" ]
Model which formulate a seq2seq problem as language modeling.
[ "Model", "which", "formulate", "a", "seq2seq", "problem", "as", "language", "modeling", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_moe.py#L409-L418
train
Model which formulate a seq2seq problem as language modeling.
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,ZM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24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(7207 - 7096) + '\x32' + chr(0b110101), 16006 - 15998), ehT0Px3KOsy9('\060' + chr(111) + chr(1904 - 1855) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9699 - 9588) + '\066' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + chr(2266 - 2217) + chr(52) + chr(0b10011 + 0o36), 0b1000), ehT0Px3KOsy9('\x30' + chr(1040 - 929) + chr(0b100111 + 0o12) + '\067' + chr(49), 15309 - 15301), ehT0Px3KOsy9('\060' + chr(2627 - 2516) + chr(641 - 590) + chr(0b110101) + '\x31', 0o10), ehT0Px3KOsy9(chr(653 - 605) + chr(0b101100 + 0o103) + chr(0b110001) + '\060' + '\062', 15135 - 15127), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\x6f' + chr(49) + chr(0b101 + 0o57) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\x37' + chr(859 - 804), 26269 - 26261), ehT0Px3KOsy9('\x30' + chr(1343 - 1232) + chr(2333 - 2284) + chr(0b101000 + 0o15), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b100111 + 0o12) + chr(50) + chr(256 - 202), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(0b0 + 0o61) + chr(0b110101) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(50) + chr(966 - 911) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + '\062' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1534 - 1483) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + chr(0b110001) + chr(0b10000 + 0o44) + '\x33', 8), ehT0Px3KOsy9('\x30' + chr(7057 - 6946) + chr(0b110001) + chr(54) + chr(462 - 410), 0b1000), ehT0Px3KOsy9(chr(2223 - 2175) + '\x6f' + chr(0b110101) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(94 - 40) + chr(1505 - 1456), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(50) + chr(1909 - 1859), 54137 - 54129), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\x32' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(49) + '\x32' + chr(0b101110 + 0o7), 8), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b11000 + 0o37) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1317 - 1262) + chr(0b101 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(0b1000 + 0o53) + chr(54) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(2286 - 2238) + chr(0b1101111) + chr(427 - 378) + chr(708 - 658) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(2256 - 2207) + chr(0b10111 + 0o33), 0b1000), ehT0Px3KOsy9(chr(1527 - 1479) + chr(111) + chr(49) + chr(0b110010) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(0b110001) + '\x35' + chr(0b11001 + 0o27), 8), ehT0Px3KOsy9(chr(1176 - 1128) + '\157' + '\062' + '\x37' + chr(0b101110 + 0o10), 12950 - 12942), ehT0Px3KOsy9(chr(186 - 138) + chr(6829 - 6718) + chr(0b110110) + chr(52), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\x35' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(2043 - 1995) + chr(0b1100110 + 0o11) + '\061' + chr(0b11000 + 0o33) + '\x35', 51145 - 51137), ehT0Px3KOsy9(chr(48) + chr(0b100101 + 0o112) + chr(0b110010) + chr(0b110001) + chr(256 - 202), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b11 + 0o56) + '\061' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b11101 + 0o122) + chr(0b101111 + 0o3) + chr(0b110101) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1595 - 1547) + chr(0b1101111) + '\x32', 10949 - 10941), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + '\x32' + '\x34', 917 - 909), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\060' + chr(0b110101), 30698 - 30690)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + chr(0b11110 + 0o27) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b')'), chr(100) + chr(183 - 82) + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(0b1100000 + 0o25) + chr(0b100101 + 0o117) + chr(0b1011001 + 0o15) + chr(45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def auC7hsh2KfnW(): n4ljua2gi1Pr = NEDOknpnkK6Z() n4ljua2gi1Pr.qr_7laJirAn2 = xafqLlk3kkUe(SXOLrMavuUCe(b'wgi@\x04\x17\x8d\x1d\n\x11}#\x1c\xce\x8as\x02\x07C\x94\xb6\n4\xce\x89\x92=>;\x07\xd0'), chr(0b1100100) + chr(0b10010 + 0o123) + chr(6607 - 6508) + '\157' + chr(2351 - 2251) + chr(0b1100101))(chr(117) + chr(0b11 + 0o161) + chr(4461 - 4359) + chr(0b11010 + 0o23) + chr(692 - 636)) n4ljua2gi1Pr.n5sZSNr92T7V = ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110 + 0o52), 23529 - 23521) n4ljua2gi1Pr.xa50HGLsAIaS = ehT0Px3KOsy9(chr(1429 - 1381) + chr(9228 - 9117) + chr(96 - 47) + chr(0b101111 + 0o7) + chr(0b110101) + chr(49) + '\x34', 14855 - 14847) n4ljua2gi1Pr.hswBUaH2luQ0 = xafqLlk3kkUe(SXOLrMavuUCe(b'tp|]'), chr(2097 - 1997) + chr(0b1100101) + chr(7595 - 7496) + chr(0b1101111) + '\144' + chr(7756 - 7655))(chr(117) + '\x74' + '\146' + chr(45) + chr(56)) n4ljua2gi1Pr.WIsPk5v9ylnD = xafqLlk3kkUe(SXOLrMavuUCe(b"kzo]N\x0b\x8c&\x0ePa9\x0b\xd0\xf8s\x0c\x11\x07\x83\xb718\x95\x91\x980'"), chr(0b1100001 + 0o3) + chr(0b10010 + 0o123) + chr(0b1100011) + chr(1666 - 1555) + chr(4479 - 4379) + chr(0b1100101))(chr(117) + chr(116) + '\x66' + '\055' + '\070') n4ljua2gi1Pr.r99iQzD4Y8i3 = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(0b110000) + chr(0b110000), 47359 - 47351) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
f
def f(x, depth1, depth2, dim='2d', first_batch_norm=True, stride=1, training=True, bottleneck=True, padding='SAME'): """Applies residual function for RevNet. Args: x: input tensor depth1: Number of output channels for the first and second conv layers. depth2: Number of output channels for the third conv layer. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the first conv filter. Note that this particular RevNet architecture only varies the stride for the first conv filter. The stride for the second conv filter is always set to 1. training: True for train phase, False for eval phase. bottleneck: If true, apply bottleneck 1x1 down/up sampling. padding: Padding for each conv layer. Returns: Output tensor after applying residual function for RevNet. """ conv = CONFIG[dim]['conv'] with tf.variable_scope('f', reuse=tf.AUTO_REUSE): if first_batch_norm: net = tf.layers.batch_normalization(x, training=training) net = tf.nn.relu(net) else: net = x if bottleneck: net = conv(net, depth1, 1, strides=stride, padding=padding, activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) net = conv(net, depth1, 3, strides=1, padding=padding, activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) net = conv(net, depth2, 1, strides=1, padding=padding, activation=None) else: net = conv(net, depth2, 3, strides=stride, padding=padding, activation=None) net = tf.layers.batch_normalization(x, training=training) net = tf.nn.relu(net) net = conv(net, depth2, 3, strides=stride, padding=padding, activation=None) return net
python
def f(x, depth1, depth2, dim='2d', first_batch_norm=True, stride=1, training=True, bottleneck=True, padding='SAME'): """Applies residual function for RevNet. Args: x: input tensor depth1: Number of output channels for the first and second conv layers. depth2: Number of output channels for the third conv layer. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the first conv filter. Note that this particular RevNet architecture only varies the stride for the first conv filter. The stride for the second conv filter is always set to 1. training: True for train phase, False for eval phase. bottleneck: If true, apply bottleneck 1x1 down/up sampling. padding: Padding for each conv layer. Returns: Output tensor after applying residual function for RevNet. """ conv = CONFIG[dim]['conv'] with tf.variable_scope('f', reuse=tf.AUTO_REUSE): if first_batch_norm: net = tf.layers.batch_normalization(x, training=training) net = tf.nn.relu(net) else: net = x if bottleneck: net = conv(net, depth1, 1, strides=stride, padding=padding, activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) net = conv(net, depth1, 3, strides=1, padding=padding, activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) net = conv(net, depth2, 1, strides=1, padding=padding, activation=None) else: net = conv(net, depth2, 3, strides=stride, padding=padding, activation=None) net = tf.layers.batch_normalization(x, training=training) net = tf.nn.relu(net) net = conv(net, depth2, 3, strides=stride, padding=padding, activation=None) return net
[ "def", "f", "(", "x", ",", "depth1", ",", "depth2", ",", "dim", "=", "'2d'", ",", "first_batch_norm", "=", "True", ",", "stride", "=", "1", ",", "training", "=", "True", ",", "bottleneck", "=", "True", ",", "padding", "=", "'SAME'", ")", ":", "conv", "=", "CONFIG", "[", "dim", "]", "[", "'conv'", "]", "with", "tf", ".", "variable_scope", "(", "'f'", ",", "reuse", "=", "tf", ".", "AUTO_REUSE", ")", ":", "if", "first_batch_norm", ":", "net", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "x", ",", "training", "=", "training", ")", "net", "=", "tf", ".", "nn", ".", "relu", "(", "net", ")", "else", ":", "net", "=", "x", "if", "bottleneck", ":", "net", "=", "conv", "(", "net", ",", "depth1", ",", "1", ",", "strides", "=", "stride", ",", "padding", "=", "padding", ",", "activation", "=", "None", ")", "net", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "net", ",", "training", "=", "training", ")", "net", "=", "tf", ".", "nn", ".", "relu", "(", "net", ")", "net", "=", "conv", "(", "net", ",", "depth1", ",", "3", ",", "strides", "=", "1", ",", "padding", "=", "padding", ",", "activation", "=", "None", ")", "net", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "net", ",", "training", "=", "training", ")", "net", "=", "tf", ".", "nn", ".", "relu", "(", "net", ")", "net", "=", "conv", "(", "net", ",", "depth2", ",", "1", ",", "strides", "=", "1", ",", "padding", "=", "padding", ",", "activation", "=", "None", ")", "else", ":", "net", "=", "conv", "(", "net", ",", "depth2", ",", "3", ",", "strides", "=", "stride", ",", "padding", "=", "padding", ",", "activation", "=", "None", ")", "net", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "x", ",", "training", "=", "training", ")", "net", "=", "tf", ".", "nn", ".", "relu", "(", "net", ")", "net", "=", "conv", "(", "net", ",", "depth2", ",", "3", ",", "strides", "=", "stride", ",", "padding", "=", "padding", ",", "activation", "=", "None", ")", "return", "net" ]
Applies residual function for RevNet. Args: x: input tensor depth1: Number of output channels for the first and second conv layers. depth2: Number of output channels for the third conv layer. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the first conv filter. Note that this particular RevNet architecture only varies the stride for the first conv filter. The stride for the second conv filter is always set to 1. training: True for train phase, False for eval phase. bottleneck: If true, apply bottleneck 1x1 down/up sampling. padding: Padding for each conv layer. Returns: Output tensor after applying residual function for RevNet.
[ "Applies", "residual", "function", "for", "RevNet", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L72-L122
train
Applies residual function for RevNet.
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,DXjfarvgFnb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,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' + '\x31' + '\x32' + chr(0b101001 + 0o12), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\x6f' + chr(0b110001) + '\063' + chr(1318 - 1263), 0o10), ehT0Px3KOsy9(chr(1748 - 1700) + chr(0b1101111) + chr(50) + chr(0b110011) + chr(0b101101 + 0o6), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x31' + chr(50) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(1486 - 1438), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\064' + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(2694 - 2583) + chr(51) + chr(116 - 68) + chr(0b110001), 16551 - 16543), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2433 - 2383) + '\062' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100011 + 0o20) + chr(0b110111) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1101111) + '\067' + '\061', 13516 - 13508), ehT0Px3KOsy9('\060' + chr(8627 - 8516) + chr(0b110011) + chr(51) + chr(2043 - 1990), 8687 - 8679), ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + '\062' + '\x31' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7149 - 7038) + chr(0b110001) + chr(0b101111 + 0o1) + chr(49), 31764 - 31756), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010 + 0o145) + '\x32' + '\060' + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(55) + chr(662 - 609), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6096 - 5985) + chr(0b10101 + 0o37) + chr(0b101001 + 0o16), 5296 - 5288), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(0b110011) + chr(0b110010) + chr(0b110000 + 0o6), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1462 - 1413) + chr(2427 - 2374) + chr(234 - 185), 0b1000), ehT0Px3KOsy9(chr(1578 - 1530) + chr(9663 - 9552) + chr(2017 - 1966) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\067' + '\067', 30266 - 30258), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + '\x31' + chr(0b110000) + chr(0b110000), 59886 - 59878), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(1132 - 1021) + chr(0b110100) + chr(1543 - 1489), ord("\x08")), ehT0Px3KOsy9(chr(1512 - 1464) + chr(0b1101111) + '\062' + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(2732 - 2679) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x37' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x31' + '\x35' + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + '\060' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110111) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(624 - 576) + chr(0b101001 + 0o106) + '\x32' + chr(52) + chr(50), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(53) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\067' + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(0b110001 + 0o76) + chr(1200 - 1149) + chr(0b11000 + 0o32), 25926 - 25918), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b110010) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b10000 + 0o43) + '\065', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\060' + chr(0b110000), 49553 - 49545), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(1543 - 1494) + chr(0b110110) + '\064', 0b1000), ehT0Px3KOsy9(chr(1078 - 1030) + chr(0b1001001 + 0o46) + chr(0b110010) + chr(2282 - 2229) + chr(1036 - 988), 0o10), ehT0Px3KOsy9('\060' + chr(12100 - 11989) + chr(0b1100 + 0o47) + '\x30' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(10510 - 10399) + chr(364 - 314) + chr(140 - 86) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(539 - 491) + chr(111) + chr(0b100001 + 0o20) + '\x37' + '\x31', 50444 - 50436)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(90 - 37) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'}'), chr(1574 - 1474) + chr(1406 - 1305) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b1110100) + chr(4314 - 4212) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def EGyt1xfPT1P6(OeWW0F1dBPRQ, J1vgggrSgjxi, sjhX7ukdlpki, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b'a;'), chr(0b1100100) + chr(1368 - 1267) + chr(5931 - 5832) + chr(0b1000011 + 0o54) + chr(100) + chr(101))(chr(0b1100010 + 0o23) + '\x74' + chr(2812 - 2710) + chr(0b101101) + chr(0b10100 + 0o44)), RGktndCUX5jn=ehT0Px3KOsy9(chr(270 - 222) + chr(0b1101111) + chr(0b10000 + 0o41), 0b1000), VKQ5wcD30goF=ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + '\x31', 8), H15mhcYcioqz=ehT0Px3KOsy9(chr(536 - 488) + '\x6f' + chr(64 - 15), 8), Hax21lk7t3Y8=ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 8), TFLseEYASEKG=xafqLlk3kkUe(SXOLrMavuUCe(b'\x00\x1e\xd6\x12'), chr(1782 - 1682) + chr(0b100011 + 0o102) + chr(99) + '\x6f' + '\x64' + '\145')(chr(0b1100 + 0o151) + chr(116) + '\146' + chr(1884 - 1839) + chr(0b1100 + 0o54))): m1sWr00SVpVY = MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'00\xf5!'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1000 + 0o134) + chr(2722 - 2621))(chr(0b1110101) + '\164' + chr(1869 - 1767) + chr(0b101101) + chr(0b111000 + 0o0))] with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'%>\xe9>aF\xad\xf3\xa1J\xbe\xe61\xe2'), '\144' + chr(0b1100101) + '\143' + chr(111) + '\x64' + chr(8122 - 8021))('\x75' + chr(11767 - 11651) + '\146' + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'5'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + chr(6840 - 6739))(chr(0b1110101) + chr(0b1110100) + chr(0b1011101 + 0o11) + '\055' + '\070'), reuse=xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12\n\xcf\x18_v\x84\xc3\xad|'), chr(100) + '\145' + chr(7727 - 7628) + chr(0b1001111 + 0o40) + chr(0b10001 + 0o123) + '\145')(chr(0b1101100 + 0o11) + '\164' + chr(0b1100110) + '\055' + '\070'))): if RGktndCUX5jn: DyzboKL9cczb = IDJ2eXGCBCDu.layers.batch_normalization(OeWW0F1dBPRQ, training=H15mhcYcioqz) DyzboKL9cczb = IDJ2eXGCBCDu.nn.relu(DyzboKL9cczb) else: DyzboKL9cczb = OeWW0F1dBPRQ if Hax21lk7t3Y8: DyzboKL9cczb = m1sWr00SVpVY(DyzboKL9cczb, J1vgggrSgjxi, ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b110001), 8), strides=VKQ5wcD30goF, padding=TFLseEYASEKG, activation=None) DyzboKL9cczb = IDJ2eXGCBCDu.layers.batch_normalization(DyzboKL9cczb, training=H15mhcYcioqz) DyzboKL9cczb = IDJ2eXGCBCDu.nn.relu(DyzboKL9cczb) DyzboKL9cczb = m1sWr00SVpVY(DyzboKL9cczb, J1vgggrSgjxi, ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b111 + 0o54), ord("\x08")), strides=ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31', 8), padding=TFLseEYASEKG, activation=None) DyzboKL9cczb = IDJ2eXGCBCDu.layers.batch_normalization(DyzboKL9cczb, training=H15mhcYcioqz) DyzboKL9cczb = IDJ2eXGCBCDu.nn.relu(DyzboKL9cczb) DyzboKL9cczb = m1sWr00SVpVY(DyzboKL9cczb, sjhX7ukdlpki, ehT0Px3KOsy9('\060' + chr(10482 - 10371) + '\x31', 8), strides=ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 8), padding=TFLseEYASEKG, activation=None) else: DyzboKL9cczb = m1sWr00SVpVY(DyzboKL9cczb, sjhX7ukdlpki, ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(51), 8), strides=VKQ5wcD30goF, padding=TFLseEYASEKG, activation=None) DyzboKL9cczb = IDJ2eXGCBCDu.layers.batch_normalization(OeWW0F1dBPRQ, training=H15mhcYcioqz) DyzboKL9cczb = IDJ2eXGCBCDu.nn.relu(DyzboKL9cczb) DyzboKL9cczb = m1sWr00SVpVY(DyzboKL9cczb, sjhX7ukdlpki, ehT0Px3KOsy9('\060' + chr(111) + chr(51), 8), strides=VKQ5wcD30goF, padding=TFLseEYASEKG, activation=None) return DyzboKL9cczb
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
downsample_bottleneck
def downsample_bottleneck(x, output_channels, dim='2d', stride=1, scope='h'): """Downsamples 'x' by `stride` using a 1x1 convolution filter. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1. """ conv = CONFIG[dim]['conv'] with tf.variable_scope(scope): x = conv(x, output_channels, 1, strides=stride, padding='SAME', activation=None) return x
python
def downsample_bottleneck(x, output_channels, dim='2d', stride=1, scope='h'): """Downsamples 'x' by `stride` using a 1x1 convolution filter. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1. """ conv = CONFIG[dim]['conv'] with tf.variable_scope(scope): x = conv(x, output_channels, 1, strides=stride, padding='SAME', activation=None) return x
[ "def", "downsample_bottleneck", "(", "x", ",", "output_channels", ",", "dim", "=", "'2d'", ",", "stride", "=", "1", ",", "scope", "=", "'h'", ")", ":", "conv", "=", "CONFIG", "[", "dim", "]", "[", "'conv'", "]", "with", "tf", ".", "variable_scope", "(", "scope", ")", ":", "x", "=", "conv", "(", "x", ",", "output_channels", ",", "1", ",", "strides", "=", "stride", ",", "padding", "=", "'SAME'", ",", "activation", "=", "None", ")", "return", "x" ]
Downsamples 'x' by `stride` using a 1x1 convolution filter. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1.
[ "Downsamples", "x", "by", "stride", "using", "a", "1x1", "convolution", "filter", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L125-L144
train
Downsamples x by stride using a 1x1 convolution filter.
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,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1V0ySZcNds,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(1756 - 1708) + chr(111) + chr(0b11011 + 0o26) + '\x32' + chr(54), 31933 - 31925), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + chr(51) + chr(0b110 + 0o53) + chr(2574 - 2523), 0o10), ehT0Px3KOsy9(chr(882 - 834) + '\x6f' + chr(51) + chr(0b101100 + 0o12) + chr(2218 - 2164), 45594 - 45586), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(1203 - 1092) + '\061' + '\064' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(1139 - 1091) + chr(0b1101111) + chr(0b101000 + 0o13) + chr(165 - 113) + chr(0b100001 + 0o26), 40037 - 40029), ehT0Px3KOsy9('\060' + chr(3253 - 3142) + chr(0b1101 + 0o46) + chr(52) + chr(1718 - 1665), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b11101 + 0o23), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\061' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(51) + chr(0b11100 + 0o31), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b110000 + 0o3) + chr(55) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1276 - 1225) + chr(53) + chr(601 - 546), ord("\x08")), ehT0Px3KOsy9(chr(602 - 554) + chr(0b1101111) + chr(2088 - 2037) + chr(2146 - 2091) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(514 - 460) + '\067', 16797 - 16789), ehT0Px3KOsy9('\060' + '\x6f' + '\x36' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x32' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + chr(1673 - 1619) + '\062', 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + '\x33' + '\062' + '\x32', 52475 - 52467), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + '\061' + chr(1739 - 1684) + chr(1321 - 1269), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1960 - 1910) + chr(0b110011) + chr(700 - 651), 13548 - 13540), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b110101) + '\x32', 0b1000), ehT0Px3KOsy9(chr(386 - 338) + '\x6f' + '\x31' + chr(53) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(3416 - 3305) + chr(0b110010) + '\x32' + chr(0b11011 + 0o32), 58315 - 58307), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110010) + chr(0b110 + 0o54), 8), ehT0Px3KOsy9(chr(48) + chr(6007 - 5896) + chr(0b10111 + 0o32) + chr(53) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\157' + chr(0b110000 + 0o2) + '\x37' + '\x31', 21926 - 21918), ehT0Px3KOsy9('\x30' + chr(9227 - 9116) + '\067' + chr(1655 - 1607), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + '\x31' + chr(0b110001) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011 + 0o0) + chr(2003 - 1953) + chr(1121 - 1066), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + '\x31' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + '\x32' + '\067' + chr(2075 - 2026), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + chr(51) + chr(53) + '\061', 0o10), ehT0Px3KOsy9(chr(1338 - 1290) + chr(0b1101111) + chr(0b101011 + 0o12) + chr(2103 - 2053), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110 + 0o57) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100001 + 0o20) + chr(2311 - 2258) + chr(395 - 343), 19132 - 19124), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(50) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(4837 - 4726) + chr(0b110011) + chr(52) + '\x35', 8), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(58 - 9) + '\061' + chr(0b100000 + 0o26), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b101100 + 0o103) + chr(0b110011) + '\x31' + chr(1603 - 1549), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b101111 + 0o3) + chr(0b100010 + 0o22), 8), ehT0Px3KOsy9(chr(131 - 83) + '\157' + '\x36' + chr(55), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + chr(0b10101 + 0o40) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'x'), chr(0b1010001 + 0o23) + '\x65' + chr(9566 - 9467) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(7842 - 7740) + chr(0b101101) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nmOdLxvRQYnI(OeWW0F1dBPRQ, jAT42bk66WvZ, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b'd\xaf'), chr(265 - 165) + chr(7143 - 7042) + '\x63' + chr(2479 - 2368) + '\x64' + chr(668 - 567))(chr(0b10 + 0o163) + chr(12547 - 12431) + chr(907 - 805) + chr(0b100 + 0o51) + chr(2821 - 2765)), VKQ5wcD30goF=ehT0Px3KOsy9(chr(737 - 689) + '\x6f' + '\x31', ord("\x08")), CJBHNoj4zKoT=xafqLlk3kkUe(SXOLrMavuUCe(b'>'), '\x64' + chr(0b1100101) + '\143' + '\157' + '\x64' + chr(101))('\165' + '\x74' + chr(0b111110 + 0o50) + chr(45) + chr(0b111000))): m1sWr00SVpVY = MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'5\xa4\x98\x13'), '\x64' + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(1241 - 1140))(chr(4654 - 4537) + chr(116) + chr(102) + chr(45) + chr(2213 - 2157))] with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b' \xaa\x84\x0c\x86\x87l\xe8\x02\x8d\x8c\x97\x87Q'), chr(100) + '\x65' + chr(0b1100011) + chr(6531 - 6420) + chr(0b1000010 + 0o42) + '\145')(chr(0b1110101) + chr(0b111010 + 0o72) + '\146' + chr(0b101 + 0o50) + chr(0b11 + 0o65)))(CJBHNoj4zKoT): OeWW0F1dBPRQ = m1sWr00SVpVY(OeWW0F1dBPRQ, jAT42bk66WvZ, ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001), 8), strides=VKQ5wcD30goF, padding=xafqLlk3kkUe(SXOLrMavuUCe(b'\x05\x8a\xbb '), chr(0b1100100) + '\145' + '\143' + chr(111) + '\x64' + chr(0b110000 + 0o65))(chr(13239 - 13122) + chr(116) + '\146' + '\x2d' + chr(56)), activation=None) return OeWW0F1dBPRQ
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
downsample_residual
def downsample_residual(x, output_channels, dim='2d', stride=1, scope='h'): """Downsamples 'x' by `stride` using average pooling. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1. """ with tf.variable_scope(scope): if stride > 1: avg_pool = CONFIG[dim]['avg_pool'] x = avg_pool(x, pool_size=(stride, stride), strides=(stride, stride), padding='VALID') input_channels = tf.shape(x)[3] diff = output_channels - input_channels x = tf.pad( x, [[0, 0], [0, 0], [0, 0], [diff // 2, diff // 2]]) return x
python
def downsample_residual(x, output_channels, dim='2d', stride=1, scope='h'): """Downsamples 'x' by `stride` using average pooling. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1. """ with tf.variable_scope(scope): if stride > 1: avg_pool = CONFIG[dim]['avg_pool'] x = avg_pool(x, pool_size=(stride, stride), strides=(stride, stride), padding='VALID') input_channels = tf.shape(x)[3] diff = output_channels - input_channels x = tf.pad( x, [[0, 0], [0, 0], [0, 0], [diff // 2, diff // 2]]) return x
[ "def", "downsample_residual", "(", "x", ",", "output_channels", ",", "dim", "=", "'2d'", ",", "stride", "=", "1", ",", "scope", "=", "'h'", ")", ":", "with", "tf", ".", "variable_scope", "(", "scope", ")", ":", "if", "stride", ">", "1", ":", "avg_pool", "=", "CONFIG", "[", "dim", "]", "[", "'avg_pool'", "]", "x", "=", "avg_pool", "(", "x", ",", "pool_size", "=", "(", "stride", ",", "stride", ")", ",", "strides", "=", "(", "stride", ",", "stride", ")", ",", "padding", "=", "'VALID'", ")", "input_channels", "=", "tf", ".", "shape", "(", "x", ")", "[", "3", "]", "diff", "=", "output_channels", "-", "input_channels", "x", "=", "tf", ".", "pad", "(", "x", ",", "[", "[", "0", ",", "0", "]", ",", "[", "0", ",", "0", "]", ",", "[", "0", ",", "0", "]", ",", "[", "diff", "//", "2", ",", "diff", "//", "2", "]", "]", ")", "return", "x" ]
Downsamples 'x' by `stride` using average pooling. Args: x: input tensor of size [N, H, W, C] output_channels: Desired number of output channels. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: What stride to use. Usually 1 or 2. scope: Optional variable scope. Returns: A downsampled tensor of size [N, H/2, W/2, output_channels] if stride is 2, else returns a tensor of size [N, H, W, output_channels] if stride is 1.
[ "Downsamples", "x", "by", "stride", "using", "average", "pooling", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L147-L175
train
Downsamples x by stride using average pooling.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVM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qGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\x37' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110110) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(117 - 69) + chr(111) + chr(0b101100 + 0o5) + chr(48) + chr(53), 698 - 690), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(3440 - 3329) + chr(0b110001) + chr(2133 - 2082) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001111 + 0o40) + chr(561 - 512) + chr(1852 - 1798) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(458 - 410) + chr(0b1101111) + chr(650 - 600) + chr(53) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(718 - 670) + chr(0b1101111) + chr(0b110001) + chr(967 - 917) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b101011 + 0o11) + chr(0b10010 + 0o43), 0o10), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + '\x33' + chr(0b101101 + 0o10), 35120 - 35112), ehT0Px3KOsy9(chr(48) + chr(0b1010111 + 0o30) + chr(0b110001) + chr(302 - 249) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(1006 - 895) + chr(1315 - 1262) + chr(0b1100 + 0o52), 0b1000), ehT0Px3KOsy9(chr(1024 - 976) + chr(1382 - 1271) + chr(0b110111) + chr(0b101000 + 0o16), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111100 + 0o63) + chr(1668 - 1618) + chr(511 - 461), 0b1000), ehT0Px3KOsy9('\060' + chr(9136 - 9025) + chr(0b110001) + chr(0b110010) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(1661 - 1609) + chr(0b11000 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(532 - 484) + '\157' + chr(49) + '\x35' + chr(0b100 + 0o62), 46972 - 46964), ehT0Px3KOsy9(chr(48) + '\157' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + chr(2149 - 2098) + chr(1006 - 957) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(254 - 203) + chr(0b11 + 0o61) + chr(0b101 + 0o62), 0b1000), ehT0Px3KOsy9(chr(2100 - 2052) + chr(12177 - 12066) + chr(49) + '\060' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110100) + '\066', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(54 - 3) + '\066' + chr(1976 - 1928), 8), ehT0Px3KOsy9('\x30' + chr(8806 - 8695) + chr(0b1 + 0o63) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\x34' + chr(0b110011 + 0o3), 8), ehT0Px3KOsy9(chr(2017 - 1969) + '\x6f' + '\x31' + chr(0b110000 + 0o5) + chr(0b1 + 0o61), 8), ehT0Px3KOsy9('\060' + chr(5891 - 5780) + chr(0b110011) + chr(50) + chr(0b100100 + 0o15), 52317 - 52309), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b10110 + 0o37) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100010 + 0o17) + chr(55) + chr(0b100101 + 0o16), 60798 - 60790), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2225 - 2172) + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(914 - 864), 8), ehT0Px3KOsy9(chr(1615 - 1567) + '\157' + chr(0b110001) + chr(49) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110 + 0o151) + chr(0b100011 + 0o22) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(52) + '\066', 8), ehT0Px3KOsy9(chr(877 - 829) + '\x6f' + chr(50) + chr(0b110010) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(0b110001) + chr(48) + chr(55), 56195 - 56187), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110110 + 0o0), 58913 - 58905), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(53) + '\x30', 6009 - 6001), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b101100 + 0o7) + chr(0b10110 + 0o34), 0b1000), ehT0Px3KOsy9(chr(1971 - 1923) + '\x6f' + chr(49) + '\063' + chr(0b11 + 0o62), 57208 - 57200), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + chr(1993 - 1942) + chr(0b110011), 50309 - 50301)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1010 + 0o145) + chr(1639 - 1586) + chr(1181 - 1133), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'W'), chr(0b1100100) + chr(0b1001100 + 0o31) + chr(5674 - 5575) + '\x6f' + '\x64' + chr(0b1 + 0o144))(chr(117) + chr(1999 - 1883) + chr(102) + chr(128 - 83) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def OytL4Gk3vp3C(OeWW0F1dBPRQ, jAT42bk66WvZ, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b'K\x94'), chr(0b10010 + 0o122) + '\145' + chr(0b1100011) + chr(0b1000101 + 0o52) + '\144' + chr(0b100111 + 0o76))(chr(0b1010101 + 0o40) + chr(9313 - 9197) + '\146' + chr(0b10000 + 0o35) + '\070'), VKQ5wcD30goF=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31', ord("\x08")), CJBHNoj4zKoT=xafqLlk3kkUe(SXOLrMavuUCe(b'\x11'), '\x64' + '\x65' + chr(9768 - 9669) + chr(0b0 + 0o157) + chr(100) + chr(101))(chr(0b1010110 + 0o37) + chr(0b1110100) + chr(0b1100110) + chr(0b10010 + 0o33) + chr(56))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\x9176\x14\xc9>@B\x19MQb5'), chr(0b1100100) + chr(0b1100101) + chr(9210 - 9111) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b11001 + 0o134) + '\164' + chr(102) + chr(0b101101) + chr(0b111000)))(CJBHNoj4zKoT): if VKQ5wcD30goF > ehT0Px3KOsy9('\060' + '\x6f' + '\061', 8): pvBLluO5IGOZ = MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'\x18\x86"\x00\x05\xc4=I'), chr(2346 - 2246) + '\x65' + chr(6923 - 6824) + chr(111) + chr(100) + chr(101))('\x75' + chr(0b100 + 0o160) + chr(5658 - 5556) + chr(0b101101) + chr(833 - 777))] OeWW0F1dBPRQ = pvBLluO5IGOZ(OeWW0F1dBPRQ, pool_size=(VKQ5wcD30goF, VKQ5wcD30goF), strides=(VKQ5wcD30goF, VKQ5wcD30goF), padding=xafqLlk3kkUe(SXOLrMavuUCe(b'/\xb1\t\x161'), chr(0b1100100) + chr(0b1011000 + 0o15) + chr(0b111100 + 0o47) + chr(0b0 + 0o157) + '\144' + chr(101))('\x75' + '\x74' + chr(9169 - 9067) + chr(0b11111 + 0o16) + chr(0b111000))) UnmU0r1RTZJ0 = IDJ2eXGCBCDu.nauYfLglTpcb(OeWW0F1dBPRQ)[ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011), ord("\x08"))] A3JtwFGKVTf0 = jAT42bk66WvZ - UnmU0r1RTZJ0 OeWW0F1dBPRQ = IDJ2eXGCBCDu.pad(OeWW0F1dBPRQ, [[ehT0Px3KOsy9('\x30' + chr(0b11010 + 0o125) + chr(48), 0o10), ehT0Px3KOsy9(chr(1195 - 1147) + chr(10881 - 10770) + chr(48), 8)], [ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(48), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\x30', 8)], [ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x30', 8), ehT0Px3KOsy9(chr(585 - 537) + chr(4392 - 4281) + chr(48), 8)], [A3JtwFGKVTf0 // ehT0Px3KOsy9(chr(1132 - 1084) + '\x6f' + '\062', 8), A3JtwFGKVTf0 // ehT0Px3KOsy9('\060' + chr(8548 - 8437) + chr(0b110010), 8)]]) return OeWW0F1dBPRQ
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
init
def init(images, num_channels, dim='2d', stride=2, kernel_size=7, maxpool=True, training=True, scope='init'): """Standard ResNet initial block used as first RevNet block. Args: images: [N, H, W, 3] tensor of input images to the model. num_channels: Output depth of convolutional layer in initial block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: stride for the convolution and pool layer. kernel_size: Size of the initial convolution filter maxpool: If true, apply a maxpool after the convolution training: True for train phase, False for eval phase. scope: Optional scope for the init block. Returns: Two [N, H, W, C] output activations from input images. """ conv = CONFIG[dim]['conv'] pool = CONFIG[dim]['max_pool'] with tf.variable_scope(scope): net = conv(images, num_channels, kernel_size, strides=stride, padding='SAME', activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) if maxpool: net = pool(net, pool_size=3, strides=stride) x1, x2 = tf.split(net, 2, axis=CONFIG[dim]['split_axis']) return x1, x2
python
def init(images, num_channels, dim='2d', stride=2, kernel_size=7, maxpool=True, training=True, scope='init'): """Standard ResNet initial block used as first RevNet block. Args: images: [N, H, W, 3] tensor of input images to the model. num_channels: Output depth of convolutional layer in initial block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: stride for the convolution and pool layer. kernel_size: Size of the initial convolution filter maxpool: If true, apply a maxpool after the convolution training: True for train phase, False for eval phase. scope: Optional scope for the init block. Returns: Two [N, H, W, C] output activations from input images. """ conv = CONFIG[dim]['conv'] pool = CONFIG[dim]['max_pool'] with tf.variable_scope(scope): net = conv(images, num_channels, kernel_size, strides=stride, padding='SAME', activation=None) net = tf.layers.batch_normalization(net, training=training) net = tf.nn.relu(net) if maxpool: net = pool(net, pool_size=3, strides=stride) x1, x2 = tf.split(net, 2, axis=CONFIG[dim]['split_axis']) return x1, x2
[ "def", "init", "(", "images", ",", "num_channels", ",", "dim", "=", "'2d'", ",", "stride", "=", "2", ",", "kernel_size", "=", "7", ",", "maxpool", "=", "True", ",", "training", "=", "True", ",", "scope", "=", "'init'", ")", ":", "conv", "=", "CONFIG", "[", "dim", "]", "[", "'conv'", "]", "pool", "=", "CONFIG", "[", "dim", "]", "[", "'max_pool'", "]", "with", "tf", ".", "variable_scope", "(", "scope", ")", ":", "net", "=", "conv", "(", "images", ",", "num_channels", ",", "kernel_size", ",", "strides", "=", "stride", ",", "padding", "=", "'SAME'", ",", "activation", "=", "None", ")", "net", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "net", ",", "training", "=", "training", ")", "net", "=", "tf", ".", "nn", ".", "relu", "(", "net", ")", "if", "maxpool", ":", "net", "=", "pool", "(", "net", ",", "pool_size", "=", "3", ",", "strides", "=", "stride", ")", "x1", ",", "x2", "=", "tf", ".", "split", "(", "net", ",", "2", ",", "axis", "=", "CONFIG", "[", "dim", "]", "[", "'split_axis'", "]", ")", "return", "x1", ",", "x2" ]
Standard ResNet initial block used as first RevNet block. Args: images: [N, H, W, 3] tensor of input images to the model. num_channels: Output depth of convolutional layer in initial block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. stride: stride for the convolution and pool layer. kernel_size: Size of the initial convolution filter maxpool: If true, apply a maxpool after the convolution training: True for train phase, False for eval phase. scope: Optional scope for the init block. Returns: Two [N, H, W, C] output activations from input images.
[ "Standard", "ResNet", "initial", "block", "used", "as", "first", "RevNet", "block", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L178-L205
train
Standard ResNet initial block.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,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lkZOtyh,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(0b1101111) + chr(1402 - 1353) + chr(2310 - 2259) + chr(0b100100 + 0o15), 42318 - 42310), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b110100) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110011) + '\065', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(0b110000) + chr(1322 - 1274), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b110010) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(915 - 866) + chr(128 - 74) + '\x31', 60999 - 60991), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(634 - 584) + chr(53) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b1001 + 0o51), 26756 - 26748), ehT0Px3KOsy9(chr(612 - 564) + chr(4426 - 4315) + '\x31' + chr(54) + chr(1390 - 1336), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\062' + chr(2789 - 2736) + chr(54), 8), ehT0Px3KOsy9('\060' + chr(0b10000 + 0o137) + '\x31' + chr(1264 - 1209) + chr(0b110110), 55806 - 55798), ehT0Px3KOsy9(chr(1371 - 1323) + chr(0b1101111) + chr(1787 - 1737) + chr(49) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(222 - 172) + chr(54) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(899 - 851) + chr(0b1010011 + 0o34) + '\061' + '\066' + chr(49), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(229 - 176) + chr(0b1010 + 0o47), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b11 + 0o61) + chr(0b11011 + 0o32), 30383 - 30375), ehT0Px3KOsy9(chr(1087 - 1039) + '\x6f' + chr(287 - 235) + '\061', 21684 - 21676), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b101 + 0o55) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b101111 + 0o10) + chr(1073 - 1021), 0o10), ehT0Px3KOsy9(chr(1816 - 1768) + '\x6f' + '\x33' + '\x32' + chr(0b110000), 324 - 316), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\067' + chr(1758 - 1710), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1084 - 1032) + '\x34', 28355 - 28347), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(49) + '\x33', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x36' + chr(2243 - 2194), 22720 - 22712), ehT0Px3KOsy9(chr(1864 - 1816) + '\157' + chr(0b110001) + '\x33', 64716 - 64708), ehT0Px3KOsy9('\060' + chr(8357 - 8246) + '\061' + '\x36' + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001000 + 0o47) + chr(50) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(50) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(51) + chr(0b101011 + 0o13) + chr(0b100 + 0o55), 20344 - 20336), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(50), 0o10), ehT0Px3KOsy9(chr(1656 - 1608) + chr(111) + chr(1941 - 1890) + chr(0b1 + 0o60) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(826 - 774) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b11000 + 0o32) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(133 - 22) + chr(896 - 845) + '\062' + chr(670 - 615), 8), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\x31' + chr(0b100000 + 0o25), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10010 + 0o37) + '\064' + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(0b110010) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(2162 - 2114) + chr(0b110111 + 0o70) + chr(0b110011) + chr(54) + '\x37', 20714 - 20706), ehT0Px3KOsy9('\060' + '\x6f' + chr(1974 - 1923) + chr(0b110001) + chr(52), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x35' + chr(1952 - 1904), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'w'), chr(0b101010 + 0o72) + chr(0b111001 + 0o54) + chr(0b1100011) + '\157' + chr(100) + chr(7414 - 7313))('\x75' + chr(116) + '\146' + chr(380 - 335) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def A5GIpkDsgP4U(YJOmEcibG8C0, X1ZpHSxyKbHn, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b'kB'), '\144' + chr(0b1001 + 0o134) + '\143' + chr(7072 - 6961) + chr(4664 - 4564) + '\x65')(chr(0b1110101) + chr(3422 - 3306) + chr(102) + chr(45) + chr(0b1010 + 0o56)), VKQ5wcD30goF=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062', 8), m6gwVXy4D3Au=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1403 - 1348), 0b1000), BjefiEmyZzGX=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001), 29629 - 29621), H15mhcYcioqz=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49), 8), CJBHNoj4zKoT=xafqLlk3kkUe(SXOLrMavuUCe(b'0Ht\xb4'), '\x64' + chr(101) + chr(0b101011 + 0o70) + chr(3066 - 2955) + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + chr(0b1011 + 0o55))): m1sWr00SVpVY = MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b':Is\xb6'), chr(6156 - 6056) + chr(0b11 + 0o142) + '\x63' + '\x6f' + '\144' + chr(101))(chr(12742 - 12625) + '\164' + chr(0b1100110) + chr(60 - 15) + chr(1943 - 1887))] qsPHwJ5jT7iz = MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'4Ge\x9f\xa5\x1e\xc1a'), chr(0b100010 + 0o102) + chr(3114 - 3013) + '\143' + '\157' + chr(0b1100100) + '\145')(chr(0b1011110 + 0o27) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38')] with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'/Go\xa9\xb4\x13\xc2hU\x05\xcd\x11\xf9\xd5'), chr(100) + chr(0b1100101) + '\143' + chr(0b10111 + 0o130) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1000111 + 0o55) + '\x66' + chr(0b101101) + chr(0b110000 + 0o10)))(CJBHNoj4zKoT): DyzboKL9cczb = m1sWr00SVpVY(YJOmEcibG8C0, X1ZpHSxyKbHn, m6gwVXy4D3Au, strides=VKQ5wcD30goF, padding=xafqLlk3kkUe(SXOLrMavuUCe(b'\ngP\x85'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(9639 - 9528) + '\144' + chr(0b101001 + 0o74))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b10000 + 0o35) + '\x38'), activation=None) DyzboKL9cczb = IDJ2eXGCBCDu.layers.batch_normalization(DyzboKL9cczb, training=H15mhcYcioqz) DyzboKL9cczb = IDJ2eXGCBCDu.nn.relu(DyzboKL9cczb) if BjefiEmyZzGX: DyzboKL9cczb = qsPHwJ5jT7iz(DyzboKL9cczb, pool_size=ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(51), 0o10), strides=VKQ5wcD30goF) (pci1T9SDshKa, OVXzvB9BcGF_) = IDJ2eXGCBCDu.split(DyzboKL9cczb, ehT0Px3KOsy9(chr(48) + chr(111) + '\x32', 8), axis=MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'*Vq\xa9\xa1.\xcfuc\x05'), chr(0b111000 + 0o54) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + '\x74' + chr(8332 - 8230) + chr(0b11001 + 0o24) + chr(56))]) return (pci1T9SDshKa, OVXzvB9BcGF_)
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
unit
def unit(x1, x2, block_num, depth, num_layers, dim='2d', bottleneck=True, first_batch_norm=True, stride=1, training=True): """Implements bottleneck RevNet unit from authors' RevNet architecture. Args: x1: [N, H, W, C] tensor of network activations. x2: [N, H, W, C] tensor of network activations. block_num: integer ID of block depth: First depth in bottleneck residual unit. num_layers: Number of layers in the RevNet block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. bottleneck: Should a bottleneck layer be used. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the residual function. training: True for train phase, False for eval phase. Returns: Two [N, H, W, C] output activation tensors. """ scope_name = 'unit_%d' % block_num if bottleneck: depth1 = depth depth2 = depth * 4 else: depth1 = depth2 = depth residual = wrapped_partial(f, depth1=depth1, depth2=depth2, dim=dim, training=training, bottleneck=bottleneck) with tf.variable_scope(scope_name): downsample = downsample_bottleneck if bottleneck else downsample_residual # Manual implementation of downsampling with tf.variable_scope('downsampling'): with tf.variable_scope('x1'): hx1 = downsample(x1, depth2, dim=dim, stride=stride) fx2 = residual(x2, stride=stride, first_batch_norm=first_batch_norm) x1 = hx1 + fx2 with tf.variable_scope('x2'): hx2 = downsample(x2, depth2, dim=dim, stride=stride) fx1 = residual(x1) x2 = hx2 + fx1 # Full block using memory-efficient rev_block implementation. with tf.variable_scope('full_block'): x1, x2 = tf.contrib.layers.rev_block(x1, x2, residual, residual, num_layers=num_layers) return x1, x2
python
def unit(x1, x2, block_num, depth, num_layers, dim='2d', bottleneck=True, first_batch_norm=True, stride=1, training=True): """Implements bottleneck RevNet unit from authors' RevNet architecture. Args: x1: [N, H, W, C] tensor of network activations. x2: [N, H, W, C] tensor of network activations. block_num: integer ID of block depth: First depth in bottleneck residual unit. num_layers: Number of layers in the RevNet block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. bottleneck: Should a bottleneck layer be used. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the residual function. training: True for train phase, False for eval phase. Returns: Two [N, H, W, C] output activation tensors. """ scope_name = 'unit_%d' % block_num if bottleneck: depth1 = depth depth2 = depth * 4 else: depth1 = depth2 = depth residual = wrapped_partial(f, depth1=depth1, depth2=depth2, dim=dim, training=training, bottleneck=bottleneck) with tf.variable_scope(scope_name): downsample = downsample_bottleneck if bottleneck else downsample_residual # Manual implementation of downsampling with tf.variable_scope('downsampling'): with tf.variable_scope('x1'): hx1 = downsample(x1, depth2, dim=dim, stride=stride) fx2 = residual(x2, stride=stride, first_batch_norm=first_batch_norm) x1 = hx1 + fx2 with tf.variable_scope('x2'): hx2 = downsample(x2, depth2, dim=dim, stride=stride) fx1 = residual(x1) x2 = hx2 + fx1 # Full block using memory-efficient rev_block implementation. with tf.variable_scope('full_block'): x1, x2 = tf.contrib.layers.rev_block(x1, x2, residual, residual, num_layers=num_layers) return x1, x2
[ "def", "unit", "(", "x1", ",", "x2", ",", "block_num", ",", "depth", ",", "num_layers", ",", "dim", "=", "'2d'", ",", "bottleneck", "=", "True", ",", "first_batch_norm", "=", "True", ",", "stride", "=", "1", ",", "training", "=", "True", ")", ":", "scope_name", "=", "'unit_%d'", "%", "block_num", "if", "bottleneck", ":", "depth1", "=", "depth", "depth2", "=", "depth", "*", "4", "else", ":", "depth1", "=", "depth2", "=", "depth", "residual", "=", "wrapped_partial", "(", "f", ",", "depth1", "=", "depth1", ",", "depth2", "=", "depth2", ",", "dim", "=", "dim", ",", "training", "=", "training", ",", "bottleneck", "=", "bottleneck", ")", "with", "tf", ".", "variable_scope", "(", "scope_name", ")", ":", "downsample", "=", "downsample_bottleneck", "if", "bottleneck", "else", "downsample_residual", "# Manual implementation of downsampling", "with", "tf", ".", "variable_scope", "(", "'downsampling'", ")", ":", "with", "tf", ".", "variable_scope", "(", "'x1'", ")", ":", "hx1", "=", "downsample", "(", "x1", ",", "depth2", ",", "dim", "=", "dim", ",", "stride", "=", "stride", ")", "fx2", "=", "residual", "(", "x2", ",", "stride", "=", "stride", ",", "first_batch_norm", "=", "first_batch_norm", ")", "x1", "=", "hx1", "+", "fx2", "with", "tf", ".", "variable_scope", "(", "'x2'", ")", ":", "hx2", "=", "downsample", "(", "x2", ",", "depth2", ",", "dim", "=", "dim", ",", "stride", "=", "stride", ")", "fx1", "=", "residual", "(", "x1", ")", "x2", "=", "hx2", "+", "fx1", "# Full block using memory-efficient rev_block implementation.", "with", "tf", ".", "variable_scope", "(", "'full_block'", ")", ":", "x1", ",", "x2", "=", "tf", ".", "contrib", ".", "layers", ".", "rev_block", "(", "x1", ",", "x2", ",", "residual", ",", "residual", ",", "num_layers", "=", "num_layers", ")", "return", "x1", ",", "x2" ]
Implements bottleneck RevNet unit from authors' RevNet architecture. Args: x1: [N, H, W, C] tensor of network activations. x2: [N, H, W, C] tensor of network activations. block_num: integer ID of block depth: First depth in bottleneck residual unit. num_layers: Number of layers in the RevNet block. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. bottleneck: Should a bottleneck layer be used. first_batch_norm: Whether to keep the first batch norm layer or not. Typically used in the first RevNet block. stride: Stride for the residual function. training: True for train phase, False for eval phase. Returns: Two [N, H, W, C] output activation tensors.
[ "Implements", "bottleneck", "RevNet", "unit", "from", "authors", "RevNet", "architecture", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L208-L258
train
Implements bottleneck RevNet architecture.
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(chr(48) + '\x6f' + '\062' + chr(0b110101 + 0o0), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100101 + 0o15) + '\x37' + '\x34', 61327 - 61319), ehT0Px3KOsy9(chr(147 - 99) + chr(111) + chr(50) + '\x35' + chr(0b110100), 2941 - 2933), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b1100 + 0o45) + chr(762 - 712), 0o10), ehT0Px3KOsy9(chr(2287 - 2239) + '\157' + chr(0b110001) + '\060' + chr(1964 - 1916), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11 + 0o63) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(0b1100 + 0o46), 2329 - 2321), ehT0Px3KOsy9(chr(1369 - 1321) + '\x6f' + chr(0b110110), 38635 - 38627), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + '\063' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1263 - 1210) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1998 - 1950) + '\x6f' + chr(0b110011) + '\x35' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\067' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101011 + 0o4) + chr(0b110011) + chr(0b110001) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + '\x32' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(1414 - 1364), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(50) + chr(1705 - 1653) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b100011 + 0o114) + chr(0b10101 + 0o34) + '\x30' + chr(0b100 + 0o57), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(440 - 390) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(51) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(1453 - 1405) + chr(0b1101111) + chr(0b1111 + 0o42) + '\x35' + chr(0b101101 + 0o6), 0b1000), ehT0Px3KOsy9(chr(76 - 28) + chr(111) + chr(51) + '\x30' + chr(1093 - 1042), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(951 - 900) + '\063' + chr(1179 - 1131), 5618 - 5610), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(0b101111 + 0o6) + chr(937 - 889), ord("\x08")), ehT0Px3KOsy9(chr(735 - 687) + '\x6f' + '\061' + chr(51) + '\x32', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100010 + 0o21) + chr(0b110101) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(594 - 546) + chr(6145 - 6034) + chr(51) + '\067' + chr(186 - 135), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(494 - 445) + '\x32' + chr(0b110100), 62629 - 62621), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(2757 - 2702) + chr(89 - 37), 18629 - 18621), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(0b11000 + 0o32) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(8768 - 8657) + '\x32' + chr(48) + chr(0b100111 + 0o13), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100100 + 0o15) + '\066' + chr(0b10110 + 0o41), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b101000 + 0o11) + '\062' + chr(0b110011), 46372 - 46364), ehT0Px3KOsy9(chr(69 - 21) + chr(4975 - 4864) + chr(0b110101) + chr(827 - 773), 55415 - 55407), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(50) + chr(0b110011 + 0o4), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(486 - 432) + chr(1328 - 1278), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x36' + chr(0b101001 + 0o16), ord("\x08")), ehT0Px3KOsy9(chr(795 - 747) + chr(0b10001 + 0o136) + chr(0b110001) + chr(0b101000 + 0o13) + '\x36', 9237 - 9229), ehT0Px3KOsy9(chr(48) + chr(0b110111 + 0o70) + '\064' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(0b100100 + 0o14), 41125 - 41117), ehT0Px3KOsy9(chr(48) + chr(0b1100111 + 0o10) + chr(391 - 341) + chr(0b110011) + chr(0b110010), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\x6f' + '\x35' + chr(0b0 + 0o60), 28521 - 28513)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(6731 - 6631) + chr(101) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def zbwQ4mKE5Iq9(pci1T9SDshKa, OVXzvB9BcGF_, KMoGKAZ8HgDt, UEys4_lSwsID, uftkTXJyNORO, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b"'\xd8"), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(6911 - 6811) + chr(0b1100101))('\165' + chr(0b101100 + 0o110) + chr(0b100011 + 0o103) + '\055' + chr(0b111000)), Hax21lk7t3Y8=ehT0Px3KOsy9('\x30' + '\157' + chr(2032 - 1983), 0b1000), RGktndCUX5jn=ehT0Px3KOsy9(chr(1809 - 1761) + chr(938 - 827) + '\x31', 8), VKQ5wcD30goF=ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + chr(49), 8), H15mhcYcioqz=ehT0Px3KOsy9('\060' + chr(0b10100 + 0o133) + chr(49), 8)): kP9QkIaIzxt1 = xafqLlk3kkUe(SXOLrMavuUCe(b'`\xd2\xc5>\x1f\x14f'), chr(0b1001011 + 0o31) + chr(5679 - 5578) + chr(4873 - 4774) + chr(111) + chr(0b1011010 + 0o12) + chr(0b100 + 0o141))(chr(0b1110000 + 0o5) + chr(116) + chr(0b1011111 + 0o7) + chr(45) + chr(0b100000 + 0o30)) % KMoGKAZ8HgDt if Hax21lk7t3Y8: J1vgggrSgjxi = UEys4_lSwsID sjhX7ukdlpki = UEys4_lSwsID * ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010 + 0o2), 0b1000) else: J1vgggrSgjxi = sjhX7ukdlpki = UEys4_lSwsID c2e479o7i3lz = zvnjEMcfSXrc(EGyt1xfPT1P6, depth1=J1vgggrSgjxi, depth2=sjhX7ukdlpki, dim=Nl_JhL3qUwSN, training=H15mhcYcioqz, bottleneck=Hax21lk7t3Y8) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xdd\xde#!Snc@X\x88\xd0\xbc\xb3'), chr(0b101100 + 0o70) + chr(3421 - 3320) + chr(0b1100011) + '\x6f' + chr(1390 - 1290) + chr(0b10010 + 0o123))(chr(117) + chr(0b100101 + 0o117) + chr(6059 - 5957) + chr(1515 - 1470) + chr(56)))(kP9QkIaIzxt1): pdesC3Xdyo9W = nmOdLxvRQYnI if Hax21lk7t3Y8 else OytL4Gk3vp3C with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xdd\xde#!Snc@X\x88\xd0\xbc\xb3'), chr(2617 - 2517) + chr(5508 - 5407) + '\x63' + chr(0b11100 + 0o123) + chr(0b10011 + 0o121) + chr(101))('\165' + '\164' + '\x66' + '\055' + chr(1325 - 1269)))(xafqLlk3kkUe(SXOLrMavuUCe(b'q\xd3\xdb$3PovsB\x85\xd8'), '\144' + chr(5372 - 5271) + chr(0b10101 + 0o116) + chr(11885 - 11774) + chr(0b111010 + 0o52) + chr(101))(chr(117) + '\164' + chr(0b110111 + 0o57) + '\x2d' + '\070')): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xdd\xde#!Snc@X\x88\xd0\xbc\xb3'), chr(0b1011000 + 0o14) + '\x65' + chr(0b1100011) + chr(0b11000 + 0o127) + chr(100) + '\x65')(chr(117) + '\164' + chr(0b1011101 + 0o11) + chr(1081 - 1036) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'm\x8d'), chr(0b1100100) + '\x65' + chr(8419 - 8320) + chr(4193 - 4082) + chr(3128 - 3028) + chr(8542 - 8441))(chr(117) + chr(10535 - 10419) + chr(3205 - 3103) + '\055' + '\x38')): avqJY6vQ951Q = pdesC3Xdyo9W(pci1T9SDshKa, sjhX7ukdlpki, dim=Nl_JhL3qUwSN, stride=VKQ5wcD30goF) SthOMMm1_imJ = c2e479o7i3lz(OVXzvB9BcGF_, stride=VKQ5wcD30goF, first_batch_norm=RGktndCUX5jn) pci1T9SDshKa = avqJY6vQ951Q + SthOMMm1_imJ with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xdd\xde#!Snc@X\x88\xd0\xbc\xb3'), chr(1809 - 1709) + chr(101) + chr(0b1100011) + '\157' + '\144' + '\145')('\165' + chr(0b111 + 0o155) + chr(0b100001 + 0o105) + chr(323 - 278) + chr(0b11000 + 0o40)))(xafqLlk3kkUe(SXOLrMavuUCe(b'm\x8e'), chr(9747 - 9647) + chr(9704 - 9603) + chr(0b100010 + 0o101) + chr(0b1101111) + '\144' + '\145')(chr(3442 - 3325) + '\x74' + chr(0b1100110) + chr(1736 - 1691) + '\070')): zYDp2ZsByk0x = pdesC3Xdyo9W(OVXzvB9BcGF_, sjhX7ukdlpki, dim=Nl_JhL3qUwSN, stride=VKQ5wcD30goF) HQy8uBNFUAz0 = c2e479o7i3lz(pci1T9SDshKa) OVXzvB9BcGF_ = zYDp2ZsByk0x + HQy8uBNFUAz0 with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'c\xdd\xde#!Snc@X\x88\xd0\xbc\xb3'), chr(3077 - 2977) + '\145' + '\x63' + chr(0b110100 + 0o73) + chr(0b1011110 + 0o6) + chr(101))(chr(3510 - 3393) + chr(116) + chr(9346 - 9244) + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b's\xc9\xc0&\x1fSni|@'), '\x64' + '\x65' + chr(0b1100011) + '\157' + chr(100) + '\145')('\165' + chr(0b1000110 + 0o56) + chr(102) + chr(0b10110 + 0o27) + chr(0b111000))): (pci1T9SDshKa, OVXzvB9BcGF_) = IDJ2eXGCBCDu.contrib.layers.rev_block(pci1T9SDshKa, OVXzvB9BcGF_, c2e479o7i3lz, c2e479o7i3lz, num_layers=uftkTXJyNORO) return (pci1T9SDshKa, OVXzvB9BcGF_)
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
final_block
def final_block(x1, x2, dim='2d', training=True, scope='final_block'): """Converts activations from last RevNet block to pre-logits. Args: x1: [NxHxWxC] tensor of network activations. x2: [NxHxWxC] tensor of network activations. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. training: True for train phase, False for eval phase. scope: Optional variable scope for the final block. Returns: [N, hidden_dim] pre-logits tensor from activations x1 and x2. """ # Final batch norm and relu with tf.variable_scope(scope): y = tf.concat([x1, x2], axis=CONFIG[dim]['split_axis']) y = tf.layers.batch_normalization(y, training=training) y = tf.nn.relu(y) # Global average pooling net = tf.reduce_mean(y, CONFIG[dim]['reduction_dimensions'], name='final_pool', keep_dims=True) return net
python
def final_block(x1, x2, dim='2d', training=True, scope='final_block'): """Converts activations from last RevNet block to pre-logits. Args: x1: [NxHxWxC] tensor of network activations. x2: [NxHxWxC] tensor of network activations. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. training: True for train phase, False for eval phase. scope: Optional variable scope for the final block. Returns: [N, hidden_dim] pre-logits tensor from activations x1 and x2. """ # Final batch norm and relu with tf.variable_scope(scope): y = tf.concat([x1, x2], axis=CONFIG[dim]['split_axis']) y = tf.layers.batch_normalization(y, training=training) y = tf.nn.relu(y) # Global average pooling net = tf.reduce_mean(y, CONFIG[dim]['reduction_dimensions'], name='final_pool', keep_dims=True) return net
[ "def", "final_block", "(", "x1", ",", "x2", ",", "dim", "=", "'2d'", ",", "training", "=", "True", ",", "scope", "=", "'final_block'", ")", ":", "# Final batch norm and relu", "with", "tf", ".", "variable_scope", "(", "scope", ")", ":", "y", "=", "tf", ".", "concat", "(", "[", "x1", ",", "x2", "]", ",", "axis", "=", "CONFIG", "[", "dim", "]", "[", "'split_axis'", "]", ")", "y", "=", "tf", ".", "layers", ".", "batch_normalization", "(", "y", ",", "training", "=", "training", ")", "y", "=", "tf", ".", "nn", ".", "relu", "(", "y", ")", "# Global average pooling", "net", "=", "tf", ".", "reduce_mean", "(", "y", ",", "CONFIG", "[", "dim", "]", "[", "'reduction_dimensions'", "]", ",", "name", "=", "'final_pool'", ",", "keep_dims", "=", "True", ")", "return", "net" ]
Converts activations from last RevNet block to pre-logits. Args: x1: [NxHxWxC] tensor of network activations. x2: [NxHxWxC] tensor of network activations. dim: '2d' if 2-dimensional, '3d' if 3-dimensional. training: True for train phase, False for eval phase. scope: Optional variable scope for the final block. Returns: [N, hidden_dim] pre-logits tensor from activations x1 and x2.
[ "Converts", "activations", "from", "last", "RevNet", "block", "to", "pre", "-", "logits", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L261-L285
train
Converts activations from last RevNet block to pre - logits.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt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ZvXL8qwsX,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(0b100010 + 0o16) + chr(111) + chr(0b11010 + 0o34) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(501 - 451) + chr(407 - 359) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(780 - 732) + chr(0b1101111) + chr(0b100110 + 0o15) + chr(51) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(53) + '\x37', 53667 - 53659), ehT0Px3KOsy9(chr(2025 - 1977) + chr(0b1101111) + chr(1863 - 1813) + '\x32' + '\x36', 37629 - 37621), ehT0Px3KOsy9('\060' + chr(0b1011101 + 0o22) + '\061' + chr(50) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o40) + chr(49) + chr(0b110010), 11572 - 11564), ehT0Px3KOsy9('\x30' + '\x6f' + chr(889 - 840) + '\x30' + chr(0b101000 + 0o17), 30877 - 30869), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + chr(0b110011 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2117 - 2067) + chr(0b11001 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + '\061' + chr(0b110000) + chr(1725 - 1671), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b1111 + 0o44) + '\067' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b1011 + 0o47) + chr(0b110000 + 0o3) + chr(1427 - 1372), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(0b101 + 0o53) + chr(52), 0o10), ehT0Px3KOsy9(chr(857 - 809) + chr(0b1100001 + 0o16) + chr(1750 - 1699) + '\x30' + chr(0b101110 + 0o11), 0b1000), ehT0Px3KOsy9(chr(1398 - 1350) + chr(3211 - 3100) + '\063' + chr(1469 - 1417) + '\x34', 9831 - 9823), ehT0Px3KOsy9(chr(165 - 117) + chr(0b1101001 + 0o6) + '\x32' + chr(1957 - 1907) + chr(0b10011 + 0o44), 16509 - 16501), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + '\x33' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100101 + 0o15) + chr(0b110000) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + chr(50) + chr(48) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100000 + 0o17) + chr(0b101111 + 0o3) + chr(0b11110 + 0o27) + chr(934 - 883), ord("\x08")), ehT0Px3KOsy9(chr(57 - 9) + chr(0b1000001 + 0o56) + '\061' + chr(0b110110) + chr(0b110110), 31467 - 31459), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + '\063' + chr(0b100100 + 0o20), 0o10), ehT0Px3KOsy9(chr(2118 - 2070) + chr(111) + '\x36' + chr(2828 - 2774), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\065' + chr(1230 - 1176), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10110 + 0o131) + '\x31' + '\067' + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(51) + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2087 - 2038) + chr(1110 - 1061) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(788 - 737) + chr(0b100010 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(290 - 242) + chr(0b1101111) + chr(50) + chr(0b111 + 0o51) + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(8069 - 7958) + chr(0b110011) + chr(1310 - 1262) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(208 - 157) + chr(52) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b100011 + 0o16) + '\x32' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(52) + '\x31', 36201 - 36193), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110000) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + chr(0b1001 + 0o51) + chr(278 - 226) + chr(0b100110 + 0o20), 33306 - 33298), ehT0Px3KOsy9(chr(2223 - 2175) + chr(111) + chr(886 - 836) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(147 - 97) + '\x34' + chr(503 - 454), 0b1000), ehT0Px3KOsy9('\060' + chr(8737 - 8626) + chr(51) + '\066' + chr(2349 - 2296), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x37' + chr(259 - 205), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + '\x35' + chr(1853 - 1805), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x1a'), chr(0b1100100) + chr(0b110011 + 0o62) + chr(99) + chr(0b101000 + 0o107) + chr(100) + '\x65')('\x75' + chr(116) + chr(3233 - 3131) + '\x2d' + chr(0b10001 + 0o47)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def G4mC4N9ftCbi(pci1T9SDshKa, OVXzvB9BcGF_, Nl_JhL3qUwSN=xafqLlk3kkUe(SXOLrMavuUCe(b'\x06\xe5'), chr(100) + chr(7626 - 7525) + '\x63' + chr(8935 - 8824) + '\x64' + chr(0b101101 + 0o70))(chr(0b1110101) + '\x74' + '\146' + chr(134 - 89) + '\070'), H15mhcYcioqz=ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(2162 - 2113), ord("\x08")), CJBHNoj4zKoT=xafqLlk3kkUe(SXOLrMavuUCe(b'R\xe8\xb4\x0e\xfa\x08(+ju-'), chr(0b1100100 + 0o0) + chr(0b10001 + 0o124) + chr(0b1100011) + chr(0b1101111) + chr(0b101 + 0o137) + '\145')(chr(0b1100010 + 0o23) + chr(10986 - 10870) + chr(102) + '\055' + chr(2359 - 2303))): with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'B\xe0\xa8\x06\xf75&"Ze%\x95\xef\xe1'), '\x64' + '\145' + chr(0b1100011) + '\x6f' + chr(3238 - 3138) + chr(0b1100101))(chr(0b110110 + 0o77) + '\164' + chr(0b1100110) + chr(550 - 505) + chr(56)))(CJBHNoj4zKoT): SqiSOtYOqOJH = IDJ2eXGCBCDu.concat([pci1T9SDshKa, OVXzvB9BcGF_], axis=MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'G\xf1\xb6\x06\xe2\x08+?le'), chr(0b1100100) + chr(0b101100 + 0o71) + chr(0b1100011) + chr(0b111010 + 0o65) + chr(0b1100100) + '\x65')(chr(117) + chr(0b101011 + 0o111) + '\x66' + '\055' + '\x38')]) SqiSOtYOqOJH = IDJ2eXGCBCDu.layers.batch_normalization(SqiSOtYOqOJH, training=H15mhcYcioqz) SqiSOtYOqOJH = IDJ2eXGCBCDu.nn.relu(SqiSOtYOqOJH) DyzboKL9cczb = IDJ2eXGCBCDu.reduce_mean(SqiSOtYOqOJH, MQv1TNKotpAa[Nl_JhL3qUwSN][xafqLlk3kkUe(SXOLrMavuUCe(b'F\xe4\xbe\x1a\xf5##(kI"\x93\xf2\xe1\xa9\x97\xfe6\xee\xf2'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + chr(5486 - 5385))(chr(117) + chr(0b1110100) + chr(4211 - 4109) + chr(0b101101) + chr(2121 - 2065))], name=xafqLlk3kkUe(SXOLrMavuUCe(b'R\xe8\xb4\x0e\xfa\x08:(jz'), chr(0b1100100) + chr(2342 - 2241) + '\143' + chr(0b1010100 + 0o33) + '\x64' + chr(0b101001 + 0o74))(chr(0b1101100 + 0o11) + chr(116) + '\x66' + '\x2d' + '\070'), keep_dims=ehT0Px3KOsy9('\x30' + chr(111) + '\x31', 8)) return DyzboKL9cczb
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet
def revnet(inputs, hparams, reuse=None): """Uses Tensor2Tensor memory optimized RevNet block to build a RevNet. Args: inputs: [NxHxWx3] tensor of input images to the model. hparams: HParams object that contains the following parameters, in addition to the parameters contained in the basic_params1() object in the common_hparams module: num_channels_first - A Python list where each element represents the depth of the first and third convolutional layers in the bottleneck residual unit for a given block. num_channels_second - A Python list where each element represents the depth of the second convolutional layer in the bottleneck residual unit for a given block. num_layers_per_block - A Python list containing the number of RevNet layers for each block. first_batch_norm - A Python list containing booleans representing the presence of a batch norm layer at the beginning of a given block. strides - A Python list containing integers representing the stride of the residual function for each block. num_channels_init_block - An integer representing the number of channels for the convolutional layer in the initial block. dimension - A string (either "2d" or "3d") that decides if the RevNet is 2-dimensional or 3-dimensional. reuse: Whether to reuse the default variable scope. Returns: [batch_size, hidden_dim] pre-logits tensor from the bottleneck RevNet. """ training = hparams.mode == tf.estimator.ModeKeys.TRAIN with tf.variable_scope('RevNet', reuse=reuse): x1, x2 = init(inputs, num_channels=hparams.num_channels_init_block, dim=hparams.dim, kernel_size=hparams.init_kernel_size, maxpool=hparams.init_maxpool, stride=hparams.init_stride, training=training) for block_num in range(len(hparams.num_layers_per_block)): block = {'depth': hparams.num_channels[block_num], 'num_layers': hparams.num_layers_per_block[block_num], 'first_batch_norm': hparams.first_batch_norm[block_num], 'stride': hparams.strides[block_num], 'bottleneck': hparams.bottleneck} x1, x2 = unit(x1, x2, block_num, dim=hparams.dim, training=training, **block) pre_logits = final_block(x1, x2, dim=hparams.dim, training=training) return pre_logits
python
def revnet(inputs, hparams, reuse=None): """Uses Tensor2Tensor memory optimized RevNet block to build a RevNet. Args: inputs: [NxHxWx3] tensor of input images to the model. hparams: HParams object that contains the following parameters, in addition to the parameters contained in the basic_params1() object in the common_hparams module: num_channels_first - A Python list where each element represents the depth of the first and third convolutional layers in the bottleneck residual unit for a given block. num_channels_second - A Python list where each element represents the depth of the second convolutional layer in the bottleneck residual unit for a given block. num_layers_per_block - A Python list containing the number of RevNet layers for each block. first_batch_norm - A Python list containing booleans representing the presence of a batch norm layer at the beginning of a given block. strides - A Python list containing integers representing the stride of the residual function for each block. num_channels_init_block - An integer representing the number of channels for the convolutional layer in the initial block. dimension - A string (either "2d" or "3d") that decides if the RevNet is 2-dimensional or 3-dimensional. reuse: Whether to reuse the default variable scope. Returns: [batch_size, hidden_dim] pre-logits tensor from the bottleneck RevNet. """ training = hparams.mode == tf.estimator.ModeKeys.TRAIN with tf.variable_scope('RevNet', reuse=reuse): x1, x2 = init(inputs, num_channels=hparams.num_channels_init_block, dim=hparams.dim, kernel_size=hparams.init_kernel_size, maxpool=hparams.init_maxpool, stride=hparams.init_stride, training=training) for block_num in range(len(hparams.num_layers_per_block)): block = {'depth': hparams.num_channels[block_num], 'num_layers': hparams.num_layers_per_block[block_num], 'first_batch_norm': hparams.first_batch_norm[block_num], 'stride': hparams.strides[block_num], 'bottleneck': hparams.bottleneck} x1, x2 = unit(x1, x2, block_num, dim=hparams.dim, training=training, **block) pre_logits = final_block(x1, x2, dim=hparams.dim, training=training) return pre_logits
[ "def", "revnet", "(", "inputs", ",", "hparams", ",", "reuse", "=", "None", ")", ":", "training", "=", "hparams", ".", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "TRAIN", "with", "tf", ".", "variable_scope", "(", "'RevNet'", ",", "reuse", "=", "reuse", ")", ":", "x1", ",", "x2", "=", "init", "(", "inputs", ",", "num_channels", "=", "hparams", ".", "num_channels_init_block", ",", "dim", "=", "hparams", ".", "dim", ",", "kernel_size", "=", "hparams", ".", "init_kernel_size", ",", "maxpool", "=", "hparams", ".", "init_maxpool", ",", "stride", "=", "hparams", ".", "init_stride", ",", "training", "=", "training", ")", "for", "block_num", "in", "range", "(", "len", "(", "hparams", ".", "num_layers_per_block", ")", ")", ":", "block", "=", "{", "'depth'", ":", "hparams", ".", "num_channels", "[", "block_num", "]", ",", "'num_layers'", ":", "hparams", ".", "num_layers_per_block", "[", "block_num", "]", ",", "'first_batch_norm'", ":", "hparams", ".", "first_batch_norm", "[", "block_num", "]", ",", "'stride'", ":", "hparams", ".", "strides", "[", "block_num", "]", ",", "'bottleneck'", ":", "hparams", ".", "bottleneck", "}", "x1", ",", "x2", "=", "unit", "(", "x1", ",", "x2", ",", "block_num", ",", "dim", "=", "hparams", ".", "dim", ",", "training", "=", "training", ",", "*", "*", "block", ")", "pre_logits", "=", "final_block", "(", "x1", ",", "x2", ",", "dim", "=", "hparams", ".", "dim", ",", "training", "=", "training", ")", "return", "pre_logits" ]
Uses Tensor2Tensor memory optimized RevNet block to build a RevNet. Args: inputs: [NxHxWx3] tensor of input images to the model. hparams: HParams object that contains the following parameters, in addition to the parameters contained in the basic_params1() object in the common_hparams module: num_channels_first - A Python list where each element represents the depth of the first and third convolutional layers in the bottleneck residual unit for a given block. num_channels_second - A Python list where each element represents the depth of the second convolutional layer in the bottleneck residual unit for a given block. num_layers_per_block - A Python list containing the number of RevNet layers for each block. first_batch_norm - A Python list containing booleans representing the presence of a batch norm layer at the beginning of a given block. strides - A Python list containing integers representing the stride of the residual function for each block. num_channels_init_block - An integer representing the number of channels for the convolutional layer in the initial block. dimension - A string (either "2d" or "3d") that decides if the RevNet is 2-dimensional or 3-dimensional. reuse: Whether to reuse the default variable scope. Returns: [batch_size, hidden_dim] pre-logits tensor from the bottleneck RevNet.
[ "Uses", "Tensor2Tensor", "memory", "optimized", "RevNet", "block", "to", "build", "a", "RevNet", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L288-L335
train
Uses Tensor2Tensor memory optimized RevNet block to build a RevNet block.
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,j9rjMY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cNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(4504 - 4393) + chr(0b1100 + 0o50) + chr(768 - 720), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + '\061' + chr(51) + chr(1237 - 1189), 42018 - 42010), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(2689 - 2634) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1583 - 1534) + chr(0b110000) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(8778 - 8667) + chr(0b110100) + chr(0b101 + 0o55), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + '\063' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(490 - 440) + '\x30' + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10000 + 0o41) + chr(1157 - 1106) + chr(1423 - 1371), 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + chr(0b110010) + '\x32' + chr(0b101110 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b101111 + 0o1) + chr(0b101110 + 0o2), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(50) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b101101 + 0o12) + chr(2265 - 2210), 12560 - 12552), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11110 + 0o25) + chr(0b10000 + 0o45) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1085 - 1036) + chr(49) + '\060', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1583 - 1532) + chr(0b10101 + 0o42) + chr(0b10111 + 0o31), 17945 - 17937), ehT0Px3KOsy9('\060' + chr(8828 - 8717) + chr(0b11111 + 0o24) + chr(54) + chr(1693 - 1645), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(716 - 665) + chr(49) + '\062', 0o10), ehT0Px3KOsy9(chr(1046 - 998) + '\157' + '\x34' + chr(2212 - 2159), 0b1000), ehT0Px3KOsy9(chr(1422 - 1374) + chr(0b111010 + 0o65) + '\063' + chr(814 - 763) + chr(1458 - 1403), 25740 - 25732), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(48) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(2233 - 2182) + '\x37' + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10101 + 0o36) + chr(48) + chr(0b110101), 36171 - 36163), ehT0Px3KOsy9(chr(0b110000) + chr(5819 - 5708) + chr(50) + chr(50) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x34' + chr(48), 23744 - 23736), ehT0Px3KOsy9('\x30' + chr(0b1000011 + 0o54) + '\x32' + '\066' + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1439 - 1389), 21351 - 21343), ehT0Px3KOsy9('\x30' + chr(0b1011011 + 0o24) + chr(0b110011) + chr(1772 - 1717) + chr(914 - 862), 46646 - 46638), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b110101) + chr(51), 62349 - 62341), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x35' + chr(54), 8), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110010) + chr(48) + '\x35', 8), ehT0Px3KOsy9(chr(491 - 443) + chr(111) + chr(0b110001) + '\x31' + '\060', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b110101) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(0b101000 + 0o17) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b101111 + 0o6) + '\x31', 8), ehT0Px3KOsy9('\060' + chr(111) + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11000 + 0o33) + '\062' + '\063', 22631 - 22623), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(0b110010) + '\x36' + chr(0b11110 + 0o30), 8), ehT0Px3KOsy9(chr(1747 - 1699) + chr(0b1 + 0o156) + '\x32' + chr(51) + '\063', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110101), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(491 - 443) + chr(111) + chr(0b110101) + chr(1574 - 1526), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e'), chr(3515 - 3415) + chr(0b1100101) + chr(99) + chr(7337 - 7226) + '\x64' + chr(0b1111 + 0o126))(chr(0b1010010 + 0o43) + '\164' + chr(6004 - 5902) + chr(45) + chr(2780 - 2724)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def A_aCh8ip8oEC(vXoupepMtCXU, n4ljua2gi1Pr, pmC5wdSFgdFj=None): H15mhcYcioqz = n4ljua2gi1Pr.mode == IDJ2eXGCBCDu.estimator.ModeKeys.TRAIN with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'V9\\\x94&@p\xe0\x03\xe2\xa3:\xcf\x8d'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))('\165' + '\164' + chr(0b1100110) + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'r=X\xb3"V'), '\x64' + chr(6988 - 6887) + chr(7593 - 7494) + chr(4949 - 4838) + chr(0b11010 + 0o112) + '\145')('\165' + '\164' + chr(0b1100110) + chr(621 - 576) + chr(0b111000)), reuse=pmC5wdSFgdFj): (pci1T9SDshKa, OVXzvB9BcGF_) = A5GIpkDsgP4U(vXoupepMtCXU, num_channels=n4ljua2gi1Pr.num_channels_init_block, dim=n4ljua2gi1Pr.dim, kernel_size=n4ljua2gi1Pr.init_kernel_size, maxpool=n4ljua2gi1Pr.init_maxpool, stride=n4ljua2gi1Pr.init_stride, training=H15mhcYcioqz) for KMoGKAZ8HgDt in vQr8gNKaIaWE(c2A0yzQpDQB3(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'N-C\xa2+Ce\xe0.\xe2\x9f%\xda\x9a\x17\x9a\x9c\xa5F\xb4'), chr(0b1100100) + chr(4697 - 4596) + chr(0b1100011) + chr(5241 - 5130) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1001000 + 0o54) + chr(504 - 402) + chr(0b11110 + 0o17) + '\x38')))): cid3MTmW5yAA = {xafqLlk3kkUe(SXOLrMavuUCe(b'D=^\x89/'), chr(100) + '\145' + chr(99) + '\x6f' + '\144' + chr(4108 - 4007))(chr(0b1010101 + 0o40) + chr(116) + chr(0b1100110 + 0o0) + chr(140 - 95) + chr(0b11000 + 0o40)): n4ljua2gi1Pr.num_channels[KMoGKAZ8HgDt], xafqLlk3kkUe(SXOLrMavuUCe(b'N-C\xa2+Ce\xe0.\xe2'), chr(0b1000101 + 0o37) + chr(0b111010 + 0o53) + chr(0b1100011) + chr(1753 - 1642) + chr(0b1100100) + '\145')('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(1027 - 971)): n4ljua2gi1Pr.num_layers_per_block[KMoGKAZ8HgDt], xafqLlk3kkUe(SXOLrMavuUCe(b'F1\\\x8e3}~\xe4(\xf2\xa8\n\xd1\x87:\x95'), chr(0b100010 + 0o102) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(0b110111 + 0o76) + '\164' + '\146' + chr(1368 - 1323) + chr(0b110010 + 0o6)): n4ljua2gi1Pr.first_batch_norm[KMoGKAZ8HgDt], xafqLlk3kkUe(SXOLrMavuUCe(b'S,\\\x94#G'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(2048 - 1948) + chr(2475 - 2374))(chr(0b1110 + 0o147) + '\164' + chr(102) + chr(605 - 560) + chr(872 - 816)): n4ljua2gi1Pr.strides[KMoGKAZ8HgDt], xafqLlk3kkUe(SXOLrMavuUCe(b'B7Z\x89+Gr\xe0?\xfa'), chr(4891 - 4791) + chr(101) + chr(0b1000 + 0o133) + chr(0b110100 + 0o73) + chr(100) + chr(101))('\x75' + chr(0b1010110 + 0o36) + chr(102) + '\055' + '\070'): n4ljua2gi1Pr.bottleneck} (pci1T9SDshKa, OVXzvB9BcGF_) = zbwQ4mKE5Iq9(pci1T9SDshKa, OVXzvB9BcGF_, KMoGKAZ8HgDt, dim=n4ljua2gi1Pr.dim, training=H15mhcYcioqz, **cid3MTmW5yAA) pmrht3CrHXTn = G4mC4N9ftCbi(pci1T9SDshKa, OVXzvB9BcGF_, dim=n4ljua2gi1Pr.dim, training=H15mhcYcioqz) return pmrht3CrHXTn
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet_base
def revnet_base(): """Default hparams for Revnet.""" hparams = common_hparams.basic_params1() hparams.add_hparam('num_channels', [64, 128, 256, 416]) hparams.add_hparam('num_layers_per_block', [1, 1, 10, 1]) hparams.add_hparam('bottleneck', True) hparams.add_hparam('first_batch_norm', [False, True, True, True]) hparams.add_hparam('init_stride', 2) hparams.add_hparam('init_kernel_size', 7) hparams.add_hparam('init_maxpool', True) hparams.add_hparam('strides', [1, 2, 2, 2]) hparams.add_hparam('num_channels_init_block', 64) hparams.add_hparam('dim', '2d') # Variable init hparams.initializer = 'normal_unit_scaling' hparams.initializer_gain = 2. # Optimization hparams.optimizer = 'Momentum' hparams.optimizer_momentum_momentum = 0.9 hparams.optimizer_momentum_nesterov = True hparams.weight_decay = 1e-4 hparams.clip_grad_norm = 0.0 # (base_lr=0.1) * (batch_size=128*8 (on TPU, or 8 GPUs)=1024) / (256.) hparams.learning_rate = 0.4 hparams.learning_rate_decay_scheme = 'cosine' # For image_imagenet224, 120k training steps, which effectively makes this a # cosine decay (i.e. no cycles). hparams.learning_rate_cosine_cycle_steps = 120000 # Can run with a batch size of 128 with Problem ImageImagenet224 hparams.batch_size = 128 return hparams
python
def revnet_base(): """Default hparams for Revnet.""" hparams = common_hparams.basic_params1() hparams.add_hparam('num_channels', [64, 128, 256, 416]) hparams.add_hparam('num_layers_per_block', [1, 1, 10, 1]) hparams.add_hparam('bottleneck', True) hparams.add_hparam('first_batch_norm', [False, True, True, True]) hparams.add_hparam('init_stride', 2) hparams.add_hparam('init_kernel_size', 7) hparams.add_hparam('init_maxpool', True) hparams.add_hparam('strides', [1, 2, 2, 2]) hparams.add_hparam('num_channels_init_block', 64) hparams.add_hparam('dim', '2d') # Variable init hparams.initializer = 'normal_unit_scaling' hparams.initializer_gain = 2. # Optimization hparams.optimizer = 'Momentum' hparams.optimizer_momentum_momentum = 0.9 hparams.optimizer_momentum_nesterov = True hparams.weight_decay = 1e-4 hparams.clip_grad_norm = 0.0 # (base_lr=0.1) * (batch_size=128*8 (on TPU, or 8 GPUs)=1024) / (256.) hparams.learning_rate = 0.4 hparams.learning_rate_decay_scheme = 'cosine' # For image_imagenet224, 120k training steps, which effectively makes this a # cosine decay (i.e. no cycles). hparams.learning_rate_cosine_cycle_steps = 120000 # Can run with a batch size of 128 with Problem ImageImagenet224 hparams.batch_size = 128 return hparams
[ "def", "revnet_base", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "hparams", ".", "add_hparam", "(", "'num_channels'", ",", "[", "64", ",", "128", ",", "256", ",", "416", "]", ")", "hparams", ".", "add_hparam", "(", "'num_layers_per_block'", ",", "[", "1", ",", "1", ",", "10", ",", "1", "]", ")", "hparams", ".", "add_hparam", "(", "'bottleneck'", ",", "True", ")", "hparams", ".", "add_hparam", "(", "'first_batch_norm'", ",", "[", "False", ",", "True", ",", "True", ",", "True", "]", ")", "hparams", ".", "add_hparam", "(", "'init_stride'", ",", "2", ")", "hparams", ".", "add_hparam", "(", "'init_kernel_size'", ",", "7", ")", "hparams", ".", "add_hparam", "(", "'init_maxpool'", ",", "True", ")", "hparams", ".", "add_hparam", "(", "'strides'", ",", "[", "1", ",", "2", ",", "2", ",", "2", "]", ")", "hparams", ".", "add_hparam", "(", "'num_channels_init_block'", ",", "64", ")", "hparams", ".", "add_hparam", "(", "'dim'", ",", "'2d'", ")", "# Variable init", "hparams", ".", "initializer", "=", "'normal_unit_scaling'", "hparams", ".", "initializer_gain", "=", "2.", "# Optimization", "hparams", ".", "optimizer", "=", "'Momentum'", "hparams", ".", "optimizer_momentum_momentum", "=", "0.9", "hparams", ".", "optimizer_momentum_nesterov", "=", "True", "hparams", ".", "weight_decay", "=", "1e-4", "hparams", ".", "clip_grad_norm", "=", "0.0", "# (base_lr=0.1) * (batch_size=128*8 (on TPU, or 8 GPUs)=1024) / (256.)", "hparams", ".", "learning_rate", "=", "0.4", "hparams", ".", "learning_rate_decay_scheme", "=", "'cosine'", "# For image_imagenet224, 120k training steps, which effectively makes this a", "# cosine decay (i.e. no cycles).", "hparams", ".", "learning_rate_cosine_cycle_steps", "=", "120000", "# Can run with a batch size of 128 with Problem ImageImagenet224", "hparams", ".", "batch_size", "=", "128", "return", "hparams" ]
Default hparams for Revnet.
[ "Default", "hparams", "for", "Revnet", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L345-L378
train
Default hparams for Revnet.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVv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P,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(1850 - 1739) + chr(0b11111 + 0o22) + chr(0b110011) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\063' + chr(1363 - 1314), 34327 - 34319), ehT0Px3KOsy9(chr(581 - 533) + '\x6f' + chr(50) + chr(51) + '\061', 8), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(9092 - 8981) + '\062' + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110101) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\063' + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + '\063' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(2005 - 1894) + '\063' + chr(106 - 53) + chr(603 - 550), 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(5679 - 5568) + '\x33' + '\060' + chr(2108 - 2054), 0b1000), ehT0Px3KOsy9(chr(612 - 564) + chr(111) + '\061' + chr(536 - 486) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(50) + '\x35' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + chr(0b101110 + 0o4) + chr(0b110010), 47251 - 47243), ehT0Px3KOsy9(chr(0b11100 + 0o24) + '\157' + '\063' + chr(51), 24414 - 24406), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b100001 + 0o116) + '\063' + chr(0b101100 + 0o5) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b100100 + 0o14) + chr(0b10011 + 0o42), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1606 - 1555) + '\061' + chr(2659 - 2605), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110110) + '\x33', 24104 - 24096), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1011 + 0o144) + chr(0b11111 + 0o23) + '\065' + '\x36', 0o10), ehT0Px3KOsy9(chr(1140 - 1092) + chr(111) + '\x32' + chr(53) + '\065', 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(51) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x36' + '\060', 0o10), ehT0Px3KOsy9(chr(1484 - 1436) + chr(6680 - 6569) + chr(0b11000 + 0o34) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(51) + '\062' + chr(0b10011 + 0o43), 61563 - 61555), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110011) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(3231 - 3120) + '\x32' + '\x30' + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101110 + 0o4) + '\x33' + '\063', 8), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(52) + chr(0b101110 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11000 + 0o31) + chr(1853 - 1801) + chr(2048 - 1993), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(1574 - 1522) + chr(525 - 476), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(6857 - 6746) + chr(0b110011) + chr(2287 - 2234) + chr(504 - 452), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5662 - 5551) + '\061' + '\066' + chr(0b110111), 38538 - 38530), ehT0Px3KOsy9('\060' + chr(10261 - 10150) + '\x31' + chr(513 - 462) + chr(0b110110), 8), ehT0Px3KOsy9(chr(170 - 122) + '\157' + '\x33' + '\x30' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110001) + chr(1227 - 1172), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(0b110110) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + '\x31' + chr(0b110111) + chr(0b110000 + 0o7), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(9471 - 9360) + chr(0b110001) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110110 + 0o71) + chr(49) + chr(0b110011) + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b11011 + 0o27) + chr(0b100110 + 0o20) + chr(1839 - 1791), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b0 + 0o60) + 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'r'), chr(100) + chr(0b111101 + 0o50) + '\x63' + chr(867 - 756) + chr(100) + chr(0b1001101 + 0o30))('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def PDbdBWtGtAfz(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(100) + '\145' + '\143' + chr(111) + chr(5591 - 5491) + '\x65')('\165' + chr(116) + chr(9625 - 9523) + chr(0b100001 + 0o14) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'2\xec\xf4JO\xf3?\x83\xa85\xc1\xa1'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(6293 - 6193) + chr(101))('\x75' + '\x74' + '\x66' + '\055' + chr(535 - 479)), [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\060' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(50) + '\x30' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + chr(0b110 + 0o56) + chr(48) + chr(0b110000), 65355 - 65347), ehT0Px3KOsy9(chr(48) + '\x6f' + '\066' + chr(932 - 880) + chr(48), 0o10)]) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(0b1100100) + chr(0b11001 + 0o114) + chr(3359 - 3260) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(2133 - 2077)))(xafqLlk3kkUe(SXOLrMavuUCe(b"2\xec\xf4J@\xfa'\x88\xb4#\xf2\xa2~\xb9\x1a\xac\x1f\xc1\xce\xb1"), chr(100) + '\x65' + '\x63' + chr(12122 - 12011) + chr(0b1001100 + 0o30) + chr(0b1000100 + 0o41))(chr(117) + chr(6650 - 6534) + '\146' + '\x2d' + chr(0b111000)), [ehT0Px3KOsy9('\x30' + chr(10620 - 10509) + '\x31', 55758 - 55750), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b110 + 0o151) + '\x31', 8), ehT0Px3KOsy9(chr(1022 - 974) + chr(0b1110 + 0o141) + chr(1918 - 1869) + chr(1588 - 1538), 42763 - 42755), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + '\061', 8)]) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(0b1010101 + 0o17) + '\145' + chr(5512 - 5413) + chr(111) + chr(0b100000 + 0o104) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'>\xf6\xeda@\xfe0\x88\xa5;'), chr(0b1100100) + chr(101) + chr(0b1000 + 0o133) + '\157' + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + '\146' + chr(45) + '\x38'), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(0b1100100) + '\145' + chr(8542 - 8443) + '\x6f' + chr(100) + chr(0b100 + 0o141))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b':\xf0\xebfX\xc4<\x8c\xb23\xc5\x8du\xa47\xa3'), '\144' + '\x65' + chr(1207 - 1108) + chr(111) + '\x64' + '\145')(chr(12980 - 12863) + chr(3022 - 2906) + chr(9788 - 9686) + chr(0b101101) + chr(0b100010 + 0o26)), [ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + '\x30', 8), ehT0Px3KOsy9(chr(473 - 425) + '\157' + chr(1803 - 1754), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(744 - 695), 8)]) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(0b1100001 + 0o3) + chr(0b1011100 + 0o11) + chr(7893 - 7794) + '\x6f' + chr(100) + chr(101))(chr(117) + '\164' + chr(0b110101 + 0o61) + chr(0b1010 + 0o43) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'5\xf7\xf0as\xe8*\x9f\xaf4\xc8'), '\x64' + chr(0b110101 + 0o60) + chr(0b1100011) + '\157' + chr(0b11100 + 0o110) + chr(953 - 852))('\165' + chr(10111 - 9995) + '\x66' + '\x2d' + chr(0b1100 + 0o54)), ehT0Px3KOsy9('\x30' + chr(111) + '\062', ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\x64' + chr(4867 - 4766))('\x75' + chr(6697 - 6581) + chr(102) + chr(1330 - 1285) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'5\xf7\xf0as\xf0;\x9f\xa85\xc1\x8dh\xa2?\xab'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))('\165' + chr(9885 - 9769) + chr(0b1100110) + '\055' + '\x38'), ehT0Px3KOsy9('\060' + '\157' + chr(2770 - 2715), 43440 - 43432)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(3742 - 3642) + '\145')(chr(117) + '\x74' + '\146' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'5\xf7\xf0as\xf6?\x95\xb6?\xc2\xbe'), '\x64' + chr(0b10010 + 0o123) + chr(99) + chr(0b100011 + 0o114) + '\144' + chr(9930 - 9829))(chr(117) + '\164' + '\x66' + '\x2d' + chr(56)), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + '\061', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(595 - 495) + chr(1679 - 1578) + chr(0b1100011) + '\x6f' + '\144' + chr(488 - 387))(chr(0b10010 + 0o143) + chr(116) + chr(102) + chr(0b1111 + 0o36) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'/\xed\xeb|H\xfe-'), '\144' + '\x65' + chr(99) + chr(2271 - 2160) + chr(6935 - 6835) + '\x65')('\165' + chr(9883 - 9767) + '\146' + chr(1896 - 1851) + '\070'), [ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + '\x31', 8), ehT0Px3KOsy9(chr(99 - 51) + chr(0b1101111) + chr(1814 - 1764), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32', 8), ehT0Px3KOsy9('\060' + '\157' + '\x32', 8)]) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), chr(132 - 32) + chr(3654 - 3553) + '\x63' + '\157' + chr(0b1001111 + 0o25) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b0 + 0o146) + chr(45) + chr(2756 - 2700)))(xafqLlk3kkUe(SXOLrMavuUCe(b'2\xec\xf4JO\xf3?\x83\xa85\xc1\xa1D\xa2+\xa7\x07\xf1\xcf\xb6\x9fG\xbd'), '\x64' + '\x65' + chr(541 - 442) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(8064 - 7948) + chr(102) + chr(1946 - 1901) + chr(0b1101 + 0o53)), ehT0Px3KOsy9(chr(174 - 126) + chr(359 - 248) + chr(49) + chr(48) + chr(426 - 378), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=\xfd\xfdJD\xeb?\x9f\xa7='), '\144' + chr(6830 - 6729) + chr(0b1100011) + chr(0b1010100 + 0o33) + chr(0b1100100) + chr(0b1100101 + 0o0))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'8\xf0\xf4'), chr(3314 - 3214) + chr(101) + chr(0b1100011) + chr(10263 - 10152) + chr(0b1010011 + 0o21) + chr(9284 - 9183))('\165' + chr(12697 - 12581) + chr(102) + chr(1466 - 1421) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'n\xfd'), '\144' + chr(0b1100101) + '\x63' + chr(4588 - 4477) + '\x64' + chr(0b1011 + 0o132))('\x75' + chr(0b1110100) + chr(0b1001010 + 0o34) + chr(0b101101) + chr(1642 - 1586))) n4ljua2gi1Pr.kwfuYzkY5C57 = xafqLlk3kkUe(SXOLrMavuUCe(b'2\xf6\xebxM\xf7\x01\x98\xa89\xd9\x8dh\xa8$\xa2\x1a\xc0\xca'), '\x64' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + chr(0b1100110) + chr(0b100011 + 0o12) + '\070') n4ljua2gi1Pr.S1SbCBXLapw8 = 2.0 n4ljua2gi1Pr.XdKNcYRObPK3 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x11\xf6\xf4pB\xef+\x80'), chr(0b1001010 + 0o32) + chr(5738 - 5637) + chr(0b1100011) + chr(2888 - 2777) + '\144' + chr(0b1100101))(chr(0b1100111 + 0o16) + chr(116) + chr(0b1100110) + chr(781 - 736) + '\070') n4ljua2gi1Pr.SrqcOzGlNbqo = 0.9 n4ljua2gi1Pr.esFRGnn6yeJR = ehT0Px3KOsy9('\060' + '\157' + '\061', 8) n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0001 n4ljua2gi1Pr.SdNSZNVkVjLh = 0.0 n4ljua2gi1Pr.QGSIpd_yUNzU = 0.4 n4ljua2gi1Pr.v3ZnJE9Hdub1 = xafqLlk3kkUe(SXOLrMavuUCe(b'?\xf6\xea|B\xfe'), chr(0b101110 + 0o66) + '\x65' + chr(0b1011011 + 0o10) + chr(0b1101111) + '\x64' + chr(0b110101 + 0o60))('\x75' + chr(116) + chr(10018 - 9916) + chr(0b101101) + chr(741 - 685)) n4ljua2gi1Pr.Wnk8oTekUy10 = ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(0b110101) + chr(1524 - 1474) + chr(51) + '\x30' + '\060', ord("\x08")) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110000) + chr(0b11110 + 0o22), 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet_cifar_base
def revnet_cifar_base(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_base() hparams.num_channels_init_block = 32 hparams.first_batch_norm = [False, True, True] hparams.init_stride = 1 hparams.init_kernel_size = 3 hparams.init_maxpool = False hparams.strides = [1, 2, 2] hparams.batch_size = 128 hparams.weight_decay = 1e-4 hparams.learning_rate = 0.1 hparams.learning_rate_cosine_cycle_steps = 5000 return hparams
python
def revnet_cifar_base(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_base() hparams.num_channels_init_block = 32 hparams.first_batch_norm = [False, True, True] hparams.init_stride = 1 hparams.init_kernel_size = 3 hparams.init_maxpool = False hparams.strides = [1, 2, 2] hparams.batch_size = 128 hparams.weight_decay = 1e-4 hparams.learning_rate = 0.1 hparams.learning_rate_cosine_cycle_steps = 5000 return hparams
[ "def", "revnet_cifar_base", "(", ")", ":", "hparams", "=", "revnet_base", "(", ")", "hparams", ".", "num_channels_init_block", "=", "32", "hparams", ".", "first_batch_norm", "=", "[", "False", ",", "True", ",", "True", "]", "hparams", ".", "init_stride", "=", "1", "hparams", ".", "init_kernel_size", "=", "3", "hparams", ".", "init_maxpool", "=", "False", "hparams", ".", "strides", "=", "[", "1", ",", "2", ",", "2", "]", "hparams", ".", "batch_size", "=", "128", "hparams", ".", "weight_decay", "=", "1e-4", "hparams", ".", "learning_rate", "=", "0.1", "hparams", ".", "learning_rate_cosine_cycle_steps", "=", "5000", "return", "hparams" ]
Tiny hparams suitable for CIFAR/etc.
[ "Tiny", "hparams", "suitable", "for", "CIFAR", "/", "etc", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L386-L400
train
Tiny hparams suitable for CIFAR.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqD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7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(622 - 574) + '\157' + '\062' + chr(1048 - 998) + chr(2933 - 2878), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b0 + 0o65) + chr(2020 - 1969), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1960 - 1909) + '\063' + chr(0b110100), 48682 - 48674), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(2623 - 2570) + chr(0b101110 + 0o7), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(2396 - 2346) + chr(1922 - 1868), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + '\064', 16876 - 16868), ehT0Px3KOsy9(chr(1310 - 1262) + chr(0b10 + 0o155) + chr(0b100001 + 0o21) + chr(0b110100) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(50) + chr(0b100111 + 0o17) + chr(0b100 + 0o56), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1 + 0o60) + '\x36' + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(2277 - 2229) + chr(0b10 + 0o155) + chr(0b10010 + 0o37) + chr(1645 - 1591), ord("\x08")), ehT0Px3KOsy9(chr(1327 - 1279) + chr(0b1101111) + chr(0b110001) + chr(1766 - 1718) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\060' + '\x35', 0o10), ehT0Px3KOsy9(chr(2205 - 2157) + chr(0b1101111) + chr(0b110110) + chr(729 - 679), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(373 - 323) + '\060' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10669 - 10558) + chr(1689 - 1639) + chr(0b110111) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(580 - 529) + '\062' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(0b110010) + '\x35', 26586 - 26578), ehT0Px3KOsy9('\060' + '\157' + chr(2419 - 2368) + chr(51) + chr(0b11111 + 0o23), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + '\063' + chr(50) + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110100) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2251 - 2197) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(1959 - 1911) + chr(5733 - 5622) + chr(49) + chr(52) + '\x30', 9259 - 9251), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\x30' + '\062', 10902 - 10894), ehT0Px3KOsy9(chr(1004 - 956) + '\157' + chr(0b1111 + 0o43) + chr(53) + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(754 - 705) + chr(2762 - 2708) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1811 - 1763) + '\157' + '\061' + '\067', 51867 - 51859), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110101) + chr(1988 - 1933), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(3519 - 3408) + chr(2225 - 2176) + '\064' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(735 - 687) + chr(0b101001 + 0o106) + '\061' + chr(49) + chr(0b101100 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(49) + chr(0b11111 + 0o30) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(2005 - 1957) + '\x6f' + chr(0b110001 + 0o0) + chr(0b11111 + 0o24), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(887 - 838) + chr(0b110001) + chr(247 - 199), 8), ehT0Px3KOsy9('\060' + '\157' + chr(1177 - 1126) + '\062' + chr(55), 5611 - 5603), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31' + chr(0b110111) + '\x35', 8), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(12006 - 11895) + chr(2262 - 2211) + chr(1978 - 1927) + chr(0b110000), 14354 - 14346), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b1110 + 0o43) + '\067', 58455 - 58447), ehT0Px3KOsy9('\060' + chr(0b11111 + 0o120) + chr(0b110001) + '\064' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(3797 - 3686) + chr(0b10110 + 0o33) + chr(0b1 + 0o60) + chr(0b10101 + 0o37), 34737 - 34729), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(51) + chr(54) + chr(735 - 683), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101111 + 0o6) + chr(1937 - 1889), 64332 - 64324)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9'), chr(7427 - 7327) + chr(101) + chr(0b1100011) + chr(0b1010011 + 0o34) + chr(100) + chr(0b1010 + 0o133))(chr(117) + chr(7176 - 7060) + chr(0b1100110) + chr(567 - 522) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def jpFk1QXDmJ2B(): n4ljua2gi1Pr = PDbdBWtGtAfz() n4ljua2gi1Pr.VrGd904CKwPy = ehT0Px3KOsy9('\060' + chr(0b10100 + 0o133) + chr(52) + '\x30', ord("\x08")) n4ljua2gi1Pr.RGktndCUX5jn = [ehT0Px3KOsy9(chr(1403 - 1355) + chr(0b1101111) + chr(0b110000), 49946 - 49938), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2118 - 2069), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9951 - 9840) + chr(0b111 + 0o52), 8)] n4ljua2gi1Pr.yZ1OiF8Zks_4 = ehT0Px3KOsy9('\x30' + chr(7515 - 7404) + chr(0b110001), 8) n4ljua2gi1Pr.mcWV_WHIzVpI = ehT0Px3KOsy9('\060' + '\157' + chr(51), 0b1000) n4ljua2gi1Pr.q7F2R9ZEJN0S = ehT0Px3KOsy9('\060' + '\157' + chr(0b101100 + 0o4), 8) n4ljua2gi1Pr.r8knJmMTTKwv = [ehT0Px3KOsy9('\060' + chr(416 - 305) + chr(1720 - 1671), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100110 + 0o14), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010), 8)] n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(1912 - 1862) + '\x30' + chr(0b110000), 0b1000) n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0001 n4ljua2gi1Pr.QGSIpd_yUNzU = 0.1 n4ljua2gi1Pr.Wnk8oTekUy10 = ehT0Px3KOsy9(chr(252 - 204) + '\x6f' + chr(49) + chr(0b100001 + 0o20) + chr(54) + chr(0b110001) + chr(0b110000), 0b1000) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet_110_cifar
def revnet_110_cifar(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_cifar_base() hparams.bottleneck = False hparams.num_channels = [16, 32, 64] hparams.num_layers_per_block = [8, 8, 8] return hparams
python
def revnet_110_cifar(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_cifar_base() hparams.bottleneck = False hparams.num_channels = [16, 32, 64] hparams.num_layers_per_block = [8, 8, 8] return hparams
[ "def", "revnet_110_cifar", "(", ")", ":", "hparams", "=", "revnet_cifar_base", "(", ")", "hparams", ".", "bottleneck", "=", "False", "hparams", ".", "num_channels", "=", "[", "16", ",", "32", ",", "64", "]", "hparams", ".", "num_layers_per_block", "=", "[", "8", ",", "8", ",", "8", "]", "return", "hparams" ]
Tiny hparams suitable for CIFAR/etc.
[ "Tiny", "hparams", "suitable", "for", "CIFAR", "/", "etc", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L415-L421
train
Tiny hparams suitable for CIFAR and etc.
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,ixtr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sBIs,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(777 - 727) + chr(0b100010 + 0o24) + chr(0b10100 + 0o36), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100011 + 0o114) + chr(0b11010 + 0o27) + chr(0b11110 + 0o30) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10439 - 10328) + '\062' + '\x30' + chr(0b110001), 46480 - 46472), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\062' + chr(0b110111) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + chr(0b110000) + '\x33', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110100) + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + chr(759 - 705) + chr(0b110100), 39850 - 39842), ehT0Px3KOsy9(chr(48) + chr(4328 - 4217) + chr(1766 - 1716) + chr(2130 - 2079) + chr(1727 - 1672), ord("\x08")), ehT0Px3KOsy9(chr(455 - 407) + chr(11568 - 11457) + '\062' + chr(55), 54464 - 54456), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(48) + chr(0b111 + 0o56), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(0b100101 + 0o20) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x35' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1010000 + 0o37) + '\063' + '\x37' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b110100) + chr(0b100110 + 0o20), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10101 + 0o36) + '\x31' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010 + 0o1) + chr(0b11100 + 0o25) + chr(0b11101 + 0o31), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b110111) + '\x36', 0b1000), ehT0Px3KOsy9(chr(2090 - 2042) + chr(8665 - 8554) + chr(50) + chr(0b100 + 0o60) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\x34' + chr(0b110001), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b10000 + 0o42) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\066' + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110 + 0o151) + '\062' + chr(0b110010) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(908 - 853) + chr(0b10100 + 0o34), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(53) + chr(747 - 697), 44786 - 44778), ehT0Px3KOsy9(chr(1754 - 1706) + chr(111) + '\x31' + chr(0b110100) + '\066', 34238 - 34230), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(0b1011 + 0o53) + chr(0b11110 + 0o30), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + chr(51) + '\066' + chr(0b10000 + 0o42), 60499 - 60491), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b10110 + 0o34) + chr(0b10100 + 0o42), 61284 - 61276), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b11111 + 0o22) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10010 + 0o42) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(0b101001 + 0o12) + '\063', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(54) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + chr(1281 - 1233) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(0b1000 + 0o51) + '\x36' + '\x36', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\065' + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(0b110001) + '\x37' + chr(0b1010 + 0o50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x36' + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\x37' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1001100 + 0o43) + chr(0b110011) + '\x35' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1837 - 1788) + '\061' + chr(2651 - 2598), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101100 + 0o11) + chr(0b11110 + 0o22), 15447 - 15439)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c'), chr(0b110100 + 0o60) + chr(101) + '\x63' + chr(0b1001110 + 0o41) + chr(100) + chr(399 - 298))(chr(0b1110101) + chr(0b1101011 + 0o11) + '\x66' + chr(0b11101 + 0o20) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wFoQwf3JKPsW(): n4ljua2gi1Pr = jpFk1QXDmJ2B() n4ljua2gi1Pr.Hax21lk7t3Y8 = ehT0Px3KOsy9('\x30' + chr(0b10111 + 0o130) + chr(0b101 + 0o53), 0b1000) n4ljua2gi1Pr.X1ZpHSxyKbHn = [ehT0Px3KOsy9(chr(1184 - 1136) + '\157' + chr(50) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11101 + 0o122) + chr(0b110100) + '\060', 0o10), ehT0Px3KOsy9(chr(844 - 796) + chr(11109 - 10998) + '\061' + chr(0b110000) + chr(1052 - 1004), ord("\x08"))] n4ljua2gi1Pr.xVVf39TAQJZ_ = [ehT0Px3KOsy9('\x30' + chr(0b101 + 0o152) + chr(0b110001) + chr(0b110 + 0o52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b1110 + 0o43) + '\060', 8), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + chr(558 - 509) + '\060', 8)] return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet_164_cifar
def revnet_164_cifar(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_cifar_base() hparams.bottleneck = True hparams.num_channels = [16, 32, 64] hparams.num_layers_per_block = [8, 8, 8] return hparams
python
def revnet_164_cifar(): """Tiny hparams suitable for CIFAR/etc.""" hparams = revnet_cifar_base() hparams.bottleneck = True hparams.num_channels = [16, 32, 64] hparams.num_layers_per_block = [8, 8, 8] return hparams
[ "def", "revnet_164_cifar", "(", ")", ":", "hparams", "=", "revnet_cifar_base", "(", ")", "hparams", ".", "bottleneck", "=", "True", "hparams", ".", "num_channels", "=", "[", "16", ",", "32", ",", "64", "]", "hparams", ".", "num_layers_per_block", "=", "[", "8", ",", "8", ",", "8", "]", "return", "hparams" ]
Tiny hparams suitable for CIFAR/etc.
[ "Tiny", "hparams", "suitable", "for", "CIFAR", "/", "etc", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L425-L431
train
Tiny hparams suitable for CIFAR and etc.
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,TLbJ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An,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(11243 - 11132) + chr(0b10101 + 0o34) + chr(1735 - 1685) + chr(0b100000 + 0o21), 65004 - 64996), ehT0Px3KOsy9(chr(2226 - 2178) + chr(0b1101111) + '\x33' + chr(0b1100 + 0o44) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(51) + chr(1680 - 1632), 31625 - 31617), ehT0Px3KOsy9(chr(1111 - 1063) + chr(0b1101111) + chr(51) + chr(2613 - 2560) + '\062', 61542 - 61534), ehT0Px3KOsy9(chr(1630 - 1582) + '\x6f' + '\062' + '\x36' + chr(0b100101 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(535 - 424) + chr(903 - 854), ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\157' + '\x31' + chr(55) + chr(1890 - 1840), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + chr(2851 - 2797) + chr(52), 45847 - 45839), ehT0Px3KOsy9('\060' + chr(10172 - 10061) + chr(51) + chr(50) + '\065', 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b110011) + chr(1341 - 1286) + chr(54), 30533 - 30525), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(1863 - 1812) + '\065' + chr(980 - 932), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\157' + '\x34' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b110111) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(51) + '\067', 0b1000), ehT0Px3KOsy9(chr(1923 - 1875) + chr(111) + chr(0b1110 + 0o43) + chr(0b110111) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(5701 - 5590) + chr(51) + '\x30' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(914 - 863) + chr(2433 - 2381) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1849 - 1801) + chr(0b11001 + 0o126) + chr(0b11011 + 0o26) + chr(1217 - 1162) + chr(2296 - 2242), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5165 - 5054) + chr(237 - 186) + chr(1077 - 1024) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011010 + 0o25) + chr(1841 - 1792) + chr(53) + '\067', 49630 - 49622), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010001 + 0o36) + chr(725 - 674) + chr(1297 - 1247) + '\x31', 0b1000), ehT0Px3KOsy9(chr(52 - 4) + chr(0b1101001 + 0o6) + '\062' + chr(1818 - 1766) + chr(0b11111 + 0o27), 61218 - 61210), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\061' + chr(116 - 67) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1393 - 1345) + '\157' + '\x31' + '\x37', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + chr(0b110111) + chr(630 - 582), 3593 - 3585), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + '\x36' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + '\x33' + chr(52) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(2148 - 2100) + chr(0b1101111) + chr(0b110001) + chr(932 - 882) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(50) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b110010) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(1114 - 1066) + chr(2277 - 2166) + '\063' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(2102 - 2054) + chr(111) + '\x32' + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10924 - 10813) + '\062' + chr(0b110101) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1069 - 1021) + chr(0b1101111) + chr(1120 - 1071) + '\065' + chr(0b10011 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(1548 - 1500) + chr(9518 - 9407) + '\x33' + chr(2287 - 2239), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1000001 + 0o56) + chr(0b110010) + chr(52) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\x33', 0b1000), ehT0Px3KOsy9(chr(1855 - 1807) + chr(8724 - 8613) + chr(0b110000 + 0o1) + chr(0b110000 + 0o2) + chr(1781 - 1726), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2388 - 2338) + '\x32' + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(10454 - 10343) + chr(107 - 58) + chr(54) + '\x37', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b101000 + 0o107) + '\065' + chr(0b100100 + 0o14), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f'), chr(0b100100 + 0o100) + chr(5754 - 5653) + chr(0b1100011) + '\x6f' + '\x64' + chr(516 - 415))(chr(5344 - 5227) + chr(0b10010 + 0o142) + chr(949 - 847) + '\055' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Nj0YSw91KM1a(): n4ljua2gi1Pr = jpFk1QXDmJ2B() n4ljua2gi1Pr.Hax21lk7t3Y8 = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31', 8) n4ljua2gi1Pr.X1ZpHSxyKbHn = [ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1000011 + 0o54) + '\x32' + chr(48), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x34' + chr(0b1000 + 0o50), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\x30' + chr(0b110000), 0b1000)] n4ljua2gi1Pr.xVVf39TAQJZ_ = [ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b11111 + 0o22) + '\060', 8), ehT0Px3KOsy9(chr(534 - 486) + chr(0b1101111) + chr(49) + '\060', 8)] return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/revnet.py
revnet_range
def revnet_range(rhp): """Hyperparameters for tuning revnet.""" rhp.set_float('learning_rate', 0.05, 0.2, scale=rhp.LOG_SCALE) rhp.set_float('weight_decay', 1e-5, 1e-3, scale=rhp.LOG_SCALE) rhp.set_discrete('num_channels_init_block', [64, 128]) return rhp
python
def revnet_range(rhp): """Hyperparameters for tuning revnet.""" rhp.set_float('learning_rate', 0.05, 0.2, scale=rhp.LOG_SCALE) rhp.set_float('weight_decay', 1e-5, 1e-3, scale=rhp.LOG_SCALE) rhp.set_discrete('num_channels_init_block', [64, 128]) return rhp
[ "def", "revnet_range", "(", "rhp", ")", ":", "rhp", ".", "set_float", "(", "'learning_rate'", ",", "0.05", ",", "0.2", ",", "scale", "=", "rhp", ".", "LOG_SCALE", ")", "rhp", ".", "set_float", "(", "'weight_decay'", ",", "1e-5", ",", "1e-3", ",", "scale", "=", "rhp", ".", "LOG_SCALE", ")", "rhp", ".", "set_discrete", "(", "'num_channels_init_block'", ",", "[", "64", ",", "128", "]", ")", "return", "rhp" ]
Hyperparameters for tuning revnet.
[ "Hyperparameters", "for", "tuning", "revnet", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/revnet.py#L435-L440
train
Hyperparameters for tuning revnet.
Pu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,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(490 - 442) + '\157' + '\x37' + chr(0b11111 + 0o21), 55061 - 55053), ehT0Px3KOsy9('\x30' + chr(111) + chr(1012 - 962) + '\x37' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(1926 - 1815) + chr(0b1010 + 0o47) + '\x34' + chr(1092 - 1037), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(11449 - 11338) + chr(0b101111 + 0o3) + chr(240 - 188) + chr(0b100100 + 0o23), 14452 - 14444), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1851 - 1802) + '\x33' + chr(0b110010), 12802 - 12794), ehT0Px3KOsy9('\060' + chr(9139 - 9028) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(49) + '\067', 13050 - 13042), ehT0Px3KOsy9('\060' + chr(0b11110 + 0o121) + chr(0b110011) + chr(0b110110) + '\067', 32120 - 32112), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b1111 + 0o42) + chr(0b101 + 0o53) + chr(1304 - 1251), 11479 - 11471), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\067' + chr(0b101 + 0o54), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\x31' + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\064' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b110101) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\065' + chr(2002 - 1953), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\x31' + '\x35', 20045 - 20037), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + chr(51) + chr(53) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1874 - 1826) + chr(111) + chr(1831 - 1780) + chr(0b100111 + 0o17) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1212 - 1163) + chr(48) + '\062', 0o10), ehT0Px3KOsy9(chr(1017 - 969) + '\157' + '\061' + chr(0b101001 + 0o11) + chr(0b101000 + 0o15), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1011001 + 0o26) + chr(833 - 779), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(0b110101) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(445 - 394) + chr(1811 - 1759), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + chr(0b110011) + chr(821 - 768) + chr(0b110110), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\060', 20660 - 20652), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(0b110011) + chr(0b1010 + 0o50) + chr(1418 - 1367), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4319 - 4208) + chr(0b100001 + 0o20) + chr(562 - 514) + chr(2169 - 2121), 0b1000), ehT0Px3KOsy9(chr(1400 - 1352) + chr(111) + '\062' + chr(0b110101) + '\x35', 35149 - 35141), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b10000 + 0o47) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1463 - 1415) + chr(0b11100 + 0o123) + chr(1719 - 1668) + chr(0b110001) + chr(0b1 + 0o57), 0b1000), ehT0Px3KOsy9(chr(1710 - 1662) + chr(0b110001 + 0o76) + chr(2158 - 2107) + chr(50) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(49) + chr(769 - 719), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(52) + chr(1693 - 1640), 8), ehT0Px3KOsy9(chr(48) + chr(0b110001 + 0o76) + chr(2426 - 2376) + chr(0b110110) + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + '\x32' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(54) + chr(2232 - 2184), 28393 - 28385), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11111 + 0o22) + chr(0b101010 + 0o6) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(985 - 937) + chr(1101 - 990) + chr(0b11 + 0o57) + chr(48) + chr(0b11110 + 0o24), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b1010 + 0o54) + '\065', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(53) + chr(0b101001 + 0o7), 48499 - 48491)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x16'), chr(0b11011 + 0o111) + chr(4341 - 4240) + chr(99) + chr(6712 - 6601) + chr(0b1100100) + chr(530 - 429))(chr(0b1110101) + chr(0b1101101 + 0o7) + chr(0b1100110) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def xEu16p_eaDEy(IwsgmEzQknPc): xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'K\xdc\x13\xf866i.\x83'), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(220 - 120) + '\x65')('\165' + '\164' + chr(7087 - 6985) + chr(1243 - 1198) + chr(2631 - 2575)))(xafqLlk3kkUe(SXOLrMavuUCe(b'T\xdc\x06\xd5>3h(\xa87\xd8\xf8\xc0'), chr(100) + chr(0b1100101) + '\x63' + chr(6543 - 6432) + '\144' + chr(0b1010 + 0o133))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(1298 - 1242)), 0.05, 0.2, scale=xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b't\xf6 \xf8\x03\x19G\x03\xb2'), chr(100) + chr(0b100010 + 0o103) + chr(0b101100 + 0o67) + chr(0b1010001 + 0o36) + chr(0b10011 + 0o121) + '\x65')(chr(117) + chr(10874 - 10758) + chr(3568 - 3466) + chr(56 - 11) + chr(56)))) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'K\xdc\x13\xf866i.\x83'), '\144' + chr(2392 - 2291) + '\143' + chr(111) + '\144' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + '\x2d' + chr(0b10000 + 0o50)))(xafqLlk3kkUe(SXOLrMavuUCe(b'O\xdc\x0e\xc08.Y+\x92&\xd8\xf5'), chr(5970 - 5870) + '\145' + chr(0b101110 + 0o65) + chr(0b1101111) + chr(0b1000110 + 0o36) + chr(0b1100101))('\165' + '\x74' + '\146' + chr(45) + '\070'), 1e-05, 0.001, scale=xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b't\xf6 \xf8\x03\x19G\x03\xb2'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(1309 - 1193) + chr(0b1100110) + chr(942 - 897) + '\070'))) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'K\xdc\x13\xf843u,\x85 \xcd\xe9'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b10101 + 0o117) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'V\xcc\n\xf832g!\x99 \xd5\xff\xfa\x87\x07d\x9e\xad 9i\x8cw'), '\144' + chr(0b1000 + 0o135) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b111110 + 0o67) + '\x74' + chr(102) + '\x2d' + chr(0b111000)), [ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + '\x31' + chr(0b1010 + 0o46) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(10437 - 10326) + chr(0b110010) + chr(48) + chr(48), 0b1000)]) return IwsgmEzQknPc
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_basic_deterministic
def next_frame_basic_deterministic(): """Basic 2-frame conv model.""" hparams = base.next_frame_base() hparams.video_num_input_frames = 4 hparams.video_num_target_frames = 1 hparams.hidden_size = 64 hparams.batch_size = 4 hparams.num_hidden_layers = 2 hparams.optimizer = "Adafactor" hparams.learning_rate_constant = 1.5 hparams.learning_rate_warmup_steps = 8000 hparams.learning_rate_schedule = "linear_warmup * constant * rsqrt_decay" hparams.label_smoothing = 0.0 hparams.initializer = "uniform_unit_scaling" hparams.initializer_gain = 1.3 hparams.weight_decay = 0.0 hparams.clip_grad_norm = 1.0 hparams.dropout = 0.1 hparams.add_hparam("residual_dropout", 0.5) hparams.add_hparam("num_compress_steps", 6) hparams.add_hparam("filter_double_steps", 2) hparams.add_hparam("pixel_sampling_temperature", 0.0) hparams.add_hparam("concat_internal_states", False) hparams.add_hparam("do_autoregressive_rnn", False) hparams.add_hparam("autoregressive_rnn_lookback", 8) hparams.add_hparam("autoregressive_rnn_warmup_steps", 8000) hparams.add_hparam("activation_fn", "relu") hparams.bottom["inputs"] = modalities.video_identity_bottom hparams.bottom["targets"] = modalities.video_identity_bottom return hparams
python
def next_frame_basic_deterministic(): """Basic 2-frame conv model.""" hparams = base.next_frame_base() hparams.video_num_input_frames = 4 hparams.video_num_target_frames = 1 hparams.hidden_size = 64 hparams.batch_size = 4 hparams.num_hidden_layers = 2 hparams.optimizer = "Adafactor" hparams.learning_rate_constant = 1.5 hparams.learning_rate_warmup_steps = 8000 hparams.learning_rate_schedule = "linear_warmup * constant * rsqrt_decay" hparams.label_smoothing = 0.0 hparams.initializer = "uniform_unit_scaling" hparams.initializer_gain = 1.3 hparams.weight_decay = 0.0 hparams.clip_grad_norm = 1.0 hparams.dropout = 0.1 hparams.add_hparam("residual_dropout", 0.5) hparams.add_hparam("num_compress_steps", 6) hparams.add_hparam("filter_double_steps", 2) hparams.add_hparam("pixel_sampling_temperature", 0.0) hparams.add_hparam("concat_internal_states", False) hparams.add_hparam("do_autoregressive_rnn", False) hparams.add_hparam("autoregressive_rnn_lookback", 8) hparams.add_hparam("autoregressive_rnn_warmup_steps", 8000) hparams.add_hparam("activation_fn", "relu") hparams.bottom["inputs"] = modalities.video_identity_bottom hparams.bottom["targets"] = modalities.video_identity_bottom return hparams
[ "def", "next_frame_basic_deterministic", "(", ")", ":", "hparams", "=", "base", ".", "next_frame_base", "(", ")", "hparams", ".", "video_num_input_frames", "=", "4", "hparams", ".", "video_num_target_frames", "=", "1", "hparams", ".", "hidden_size", "=", "64", "hparams", ".", "batch_size", "=", "4", "hparams", ".", "num_hidden_layers", "=", "2", "hparams", ".", "optimizer", "=", "\"Adafactor\"", "hparams", ".", "learning_rate_constant", "=", "1.5", "hparams", ".", "learning_rate_warmup_steps", "=", "8000", "hparams", ".", "learning_rate_schedule", "=", "\"linear_warmup * constant * rsqrt_decay\"", "hparams", ".", "label_smoothing", "=", "0.0", "hparams", ".", "initializer", "=", "\"uniform_unit_scaling\"", "hparams", ".", "initializer_gain", "=", "1.3", "hparams", ".", "weight_decay", "=", "0.0", "hparams", ".", "clip_grad_norm", "=", "1.0", "hparams", ".", "dropout", "=", "0.1", "hparams", ".", "add_hparam", "(", "\"residual_dropout\"", ",", "0.5", ")", "hparams", ".", "add_hparam", "(", "\"num_compress_steps\"", ",", "6", ")", "hparams", ".", "add_hparam", "(", "\"filter_double_steps\"", ",", "2", ")", "hparams", ".", "add_hparam", "(", "\"pixel_sampling_temperature\"", ",", "0.0", ")", "hparams", ".", "add_hparam", "(", "\"concat_internal_states\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"do_autoregressive_rnn\"", ",", "False", ")", "hparams", ".", "add_hparam", "(", "\"autoregressive_rnn_lookback\"", ",", "8", ")", "hparams", ".", "add_hparam", "(", "\"autoregressive_rnn_warmup_steps\"", ",", "8000", ")", "hparams", ".", "add_hparam", "(", "\"activation_fn\"", ",", "\"relu\"", ")", "hparams", ".", "bottom", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_identity_bottom", "hparams", ".", "bottom", "[", "\"targets\"", "]", "=", "modalities", ".", "video_identity_bottom", "return", "hparams" ]
Basic 2-frame conv model.
[ "Basic", "2", "-", "frame", "conv", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L27-L56
train
Basic 2 - frame conv 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,eh4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HEeM4cxI,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(0b110000 + 0o77) + chr(0b1001 + 0o50) + chr(1046 - 994) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1063 - 1014) + chr(0b110000) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11011 + 0o124) + chr(0b110011) + chr(622 - 573) + chr(49), 14136 - 14128), ehT0Px3KOsy9('\x30' + chr(9283 - 9172) + chr(0b110011) + chr(54) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\066' + chr(49), 5347 - 5339), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(0b110110) + chr(49), 29867 - 29859), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b0 + 0o66) + '\065', 0b1000), ehT0Px3KOsy9(chr(1706 - 1658) + chr(111) + chr(0b110010) + '\x31' + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100 + 0o143) + '\063' + chr(0b110010 + 0o5) + '\066', 35732 - 35724), ehT0Px3KOsy9(chr(48) + chr(111) + '\066' + '\061', 8), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(862 - 809) + '\066', 10240 - 10232), ehT0Px3KOsy9(chr(1006 - 958) + chr(11718 - 11607) + chr(1353 - 1304) + chr(0b10111 + 0o34) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o7) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + chr(0b101111 + 0o2) + '\x33', 16388 - 16380), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(52) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(3890 - 3779) + '\x33' + chr(0b110101) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(2078 - 2030) + '\157' + '\062', 63223 - 63215), ehT0Px3KOsy9('\060' + chr(0b10110 + 0o131) + '\x33' + chr(0b110000) + chr(320 - 266), 0b1000), ehT0Px3KOsy9(chr(1200 - 1152) + chr(11981 - 11870) + chr(2015 - 1966) + chr(1950 - 1901) + '\x34', 26061 - 26053), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(49) + chr(2106 - 2056) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1682 - 1627) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001110 + 0o41) + '\061' + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(5672 - 5561) + chr(50) + '\066' + chr(0b101111 + 0o3), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101100 + 0o103) + chr(49) + '\x31' + chr(2794 - 2739), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + chr(51) + '\x32', 0o10), ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + chr(0b100101 + 0o14) + '\x34' + chr(0b100010 + 0o22), 33749 - 33741), ehT0Px3KOsy9(chr(755 - 707) + chr(7558 - 7447) + chr(2052 - 2001) + chr(55) + chr(910 - 859), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11100 + 0o27) + '\x37' + '\x31', 1692 - 1684), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b11100 + 0o27) + chr(0b10110 + 0o40), 24396 - 24388), ehT0Px3KOsy9('\060' + chr(4046 - 3935) + '\x33' + '\x37' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(1920 - 1871) + '\064' + '\x32', 31696 - 31688), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(2317 - 2262) + chr(1819 - 1771), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + chr(51) + chr(0b101 + 0o60) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(1194 - 1145) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\064' + chr(0b0 + 0o65), 0b1000), ehT0Px3KOsy9(chr(2267 - 2219) + chr(111) + chr(1202 - 1153) + '\x33', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(578 - 529) + chr(1903 - 1855) + chr(0b110010), 35547 - 35539), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001001 + 0o46) + chr(120 - 71) + chr(0b110001) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b111011 + 0o64) + '\063' + '\065' + chr(0b101010 + 0o7), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(1288 - 1235) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'H'), chr(100) + chr(101) + chr(0b1100011) + '\157' + chr(0b1000110 + 0o36) + '\x65')('\x75' + chr(10980 - 10864) + chr(0b1100000 + 0o6) + chr(1645 - 1600) + chr(2127 - 2071)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RpiVMrfg4zTk(): n4ljua2gi1Pr = XLXqkmM_0GVx.next_frame_base() n4ljua2gi1Pr.UUXW9NWPZxPI = ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(52), 0b1000) n4ljua2gi1Pr.UxYiT0ZFW2SZ = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 0b1000) n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9(chr(48) + chr(6790 - 6679) + chr(760 - 711) + chr(0b100011 + 0o15) + '\x30', 8573 - 8565) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(3218 - 3107) + chr(0b10111 + 0o35), 8) n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9(chr(48) + chr(0b100 + 0o153) + chr(0b110010), 8) n4ljua2gi1Pr.XdKNcYRObPK3 = xafqLlk3kkUe(SXOLrMavuUCe(b"''\xa8\x96P\xd2\x01\xe4\x8c"), chr(0b1100100) + chr(0b10011 + 0o122) + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(1829 - 1727) + '\x2d' + chr(2725 - 2669)) n4ljua2gi1Pr.Ot9HUjnkxXA_ = 1.5 n4ljua2gi1Pr.fHyhoyGmdvM9 = ehT0Px3KOsy9(chr(1627 - 1579) + chr(111) + chr(49) + chr(55) + chr(53) + '\x30' + chr(0b100001 + 0o17), 10244 - 10236) n4ljua2gi1Pr.Lz_s7neUzM5V = xafqLlk3kkUe(SXOLrMavuUCe(b'\n*\xa7\x95P\xc3*\xfc\x9fC\xc3*U+\x8f0\x8em\xa8?!]c\xc6o\xb0D\x89\x8a\xaf\x8a\x16g\x8f-\x86j;'), chr(1222 - 1122) + chr(0b1100101) + '\143' + chr(3333 - 3222) + '\144' + '\145')(chr(4021 - 3904) + chr(0b11011 + 0o131) + chr(102) + chr(0b101101) + chr(0b111000)) n4ljua2gi1Pr.FSjUgdaczzRk = 0.0 n4ljua2gi1Pr.kwfuYzkY5C57 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x13-\xa0\x96^\xc3\x18\xd4\x8b_\xc7+zx\xc6q\x81k\xa8+'), chr(100) + chr(0b101111 + 0o66) + chr(99) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(4023 - 3921) + '\055' + '\x38') n4ljua2gi1Pr.S1SbCBXLapw8 = 1.3 n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0 n4ljua2gi1Pr.SdNSZNVkVjLh = 1.0 n4ljua2gi1Pr.ag0mwEgWzjYv = 0.1 xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), chr(0b10 + 0o142) + '\x65' + chr(4423 - 4324) + '\x6f' + chr(0b11100 + 0o110) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x14&\xba\x99U\xc4\x14\xe7\xa1U\xdc0Ud\xd0d'), '\x64' + chr(101) + '\143' + '\157' + chr(5995 - 5895) + chr(101))(chr(2698 - 2581) + '\164' + chr(0b1010110 + 0o20) + chr(0b100011 + 0o12) + '\070'), 0.5) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), '\144' + chr(0b1010010 + 0o23) + chr(99) + chr(111) + chr(0b110 + 0o136) + chr(718 - 617))(chr(117) + '\x74' + chr(6737 - 6635) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x086\xa4\xafR\xde\x18\xfb\x8cT\xdd,zx\xd1u\x9dq'), '\x64' + chr(0b110011 + 0o62) + chr(2124 - 2025) + chr(3483 - 3372) + chr(4636 - 4536) + '\x65')(chr(5749 - 5632) + chr(9710 - 9594) + '\x66' + chr(602 - 557) + chr(0b100000 + 0o30)), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(1281 - 1227), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(7830 - 7730) + '\145')(chr(117) + '\x74' + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x00*\xa5\x84T\xc3*\xef\x91D\xcc3@T\xd6d\x88r\xb5'), chr(0b1000011 + 0o41) + chr(0b101100 + 0o71) + chr(1403 - 1304) + chr(0b1101111) + chr(6434 - 6334) + chr(0b1100101))(chr(0b11001 + 0o134) + chr(653 - 537) + chr(0b1000111 + 0o37) + '\x2d' + '\070'), ehT0Px3KOsy9('\060' + '\157' + chr(0b11010 + 0o30), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), chr(3911 - 3811) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(4874 - 4774) + chr(0b1000 + 0o135))(chr(0b101001 + 0o114) + chr(0b1110100) + chr(102) + chr(783 - 738) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b"\x16*\xb1\x95]\xee\x06\xea\x93A\xc26Kl\xfad\x88o\xb6)']y\xc7=\xff"), chr(8668 - 8568) + '\145' + '\x63' + chr(0b1100110 + 0o11) + chr(0b1100100) + chr(9257 - 9156))(chr(0b1101 + 0o150) + '\x74' + chr(0b110101 + 0o61) + chr(0b101101) + '\x38'), 0.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), '\144' + '\x65' + chr(2105 - 2006) + chr(0b1101111) + chr(100) + chr(0b101011 + 0o72))(chr(117) + chr(1379 - 1263) + chr(102) + '\055' + chr(1631 - 1575)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x05,\xa7\x93P\xc5*\xe2\x90E\xcb-Kj\xc9O\x9ev\xa780O'), chr(100) + chr(0b1100000 + 0o5) + chr(99) + '\x6f' + chr(0b1100100) + chr(2540 - 2439))(chr(0b1100011 + 0o22) + '\164' + chr(102) + chr(0b10100 + 0o31) + '\x38'), ehT0Px3KOsy9(chr(48) + chr(0b1011111 + 0o20) + chr(48), 9468 - 9460)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), '\x64' + '\x65' + chr(0b1100011) + '\157' + chr(6220 - 6120) + '\x65')('\165' + chr(0b101100 + 0o110) + '\146' + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x02,\x96\x91D\xc5\x1a\xf9\x9bV\xdc:Vx\xccf\x88]\xb4";'), chr(0b1100100) + '\145' + '\x63' + chr(5260 - 5149) + chr(0b111111 + 0o45) + chr(101))('\165' + chr(1781 - 1665) + '\x66' + chr(0b100101 + 0o10) + chr(871 - 815)), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\x6f' + '\x30', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), chr(0b1100100) + chr(8642 - 8541) + '\143' + chr(8860 - 8749) + chr(100) + '\x65')('\x75' + chr(1724 - 1608) + chr(0b1100011 + 0o3) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x076\xbd\x9fC\xd4\x12\xf9\x9bB\xdd6Sn\xfab\x83l\x99 :Sf\xd0.\xf9\x0f'), chr(0b10001 + 0o123) + chr(101) + chr(0b101100 + 0o67) + '\157' + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(6064 - 5962) + chr(0b101101) + chr(56)), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b10110 + 0o32), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), '\144' + '\145' + chr(0b1100011) + chr(0b1010101 + 0o32) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(3252 - 3150) + chr(1811 - 1766) + chr(0b110101 + 0o3)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x076\xbd\x9fC\xd4\x12\xf9\x9bB\xdd6Sn\xfab\x83l\x99;4N`\xc7?\xc5\x17\x8f\x9c\xae\x8b'), chr(0b10101 + 0o117) + chr(0b1100101) + '\x63' + '\x6f' + chr(100) + '\145')(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(0b1010010 + 0o24) + chr(1914 - 1869) + chr(0b1100 + 0o54)), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b11010 + 0o35) + '\065' + chr(0b10000 + 0o40) + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b"\x07'\xad\xafY\xc1\x14\xf9\x9f\\"), chr(8950 - 8850) + chr(8027 - 7926) + '\143' + chr(9742 - 9631) + chr(6202 - 6102) + chr(3979 - 3878))(chr(0b111 + 0o156) + chr(0b1000110 + 0o56) + chr(0b1100110) + chr(0b101101) + chr(0b10010 + 0o46)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x07 \xbd\x99G\xd0\x01\xe2\x91_\xf19K'), '\144' + '\145' + chr(0b1000 + 0o133) + '\157' + chr(0b1001000 + 0o34) + chr(0b1100101))(chr(0b1001111 + 0o46) + chr(0b101100 + 0o110) + chr(0b1001 + 0o135) + chr(45) + chr(2206 - 2150)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x14&\xa5\x85'), chr(100) + '\x65' + chr(421 - 322) + chr(709 - 598) + chr(100) + chr(0b110101 + 0o60))(chr(117) + chr(116) + '\x66' + chr(497 - 452) + chr(0b111 + 0o61))) n4ljua2gi1Pr.kXxsZxlIQUSQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f-\xb9\x85E\xc2'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1010010 + 0o22) + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(3442 - 3326) + chr(0b1100110) + '\055' + chr(56))] = PuPeNl0CuqOQ.video_identity_bottom n4ljua2gi1Pr.kXxsZxlIQUSQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x12"\xbb\x97T\xc5\x06'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1000000 + 0o44) + '\145')(chr(0b1000110 + 0o57) + chr(116) + '\x66' + chr(695 - 650) + chr(0b1101 + 0o53))] = PuPeNl0CuqOQ.video_identity_bottom return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_pixel_noise
def next_frame_pixel_noise(): """Basic 2-frame conv model with pixel noise.""" hparams = next_frame_basic_deterministic() hparams.add_hparam("video_modality_input_noise", 0.05) hparams.bottom["inputs"] = modalities.video_pixel_noise_bottom hparams.top["inputs"] = modalities.video_top return hparams
python
def next_frame_pixel_noise(): """Basic 2-frame conv model with pixel noise.""" hparams = next_frame_basic_deterministic() hparams.add_hparam("video_modality_input_noise", 0.05) hparams.bottom["inputs"] = modalities.video_pixel_noise_bottom hparams.top["inputs"] = modalities.video_top return hparams
[ "def", "next_frame_pixel_noise", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "add_hparam", "(", "\"video_modality_input_noise\"", ",", "0.05", ")", "hparams", ".", "bottom", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_pixel_noise_bottom", "hparams", ".", "top", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_top", "return", "hparams" ]
Basic 2-frame conv model with pixel noise.
[ "Basic", "2", "-", "frame", "conv", "model", "with", "pixel", "noise", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L60-L66
train
Basic 2 - frame conv model with pixel noise.
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_zsE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wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1001101 + 0o42) + chr(1544 - 1493) + '\x32' + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(53) + chr(2651 - 2598), 4877 - 4869), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + chr(1165 - 1117) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + chr(12046 - 11935) + chr(0b110100), 26499 - 26491), ehT0Px3KOsy9(chr(0b110000) + chr(8497 - 8386) + chr(1023 - 972) + chr(48) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + '\067' + chr(0b101111 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2692 - 2581) + chr(0b110010) + '\x35' + chr(1102 - 1054), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(50) + '\066' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(53) + chr(1855 - 1805), 0b1000), ehT0Px3KOsy9(chr(2022 - 1974) + chr(10118 - 10007) + chr(0b110011) + chr(0b101000 + 0o17), 0b1000), ehT0Px3KOsy9(chr(1504 - 1456) + '\157' + chr(51) + chr(2148 - 2096) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(815 - 767) + '\157' + chr(0b11 + 0o56) + chr(52) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1011 + 0o46) + chr(2792 - 2737) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100110 + 0o111) + chr(49) + '\066' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3379 - 3268) + chr(51) + '\x31' + chr(1040 - 992), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x32' + chr(267 - 214), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(54) + chr(0b1111 + 0o42), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + '\x34' + chr(0b1011 + 0o47), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + chr(0b110101), 40023 - 40015), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(10073 - 9962) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(9835 - 9724) + '\x33' + chr(2270 - 2216), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101110 + 0o6) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2088 - 2037) + '\x32' + '\064', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1514 - 1465) + chr(2142 - 2088) + chr(54), 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10010 + 0o41) + chr(106 - 51) + chr(0b1111 + 0o47), 0o10), ehT0Px3KOsy9(chr(1931 - 1883) + '\157' + chr(0b101011 + 0o10) + chr(0b110001) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\x30' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(1818 - 1770) + chr(0b100011 + 0o114) + chr(49) + chr(0b1001 + 0o50), 59773 - 59765), ehT0Px3KOsy9(chr(48) + chr(0b110000 + 0o77) + chr(55) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2716 - 2605) + chr(0b110011) + chr(0b110110 + 0o1) + '\x34', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + '\062' + '\060' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\063' + chr(2017 - 1965) + chr(52), 61501 - 61493), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(244 - 193) + '\x31' + chr(0b100111 + 0o14), 59851 - 59843), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + '\061' + chr(0b110 + 0o60) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(2191 - 2142) + '\x32' + chr(0b110100), 7461 - 7453), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + '\x37' + chr(112 - 63), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + chr(51) + '\x36' + chr(55), 34029 - 34021), ehT0Px3KOsy9(chr(1528 - 1480) + chr(0b1101111) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(1693 - 1645) + '\062', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(647 - 599) + chr(0b1000011 + 0o54) + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfb'), chr(0b110 + 0o136) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1111 + 0o126))(chr(0b1110101) + '\164' + chr(6478 - 6376) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def YgYcP9mwEHoq(): n4ljua2gi1Pr = RpiVMrfg4zTk() xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4\xc9\xa7[\xa8\x8f\xc9\xc0\xcbr'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b101001 + 0o74))(chr(0b1110101) + chr(13123 - 13007) + '\146' + '\x2d' + chr(0b110010 + 0o6)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa3\xc4\xa7a\xaf\xa0\xc5\xdd\xce~\x89\t\x0f\x0f\x97p\xfb\x81\x17Q\\pN\xbd\x05\x9b'), chr(0b1100100) + '\145' + chr(3579 - 3480) + '\x6f' + chr(100) + chr(101))(chr(0b100111 + 0o116) + chr(1143 - 1027) + chr(10299 - 10197) + chr(853 - 808) + chr(0b110000 + 0o10)), 0.05) n4ljua2gi1Pr.kXxsZxlIQUSQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xc3\xb3q\xb4\x8c'), '\x64' + chr(0b1011011 + 0o12) + chr(3754 - 3655) + '\x6f' + chr(0b1100100) + chr(1081 - 980))(chr(0b110011 + 0o102) + '\x74' + chr(8746 - 8644) + chr(0b10010 + 0o33) + chr(0b100110 + 0o22))] = PuPeNl0CuqOQ.video_pixel_noise_bottom n4ljua2gi1Pr.qxrVBjeryNEZ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xbc\xc3\xb3q\xb4\x8c'), chr(0b1100100) + chr(0b110110 + 0o57) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(117) + chr(10743 - 10627) + chr(0b110110 + 0o60) + '\x2d' + '\x38')] = PuPeNl0CuqOQ.video_top return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_sampling
def next_frame_sampling(): """Basic conv model with scheduled sampling.""" hparams = next_frame_basic_deterministic() hparams.scheduled_sampling_mode = "prob_inverse_exp" hparams.scheduled_sampling_max_prob = 1.0 hparams.scheduled_sampling_decay_steps = 10000 return hparams
python
def next_frame_sampling(): """Basic conv model with scheduled sampling.""" hparams = next_frame_basic_deterministic() hparams.scheduled_sampling_mode = "prob_inverse_exp" hparams.scheduled_sampling_max_prob = 1.0 hparams.scheduled_sampling_decay_steps = 10000 return hparams
[ "def", "next_frame_sampling", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "scheduled_sampling_mode", "=", "\"prob_inverse_exp\"", "hparams", ".", "scheduled_sampling_max_prob", "=", "1.0", "hparams", ".", "scheduled_sampling_decay_steps", "=", "10000", "return", "hparams" ]
Basic conv model with scheduled sampling.
[ "Basic", "conv", "model", "with", "scheduled", "sampling", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L79-L85
train
Basic conv model with scheduled sampling.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmlu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,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1062 - 1011) + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1578 - 1523) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + '\061' + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(285 - 237) + chr(0b1101111) + chr(0b110010) + chr(0b110001 + 0o0) + chr(49), 39712 - 39704), ehT0Px3KOsy9(chr(48) + chr(1546 - 1435) + chr(0b10100 + 0o35) + '\x32' + chr(288 - 239), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110010) + chr(1107 - 1058), 8), ehT0Px3KOsy9('\060' + chr(0b100010 + 0o115) + '\x31' + '\062' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + '\x31' + '\x34', 9414 - 9406), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1291 - 1236) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(2159 - 2111) + chr(11372 - 11261) + '\x31' + '\x37' + chr(0b1011 + 0o45), 12004 - 11996), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + chr(829 - 780) + '\x33' + chr(1177 - 1126), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10010 + 0o41) + chr(1551 - 1501) + chr(0b110111), 50477 - 50469), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + '\x31' + '\x32' + chr(0b11 + 0o56), 8), ehT0Px3KOsy9('\x30' + chr(2989 - 2878) + '\063' + chr(378 - 327) + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(5553 - 5442) + chr(1360 - 1311) + chr(51) + chr(324 - 271), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b10001 + 0o40) + '\067' + chr(0b100110 + 0o13), 0o10), ehT0Px3KOsy9('\x30' + chr(0b111010 + 0o65) + chr(0b11011 + 0o30) + '\063' + chr(0b100011 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(450 - 402) + chr(111) + chr(159 - 108) + '\x32' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1635 - 1587) + chr(0b101101 + 0o102) + chr(53) + chr(0b111 + 0o56), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2344 - 2291) + '\061', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b1 + 0o61) + chr(50) + chr(710 - 658), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(5699 - 5588) + chr(0b110001) + chr(0b110000 + 0o3) + '\065', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10000 + 0o42) + chr(52) + chr(54), 36121 - 36113), ehT0Px3KOsy9(chr(2185 - 2137) + chr(0b1101111) + chr(49) + chr(2299 - 2251) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2157 - 2046) + '\x36' + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1513 - 1464) + chr(2225 - 2171), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(226 - 172) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(5019 - 4908) + '\x32' + '\x35' + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(1744 - 1690) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + '\063' + chr(0b100 + 0o55), 8), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(49) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(53) + chr(48), 0b1000), ehT0Px3KOsy9(chr(189 - 141) + '\x6f' + chr(1747 - 1697) + chr(2127 - 2075) + '\064', 61743 - 61735), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1561 - 1512) + chr(0b110000 + 0o2) + chr(1575 - 1527), ord("\x08")), ehT0Px3KOsy9(chr(2006 - 1958) + chr(0b1101111) + chr(0b110011) + chr(53) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + chr(0b110011) + chr(48) + chr(2173 - 2119), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(0b110011) + '\x32' + chr(0b100100 + 0o16), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(7660 - 7549) + chr(50) + '\064' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(890 - 839) + '\065' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b100001 + 0o23), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110101) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'7'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(1441 - 1341) + chr(0b110110 + 0o57))(chr(0b1101000 + 0o15) + chr(116) + chr(0b1100110) + chr(1627 - 1582) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ppG02FVYZccV(): n4ljua2gi1Pr = RpiVMrfg4zTk() n4ljua2gi1Pr.RnAcJFv3oEFN = xafqLlk3kkUe(SXOLrMavuUCe(b'iOe\xeb\x0e89zY\n(\xb2\x0e\xbd%\t'), chr(0b1100100) + chr(0b1100101) + chr(8142 - 8043) + chr(111) + chr(6373 - 6273) + chr(101))(chr(117) + chr(0b1011010 + 0o32) + chr(0b110001 + 0o65) + chr(0b10000 + 0o35) + '\x38') n4ljua2gi1Pr.uUU7a3EfxKmU = 1.0 n4ljua2gi1Pr.akJlwdygthZ5 = ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(50) + '\x33' + '\064' + chr(0b1001 + 0o51) + '\060', ord("\x08")) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_ae
def next_frame_ae(): """Conv autoencoder.""" hparams = next_frame_basic_deterministic() hparams.bottom["inputs"] = modalities.video_bitwise_bottom hparams.top["inputs"] = modalities.video_top hparams.hidden_size = 256 hparams.batch_size = 8 hparams.num_hidden_layers = 4 hparams.num_compress_steps = 4 hparams.dropout = 0.4 return hparams
python
def next_frame_ae(): """Conv autoencoder.""" hparams = next_frame_basic_deterministic() hparams.bottom["inputs"] = modalities.video_bitwise_bottom hparams.top["inputs"] = modalities.video_top hparams.hidden_size = 256 hparams.batch_size = 8 hparams.num_hidden_layers = 4 hparams.num_compress_steps = 4 hparams.dropout = 0.4 return hparams
[ "def", "next_frame_ae", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "bottom", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_bitwise_bottom", "hparams", ".", "top", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_top", "hparams", ".", "hidden_size", "=", "256", "hparams", ".", "batch_size", "=", "8", "hparams", ".", "num_hidden_layers", "=", "4", "hparams", ".", "num_compress_steps", "=", "4", "hparams", ".", "dropout", "=", "0.4", "return", "hparams" ]
Conv autoencoder.
[ "Conv", "autoencoder", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L96-L106
train
Conv autoencoder hparams.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0S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iu2kLpS8s,QOfmzcVJsrp8,tzcpInYwBvYW,iDQ_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o57) + chr(51) + chr(50), 0b1000), ehT0Px3KOsy9(chr(1213 - 1165) + chr(2197 - 2086) + chr(49) + '\x30' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001 + 0o6) + '\064', 50627 - 50619), ehT0Px3KOsy9(chr(48) + '\157' + '\x31', 19075 - 19067), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(797 - 749) + chr(0b1010 + 0o47), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110010) + '\x36', 0o10), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b10101 + 0o36) + '\x36' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11110 + 0o24) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(652 - 541) + chr(0b110101) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(55) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110101 + 0o72) + chr(0b110001) + chr(0b110100) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\067', 47860 - 47852), ehT0Px3KOsy9(chr(675 - 627) + '\x6f' + chr(0b110011) + '\x30' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(2210 - 2162) + chr(1536 - 1425) + chr(0b110011) + chr(55) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + chr(50) + chr(0b110101 + 0o1) + chr(0b1 + 0o61), 0o10), ehT0Px3KOsy9(chr(1184 - 1136) + '\157' + '\061' + chr(0b10010 + 0o43) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(55) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(223 - 175) + chr(111) + chr(0b110001) + chr(0b100110 + 0o21) + chr(0b11 + 0o56), 29914 - 29906), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\064' + chr(1054 - 1001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101100 + 0o103) + chr(2074 - 2024) + chr(0b110010) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(51) + chr(54) + '\064', 0b1000), ehT0Px3KOsy9(chr(208 - 160) + '\x6f' + '\x32' + '\x36' + chr(0b110000), 44693 - 44685), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(3356 - 3245) + '\x33' + '\x32' + chr(0b1101 + 0o46), 6311 - 6303), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + '\062' + '\x33' + chr(1507 - 1454), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b10110 + 0o35) + '\065', 60988 - 60980), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(816 - 765) + '\061' + chr(1504 - 1452), 0o10), ehT0Px3KOsy9('\060' + chr(0b10100 + 0o133) + '\067', 48497 - 48489), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b100111 + 0o110) + chr(51) + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(589 - 478) + chr(0b101000 + 0o17) + chr(2804 - 2750), 8), ehT0Px3KOsy9('\060' + chr(0b110101 + 0o72) + chr(199 - 149) + chr(2841 - 2787), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101111 + 0o4) + chr(51) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10011 + 0o36) + chr(0b110101) + chr(1612 - 1564), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + '\157' + chr(49) + chr(0b110000) + '\x36', 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + '\x31', 8), ehT0Px3KOsy9('\060' + chr(10762 - 10651) + chr(2020 - 1968), 0b1000), ehT0Px3KOsy9('\x30' + chr(1171 - 1060) + chr(50) + chr(54) + chr(479 - 424), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + '\x36' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b10111 + 0o130) + '\x31' + '\x36' + '\062', 46605 - 46597), ehT0Px3KOsy9(chr(1478 - 1430) + chr(0b1101111) + chr(0b11110 + 0o24) + chr(0b100110 + 0o14) + chr(0b101001 + 0o10), 4136 - 4128), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(1699 - 1646) + chr(1853 - 1799), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\065' + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b't'), chr(705 - 605) + chr(3073 - 2972) + '\143' + '\x6f' + chr(6646 - 6546) + chr(0b100100 + 0o101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nY3_1Sb1B_mx(): n4ljua2gi1Pr = RpiVMrfg4zTk() n4ljua2gi1Pr.kXxsZxlIQUSQ[xafqLlk3kkUe(SXOLrMavuUCe(b'3.Lt\xf5\xe5'), chr(0b100011 + 0o101) + chr(0b1100101) + chr(5898 - 5799) + '\x6f' + chr(3094 - 2994) + '\145')(chr(117) + chr(0b1010000 + 0o44) + '\146' + chr(0b101101) + chr(0b11111 + 0o31))] = PuPeNl0CuqOQ.video_bitwise_bottom n4ljua2gi1Pr.qxrVBjeryNEZ[xafqLlk3kkUe(SXOLrMavuUCe(b'3.Lt\xf5\xe5'), chr(100) + chr(0b101010 + 0o73) + chr(0b100011 + 0o100) + chr(111) + chr(0b111000 + 0o54) + chr(2853 - 2752))(chr(0b1110101) + chr(0b1001011 + 0o51) + chr(0b101110 + 0o70) + chr(396 - 351) + chr(56))] = PuPeNl0CuqOQ.video_top n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1823 - 1771) + chr(1517 - 1469) + chr(0b110000), 0b1000) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + '\x31' + chr(0b10 + 0o56), 61434 - 61426) n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9('\x30' + '\157' + chr(52), 8) n4ljua2gi1Pr._y1Py7UE3OKS = ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x34', 8) n4ljua2gi1Pr.ag0mwEgWzjYv = 0.4 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_ae_tiny
def next_frame_ae_tiny(): """Conv autoencoder, tiny set for testing.""" hparams = next_frame_tiny() hparams.bottom["inputs"] = modalities.video_bitwise_bottom hparams.top["inputs"] = modalities.video_top hparams.batch_size = 8 hparams.dropout = 0.4 return hparams
python
def next_frame_ae_tiny(): """Conv autoencoder, tiny set for testing.""" hparams = next_frame_tiny() hparams.bottom["inputs"] = modalities.video_bitwise_bottom hparams.top["inputs"] = modalities.video_top hparams.batch_size = 8 hparams.dropout = 0.4 return hparams
[ "def", "next_frame_ae_tiny", "(", ")", ":", "hparams", "=", "next_frame_tiny", "(", ")", "hparams", ".", "bottom", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_bitwise_bottom", "hparams", ".", "top", "[", "\"inputs\"", "]", "=", "modalities", ".", "video_top", "hparams", ".", "batch_size", "=", "8", "hparams", ".", "dropout", "=", "0.4", "return", "hparams" ]
Conv autoencoder, tiny set for testing.
[ "Conv", "autoencoder", "tiny", "set", "for", "testing", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L110-L117
train
Conv autoencoder tiny set for testing.
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(1110 - 1062) + '\x6f' + chr(50) + chr(0b11110 + 0o25) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + chr(51) + chr(2763 - 2708) + chr(0b11110 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(688 - 640) + chr(12236 - 12125) + chr(0b110011) + '\061' + chr(1286 - 1236), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9('\x30' + chr(8931 - 8820) + chr(0b110011) + '\061' + '\065', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1110 + 0o45) + '\062' + chr(632 - 584), 38196 - 38188), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\x32' + chr(2753 - 2699), 23282 - 23274), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(51) + chr(0b100110 + 0o12), 0b1000), ehT0Px3KOsy9('\060' + chr(0b11100 + 0o123) + chr(0b10110 + 0o33) + '\x31' + chr(50), 42490 - 42482), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11100 + 0o25) + '\x31' + chr(54), 43148 - 43140), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(420 - 369) + '\060' + chr(2462 - 2409), 0b1000), ehT0Px3KOsy9(chr(1253 - 1205) + '\157' + chr(0b110010) + '\x37' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000101 + 0o52) + chr(1459 - 1404), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b10001 + 0o46) + chr(0b100010 + 0o21), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(1995 - 1944) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10248 - 10137) + chr(0b1101 + 0o52) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100011 + 0o17) + chr(50) + chr(53), 10840 - 10832), ehT0Px3KOsy9(chr(2155 - 2107) + chr(111) + '\063' + '\064' + '\x30', 27430 - 27422), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(0b11111 + 0o120) + chr(0b110001) + chr(554 - 504) + chr(53), 0o10), ehT0Px3KOsy9(chr(816 - 768) + chr(0b1101111) + chr(0b10100 + 0o35) + '\x36' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110010 + 0o75) + chr(0b11 + 0o60) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(0b11010 + 0o125) + '\x32' + chr(0b11101 + 0o31) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1 + 0o65) + chr(1385 - 1333), 35520 - 35512), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(49) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5489 - 5378) + '\x33' + '\062' + '\060', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11100 + 0o27) + '\066' + chr(0b1010 + 0o53), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b100101 + 0o16) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\x31', 8), ehT0Px3KOsy9(chr(0b110000) + chr(11251 - 11140) + chr(49) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\067' + '\x32', 1895 - 1887), ehT0Px3KOsy9(chr(737 - 689) + chr(10788 - 10677) + '\063' + chr(55) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + chr(49) + '\064' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(907 - 859) + chr(0b1101111) + '\061' + chr(0b110010) + '\065', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\062' + '\x34', 0o10), ehT0Px3KOsy9(chr(1734 - 1686) + chr(111) + chr(0b1100 + 0o46) + chr(0b110011) + chr(0b110101 + 0o1), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110000 + 0o2) + chr(0b11011 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(0b1011 + 0o46) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\x36' + '\065', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b101011 + 0o6) + chr(52), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(184 - 136) + chr(1004 - 893) + chr(0b101001 + 0o14) + chr(1533 - 1485), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3'), '\x64' + '\x65' + '\x63' + chr(0b1101000 + 0o7) + '\144' + chr(101))(chr(815 - 698) + chr(0b11001 + 0o133) + chr(7159 - 7057) + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def z_s2RevTsF5t(): n4ljua2gi1Pr = nqL4SlqG7opA() n4ljua2gi1Pr.kXxsZxlIQUSQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x95\xba\xd6\xb9\xa3'), chr(0b100110 + 0o76) + '\145' + chr(0b1001000 + 0o33) + chr(0b1101111) + '\x64' + '\145')(chr(13211 - 13094) + chr(8985 - 8869) + '\x66' + '\055' + chr(0b110010 + 0o6))] = PuPeNl0CuqOQ.video_bitwise_bottom n4ljua2gi1Pr.qxrVBjeryNEZ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\x95\xba\xd6\xb9\xa3'), '\x64' + '\x65' + chr(0b1100011) + '\x6f' + chr(7391 - 7291) + '\x65')(chr(0b11 + 0o162) + '\x74' + chr(0b1100110) + chr(45) + chr(0b111000))] = PuPeNl0CuqOQ.video_top n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(2242 - 2194), ord("\x08")) n4ljua2gi1Pr.ag0mwEgWzjYv = 0.4 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_tiny
def next_frame_tiny(): """Tiny for testing.""" hparams = next_frame_basic_deterministic() hparams.hidden_size = 32 hparams.num_hidden_layers = 1 hparams.num_compress_steps = 2 hparams.filter_double_steps = 1 return hparams
python
def next_frame_tiny(): """Tiny for testing.""" hparams = next_frame_basic_deterministic() hparams.hidden_size = 32 hparams.num_hidden_layers = 1 hparams.num_compress_steps = 2 hparams.filter_double_steps = 1 return hparams
[ "def", "next_frame_tiny", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "hidden_size", "=", "32", "hparams", ".", "num_hidden_layers", "=", "1", "hparams", ".", "num_compress_steps", "=", "2", "hparams", ".", "filter_double_steps", "=", "1", "return", "hparams" ]
Tiny for testing.
[ "Tiny", "for", "testing", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L129-L136
train
Tiny 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,sbc9gub6LI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KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\062' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b101111 + 0o100) + chr(0b11001 + 0o31) + '\x36' + chr(0b110010), 25986 - 25978), ehT0Px3KOsy9(chr(2005 - 1957) + chr(11790 - 11679) + chr(0b11101 + 0o25) + chr(320 - 268) + chr(309 - 258), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1010 + 0o47) + chr(0b101101 + 0o10) + chr(810 - 762), 28926 - 28918), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(0b101110 + 0o3) + chr(48), 20643 - 20635), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110100) + chr(2692 - 2638), 59091 - 59083), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b10000 + 0o42) + '\x31' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101101 + 0o2) + chr(2285 - 2234) + '\x30' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + '\061' + '\x30' + chr(0b11111 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101001 + 0o11) + '\061' + chr(1115 - 1065), 0o10), ehT0Px3KOsy9(chr(48) + chr(356 - 245) + chr(0b110011) + chr(53) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + '\x32' + chr(0b110110) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(0b110010) + chr(0b110000) + chr(2398 - 2344), 0b1000), ehT0Px3KOsy9('\060' + chr(11758 - 11647) + '\062' + '\x32' + chr(48), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b101011 + 0o10) + chr(777 - 728) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(53) + chr(2156 - 2106), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\x33' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(111) + '\063' + chr(54), 36824 - 36816), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + '\065' + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\064' + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(9234 - 9123) + chr(0b110001) + '\062' + '\066', 0o10), ehT0Px3KOsy9(chr(229 - 181) + chr(0b1000010 + 0o55) + '\x32' + chr(1611 - 1561) + chr(1000 - 951), 18369 - 18361), ehT0Px3KOsy9(chr(1675 - 1627) + chr(7422 - 7311) + '\061' + '\063' + '\066', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(0b11011 + 0o32) + chr(0b110011), 3666 - 3658), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b110100) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(3892 - 3781) + '\x31' + chr(1841 - 1792) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(5458 - 5347) + chr(0b110010) + '\061' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(50) + chr(952 - 900), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b1010 + 0o55) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1100100 + 0o13) + chr(0b110100) + chr(0b110001 + 0o3), 21000 - 20992), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110100), 35832 - 35824), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(0b110010) + chr(55) + '\x30', 33410 - 33402), ehT0Px3KOsy9(chr(1624 - 1576) + chr(0b1101111) + chr(1006 - 957) + chr(2542 - 2490), 8), ehT0Px3KOsy9('\060' + chr(0b1001110 + 0o41) + '\x31' + '\063' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(469 - 414) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b101010 + 0o105) + chr(0b100000 + 0o21) + chr(0b101000 + 0o13) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(51) + '\x34' + chr(0b101011 + 0o11), 8), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b1011 + 0o52) + chr(1264 - 1211), 0o10), ehT0Px3KOsy9('\060' + chr(2011 - 1900) + '\x31' + chr(584 - 535) + '\x32', 14633 - 14625)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o10) + '\060', 41358 - 41350)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'>'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(0b100010 + 0o102) + '\x65')(chr(117) + '\x74' + '\x66' + chr(0b11 + 0o52) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nqL4SlqG7opA(): n4ljua2gi1Pr = RpiVMrfg4zTk() n4ljua2gi1Pr.qzoyXN3kdhDL = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2397 - 2345) + chr(48), 0b1000) n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100001 + 0o20), ord("\x08")) n4ljua2gi1Pr._y1Py7UE3OKS = ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062', ord("\x08")) n4ljua2gi1Pr.l3Jb92JIYIRX = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49), 8) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_l1
def next_frame_l1(): """Basic conv model with L1 modality.""" hparams = next_frame_basic_deterministic() hparams.loss["targets"] = modalities.video_l1_loss hparams.top["targets"] = modalities.video_l1_top hparams.video_modality_loss_cutoff = 2.4 return hparams
python
def next_frame_l1(): """Basic conv model with L1 modality.""" hparams = next_frame_basic_deterministic() hparams.loss["targets"] = modalities.video_l1_loss hparams.top["targets"] = modalities.video_l1_top hparams.video_modality_loss_cutoff = 2.4 return hparams
[ "def", "next_frame_l1", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "loss", "[", "\"targets\"", "]", "=", "modalities", ".", "video_l1_loss", "hparams", ".", "top", "[", "\"targets\"", "]", "=", "modalities", ".", "video_l1_top", "hparams", ".", "video_modality_loss_cutoff", "=", "2.4", "return", "hparams" ]
Basic conv model with L1 modality.
[ "Basic", "conv", "model", "with", "L1", "modality", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L140-L146
train
Basic conv model with L1 modality.
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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5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b10111 + 0o31) + chr(54), 46747 - 46739), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101000 + 0o12) + '\065' + chr(2371 - 2320), 41536 - 41528), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(49) + chr(0b110011) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(1920 - 1872) + chr(0b1101111) + '\063' + chr(2303 - 2252) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(49) + chr(1313 - 1263), 0b1000), ehT0Px3KOsy9(chr(2067 - 2019) + '\x6f' + chr(0b1101 + 0o45) + chr(0b11111 + 0o24) + chr(0b10001 + 0o41), 0b1000), ehT0Px3KOsy9(chr(1069 - 1021) + chr(8139 - 8028) + '\x33' + chr(177 - 123), 33398 - 33390), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + '\065' + chr(0b11110 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10111 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1001010 + 0o45) + chr(2166 - 2116) + chr(0b10000 + 0o40), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010000 + 0o37) + '\x35' + chr(0b10 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b11000 + 0o127) + chr(0b110011) + chr(0b101111 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(12236 - 12125) + '\x31' + '\x36', 0b1000), ehT0Px3KOsy9('\060' + chr(9319 - 9208) + chr(0b110010) + chr(0b110011) + '\067', 0o10), ehT0Px3KOsy9(chr(1549 - 1501) + '\157' + chr(0b1000 + 0o53) + chr(55) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101010 + 0o10) + chr(0b11111 + 0o23) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(52) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010 + 0o0) + '\067' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + '\157' + '\063' + chr(0b110111) + '\x32', 12693 - 12685), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b101 + 0o53) + chr(1806 - 1758), 0o10), ehT0Px3KOsy9(chr(1003 - 955) + chr(111) + chr(0b110010) + '\x30' + chr(54), 8), ehT0Px3KOsy9('\060' + chr(111) + '\062' + '\066' + chr(52), 63357 - 63349), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110101) + chr(1560 - 1510), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000000 + 0o57) + chr(49) + chr(49) + '\x32', 16301 - 16293), ehT0Px3KOsy9(chr(0b110000) + chr(6630 - 6519) + chr(524 - 473) + chr(48) + '\x35', 65371 - 65363), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b101110 + 0o5), 8), ehT0Px3KOsy9(chr(1956 - 1908) + chr(111) + '\x32' + chr(0b110001) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(0b110010) + '\x35' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1118 - 1070) + chr(7884 - 7773) + chr(49) + chr(0b110100), 46439 - 46431), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b111010 + 0o65) + chr(0b1000 + 0o53) + chr(52) + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100 + 0o55) + '\063' + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(0b110001) + chr(53) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(6691 - 6580) + '\x31' + chr(50) + chr(501 - 449), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(455 - 406) + chr(0b110101) + chr(0b10010 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(9926 - 9815) + chr(51) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(839 - 791) + chr(4605 - 4494) + chr(0b100001 + 0o22) + chr(0b100100 + 0o14) + chr(0b101111 + 0o10), 0b1000), ehT0Px3KOsy9(chr(1233 - 1185) + chr(0b1101111) + chr(0b110001) + chr(0b111 + 0o53) + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2043 - 1992) + '\x35' + chr(0b110101), 52166 - 52158)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(497 - 449) + chr(0b1101111) + chr(0b110101 + 0o0) + chr(0b110000), 48680 - 48672)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8'), chr(0b1100100) + chr(4510 - 4409) + chr(0b110111 + 0o54) + chr(111) + chr(100) + '\145')(chr(0b100101 + 0o120) + chr(4159 - 4043) + chr(2268 - 2166) + '\x2d' + chr(0b10101 + 0o43)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def iWZ7RSsJVeiY(): n4ljua2gi1Pr = RpiVMrfg4zTk() n4ljua2gi1Pr.YpO0BcZ6fMsf[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2\xcav?\xbf\xbe\xe9'), '\144' + '\x65' + chr(1496 - 1397) + '\157' + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(0b100010 + 0o104) + '\055' + '\x38')] = PuPeNl0CuqOQ.video_l1_loss n4ljua2gi1Pr.qxrVBjeryNEZ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2\xcav?\xbf\xbe\xe9'), chr(0b1000110 + 0o36) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + chr(0b1010 + 0o134) + chr(236 - 191) + chr(0b11111 + 0o31))] = PuPeNl0CuqOQ.video_l1_top n4ljua2gi1Pr.EF49vBKJeCZx = 2.4 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_l2
def next_frame_l2(): """Basic conv model with L2 modality.""" hparams = next_frame_basic_deterministic() hparams.loss["targets"] = modalities.video_l2_loss hparams.top["targets"] = modalities.video_l1_top hparams.video_modality_loss_cutoff = 2.4 return hparams
python
def next_frame_l2(): """Basic conv model with L2 modality.""" hparams = next_frame_basic_deterministic() hparams.loss["targets"] = modalities.video_l2_loss hparams.top["targets"] = modalities.video_l1_top hparams.video_modality_loss_cutoff = 2.4 return hparams
[ "def", "next_frame_l2", "(", ")", ":", "hparams", "=", "next_frame_basic_deterministic", "(", ")", "hparams", ".", "loss", "[", "\"targets\"", "]", "=", "modalities", ".", "video_l2_loss", "hparams", ".", "top", "[", "\"targets\"", "]", "=", "modalities", ".", "video_l1_top", "hparams", ".", "video_modality_loss_cutoff", "=", "2.4", "return", "hparams" ]
Basic conv model with L2 modality.
[ "Basic", "conv", "model", "with", "L2", "modality", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L150-L156
train
Basic conv model with L2 modality.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQE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SmY,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(0b101110 + 0o2) + chr(111) + chr(51) + chr(0b101100 + 0o13) + '\062', 0o10), ehT0Px3KOsy9(chr(700 - 652) + chr(0b1011110 + 0o21) + chr(54) + chr(0b101001 + 0o7), 58872 - 58864), ehT0Px3KOsy9('\060' + chr(111) + chr(58 - 9) + chr(54) + '\067', 0b1000), ehT0Px3KOsy9(chr(275 - 227) + '\x6f' + chr(0b100001 + 0o21) + chr(54), 16183 - 16175), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1001001 + 0o46) + chr(0b1010 + 0o53) + '\060', 0o10), ehT0Px3KOsy9('\060' + chr(6874 - 6763) + chr(1056 - 1002) + chr(0b10 + 0o65), 5680 - 5672), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b110101) + chr(404 - 350), 12804 - 12796), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + '\x32' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1074 - 1026) + chr(111) + chr(2203 - 2152) + '\x36' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1138 - 1090) + chr(0b1101111) + chr(0b11111 + 0o24) + chr(0b100101 + 0o14) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(0b1100 + 0o53) + chr(0b110000), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b110110) + chr(0b100000 + 0o20), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8280 - 8169) + chr(51 - 2) + chr(50) + chr(0b10101 + 0o36), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\062' + chr(1447 - 1394), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b110010) + chr(51) + chr(0b101101 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(1980 - 1932) + chr(10086 - 9975) + '\064' + chr(2284 - 2234), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010011 + 0o34) + chr(51) + chr(0b11001 + 0o32) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101011 + 0o7) + chr(0b110011) + chr(1595 - 1541), 27355 - 27347), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101111 + 0o3) + '\067' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x32' + '\x36', 23797 - 23789), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101110 + 0o11) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001) + '\x36' + chr(48), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b110110) + chr(48), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(1726 - 1672) + chr(49), 0b1000), ehT0Px3KOsy9(chr(1436 - 1388) + chr(0b1101111) + '\063' + chr(0b101100 + 0o10) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(115 - 67) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + chr(2538 - 2487) + chr(0b110011) + '\067', 54822 - 54814), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(52), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1336 - 1286) + chr(0b1110 + 0o46) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(1461 - 1413) + chr(111) + chr(0b110011) + chr(54) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1401 - 1352) + '\060' + '\066', 0o10), ehT0Px3KOsy9(chr(2069 - 2021) + chr(7289 - 7178) + chr(0b110111) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101100 + 0o7) + chr(55) + '\067', 16969 - 16961), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2210 - 2161) + chr(1888 - 1833) + chr(802 - 752), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000010 + 0o55) + '\x32' + '\x31' + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101000 + 0o17) + chr(0b100100 + 0o20), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\x30' + '\063', 0o10), ehT0Px3KOsy9(chr(2128 - 2080) + chr(0b1101111) + chr(87 - 37) + chr(0b110011 + 0o4) + chr(1197 - 1145), 0b1000), ehT0Px3KOsy9(chr(1733 - 1685) + chr(111) + '\x35', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b110000), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4'), '\144' + chr(101) + chr(0b111100 + 0o47) + '\157' + '\x64' + chr(101))('\165' + '\x74' + chr(3037 - 2935) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def OIvxeIFceGEN(): n4ljua2gi1Pr = RpiVMrfg4zTk() n4ljua2gi1Pr.YpO0BcZ6fMsf[xafqLlk3kkUe(SXOLrMavuUCe(b'\x8eQ\x05qMC\x1d'), chr(100) + '\145' + chr(0b10101 + 0o116) + chr(0b1000111 + 0o50) + chr(0b1100100) + chr(0b1011100 + 0o11))(chr(117) + '\x74' + '\x66' + chr(45) + chr(0b101000 + 0o20))] = PuPeNl0CuqOQ.video_l2_loss n4ljua2gi1Pr.qxrVBjeryNEZ[xafqLlk3kkUe(SXOLrMavuUCe(b'\x8eQ\x05qMC\x1d'), chr(4519 - 4419) + '\x65' + '\x63' + '\x6f' + chr(0b1000011 + 0o41) + chr(459 - 358))(chr(0b1101000 + 0o15) + chr(0b1110100) + chr(0b1100110) + chr(861 - 816) + chr(0b110110 + 0o2))] = PuPeNl0CuqOQ.video_l1_top n4ljua2gi1Pr.EF49vBKJeCZx = 2.4 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_base_range
def next_frame_base_range(rhp): """Basic tuning grid.""" rhp.set_float("dropout", 0.2, 0.6) rhp.set_discrete("hidden_size", [64, 128, 256]) rhp.set_int("num_compress_steps", 5, 8) rhp.set_discrete("batch_size", [4, 8, 16, 32]) rhp.set_int("num_hidden_layers", 1, 3) rhp.set_int("filter_double_steps", 1, 6) rhp.set_float("learning_rate_constant", 1., 4.) rhp.set_int("learning_rate_warmup_steps", 500, 3000) rhp.set_float("initializer_gain", 0.8, 1.8)
python
def next_frame_base_range(rhp): """Basic tuning grid.""" rhp.set_float("dropout", 0.2, 0.6) rhp.set_discrete("hidden_size", [64, 128, 256]) rhp.set_int("num_compress_steps", 5, 8) rhp.set_discrete("batch_size", [4, 8, 16, 32]) rhp.set_int("num_hidden_layers", 1, 3) rhp.set_int("filter_double_steps", 1, 6) rhp.set_float("learning_rate_constant", 1., 4.) rhp.set_int("learning_rate_warmup_steps", 500, 3000) rhp.set_float("initializer_gain", 0.8, 1.8)
[ "def", "next_frame_base_range", "(", "rhp", ")", ":", "rhp", ".", "set_float", "(", "\"dropout\"", ",", "0.2", ",", "0.6", ")", "rhp", ".", "set_discrete", "(", "\"hidden_size\"", ",", "[", "64", ",", "128", ",", "256", "]", ")", "rhp", ".", "set_int", "(", "\"num_compress_steps\"", ",", "5", ",", "8", ")", "rhp", ".", "set_discrete", "(", "\"batch_size\"", ",", "[", "4", ",", "8", ",", "16", ",", "32", "]", ")", "rhp", ".", "set_int", "(", "\"num_hidden_layers\"", ",", "1", ",", "3", ")", "rhp", ".", "set_int", "(", "\"filter_double_steps\"", ",", "1", ",", "6", ")", "rhp", ".", "set_float", "(", "\"learning_rate_constant\"", ",", "1.", ",", "4.", ")", "rhp", ".", "set_int", "(", "\"learning_rate_warmup_steps\"", ",", "500", ",", "3000", ")", "rhp", ".", "set_float", "(", "\"initializer_gain\"", ",", "0.8", ",", "1.8", ")" ]
Basic tuning grid.
[ "Basic", "tuning", "grid", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L160-L170
train
Bas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wRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(1933 - 1882) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2261 - 2212) + chr(971 - 923) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110000) + chr(2020 - 1968), ord("\x08")), ehT0Px3KOsy9(chr(952 - 904) + chr(0b1001001 + 0o46) + chr(51) + chr(0b10100 + 0o36), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(55) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(2094 - 2041), 47575 - 47567), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + '\x36' + chr(2007 - 1952), 41581 - 41573), ehT0Px3KOsy9(chr(0b110000) + chr(2948 - 2837) + chr(1282 - 1233) + '\067' + '\066', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + chr(50) + '\066' + '\066', 11731 - 11723), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(51) + chr(1255 - 1203) + chr(1789 - 1736), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(403 - 292) + '\x31' + '\x31' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(5743 - 5632) + chr(276 - 226) + '\x34' + chr(0b10 + 0o64), ord("\x08")), ehT0Px3KOsy9(chr(656 - 608) + chr(4777 - 4666) + '\061', 0b1000), ehT0Px3KOsy9(chr(1536 - 1488) + chr(0b1011110 + 0o21) + chr(0b100 + 0o57) + chr(1352 - 1301) + chr(0b10101 + 0o41), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(614 - 564) + chr(0b1100 + 0o51) + chr(0b10001 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\061' + chr(846 - 794), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(49), 35529 - 35521), ehT0Px3KOsy9(chr(2282 - 2234) + chr(8506 - 8395) + '\061' + chr(0b101010 + 0o12) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(50) + '\x31' + chr(2026 - 1973), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + '\x34' + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100110 + 0o13) + chr(0b101100 + 0o13) + '\x36', 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + '\062', 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x36' + '\x31', 828 - 820), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(9628 - 9517) + chr(0b110011) + chr(55) + chr(0b100101 + 0o16), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101010 + 0o5) + '\x33' + chr(48) + '\067', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x31' + chr(0b10101 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + chr(0b100001 + 0o20) + chr(0b110111) + chr(48), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\066' + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2292 - 2243) + chr(0b0 + 0o61) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110100) + chr(1388 - 1335), 8), ehT0Px3KOsy9(chr(2193 - 2145) + chr(0b1101111) + chr(51) + chr(0b11001 + 0o30) + chr(1855 - 1802), 58457 - 58449), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1081 - 1030) + chr(0b101100 + 0o4) + chr(55), 8), ehT0Px3KOsy9('\060' + chr(1950 - 1839) + chr(1704 - 1649) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(0b110011) + '\061' + '\061', 52831 - 52823), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(4058 - 3947) + '\061' + chr(0b110110) + chr(51), 34626 - 34618), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110001) + '\x35', 40633 - 40625), ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b100111 + 0o110) + chr(2147 - 2097) + '\063' + chr(796 - 742), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1537 - 1486) + chr(0b110010) + '\x33', 49599 - 49591), ehT0Px3KOsy9('\x30' + chr(0b1010001 + 0o36) + '\x31', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1701 - 1653) + chr(0b1101111) + chr(0b110101) + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'5'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def A9vtyHomT9_r(IwsgmEzQknPc): xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EYq\x18\x1f\xc2'), '\x64' + chr(0b1100101) + chr(8108 - 8009) + chr(0b101000 + 0o107) + chr(9295 - 9195) + '\145')('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f2+jPh\x03'), '\144' + chr(101) + '\143' + '\157' + chr(0b111000 + 0o54) + chr(101))(chr(1748 - 1631) + '\x74' + chr(0b10000 + 0o126) + chr(45) + '\070'), 0.2, 0.6) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0E[t\x04\x1d\xc4\x80>\xc3'), chr(0b110001 + 0o63) + chr(0b110110 + 0o57) + chr(630 - 531) + chr(0b11111 + 0o120) + chr(100) + chr(7629 - 7528))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b's) ~Zs(\r\xdf\x9f/'), chr(100) + chr(0b110010 + 0o63) + chr(99) + '\x6f' + '\x64' + '\x65')(chr(0b1101 + 0o150) + chr(0b1011110 + 0o26) + chr(0b101 + 0o141) + '\x2d' + '\x38'), [ehT0Px3KOsy9(chr(48) + chr(4588 - 4477) + chr(0b110001) + '\060' + chr(1611 - 1563), 8), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + chr(1721 - 1671) + chr(0b11 + 0o55) + chr(0b101001 + 0o7), 40781 - 40773), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(52) + '\x30' + chr(0b110000), 63208 - 63200)]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EVs\x03'), chr(4289 - 4189) + chr(0b1100101) + '\143' + '\x6f' + '\x64' + chr(101))('\x75' + '\x74' + chr(0b101000 + 0o76) + '\055' + chr(0b110111 + 0o1)))(xafqLlk3kkUe(SXOLrMavuUCe(b'u5)E\\r\x1a\x0e\xc4\x809\xd5^\xad\xdd)i\x15'), '\144' + chr(2788 - 2687) + chr(0b1000110 + 0o35) + chr(111) + chr(0b1011101 + 0o7) + chr(0b1100101))('\165' + '\164' + chr(0b1100101 + 0o1) + '\x2d' + '\x38'), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101101 + 0o10), 0o10), ehT0Px3KOsy9(chr(48) + chr(1975 - 1864) + chr(49) + chr(0b110000), ord("\x08"))) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0E[t\x04\x1d\xc4\x80>\xc3'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b111 + 0o150) + chr(0b100100 + 0o100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b100000 + 0o106) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'y!0yWB\x04\x17\xcc\x80'), '\x64' + chr(990 - 889) + '\x63' + chr(0b110101 + 0o72) + chr(0b1001010 + 0o32) + chr(2545 - 2444))(chr(0b1110101) + '\x74' + chr(102) + chr(45) + chr(0b111000)), [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1011110 + 0o21) + '\061' + chr(301 - 253), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + '\x30', 0o10), ehT0Px3KOsy9(chr(2095 - 2047) + '\x6f' + chr(755 - 703) + '\x30', ord("\x08"))]) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EVs\x03'), chr(8351 - 8251) + chr(7730 - 7629) + chr(4604 - 4505) + chr(111) + '\x64' + '\145')('\165' + '\x74' + chr(0b11000 + 0o116) + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'u5)EWt\x13\x1a\xd3\x8b\x15\xca`\xa7\xcc>j'), chr(5614 - 5514) + chr(0b1010010 + 0o23) + chr(99) + '\157' + chr(0b1010110 + 0o16) + '\145')(chr(0b101 + 0o160) + chr(116) + chr(102) + '\055' + '\070'), ehT0Px3KOsy9(chr(617 - 569) + chr(0b111110 + 0o61) + chr(0b110001), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(51), 53143 - 53135)) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EVs\x03'), '\144' + chr(7491 - 7390) + chr(5626 - 5527) + chr(0b1110 + 0o141) + chr(0b1100100) + chr(697 - 596))(chr(117) + chr(13026 - 12910) + chr(102) + chr(171 - 126) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'})(nZo(\x1a\xd9\x90(\xcad\x81\xda8|\x16\xfe'), chr(8377 - 8277) + '\x65' + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(1071 - 954) + chr(116) + chr(0b1100110) + chr(1837 - 1792) + '\070'), ehT0Px3KOsy9('\060' + chr(6495 - 6384) + chr(0b110001), 8), ehT0Px3KOsy9(chr(189 - 141) + chr(0b1001 + 0o146) + '\x36', 0b1000)) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EYq\x18\x1f\xc2'), chr(0b1100100) + chr(0b10101 + 0o120) + chr(0b1100011) + '\157' + chr(0b101010 + 0o72) + chr(101))('\x75' + chr(0b1101000 + 0o14) + chr(102) + '\x2d' + chr(0b10001 + 0o47)))(xafqLlk3kkUe(SXOLrMavuUCe(b'w%%hQt\x19\x19\xe9\x97+\xd2d\x81\xca#w\x15\xf9\xc1\x10n'), chr(100) + chr(0b11011 + 0o112) + chr(0b1100011) + '\157' + chr(0b111111 + 0o45) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + '\x38'), 1.0, 4.0) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EVs\x03'), chr(100) + '\x65' + '\143' + '\x6f' + '\x64' + chr(101))(chr(11416 - 11299) + chr(0b1110011 + 0o1) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'w%%hQt\x19\x19\xe9\x97+\xd2d\x81\xde-k\x0b\xf8\xd0!i\xc5\x9e\xb7;'), chr(0b1001101 + 0o27) + chr(101) + chr(0b1011111 + 0o4) + chr(0b1011100 + 0o23) + '\x64' + chr(101))(chr(10014 - 9897) + '\164' + chr(0b1100110) + '\x2d' + '\x38'), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x37' + chr(54) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(415 - 367) + chr(111) + chr(0b1100 + 0o51) + '\066' + '\x37' + '\x30', ord("\x08"))) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'h%0EYq\x18\x1f\xc2'), '\x64' + chr(0b1100101) + chr(0b1000001 + 0o42) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + chr(116) + chr(4546 - 4444) + chr(0b100001 + 0o14) + chr(1098 - 1042)))(xafqLlk3kkUe(SXOLrMavuUCe(b'r.-nV|\x1b\x17\xcc\x808\xf9f\xbf\xc0"'), chr(1960 - 1860) + chr(0b1100101) + chr(1209 - 1110) + chr(1975 - 1864) + chr(0b1001011 + 0o31) + '\x65')(chr(0b1110101) + chr(0b1001111 + 0o45) + chr(6553 - 6451) + '\055' + chr(1342 - 1286)), 0.8, 1.8)
tensorflow/tensor2tensor
tensor2tensor/models/video/basic_deterministic_params.py
next_frame_ae_range
def next_frame_ae_range(rhp): """Autoencoder world model tuning grid.""" rhp.set_float("dropout", 0.3, 0.5) rhp.set_int("num_compress_steps", 1, 3) rhp.set_int("num_hidden_layers", 2, 6) rhp.set_float("learning_rate_constant", 1., 2.) rhp.set_float("initializer_gain", 0.8, 1.5) rhp.set_int("filter_double_steps", 2, 3)
python
def next_frame_ae_range(rhp): """Autoencoder world model tuning grid.""" rhp.set_float("dropout", 0.3, 0.5) rhp.set_int("num_compress_steps", 1, 3) rhp.set_int("num_hidden_layers", 2, 6) rhp.set_float("learning_rate_constant", 1., 2.) rhp.set_float("initializer_gain", 0.8, 1.5) rhp.set_int("filter_double_steps", 2, 3)
[ "def", "next_frame_ae_range", "(", "rhp", ")", ":", "rhp", ".", "set_float", "(", "\"dropout\"", ",", "0.3", ",", "0.5", ")", "rhp", ".", "set_int", "(", "\"num_compress_steps\"", ",", "1", ",", "3", ")", "rhp", ".", "set_int", "(", "\"num_hidden_layers\"", ",", "2", ",", "6", ")", "rhp", ".", "set_float", "(", "\"learning_rate_constant\"", ",", "1.", ",", "2.", ")", "rhp", ".", "set_float", "(", "\"initializer_gain\"", ",", "0.8", ",", "1.5", ")", "rhp", ".", "set_int", "(", "\"filter_double_steps\"", ",", "2", ",", "3", ")" ]
Autoencoder world model tuning grid.
[ "Autoencoder", "world", "model", "tuning", "grid", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/basic_deterministic_params.py#L194-L201
train
Autoencoder world model tuning grid.
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,SBR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SaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\x33' + chr(0b11011 + 0o30) + chr(1790 - 1742), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(121 - 10) + chr(51) + chr(0b10111 + 0o35) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(397 - 349) + chr(6997 - 6886) + chr(0b110011) + '\x36' + chr(1283 - 1235), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100110 + 0o13) + '\x32' + chr(55), 0b1000), ehT0Px3KOsy9(chr(806 - 758) + chr(0b1101111) + chr(50) + '\x31' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2486 - 2375) + '\061' + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(1608 - 1558) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(1810 - 1762) + '\x6f' + chr(50) + '\063' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(715 - 662) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2288 - 2177) + chr(51) + chr(0b110011) + chr(54), 54211 - 54203), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b100011 + 0o114) + '\x31' + chr(0b110100) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(51) + chr(1773 - 1724), 26219 - 26211), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(670 - 619) + chr(51) + chr(51), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6699 - 6588) + chr(141 - 92) + '\x31' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + chr(1270 - 1219) + chr(381 - 331) + chr(892 - 837), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2552 - 2441) + chr(0b1001 + 0o52) + '\x35' + '\065', 37506 - 37498), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\061' + '\062' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\066' + chr(1017 - 967), 60048 - 60040), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11111 + 0o24) + '\x32' + chr(2228 - 2176), ord("\x08")), ehT0Px3KOsy9(chr(1497 - 1449) + chr(0b1101111) + '\061' + '\x33' + chr(1592 - 1539), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + chr(0b101100 + 0o7) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(0b10000 + 0o42) + chr(0b110100) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\061' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110101 + 0o72) + chr(0b110011) + chr(0b100011 + 0o22) + chr(966 - 913), 8), ehT0Px3KOsy9(chr(1682 - 1634) + chr(111) + chr(2088 - 2037) + chr(0b110010) + chr(0b101010 + 0o15), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b11100 + 0o26) + chr(1586 - 1531), ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(51) + chr(0b11010 + 0o26) + '\x34', 60206 - 60198), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b10100 + 0o41) + chr(2077 - 2022), 16913 - 16905), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + '\062' + '\064' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + '\063' + chr(322 - 271) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b110110) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(2113 - 2064) + '\061' + chr(0b101010 + 0o15), 63632 - 63624), ehT0Px3KOsy9(chr(48) + chr(0b101011 + 0o104) + chr(51) + chr(1946 - 1892) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + chr(49) + chr(0b110011) + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + '\x32' + chr(1945 - 1897) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011100 + 0o23) + '\x31' + chr(48) + chr(53), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(197 - 149) + chr(111) + chr(664 - 611) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x03'), chr(100) + chr(101) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\165' + '\x74' + chr(0b1001010 + 0o34) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VaOZVJ5DZeWb(IwsgmEzQknPc): xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf1\xe6g3\xe9'), chr(100) + chr(9472 - 9371) + chr(0b1100011) + chr(0b1101111) + chr(0b100101 + 0o77) + chr(370 - 269))('\165' + chr(2082 - 1966) + chr(102) + '\x2d' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'I\xaa\x8a\x808\xff|'), chr(100) + chr(0b101011 + 0o72) + chr(6096 - 5997) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100 + 0o132) + chr(859 - 814) + '\070'), 0.3, 0.5) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf>\xe4|'), '\144' + chr(0b1100101) + chr(0b110110 + 0o55) + chr(5233 - 5122) + chr(100) + chr(0b1100100 + 0o1))('\x75' + chr(0b1110011 + 0o1) + '\146' + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'C\xad\x88\xaf4\xe5e"\xefL\xad\x13\xc6\xa8=\xb2\x9d#'), chr(4928 - 4828) + chr(6978 - 6877) + chr(1740 - 1641) + chr(111) + chr(3218 - 3118) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(0b11000 + 0o25) + chr(0b11100 + 0o34)), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101001 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(7521 - 7410) + chr(0b101111 + 0o4), 0b1000)) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf>\xe4|'), chr(100) + chr(8377 - 8276) + chr(0b1100011) + '\157' + chr(0b110100 + 0o60) + chr(101))(chr(117) + '\164' + chr(102) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'C\xad\x88\xaf?\xe3l6\xf8G\x81\x0c\xf8\xa2,\xa5\x9e'), '\144' + '\x65' + chr(1389 - 1290) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(10502 - 10385) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(2582 - 2526)), ehT0Px3KOsy9(chr(48) + chr(0b1001000 + 0o47) + chr(0b110010 + 0o0), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + chr(0b1 + 0o65), 0b1000)) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf1\xe6g3\xe9'), '\x64' + chr(0b1100101) + chr(1596 - 1497) + chr(0b11100 + 0o123) + '\x64' + chr(0b1100101))('\x75' + chr(0b11100 + 0o130) + chr(0b101011 + 0o73) + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'A\xbd\x84\x829\xe3f5\xc2[\xbf\x14\xfc\x84*\xb8\x83#\x86\xb53P'), '\x64' + '\x65' + chr(0b1100011) + chr(9266 - 9155) + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(0b11111 + 0o16) + chr(0b111000)), 1.0, 2.0) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf1\xe6g3\xe9'), chr(2938 - 2838) + '\145' + chr(0b1100011) + '\157' + chr(100) + chr(101))(chr(0b1110101) + '\x74' + '\146' + chr(957 - 912) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb6\x8c\x84>\xebd;\xe7L\xac?\xfe\xba \xb9'), chr(2767 - 2667) + '\x65' + '\x63' + '\157' + '\x64' + chr(0b1001000 + 0o35))(chr(117) + chr(0b1000001 + 0o63) + chr(5662 - 5560) + chr(0b101101) + chr(2827 - 2771)), 0.8, 1.5) xafqLlk3kkUe(IwsgmEzQknPc, xafqLlk3kkUe(SXOLrMavuUCe(b'^\xbd\x91\xaf>\xe4|'), chr(3935 - 3835) + '\x65' + chr(99) + '\157' + chr(100) + '\x65')(chr(117) + '\164' + '\x66' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'K\xb1\x89\x842\xf8W6\xf2\\\xbc\x0c\xfc\x84:\xa3\x88 \x81'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1001 + 0o133) + chr(2144 - 2043))('\x75' + chr(12569 - 12453) + '\146' + chr(0b101101) + '\070'), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010 + 0o0), 8), ehT0Px3KOsy9('\x30' + chr(6239 - 6128) + '\x33', 8))
tensorflow/tensor2tensor
tensor2tensor/models/research/multiquery_paper.py
mqp_lm1b_base
def mqp_lm1b_base(): """Series of architectures for language modeling.""" hparams = mtf_transformer2.mtf_unitransformer_base() hparams.d_model = 1024 hparams.max_length = 256 hparams.batch_size = 256 # Parameters for my_layer_stack() hparams.num_hidden_layers = 6 hparams.d_ff = 8192 hparams.d_kv = 128 hparams.num_heads = 8 hparams.learning_rate_decay_steps = 13600 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:32" return hparams
python
def mqp_lm1b_base(): """Series of architectures for language modeling.""" hparams = mtf_transformer2.mtf_unitransformer_base() hparams.d_model = 1024 hparams.max_length = 256 hparams.batch_size = 256 # Parameters for my_layer_stack() hparams.num_hidden_layers = 6 hparams.d_ff = 8192 hparams.d_kv = 128 hparams.num_heads = 8 hparams.learning_rate_decay_steps = 13600 hparams.layout = "batch:batch;vocab:model;d_ff:model;heads:model" hparams.mesh_shape = "batch:32" return hparams
[ "def", "mqp_lm1b_base", "(", ")", ":", "hparams", "=", "mtf_transformer2", ".", "mtf_unitransformer_base", "(", ")", "hparams", ".", "d_model", "=", "1024", "hparams", ".", "max_length", "=", "256", "hparams", ".", "batch_size", "=", "256", "# Parameters for my_layer_stack()", "hparams", ".", "num_hidden_layers", "=", "6", "hparams", ".", "d_ff", "=", "8192", "hparams", ".", "d_kv", "=", "128", "hparams", ".", "num_heads", "=", "8", "hparams", ".", "learning_rate_decay_steps", "=", "13600", "hparams", ".", "layout", "=", "\"batch:batch;vocab:model;d_ff:model;heads:model\"", "hparams", ".", "mesh_shape", "=", "\"batch:32\"", "return", "hparams" ]
Series of architectures for language modeling.
[ "Series", "of", "architectures", "for", "language", "modeling", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31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LRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(10176 - 10065) + chr(1542 - 1492) + chr(0b100000 + 0o21) + chr(0b10011 + 0o44), 0b1000), ehT0Px3KOsy9(chr(845 - 797) + '\157' + '\063' + chr(0b110000) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(52) + chr(0b10010 + 0o44), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b101000 + 0o107) + chr(0b110011) + chr(0b11011 + 0o27) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(54) + chr(0b1010 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(1267 - 1219) + chr(0b1000010 + 0o55) + '\062' + chr(1704 - 1652) + chr(1626 - 1571), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b110010) + '\x34', 58508 - 58500), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(945 - 896) + chr(0b11101 + 0o26), 0o10), ehT0Px3KOsy9('\x30' + chr(3435 - 3324) + '\061' + chr(0b110011) + chr(51), 43472 - 43464), ehT0Px3KOsy9(chr(0b110000) + chr(11826 - 11715) + '\062' + '\x35' + '\061', 51921 - 51913), ehT0Px3KOsy9(chr(596 - 548) + '\157' + chr(872 - 822) + chr(0b11101 + 0o24) + chr(0b1010 + 0o54), 43290 - 43282), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110100) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100011 + 0o20) + '\065' + chr(974 - 922), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(51) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1444 - 1393) + chr(1350 - 1298) + chr(0b100001 + 0o24), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(689 - 638) + '\061' + chr(2068 - 2020), 4034 - 4026), ehT0Px3KOsy9(chr(48) + chr(7025 - 6914) + chr(0b10000 + 0o47) + chr(0b10010 + 0o37), 0o10), ehT0Px3KOsy9(chr(310 - 262) + '\157' + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(2817 - 2763) + chr(0b1010 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10000 + 0o43) + '\x32' + chr(1078 - 1026), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(1169 - 1120) + chr(0b11011 + 0o34) + chr(53), 0b1000), ehT0Px3KOsy9(chr(2025 - 1977) + '\x6f' + chr(1290 - 1241) + '\065' + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9792 - 9681) + '\062' + chr(50) + '\x35', 0b1000), ehT0Px3KOsy9(chr(1941 - 1893) + chr(111) + '\x33' + chr(0b1000 + 0o57) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1483 - 1435) + chr(0b1101000 + 0o7) + '\062' + chr(1422 - 1367), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(54) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + chr(0b10111 + 0o32) + chr(0b11100 + 0o26), 41002 - 40994), ehT0Px3KOsy9(chr(1670 - 1622) + chr(0b1101111) + chr(1268 - 1217) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1001111 + 0o40) + '\062' + '\066' + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(2141 - 2090) + chr(0b101001 + 0o15), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b100001 + 0o21) + '\064', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(48) + chr(1469 - 1414), 47498 - 47490), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000000 + 0o57) + '\x31' + chr(0b110000 + 0o5) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(6609 - 6498) + chr(0b11001 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(2219 - 2170) + '\x33' + '\x31', 0b1000), ehT0Px3KOsy9(chr(2297 - 2249) + chr(0b100100 + 0o113) + '\x32' + chr(0b110111) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(111) + chr(1297 - 1248) + chr(0b110011) + '\061', 8), ehT0Px3KOsy9(chr(742 - 694) + chr(0b11101 + 0o122) + '\063' + chr(0b110100) + '\065', 8), ehT0Px3KOsy9(chr(159 - 111) + chr(0b101010 + 0o105) + chr(0b110001) + chr(0b110100) + '\x37', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(111) + chr(2781 - 2728) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1'), '\144' + '\145' + chr(9787 - 9688) + '\x6f' + '\x64' + chr(0b1000 + 0o135))(chr(0b1010 + 0o153) + '\x74' + '\x66' + chr(0b1000 + 0o45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def hjaU78tuaXhy(): n4ljua2gi1Pr = KRlzou_1VboM.mtf_unitransformer_base() n4ljua2gi1Pr.dHIk6a7HYqLO = ehT0Px3KOsy9(chr(48) + chr(4947 - 4836) + chr(0b110010) + chr(0b100100 + 0o14) + '\060' + '\x30', 0o10) n4ljua2gi1Pr._o7pVXAdOCRy = ehT0Px3KOsy9('\060' + '\157' + '\064' + chr(0b110000) + chr(0b110000), ord("\x08")) n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b100001 + 0o23) + '\060' + chr(0b110000), 8) n4ljua2gi1Pr.jZh5_pLUoOoZ = ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x36', 0o10) n4ljua2gi1Pr.EpyOHjLLhjxL = ehT0Px3KOsy9('\x30' + chr(5830 - 5719) + '\x32' + chr(1643 - 1595) + chr(48) + chr(1536 - 1488) + '\060', 29005 - 28997) n4ljua2gi1Pr.cboJxztkwgnV = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010 + 0o0) + chr(48) + chr(48), 10757 - 10749) n4ljua2gi1Pr.vRVqPOZ1hUG7 = ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(1356 - 1308), 0o10) n4ljua2gi1Pr.YBAB1XyoxOc5 = ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(112 - 62) + chr(52) + chr(0b110100) + '\060', ord("\x08")) n4ljua2gi1Pr.HDH7OEwZuDah = xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\xa2\x12\xb4\x1a\x9d\xb6j/\xca\xe6X\x9a\xf2\x86\xa9[>\x1b\xbb\x19\x0f\xf9\xc0s\xeeil%\xdf\xb1\xb0\xe2\x02>1\xdf8\x81\x14\xb5\xae\t\xb3\x17\xcb'), chr(0b1100100) + chr(4924 - 4823) + '\143' + chr(455 - 344) + chr(0b1100100) + chr(0b1001 + 0o134))(chr(0b1110101) + chr(0b1010111 + 0o35) + chr(102) + '\x2d' + chr(1424 - 1368)) n4ljua2gi1Pr.GnGMnRt7o0q6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xed\xa2\x12\xb4\x1a\x9d\xe79'), '\x64' + chr(0b1100101) + chr(9572 - 9473) + chr(0b1101111) + '\x64' + chr(6054 - 5953))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b1011 + 0o42) + chr(0b111000)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_free.py
initialize_env_specs
def initialize_env_specs(hparams, env_problem_name): """Initializes env_specs using the appropriate env.""" if env_problem_name: env = registry.env_problem(env_problem_name, batch_size=hparams.batch_size) else: env = rl_utils.setup_env(hparams, hparams.batch_size, hparams.eval_max_num_noops, hparams.rl_env_max_episode_steps, env_name=hparams.rl_env_name) env.start_new_epoch(0) return rl.make_real_env_fn(env)
python
def initialize_env_specs(hparams, env_problem_name): """Initializes env_specs using the appropriate env.""" if env_problem_name: env = registry.env_problem(env_problem_name, batch_size=hparams.batch_size) else: env = rl_utils.setup_env(hparams, hparams.batch_size, hparams.eval_max_num_noops, hparams.rl_env_max_episode_steps, env_name=hparams.rl_env_name) env.start_new_epoch(0) return rl.make_real_env_fn(env)
[ "def", "initialize_env_specs", "(", "hparams", ",", "env_problem_name", ")", ":", "if", "env_problem_name", ":", "env", "=", "registry", ".", "env_problem", "(", "env_problem_name", ",", "batch_size", "=", "hparams", ".", "batch_size", ")", "else", ":", "env", "=", "rl_utils", ".", "setup_env", "(", "hparams", ",", "hparams", ".", "batch_size", ",", "hparams", ".", "eval_max_num_noops", ",", "hparams", ".", "rl_env_max_episode_steps", ",", "env_name", "=", "hparams", ".", "rl_env_name", ")", "env", ".", "start_new_epoch", "(", "0", ")", "return", "rl", ".", "make_real_env_fn", "(", "env", ")" ]
Initializes env_specs using the appropriate env.
[ "Initializes", "env_specs", "using", "the", "appropriate", "env", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_free.py#L68-L79
train
Initializes env_specs using the appropriate env.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6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Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(2446 - 2396) + '\x31' + '\x32', 55242 - 55234), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + chr(50) + chr(0b110011) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100110 + 0o14) + chr(0b1001 + 0o55) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + chr(878 - 824) + chr(55), 26579 - 26571), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(10829 - 10718) + chr(49) + chr(55) + '\x33', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(52) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b11011 + 0o124) + chr(50) + chr(49) + chr(2590 - 2536), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\061' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000100 + 0o53) + chr(1811 - 1759) + chr(0b100111 + 0o11), 30633 - 30625), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x36' + chr(968 - 914), 33672 - 33664), ehT0Px3KOsy9(chr(48) + chr(0b1100000 + 0o17) + '\x37' + '\065', 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(9065 - 8954) + '\x33' + chr(213 - 160) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x32' + chr(0b1101 + 0o47) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100010 + 0o115) + chr(0b11001 + 0o31) + chr(0b101000 + 0o16) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b10001 + 0o44) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(1286 - 1238) + '\x6f' + '\x32' + chr(54) + chr(0b110000), 2803 - 2795), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + '\x33' + '\x35' + chr(48), 0b1000), ehT0Px3KOsy9(chr(1135 - 1087) + chr(0b111010 + 0o65) + '\x33' + chr(49) + chr(0b1011 + 0o54), 6505 - 6497), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1011100 + 0o23) + '\x31' + chr(0b110111) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10100 + 0o36) + chr(0b110100) + chr(0b1111 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9088 - 8977) + chr(0b110011) + chr(0b1010 + 0o55) + chr(54), 54842 - 54834), ehT0Px3KOsy9(chr(1412 - 1364) + '\x6f' + '\x32' + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(314 - 266) + chr(7518 - 7407) + '\x33' + '\060' + chr(1208 - 1155), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(967 - 918) + chr(0b10000 + 0o45) + chr(0b101100 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + chr(7269 - 7158) + chr(0b110101) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + '\x33' + chr(781 - 733) + '\065', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(484 - 435) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110101 + 0o72) + chr(0b101101 + 0o6) + chr(2186 - 2138) + chr(622 - 568), 16927 - 16919), ehT0Px3KOsy9('\x30' + chr(3535 - 3424) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(0b110010) + chr(50) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(2606 - 2495) + chr(0b110011) + chr(1745 - 1694) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\065' + '\x34', 63999 - 63991), ehT0Px3KOsy9('\060' + '\x6f' + chr(53) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101101 + 0o2) + chr(2322 - 2268) + chr(2865 - 2811), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b101100 + 0o103) + chr(1310 - 1261) + chr(0b10111 + 0o40) + chr(51), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(51) + chr(49) + chr(0b100110 + 0o14), 0o10), ehT0Px3KOsy9(chr(1437 - 1389) + '\x6f' + chr(0b11110 + 0o23) + '\x34' + chr(307 - 257), ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(111) + chr(0b11 + 0o62) + '\064', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011010 + 0o25) + '\x31' + chr(0b101110 + 0o4) + chr(51), 12354 - 12346)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + chr(53) + '\x30', 59425 - 59417)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4'), chr(0b1100100) + chr(2040 - 1939) + chr(99) + chr(111) + '\144' + chr(101))('\165' + chr(1080 - 964) + chr(0b1100110) + chr(1777 - 1732) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ftKqvGsyjDGo(n4ljua2gi1Pr, SQOj28X9N9zs): if SQOj28X9N9zs: xzsHIGfR8Ip5 = U24OBsRcVqkJ.env_problem(SQOj28X9N9zs, batch_size=n4ljua2gi1Pr.ix9dZyeAmUxY) else: xzsHIGfR8Ip5 = dS9nMkNNnOq2.setup_env(n4ljua2gi1Pr, n4ljua2gi1Pr.ix9dZyeAmUxY, n4ljua2gi1Pr.eval_max_num_noops, n4ljua2gi1Pr.rl_env_max_episode_steps, env_name=n4ljua2gi1Pr.rl_env_name) xafqLlk3kkUe(xzsHIGfR8Ip5, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xe9\xd2E\x0f\xbc\xe0\xecWESM\x84\xc1\xdd'), '\144' + chr(0b101011 + 0o72) + '\143' + '\157' + chr(100) + chr(0b1000111 + 0o36))('\165' + chr(12802 - 12686) + chr(8529 - 8427) + chr(0b10000 + 0o35) + chr(0b111000)))(ehT0Px3KOsy9('\x30' + '\157' + chr(225 - 177), 49043 - 49035)) return xafqLlk3kkUe(iwzD7IVqUS5S, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7\xfc\xd8R$\x91\xeb\xe8LESS\x9d\xfd\xd3\x81'), chr(0b1010110 + 0o16) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(8180 - 8063) + chr(0b110101 + 0o77) + chr(0b11011 + 0o113) + chr(0b101101) + chr(146 - 90)))(xzsHIGfR8Ip5)
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_free.py
train
def train(hparams, output_dir, env_problem_name, report_fn=None): """Train.""" env_fn = initialize_env_specs(hparams, env_problem_name) tf.logging.vlog(1, "HParams in trainer_model_free.train : %s", misc_utils.pprint_hparams(hparams)) tf.logging.vlog(1, "Using hparams.base_algo: %s", hparams.base_algo) learner = rl_utils.LEARNERS[hparams.base_algo]( hparams.frame_stack_size, output_dir, output_dir, total_num_epochs=1 ) policy_hparams = trainer_lib.create_hparams(hparams.base_algo_params) rl_utils.update_hparams_from_hparams( policy_hparams, hparams, hparams.base_algo + "_" ) tf.logging.vlog(1, "Policy HParams : %s", misc_utils.pprint_hparams(policy_hparams)) # TODO(konradczechowski): remove base_algo dependance, when evaluation method # will be decided if hparams.base_algo == "ppo": total_steps = policy_hparams.epochs_num tf.logging.vlog(2, "total_steps: %d", total_steps) eval_every_epochs = policy_hparams.eval_every_epochs tf.logging.vlog(2, "eval_every_epochs: %d", eval_every_epochs) if eval_every_epochs == 0: eval_every_epochs = total_steps policy_hparams.eval_every_epochs = 0 metric_name = rl_utils.get_metric_name( sampling_temp=hparams.eval_sampling_temps[0], max_num_noops=hparams.eval_max_num_noops, clipped=False ) tf.logging.vlog(1, "metric_name: %s", metric_name) eval_metrics_dir = os.path.join(output_dir, "eval_metrics") eval_metrics_dir = os.path.expanduser(eval_metrics_dir) tf.gfile.MakeDirs(eval_metrics_dir) eval_metrics_writer = tf.summary.FileWriter(eval_metrics_dir) def evaluate_on_new_model(model_dir_path): global step eval_metrics = rl_utils.evaluate_all_configs(hparams, model_dir_path) tf.logging.info( "Agent eval metrics:\n{}".format(pprint.pformat(eval_metrics))) rl_utils.summarize_metrics(eval_metrics_writer, eval_metrics, step) if report_fn: report_fn(eval_metrics[metric_name], step) step += 1 policy_hparams.epochs_num = total_steps policy_hparams.save_models_every_epochs = eval_every_epochs else: def evaluate_on_new_model(model_dir_path): del model_dir_path raise NotImplementedError( "This function is currently implemented only for ppo") learner.train(env_fn, policy_hparams, simulated=False, save_continuously=True, epoch=0, model_save_fn=evaluate_on_new_model)
python
def train(hparams, output_dir, env_problem_name, report_fn=None): """Train.""" env_fn = initialize_env_specs(hparams, env_problem_name) tf.logging.vlog(1, "HParams in trainer_model_free.train : %s", misc_utils.pprint_hparams(hparams)) tf.logging.vlog(1, "Using hparams.base_algo: %s", hparams.base_algo) learner = rl_utils.LEARNERS[hparams.base_algo]( hparams.frame_stack_size, output_dir, output_dir, total_num_epochs=1 ) policy_hparams = trainer_lib.create_hparams(hparams.base_algo_params) rl_utils.update_hparams_from_hparams( policy_hparams, hparams, hparams.base_algo + "_" ) tf.logging.vlog(1, "Policy HParams : %s", misc_utils.pprint_hparams(policy_hparams)) # TODO(konradczechowski): remove base_algo dependance, when evaluation method # will be decided if hparams.base_algo == "ppo": total_steps = policy_hparams.epochs_num tf.logging.vlog(2, "total_steps: %d", total_steps) eval_every_epochs = policy_hparams.eval_every_epochs tf.logging.vlog(2, "eval_every_epochs: %d", eval_every_epochs) if eval_every_epochs == 0: eval_every_epochs = total_steps policy_hparams.eval_every_epochs = 0 metric_name = rl_utils.get_metric_name( sampling_temp=hparams.eval_sampling_temps[0], max_num_noops=hparams.eval_max_num_noops, clipped=False ) tf.logging.vlog(1, "metric_name: %s", metric_name) eval_metrics_dir = os.path.join(output_dir, "eval_metrics") eval_metrics_dir = os.path.expanduser(eval_metrics_dir) tf.gfile.MakeDirs(eval_metrics_dir) eval_metrics_writer = tf.summary.FileWriter(eval_metrics_dir) def evaluate_on_new_model(model_dir_path): global step eval_metrics = rl_utils.evaluate_all_configs(hparams, model_dir_path) tf.logging.info( "Agent eval metrics:\n{}".format(pprint.pformat(eval_metrics))) rl_utils.summarize_metrics(eval_metrics_writer, eval_metrics, step) if report_fn: report_fn(eval_metrics[metric_name], step) step += 1 policy_hparams.epochs_num = total_steps policy_hparams.save_models_every_epochs = eval_every_epochs else: def evaluate_on_new_model(model_dir_path): del model_dir_path raise NotImplementedError( "This function is currently implemented only for ppo") learner.train(env_fn, policy_hparams, simulated=False, save_continuously=True, epoch=0, model_save_fn=evaluate_on_new_model)
[ "def", "train", "(", "hparams", ",", "output_dir", ",", "env_problem_name", ",", "report_fn", "=", "None", ")", ":", "env_fn", "=", "initialize_env_specs", "(", "hparams", ",", "env_problem_name", ")", "tf", ".", "logging", ".", "vlog", "(", "1", ",", "\"HParams in trainer_model_free.train : %s\"", ",", "misc_utils", ".", "pprint_hparams", "(", "hparams", ")", ")", "tf", ".", "logging", ".", "vlog", "(", "1", ",", "\"Using hparams.base_algo: %s\"", ",", "hparams", ".", "base_algo", ")", "learner", "=", "rl_utils", ".", "LEARNERS", "[", "hparams", ".", "base_algo", "]", "(", "hparams", ".", "frame_stack_size", ",", "output_dir", ",", "output_dir", ",", "total_num_epochs", "=", "1", ")", "policy_hparams", "=", "trainer_lib", ".", "create_hparams", "(", "hparams", ".", "base_algo_params", ")", "rl_utils", ".", "update_hparams_from_hparams", "(", "policy_hparams", ",", "hparams", ",", "hparams", ".", "base_algo", "+", "\"_\"", ")", "tf", ".", "logging", ".", "vlog", "(", "1", ",", "\"Policy HParams : %s\"", ",", "misc_utils", ".", "pprint_hparams", "(", "policy_hparams", ")", ")", "# TODO(konradczechowski): remove base_algo dependance, when evaluation method", "# will be decided", "if", "hparams", ".", "base_algo", "==", "\"ppo\"", ":", "total_steps", "=", "policy_hparams", ".", "epochs_num", "tf", ".", "logging", ".", "vlog", "(", "2", ",", "\"total_steps: %d\"", ",", "total_steps", ")", "eval_every_epochs", "=", "policy_hparams", ".", "eval_every_epochs", "tf", ".", "logging", ".", "vlog", "(", "2", ",", "\"eval_every_epochs: %d\"", ",", "eval_every_epochs", ")", "if", "eval_every_epochs", "==", "0", ":", "eval_every_epochs", "=", "total_steps", "policy_hparams", ".", "eval_every_epochs", "=", "0", "metric_name", "=", "rl_utils", ".", "get_metric_name", "(", "sampling_temp", "=", "hparams", ".", "eval_sampling_temps", "[", "0", "]", ",", "max_num_noops", "=", "hparams", ".", "eval_max_num_noops", ",", "clipped", "=", "False", ")", "tf", ".", "logging", ".", "vlog", "(", "1", ",", "\"metric_name: %s\"", ",", "metric_name", ")", "eval_metrics_dir", "=", "os", ".", "path", ".", "join", "(", "output_dir", ",", "\"eval_metrics\"", ")", "eval_metrics_dir", "=", "os", ".", "path", ".", "expanduser", "(", "eval_metrics_dir", ")", "tf", ".", "gfile", ".", "MakeDirs", "(", "eval_metrics_dir", ")", "eval_metrics_writer", "=", "tf", ".", "summary", ".", "FileWriter", "(", "eval_metrics_dir", ")", "def", "evaluate_on_new_model", "(", "model_dir_path", ")", ":", "global", "step", "eval_metrics", "=", "rl_utils", ".", "evaluate_all_configs", "(", "hparams", ",", "model_dir_path", ")", "tf", ".", "logging", ".", "info", "(", "\"Agent eval metrics:\\n{}\"", ".", "format", "(", "pprint", ".", "pformat", "(", "eval_metrics", ")", ")", ")", "rl_utils", ".", "summarize_metrics", "(", "eval_metrics_writer", ",", "eval_metrics", ",", "step", ")", "if", "report_fn", ":", "report_fn", "(", "eval_metrics", "[", "metric_name", "]", ",", "step", ")", "step", "+=", "1", "policy_hparams", ".", "epochs_num", "=", "total_steps", "policy_hparams", ".", "save_models_every_epochs", "=", "eval_every_epochs", "else", ":", "def", "evaluate_on_new_model", "(", "model_dir_path", ")", ":", "del", "model_dir_path", "raise", "NotImplementedError", "(", "\"This function is currently implemented only for ppo\"", ")", "learner", ".", "train", "(", "env_fn", ",", "policy_hparams", ",", "simulated", "=", "False", ",", "save_continuously", "=", "True", ",", "epoch", "=", "0", ",", "model_save_fn", "=", "evaluate_on_new_model", ")" ]
Train.
[ "Train", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_free.py#L85-L153
train
Train the model using 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,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEOh2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myeWBmUpv,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(0b10011 + 0o35), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(142 - 93) + '\x31' + chr(0b10000 + 0o44), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(48), 8), ehT0Px3KOsy9(chr(1889 - 1841) + chr(11419 - 11308) + '\061' + '\x36' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(538 - 490) + chr(111) + '\x31' + chr(0b1010 + 0o51) + chr(951 - 900), ord("\x08")), ehT0Px3KOsy9(chr(636 - 588) + chr(0b1101111) + chr(0b110010) + '\064' + '\x37', 0b1000), ehT0Px3KOsy9(chr(349 - 301) + chr(0b100010 + 0o115) + chr(0b101010 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + '\067' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + chr(0b110011) + '\065' + chr(1218 - 1163), 36962 - 36954), ehT0Px3KOsy9('\060' + '\157' + '\065' + chr(0b0 + 0o67), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b10111 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(7865 - 7754) + chr(0b110010) + chr(48) + chr(0b110111), 9091 - 9083), ehT0Px3KOsy9('\x30' + chr(4794 - 4683) + '\063' + '\063' + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b100000 + 0o117) + chr(49) + chr(0b110001 + 0o1), 42693 - 42685), ehT0Px3KOsy9(chr(0b110000) + chr(4297 - 4186) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + '\x35', 30940 - 30932), ehT0Px3KOsy9('\060' + chr(6681 - 6570) + chr(49) + chr(0b1000 + 0o50) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b101110 + 0o10) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\067' + chr(1859 - 1809), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1101111) + chr(0b110000 + 0o3) + chr(0b100101 + 0o20) + chr(0b110100 + 0o3), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10010 + 0o40) + '\063' + chr(0b101000 + 0o11), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + '\x36', 39133 - 39125), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\064' + '\x37', 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(2235 - 2124) + chr(492 - 442) + '\063' + chr(0b1100 + 0o47), 3214 - 3206), ehT0Px3KOsy9(chr(48) + chr(1488 - 1377) + '\066' + chr(2095 - 2041), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + chr(0b110101) + chr(0b11010 + 0o34), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(426 - 378) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2399 - 2350) + chr(0b110110) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b101100 + 0o5) + chr(51) + chr(0b1100 + 0o51), 0o10), ehT0Px3KOsy9('\060' + chr(4212 - 4101) + '\x33' + chr(54) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b1010 + 0o55) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(135 - 24) + chr(0b11001 + 0o32) + '\065' + chr(2492 - 2438), 8), ehT0Px3KOsy9(chr(489 - 441) + chr(0b1101111) + chr(1510 - 1460), 8), ehT0Px3KOsy9(chr(0b110000) + chr(11865 - 11754) + '\062' + '\x37' + chr(786 - 736), 0o10), ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + chr(0b110101) + '\x30', 9257 - 9249), ehT0Px3KOsy9(chr(286 - 238) + '\157' + chr(0b10000 + 0o41) + chr(0b110110) + chr(0b10111 + 0o36), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1111 + 0o44) + chr(0b110010 + 0o2), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(52) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1111 + 0o42) + '\x31' + '\062', 56324 - 56316)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1000101 + 0o52) + '\065' + chr(0b100111 + 0o11), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'.'), '\x64' + chr(5135 - 5034) + chr(0b1100011) + chr(9400 - 9289) + chr(0b101000 + 0o74) + '\x65')(chr(117) + '\x74' + chr(102) + chr(0b11011 + 0o22) + chr(2056 - 2000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def e80gRioCjdat(n4ljua2gi1Pr, nd0OX_BS6_o4, SQOj28X9N9zs, FRqNoLmvqdQl=None): LwGmvHQYXm7c = ftKqvGsyjDGo(n4ljua2gi1Pr, SQOj28X9N9zs) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), chr(0b11111 + 0o105) + '\x65' + chr(0b1 + 0o142) + chr(0b101001 + 0o106) + chr(0b1100100) + chr(0b111011 + 0o52))(chr(11316 - 11199) + chr(0b1001110 + 0o46) + chr(102) + chr(0b10101 + 0o30) + '\x38'))(ehT0Px3KOsy9('\x30' + chr(7536 - 7425) + chr(1863 - 1814), 12563 - 12555), xafqLlk3kkUe(SXOLrMavuUCe(b'H\x1ca\x07:\xcaq[\x86A2\xf3\xa8kjS"\xc6e\x82\xf6b\xc2\xf7i\x88\xb7\x118\xdf\xcf\x9cc\xd3FU&\x04%9'), '\x64' + chr(920 - 819) + chr(9397 - 9298) + chr(0b1000 + 0o147) + '\x64' + chr(0b10010 + 0o123))(chr(2215 - 2098) + '\x74' + chr(1603 - 1501) + '\x2d' + '\070'), xafqLlk3kkUe(kQW8mMspQUIu, xafqLlk3kkUe(SXOLrMavuUCe(b'p<r\x1c5\xd3]\x13\x9fN`\xe6\xb7y'), chr(0b110100 + 0o60) + chr(7799 - 7698) + '\143' + chr(0b1000000 + 0o57) + chr(100) + '\145')(chr(0b1110101) + chr(1839 - 1723) + '\146' + '\055' + '\x38'))(n4ljua2gi1Pr)) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), chr(1225 - 1125) + '\x65' + '\x63' + chr(0b1000 + 0o147) + chr(4493 - 4393) + '\x65')(chr(0b1110101) + chr(0b1100 + 0o150) + '\146' + chr(0b101101) + '\070'))(ehT0Px3KOsy9('\x30' + chr(7796 - 7685) + '\061', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'U?i\x1b<\x87j\x0b\x8e]s\xea\xa9$a\\4\xd1e\x8e\xf5a\xc8\xa1\x16\xcb\xb6'), '\x64' + '\145' + chr(0b1100011) + chr(0b1001110 + 0o41) + chr(6866 - 6766) + chr(0b1100101))(chr(117) + chr(0b1100111 + 0o15) + '\x66' + chr(0b100100 + 0o11) + chr(2282 - 2226)), xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b-s\x10\x04\xc6n\x1c\x80'), '\144' + chr(101) + chr(99) + chr(0b1001000 + 0o47) + chr(7174 - 7074) + '\x65')(chr(0b1110101) + '\164' + chr(0b11011 + 0o113) + '\x2d' + '\x38'))) pdR5uWN8d5YQ = dS9nMkNNnOq2.LEARNERS[n4ljua2gi1Pr.base_algo](n4ljua2gi1Pr.frame_stack_size, nd0OX_BS6_o4, nd0OX_BS6_o4, total_num_epochs=ehT0Px3KOsy9(chr(303 - 255) + chr(111) + '\x31', 8)) irXbreMwM8Zh = KvtIAVGi33Ty.create_hparams(n4ljua2gi1Pr.base_algo_params) xafqLlk3kkUe(dS9nMkNNnOq2, xafqLlk3kkUe(SXOLrMavuUCe(b'u<d\x14/\xc2]\x13\x9fN`\xe6\xb7y\\[5\xdbW\xb0\xf1v\xc6\xe9W\x83\xb6'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1000101 + 0o52) + chr(0b1100100) + chr(2306 - 2205))('\165' + '\x74' + chr(0b1010101 + 0o21) + chr(0b10011 + 0o32) + '\x38'))(irXbreMwM8Zh, n4ljua2gi1Pr, xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b-s\x10\x04\xc6n\x1c\x80'), chr(0b1100100) + chr(7356 - 7255) + chr(7739 - 7640) + '\x6f' + chr(8773 - 8673) + chr(101))('\x75' + '\164' + chr(0b111001 + 0o55) + chr(0b110 + 0o47) + '\x38')) + xafqLlk3kkUe(SXOLrMavuUCe(b'_'), '\x64' + chr(2187 - 2086) + chr(0b111000 + 0o53) + chr(0b1101111) + '\x64' + chr(3833 - 3732))(chr(0b1000011 + 0o62) + chr(0b1000010 + 0o62) + chr(0b1100110) + chr(45) + '\x38')) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), '\144' + '\x65' + chr(7417 - 7318) + chr(0b1100001 + 0o16) + chr(100) + '\145')(chr(0b1011101 + 0o30) + chr(0b1110100) + chr(0b1001100 + 0o32) + chr(45) + chr(56)))(ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'P#l\x1c8\xde"3\xbfN`\xe6\xb7y#\x07g\x91I'), chr(0b1100100) + chr(0b1001001 + 0o34) + '\143' + chr(111) + chr(0b1010101 + 0o17) + '\145')(chr(0b1101011 + 0o12) + '\x74' + chr(0b1010000 + 0o26) + '\055' + chr(56)), xafqLlk3kkUe(kQW8mMspQUIu, xafqLlk3kkUe(SXOLrMavuUCe(b'p<r\x1c5\xd3]\x13\x9fN`\xe6\xb7y'), '\x64' + chr(5234 - 5133) + chr(0b1010011 + 0o20) + '\x6f' + chr(100) + '\145')(chr(0b1101100 + 0o11) + chr(0b1110100) + chr(102) + '\x2d' + '\070'))(irXbreMwM8Zh)) if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b-s\x10\x04\xc6n\x1c\x80'), chr(0b110 + 0o136) + chr(0b1 + 0o144) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))(chr(7973 - 7856) + '\164' + chr(0b111 + 0o137) + chr(1399 - 1354) + chr(0b111000))) == xafqLlk3kkUe(SXOLrMavuUCe(b'p<o'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(100) + chr(101))('\x75' + chr(0b11100 + 0o130) + chr(0b1101 + 0o131) + chr(0b10011 + 0o32) + chr(56)): Ex1j99qsBdgt = irXbreMwM8Zh.epochs_num xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), '\144' + chr(0b1100101) + chr(99) + chr(111) + '\144' + chr(6091 - 5990))('\x75' + chr(0b1011010 + 0o32) + chr(102) + chr(45) + chr(1495 - 1439)))(ehT0Px3KOsy9('\060' + chr(434 - 323) + chr(0b11000 + 0o32), 8), xafqLlk3kkUe(SXOLrMavuUCe(b't#t\x147\xf8q\x0f\x8a_a\xbd\xfa/g'), '\144' + chr(5646 - 5545) + chr(0b1001010 + 0o31) + '\x6f' + '\144' + '\145')(chr(0b1110010 + 0o3) + chr(116) + '\146' + chr(0b101101) + chr(0b1100 + 0o54)), Ex1j99qsBdgt) N8BvhB87aVkD = irXbreMwM8Zh.eval_every_epochs xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), chr(0b1001001 + 0o33) + chr(5798 - 5697) + '\x63' + '\x6f' + chr(0b1011101 + 0o7) + chr(0b1100101))(chr(117) + chr(0b110011 + 0o101) + chr(0b1100110) + chr(45) + chr(0b111000)))(ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + '\062', 8), xafqLlk3kkUe(SXOLrMavuUCe(b'e:a\x19\x04\xc2t\x1e\x9dVM\xe2\xaae`U4\x8e\x1a\xca\xfd'), chr(7840 - 7740) + chr(0b1100101) + '\143' + chr(0b1010001 + 0o36) + '\x64' + chr(3681 - 3580))('\x75' + '\164' + '\x66' + chr(1545 - 1500) + chr(56)), N8BvhB87aVkD) if N8BvhB87aVkD == ehT0Px3KOsy9(chr(48) + chr(111) + chr(48), 8): N8BvhB87aVkD = Ex1j99qsBdgt irXbreMwM8Zh.N8BvhB87aVkD = ehT0Px3KOsy9('\x30' + '\157' + '\x30', 8) Fk10FZM6EP2K = dS9nMkNNnOq2.get_metric_name(sampling_temp=n4ljua2gi1Pr.eval_sampling_temps[ehT0Px3KOsy9('\060' + chr(111) + chr(48), 8)], max_num_noops=n4ljua2gi1Pr.eval_max_num_noops, clipped=ehT0Px3KOsy9(chr(48) + '\157' + chr(993 - 945), 8)) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'v o\x12'), chr(0b10001 + 0o123) + chr(0b1010 + 0o133) + chr(1078 - 979) + chr(10305 - 10194) + chr(0b1100100) + '\145')('\x75' + chr(116) + chr(4078 - 3976) + '\x2d' + '\x38'))(ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101001 + 0o10), 8), xafqLlk3kkUe(SXOLrMavuUCe(b'm)t\x072\xc4]\x15\x8eBw\xbd\xfa/p'), '\144' + '\145' + chr(6734 - 6635) + chr(0b1101111) + chr(100) + chr(0b1010101 + 0o20))(chr(462 - 345) + '\x74' + '\x66' + chr(0b11101 + 0o20) + chr(56)), Fk10FZM6EP2K) YJ1Ho2nmjmPl = oqhJDdMJfuwx.path.join(nd0OX_BS6_o4, xafqLlk3kkUe(SXOLrMavuUCe(b'e:a\x19\x04\xcag\x0f\x9dFq\xf4'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + '\144' + chr(9168 - 9067))('\x75' + chr(0b1110100) + chr(5481 - 5379) + '\x2d' + '\x38')) YJ1Ho2nmjmPl = oqhJDdMJfuwx.path.expanduser(YJ1Ho2nmjmPl) xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'M-k\x10\x1f\xcep\x08'), '\x64' + chr(0b11010 + 0o113) + chr(0b110010 + 0o61) + '\157' + chr(0b111110 + 0o46) + chr(0b111110 + 0o47))('\165' + chr(116) + chr(102) + '\055' + '\070'))(YJ1Ho2nmjmPl) mOm1AorxMOLi = IDJ2eXGCBCDu.summary.FileWriter(YJ1Ho2nmjmPl) def jlEsm9Th14yh(hdZD03xiSXLL): global kDuFsAhEatcU gEY30c7K0x8W = dS9nMkNNnOq2.evaluate_all_configs(n4ljua2gi1Pr, hdZD03xiSXLL) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'S{H\r.\xc4eL\x85CH\xec'), '\x64' + chr(101) + '\143' + '\157' + '\x64' + '\x65')(chr(0b1000111 + 0o56) + '\x74' + '\146' + '\055' + '\x38'))(xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b'A+e\x1b/\x87g\r\x8eC2\xea\xbf~qT$\xc7\x00\xe5\xe2{'), '\144' + chr(0b110101 + 0o60) + chr(0b1100011) + '\157' + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'Vxr\x1a\x13\xc6QH\xbf_w\xed'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(111) + chr(0b10101 + 0o117) + '\145')(chr(0b1110101) + chr(1550 - 1434) + chr(0b10011 + 0o123) + chr(45) + chr(56)))(xafqLlk3kkUe(quvQcGrKjCXS, xafqLlk3kkUe(SXOLrMavuUCe(b'p*o\x076\xc6v'), '\x64' + chr(0b11110 + 0o107) + chr(2580 - 2481) + chr(10115 - 10004) + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b100011 + 0o103) + chr(45) + '\070'))(gEY30c7K0x8W))) xafqLlk3kkUe(dS9nMkNNnOq2, xafqLlk3kkUe(SXOLrMavuUCe(b's9m\x18:\xd5k\x01\x8ap\x7f\xe2\xaexj^4'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1010001 + 0o36) + chr(100) + '\x65')(chr(3051 - 2934) + chr(116) + chr(0b1100110) + chr(45) + chr(56)))(mOm1AorxMOLi, gEY30c7K0x8W, kDuFsAhEatcU) if FRqNoLmvqdQl: FRqNoLmvqdQl(gEY30c7K0x8W[Fk10FZM6EP2K], kDuFsAhEatcU) kDuFsAhEatcU += ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 8) irXbreMwM8Zh.bmKj4pIdOoua = Ex1j99qsBdgt irXbreMwM8Zh.wRrvCgw367Yr = N8BvhB87aVkD else: def jlEsm9Th14yh(hdZD03xiSXLL): del hdZD03xiSXLL raise _zJ24Vce7wp0(xafqLlk3kkUe(SXOLrMavuUCe(b'T$i\x06{\xc1w\x15\x8c[{\xe8\xb4*jNg\xd7O\x9d\xebc\xc9\xefZ\x97\xe5\x1d0\x81\xd7\x8bo\xdfF\x01y@ %n yU=\xc8p[\x9f_}'), chr(5904 - 5804) + '\x65' + '\143' + chr(0b101000 + 0o107) + chr(0b1100100) + chr(0b1100101))(chr(10453 - 10336) + chr(7294 - 7178) + chr(102) + chr(0b101101) + chr(0b10010 + 0o46))) xafqLlk3kkUe(pdR5uWN8d5YQ, xafqLlk3kkUe(SXOLrMavuUCe(b'et0\x12\t\xcem8\x85Ks\xf3'), chr(0b1100100) + chr(0b100000 + 0o105) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(3134 - 3017) + '\164' + '\146' + '\055' + '\070'))(LwGmvHQYXm7c, irXbreMwM8Zh, simulated=ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8), save_continuously=ehT0Px3KOsy9('\x30' + chr(11165 - 11054) + chr(0b110001), 8), epoch=ehT0Px3KOsy9('\060' + '\157' + '\060', 8), model_save_fn=jlEsm9Th14yh)
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
learning_rate_factor
def learning_rate_factor(name, step_num, hparams): """Compute the designated learning rate factor from hparams.""" if name == "constant": tf.logging.info("Base learning rate: %f", hparams.learning_rate_constant) return hparams.learning_rate_constant elif name == "linear_warmup": return tf.minimum(1.0, step_num / hparams.learning_rate_warmup_steps) elif name == "linear_decay": ret = (hparams.train_steps - step_num) / hparams.learning_rate_decay_steps return tf.minimum(1.0, tf.maximum(0.0, ret)) elif name == "cosdecay": # openai gpt in_warmup = tf.cast(step_num <= hparams.learning_rate_warmup_steps, dtype=tf.float32) ret = 0.5 * (1 + tf.cos( np.pi * step_num / hparams.learning_rate_decay_steps)) # if in warmup stage return 1 else return the decayed value return in_warmup * 1 + (1 - in_warmup) * ret elif name == "single_cycle_cos_decay": # Cosine decay to zero with a single cycle. This is different from # "cosdecay" because it starts at 1 when the warmup steps end. x = tf.maximum(step_num, hparams.learning_rate_warmup_steps) step = x - hparams.learning_rate_warmup_steps return tf.math.cos( step * np.pi / hparams.learning_rate_decay_steps) / 2.0 + 0.5 elif name == "rsqrt_decay": return tf.rsqrt(tf.maximum(step_num, hparams.learning_rate_warmup_steps)) elif name == "rsqrt_normalized_decay": scale = tf.sqrt(tf.to_float(hparams.learning_rate_warmup_steps)) return scale * tf.rsqrt(tf.maximum( step_num, hparams.learning_rate_warmup_steps)) elif name == "exp_decay": decay_steps = hparams.learning_rate_decay_steps warmup_steps = hparams.learning_rate_warmup_steps p = (step_num - warmup_steps) / decay_steps p = tf.maximum(p, 0.) if hparams.learning_rate_decay_staircase: p = tf.floor(p) return tf.pow(hparams.learning_rate_decay_rate, p) elif name == "rsqrt_hidden_size": return hparams.hidden_size ** -0.5 elif name == "legacy": return legacy_learning_rate_schedule(hparams) else: raise ValueError("unknown learning rate factor %s" % name)
python
def learning_rate_factor(name, step_num, hparams): """Compute the designated learning rate factor from hparams.""" if name == "constant": tf.logging.info("Base learning rate: %f", hparams.learning_rate_constant) return hparams.learning_rate_constant elif name == "linear_warmup": return tf.minimum(1.0, step_num / hparams.learning_rate_warmup_steps) elif name == "linear_decay": ret = (hparams.train_steps - step_num) / hparams.learning_rate_decay_steps return tf.minimum(1.0, tf.maximum(0.0, ret)) elif name == "cosdecay": # openai gpt in_warmup = tf.cast(step_num <= hparams.learning_rate_warmup_steps, dtype=tf.float32) ret = 0.5 * (1 + tf.cos( np.pi * step_num / hparams.learning_rate_decay_steps)) # if in warmup stage return 1 else return the decayed value return in_warmup * 1 + (1 - in_warmup) * ret elif name == "single_cycle_cos_decay": # Cosine decay to zero with a single cycle. This is different from # "cosdecay" because it starts at 1 when the warmup steps end. x = tf.maximum(step_num, hparams.learning_rate_warmup_steps) step = x - hparams.learning_rate_warmup_steps return tf.math.cos( step * np.pi / hparams.learning_rate_decay_steps) / 2.0 + 0.5 elif name == "rsqrt_decay": return tf.rsqrt(tf.maximum(step_num, hparams.learning_rate_warmup_steps)) elif name == "rsqrt_normalized_decay": scale = tf.sqrt(tf.to_float(hparams.learning_rate_warmup_steps)) return scale * tf.rsqrt(tf.maximum( step_num, hparams.learning_rate_warmup_steps)) elif name == "exp_decay": decay_steps = hparams.learning_rate_decay_steps warmup_steps = hparams.learning_rate_warmup_steps p = (step_num - warmup_steps) / decay_steps p = tf.maximum(p, 0.) if hparams.learning_rate_decay_staircase: p = tf.floor(p) return tf.pow(hparams.learning_rate_decay_rate, p) elif name == "rsqrt_hidden_size": return hparams.hidden_size ** -0.5 elif name == "legacy": return legacy_learning_rate_schedule(hparams) else: raise ValueError("unknown learning rate factor %s" % name)
[ "def", "learning_rate_factor", "(", "name", ",", "step_num", ",", "hparams", ")", ":", "if", "name", "==", "\"constant\"", ":", "tf", ".", "logging", ".", "info", "(", "\"Base learning rate: %f\"", ",", "hparams", ".", "learning_rate_constant", ")", "return", "hparams", ".", "learning_rate_constant", "elif", "name", "==", "\"linear_warmup\"", ":", "return", "tf", ".", "minimum", "(", "1.0", ",", "step_num", "/", "hparams", ".", "learning_rate_warmup_steps", ")", "elif", "name", "==", "\"linear_decay\"", ":", "ret", "=", "(", "hparams", ".", "train_steps", "-", "step_num", ")", "/", "hparams", ".", "learning_rate_decay_steps", "return", "tf", ".", "minimum", "(", "1.0", ",", "tf", ".", "maximum", "(", "0.0", ",", "ret", ")", ")", "elif", "name", "==", "\"cosdecay\"", ":", "# openai gpt", "in_warmup", "=", "tf", ".", "cast", "(", "step_num", "<=", "hparams", ".", "learning_rate_warmup_steps", ",", "dtype", "=", "tf", ".", "float32", ")", "ret", "=", "0.5", "*", "(", "1", "+", "tf", ".", "cos", "(", "np", ".", "pi", "*", "step_num", "/", "hparams", ".", "learning_rate_decay_steps", ")", ")", "# if in warmup stage return 1 else return the decayed value", "return", "in_warmup", "*", "1", "+", "(", "1", "-", "in_warmup", ")", "*", "ret", "elif", "name", "==", "\"single_cycle_cos_decay\"", ":", "# Cosine decay to zero with a single cycle. This is different from", "# \"cosdecay\" because it starts at 1 when the warmup steps end.", "x", "=", "tf", ".", "maximum", "(", "step_num", ",", "hparams", ".", "learning_rate_warmup_steps", ")", "step", "=", "x", "-", "hparams", ".", "learning_rate_warmup_steps", "return", "tf", ".", "math", ".", "cos", "(", "step", "*", "np", ".", "pi", "/", "hparams", ".", "learning_rate_decay_steps", ")", "/", "2.0", "+", "0.5", "elif", "name", "==", "\"rsqrt_decay\"", ":", "return", "tf", ".", "rsqrt", "(", "tf", ".", "maximum", "(", "step_num", ",", "hparams", ".", "learning_rate_warmup_steps", ")", ")", "elif", "name", "==", "\"rsqrt_normalized_decay\"", ":", "scale", "=", "tf", ".", "sqrt", "(", "tf", ".", "to_float", "(", "hparams", ".", "learning_rate_warmup_steps", ")", ")", "return", "scale", "*", "tf", ".", "rsqrt", "(", "tf", ".", "maximum", "(", "step_num", ",", "hparams", ".", "learning_rate_warmup_steps", ")", ")", "elif", "name", "==", "\"exp_decay\"", ":", "decay_steps", "=", "hparams", ".", "learning_rate_decay_steps", "warmup_steps", "=", "hparams", ".", "learning_rate_warmup_steps", "p", "=", "(", "step_num", "-", "warmup_steps", ")", "/", "decay_steps", "p", "=", "tf", ".", "maximum", "(", "p", ",", "0.", ")", "if", "hparams", ".", "learning_rate_decay_staircase", ":", "p", "=", "tf", ".", "floor", "(", "p", ")", "return", "tf", ".", "pow", "(", "hparams", ".", "learning_rate_decay_rate", ",", "p", ")", "elif", "name", "==", "\"rsqrt_hidden_size\"", ":", "return", "hparams", ".", "hidden_size", "**", "-", "0.5", "elif", "name", "==", "\"legacy\"", ":", "return", "legacy_learning_rate_schedule", "(", "hparams", ")", "else", ":", "raise", "ValueError", "(", "\"unknown learning rate factor %s\"", "%", "name", ")" ]
Compute the designated learning rate factor from hparams.
[ "Compute", "the", "designated", "learning", "rate", "factor", "from", "hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L26-L69
train
Compute the designated learning rate factor from 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,sR2sPcm7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WkL,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(111) + chr(2381 - 2329), ord("\x08")), ehT0Px3KOsy9(chr(944 - 896) + chr(0b101101 + 0o102) + chr(0b10000 + 0o41) + chr(0b110111) + chr(2009 - 1957), 37873 - 37865), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\x31' + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + '\060' + chr(48), 5264 - 5256), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + '\x33' + '\x32' + chr(0b110100 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + '\x33' + chr(0b110111) + chr(2132 - 2077), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b111010 + 0o65) + chr(50) + chr(0b11101 + 0o26) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10 + 0o155) + chr(0b110001) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100101 + 0o14) + chr(53) + chr(0b10001 + 0o43), 63459 - 63451), ehT0Px3KOsy9('\060' + chr(11023 - 10912) + chr(2450 - 2400), 0o10), ehT0Px3KOsy9(chr(1193 - 1145) + '\x6f' + chr(0b110010) + '\066' + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(660 - 612) + '\x6f' + chr(50) + chr(48) + chr(2244 - 2193), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(541 - 492) + '\x37' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1622 - 1574) + '\x6f' + '\061' + chr(0b110110) + chr(0b10111 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(1602 - 1554) + chr(0b1101111) + chr(1319 - 1269) + chr(1677 - 1623) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(2155 - 2107) + '\157' + chr(52) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(1573 - 1524) + chr(2664 - 2612) + '\064', 9998 - 9990), ehT0Px3KOsy9('\x30' + chr(8536 - 8425) + '\x35' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100010 + 0o17) + '\x35' + chr(0b111 + 0o60), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(2384 - 2335) + '\062' + chr(0b110110), 47139 - 47131), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x31' + chr(51) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(0b100001 + 0o25) + chr(0b10101 + 0o34), 50752 - 50744), ehT0Px3KOsy9(chr(48) + chr(0b110111 + 0o70) + chr(2068 - 2019) + chr(0b1100 + 0o50) + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(3567 - 3456) + '\063' + chr(1489 - 1440) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(111) + chr(736 - 686) + '\x31' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(1521 - 1473) + '\x6f' + chr(50) + '\060' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(11830 - 11719) + chr(2185 - 2136) + chr(0b110110) + chr(1787 - 1738), 18533 - 18525), ehT0Px3KOsy9('\x30' + chr(11417 - 11306) + chr(0b100010 + 0o21) + '\061' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\x31' + chr(0b110011) + '\x32', 0o10), ehT0Px3KOsy9(chr(568 - 520) + '\157' + chr(1558 - 1506) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(352 - 302) + chr(0b110010) + chr(1666 - 1617), 0b1000), ehT0Px3KOsy9(chr(1375 - 1327) + '\x6f' + chr(0b110011) + chr(54) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\061' + '\x31', 0o10), ehT0Px3KOsy9(chr(48) + chr(2985 - 2874) + '\x32' + chr(55) + chr(0b101001 + 0o16), 0b1000), ehT0Px3KOsy9(chr(1439 - 1391) + chr(7703 - 7592) + chr(0b100 + 0o57) + '\061' + chr(2380 - 2325), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b101001 + 0o11) + chr(833 - 781) + chr(771 - 722), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100000 + 0o21) + chr(0b11101 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(51) + chr(48) + chr(53), 13831 - 13823), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b101110 + 0o4) + chr(0b110101), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(11747 - 11636) + chr(2670 - 2617) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(0b110 + 0o136) + chr(9760 - 9659) + chr(99) + chr(111) + chr(0b1001011 + 0o31) + '\x65')(chr(13512 - 13395) + '\x74' + chr(4899 - 4797) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eEh1MPdafG_x(AIvJRzLdDfgF, s4MGxQMbnqrH, n4ljua2gi1Pr): if AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'g\x13\xa03\xa1\x9e\xf3{'), chr(100) + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\x65')(chr(0b110111 + 0o76) + '\164' + chr(5950 - 5848) + '\x2d' + chr(56)): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'WK\x868\xa0\x9c\xfa8\x06n\xecr'), '\144' + '\145' + chr(0b1001101 + 0o26) + chr(0b1101111) + chr(9565 - 9465) + '\x65')('\x75' + chr(0b1000 + 0o154) + chr(102) + '\055' + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'F\x1d\xbd%\xf5\x93\xf8n\x1el\xdfw\xe4]\x05\xd4W\x01\x10Os;'), chr(4884 - 4784) + chr(101) + chr(1882 - 1783) + chr(10984 - 10873) + chr(0b1100100) + chr(0b1010011 + 0o22))(chr(0b1001001 + 0o54) + chr(2328 - 2212) + chr(116 - 14) + '\x2d' + chr(0b111000)), xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'K\x08\xf7\x08\x80\x95\xf3d\x14Z\xf7F'), chr(6827 - 6727) + chr(8073 - 7972) + '\x63' + '\x6f' + chr(100) + chr(0b11100 + 0o111))(chr(117) + chr(11623 - 11507) + chr(0b1100110) + chr(45) + '\070'))) return xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'K\x08\xf7\x08\x80\x95\xf3d\x14Z\xf7F'), chr(0b1100100) + chr(9871 - 9770) + chr(2669 - 2570) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(2519 - 2402) + chr(116) + chr(102) + chr(45) + chr(0b111000))) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'h\x15\xa0%\xb4\x8d\xc2x\rp\xdbl\xf3'), '\x64' + chr(0b11001 + 0o114) + '\x63' + chr(0b1101111) + chr(0b100101 + 0o77) + '\145')(chr(12378 - 12261) + chr(0b1010101 + 0o37) + chr(910 - 808) + chr(0b1100 + 0o41) + '\070'): return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'i\x15\xa0)\xb8\x8a\xf0'), '\144' + '\145' + chr(5222 - 5123) + chr(4893 - 4782) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(1131 - 1029) + chr(150 - 105) + chr(0b111000)))(1.0, s4MGxQMbnqrH / xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b4\xb7(\xba\x86\xdab\x08t\xfb '), chr(0b1100100) + '\x65' + '\143' + '\157' + chr(100) + chr(5667 - 5566))('\165' + '\164' + chr(0b1011000 + 0o16) + chr(45) + chr(1123 - 1067)))) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'h\x15\xa0%\xb4\x8d\xc2k\ta\xd7`'), chr(7468 - 7368) + chr(0b1100101) + '\143' + '\x6f' + chr(384 - 284) + chr(6583 - 6482))(chr(0b1110101) + chr(0b1010010 + 0o42) + chr(0b1100110) + '\055' + '\x38'): VHn4CV4Ymrei = (n4ljua2gi1Pr.train_steps - s4MGxQMbnqrH) / n4ljua2gi1Pr.YBAB1XyoxOc5 return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'i\x15\xa0)\xb8\x8a\xf0'), '\x64' + chr(3730 - 3629) + chr(3728 - 3629) + chr(0b1101111) + '\x64' + '\145')(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(623 - 567)))(1.0, xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'i\x1d\xb6)\xb8\x8a\xf0'), chr(0b1100100) + chr(0b1100101) + chr(0b10111 + 0o114) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(8115 - 8013) + chr(45) + '\070'))(0.0, VHn4CV4Ymrei)) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'g\x13\xbd$\xb0\x9c\xfcv'), '\x64' + '\x65' + chr(7165 - 7066) + '\157' + chr(8791 - 8691) + chr(101))(chr(117) + chr(11864 - 11748) + chr(0b100101 + 0o101) + '\055' + chr(0b11010 + 0o36)): HKZvWEUam6EL = IDJ2eXGCBCDu.cast(s4MGxQMbnqrH <= n4ljua2gi1Pr.fHyhoyGmdvM9, dtype=IDJ2eXGCBCDu.float32) VHn4CV4Ymrei = 0.5 * (ehT0Px3KOsy9('\060' + '\x6f' + chr(940 - 891), ord("\x08")) + IDJ2eXGCBCDu.cos(WqUC3KWvYVup.pi * s4MGxQMbnqrH / n4ljua2gi1Pr.YBAB1XyoxOc5)) return HKZvWEUam6EL * ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001), 8) + (ehT0Px3KOsy9(chr(0b110000) + chr(7499 - 7388) + '\061', 8) - HKZvWEUam6EL) * VHn4CV4Ymrei elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b"w\x15\xa0'\xb9\x9a\xc2l\x15a\xda|\xdc\x1e\x18\xc6|\x00O\x0c7$"), '\x64' + chr(8267 - 8166) + '\x63' + chr(0b1100110 + 0o11) + chr(100) + chr(0b11001 + 0o114))(chr(0b1110101) + chr(9936 - 9820) + chr(0b1100110) + chr(0b101101) + chr(56)): OeWW0F1dBPRQ = IDJ2eXGCBCDu.maximum(s4MGxQMbnqrH, n4ljua2gi1Pr.fHyhoyGmdvM9) kDuFsAhEatcU = OeWW0F1dBPRQ - n4ljua2gi1Pr.fHyhoyGmdvM9 return xafqLlk3kkUe(IDJ2eXGCBCDu.math, xafqLlk3kkUe(SXOLrMavuUCe(b'g\x13\xbd'), '\144' + '\145' + chr(2313 - 2214) + chr(0b1101111) + chr(0b1 + 0o143) + chr(0b1001111 + 0o26))(chr(0b1110101) + '\164' + chr(102) + chr(593 - 548) + chr(0b111000)))(kDuFsAhEatcU * xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b't\x15'), chr(0b1100100) + chr(2432 - 2331) + chr(178 - 79) + chr(440 - 329) + chr(0b111110 + 0o46) + chr(0b110100 + 0o61))(chr(0b1110101) + '\164' + '\146' + chr(0b101101) + chr(0b111000))) / xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b']>\x8f\x02\xe4\xa7\xe4`\x14M\xd5,'), chr(100) + chr(8332 - 8231) + '\143' + '\157' + chr(8130 - 8030) + chr(0b1100101))('\x75' + '\x74' + '\146' + '\055' + chr(56)))) / 2.0 + 0.5 elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'v\x0f\xbf2\xa1\xa0\xf9j\x0fc\xcf'), chr(100) + '\145' + '\x63' + chr(0b11111 + 0o120) + chr(0b110010 + 0o62) + chr(738 - 637))(chr(0b1110101) + '\x74' + chr(3296 - 3194) + chr(0b100001 + 0o14) + '\070'): return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'v\x0f\xbf2\xa1'), chr(4087 - 3987) + chr(0b1001111 + 0o26) + '\x63' + chr(111) + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + '\x66' + '\055' + '\070'))(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'i\x1d\xb6)\xb8\x8a\xf0'), chr(1706 - 1606) + chr(0b100000 + 0o105) + chr(0b1001111 + 0o24) + '\x6f' + chr(9058 - 8958) + '\x65')(chr(117) + '\164' + chr(102) + chr(0b1001 + 0o44) + '\x38'))(s4MGxQMbnqrH, xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b4\xb7(\xba\x86\xdab\x08t\xfb '), '\x64' + chr(101) + '\x63' + '\x6f' + '\144' + chr(0b10011 + 0o122))(chr(3878 - 3761) + '\164' + '\x66' + chr(1655 - 1610) + '\070')))) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'v\x0f\xbf2\xa1\xa0\xf3`\x1eo\xd7u\xea\x07\x12\xd1|\x00O\x0c7$'), chr(100) + chr(0b1100101) + chr(551 - 452) + '\157' + chr(3436 - 3336) + chr(0b1100101))(chr(200 - 83) + chr(0b1110100) + '\x66' + '\055' + '\x38'): xjPLimsZRgb9 = IDJ2eXGCBCDu.sqrt(IDJ2eXGCBCDu.to_float(n4ljua2gi1Pr.fHyhoyGmdvM9)) return xjPLimsZRgb9 * xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'v\x0f\xbf2\xa1'), '\x64' + '\145' + chr(2435 - 2336) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(8297 - 8181) + chr(102) + chr(0b100101 + 0o10) + '\070'))(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'i\x1d\xb6)\xb8\x8a\xf0'), chr(0b110010 + 0o62) + '\145' + chr(0b1100011) + chr(0b1000011 + 0o54) + chr(100) + '\x65')(chr(0b110000 + 0o105) + '\x74' + chr(2119 - 2017) + chr(0b101101) + chr(0b110 + 0o62)))(s4MGxQMbnqrH, xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'b4\xb7(\xba\x86\xdab\x08t\xfb '), '\x64' + '\145' + chr(0b1100011) + chr(0b101001 + 0o106) + chr(3938 - 3838) + chr(0b1100101))('\x75' + chr(116) + chr(1876 - 1774) + '\x2d' + '\x38')))) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'a\x04\xbe\x1f\xb1\x9a\xfen\x15'), chr(100) + chr(0b1100101) + chr(0b10100 + 0o117) + chr(5220 - 5109) + chr(100) + chr(3272 - 3171))(chr(117) + '\x74' + chr(102) + '\055' + chr(56)): IyD5QShhvvmp = n4ljua2gi1Pr.YBAB1XyoxOc5 p2epArE4laJj = n4ljua2gi1Pr.fHyhoyGmdvM9 UyakMW2IMFEj = (s4MGxQMbnqrH - p2epArE4laJj) / IyD5QShhvvmp UyakMW2IMFEj = IDJ2eXGCBCDu.maximum(UyakMW2IMFEj, 0.0) if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'h\x19\xaf2\xbb\x96\xf3h3p\xd7m\xe6"\x13\xd0@\x05S0%)\x90\r\xba\xe9\xe0\x02\xaf'), chr(3032 - 2932) + '\x65' + chr(99) + chr(10471 - 10360) + '\x64' + chr(0b110110 + 0o57))('\x75' + chr(5401 - 5285) + chr(3091 - 2989) + chr(0b10111 + 0o26) + '\x38')): UyakMW2IMFEj = IDJ2eXGCBCDu.floor(UyakMW2IMFEj) return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b't\x13\xb9'), '\x64' + chr(0b1100101) + chr(99) + '\x6f' + '\144' + '\145')(chr(0b1010011 + 0o42) + chr(0b1110100) + chr(0b1100110) + chr(192 - 147) + chr(56)))(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'h\x19\xaf2\xbb\x96\xf3h3p\xd7m\xe6"\x13\xd0@\x05S0$<\x85\x01'), '\x64' + chr(4644 - 4543) + chr(0b1010111 + 0o14) + chr(111) + chr(285 - 185) + chr(3462 - 3361))('\165' + chr(2171 - 2055) + '\x66' + '\x2d' + '\070')), UyakMW2IMFEj) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'v\x0f\xbf2\xa1\xa0\xf5f\x08f\xd3w\xdc\x0e\x1e\xcfF'), chr(0b1100100) + chr(2059 - 1958) + chr(0b1100011) + chr(111) + '\x64' + chr(101))('\x75' + chr(3173 - 3057) + '\x66' + chr(1679 - 1634) + chr(0b111000)): return xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'u\x06\xa19\x8d\xb1\xaed\x08j\xf2U'), '\144' + '\x65' + chr(2186 - 2087) + chr(0b1101111) + chr(5864 - 5764) + chr(4940 - 4839))('\165' + '\164' + '\x66' + chr(0b100110 + 0o7) + '\070')) ** (-0.5) elif AIvJRzLdDfgF == xafqLlk3kkUe(SXOLrMavuUCe(b'h\x19\xa9!\xb6\x86'), chr(0b10100 + 0o120) + '\145' + chr(5132 - 5033) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(13011 - 12895) + chr(0b1110 + 0o130) + chr(1437 - 1392) + chr(0b111000)): return BtZjIfsBs4dS(n4ljua2gi1Pr) else: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'q\x12\xa5.\xba\x88\xf3/\x00g\xd7k\xed\x14\x19\xd2\x03\x16K\x1b3}\x97\x05\xab\xfe\xee\x03\xea\x7fU'), '\144' + '\x65' + chr(99) + '\x6f' + chr(217 - 117) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)) % AIvJRzLdDfgF)
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
learning_rate_schedule
def learning_rate_schedule(hparams): """Learning rate schedule based on hparams.""" mlperf_log.transformer_print(key=mlperf_log.OPT_LR, deferred=True) mlperf_log.transformer_print( key=mlperf_log.OPT_LR_WARMUP_STEPS, value=hparams.learning_rate_warmup_steps) step_num = _global_step(hparams) schedule_string = hparams.learning_rate_schedule names = schedule_string.split("*") names = [name.strip() for name in names if name.strip()] ret = tf.constant(1.0) for name in names: ret *= learning_rate_factor(name, step_num, hparams) return ret
python
def learning_rate_schedule(hparams): """Learning rate schedule based on hparams.""" mlperf_log.transformer_print(key=mlperf_log.OPT_LR, deferred=True) mlperf_log.transformer_print( key=mlperf_log.OPT_LR_WARMUP_STEPS, value=hparams.learning_rate_warmup_steps) step_num = _global_step(hparams) schedule_string = hparams.learning_rate_schedule names = schedule_string.split("*") names = [name.strip() for name in names if name.strip()] ret = tf.constant(1.0) for name in names: ret *= learning_rate_factor(name, step_num, hparams) return ret
[ "def", "learning_rate_schedule", "(", "hparams", ")", ":", "mlperf_log", ".", "transformer_print", "(", "key", "=", "mlperf_log", ".", "OPT_LR", ",", "deferred", "=", "True", ")", "mlperf_log", ".", "transformer_print", "(", "key", "=", "mlperf_log", ".", "OPT_LR_WARMUP_STEPS", ",", "value", "=", "hparams", ".", "learning_rate_warmup_steps", ")", "step_num", "=", "_global_step", "(", "hparams", ")", "schedule_string", "=", "hparams", ".", "learning_rate_schedule", "names", "=", "schedule_string", ".", "split", "(", "\"*\"", ")", "names", "=", "[", "name", ".", "strip", "(", ")", "for", "name", "in", "names", "if", "name", ".", "strip", "(", ")", "]", "ret", "=", "tf", ".", "constant", "(", "1.0", ")", "for", "name", "in", "names", ":", "ret", "*=", "learning_rate_factor", "(", "name", ",", "step_num", ",", "hparams", ")", "return", "ret" ]
Learning rate schedule based on hparams.
[ "Learning", "rate", "schedule", "based", "on", "hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L72-L85
train
Learning rate schedule based on hparams.
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('\060' + chr(111) + chr(0b110010) + chr(53) + chr(0b11010 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101101 + 0o4) + chr(2786 - 2731) + chr(0b100 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(980 - 929) + chr(53) + chr(132 - 83), 0b1000), ehT0Px3KOsy9(chr(1593 - 1545) + '\157' + chr(0b110001) + chr(53) + chr(1021 - 969), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + chr(0b110101), 44339 - 44331), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(210 - 159) + chr(0b110000), 52814 - 52806), ehT0Px3KOsy9(chr(660 - 612) + chr(111) + chr(55) + '\062', 27964 - 27956), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b0 + 0o157) + chr(0b100110 + 0o14) + chr(0b110100) + chr(0b101011 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(54) + chr(1865 - 1817), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1 + 0o60) + '\x30' + chr(1577 - 1522), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + '\063' + chr(50) + chr(1085 - 1034), 30111 - 30103), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(54) + chr(49), 52268 - 52260), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010 + 0o145) + chr(51) + '\x33' + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110100 + 0o73) + chr(0b11001 + 0o35) + chr(51), 38412 - 38404), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(0b10000 + 0o47) + '\061', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + '\x33' + chr(55) + '\060', 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b11111 + 0o26) + '\060', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1 + 0o156) + '\x33' + '\060' + chr(0b110101), 62761 - 62753), ehT0Px3KOsy9('\060' + chr(4595 - 4484) + '\061' + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b10000 + 0o45) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(1453 - 1399), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2574 - 2523) + chr(0b101000 + 0o14) + chr(2616 - 2562), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + '\067' + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1330 - 1278) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\065' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\063' + chr(0b1011 + 0o47), 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1001001 + 0o46) + '\063' + chr(0b110101) + '\064', 41901 - 41893), ehT0Px3KOsy9('\x30' + chr(4384 - 4273) + '\061' + chr(0b10010 + 0o37) + chr(0b100001 + 0o26), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(49) + chr(54), 62453 - 62445), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1111 + 0o42) + '\x32' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(51) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\x31' + chr(0b1 + 0o57), 33734 - 33726), ehT0Px3KOsy9(chr(0b110000) + chr(11903 - 11792) + '\x33' + chr(53) + chr(0b1 + 0o60), 8), ehT0Px3KOsy9('\060' + '\157' + '\066' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(48) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(48) + chr(2126 - 2074), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + chr(50) + chr(0b110111) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8687 - 8576) + chr(53) + '\x37', 51039 - 51031), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + '\x33' + chr(0b110010 + 0o2) + chr(53), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + '\065' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x87'), chr(0b1100100) + chr(0b110011 + 0o62) + chr(0b1100011) + '\157' + chr(0b1000111 + 0o35) + '\x65')(chr(0b100100 + 0o121) + chr(116) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Lz_s7neUzM5V(n4ljua2gi1Pr): xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x0b\x88\x02F~U\xd3\x9d"\xa1.\xa8AP\x96\\'), chr(100) + chr(0b110001 + 0o64) + chr(2793 - 2694) + chr(111) + chr(2524 - 2424) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + chr(0b10101 + 0o30) + '\070'))(key=xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6)\xbd3yJ'), chr(6705 - 6605) + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(101))(chr(0b10101 + 0o140) + chr(12505 - 12389) + '\146' + '\x2d' + chr(56))), deferred=ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061', ord("\x08"))) xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x0b\x88\x02F~U\xd3\x9d"\xa1.\xa8AP\x96\\'), chr(6840 - 6740) + chr(9861 - 9760) + chr(0b1100011) + chr(111) + chr(0b11100 + 0o110) + chr(101))('\165' + chr(12399 - 12283) + chr(0b1100001 + 0o5) + chr(1844 - 1799) + chr(56)))(key=xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6)\xbd3yJe\xf6\xb1\x15\x9e$\x88lj\xacm\x95/'), chr(100) + '\145' + chr(0b1011101 + 0o6) + chr(111) + '\x64' + '\x65')('\165' + chr(0b111010 + 0o72) + chr(0b110100 + 0o62) + chr(1662 - 1617) + chr(0b10 + 0o66))), value=xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf1\x90\x04Za}\xcc\x941\x9eH'), chr(410 - 310) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1 + 0o144))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b11011 + 0o22) + '\070'))) s4MGxQMbnqrH = GBPY9HD7XOxV(n4ljua2gi1Pr) yHmZiM0BSt93 = n4ljua2gi1Pr.Lz_s7neUzM5V OcnR1hZ7pGdr = yHmZiM0BSt93.split(xafqLlk3kkUe(SXOLrMavuUCe(b'\x83'), chr(7938 - 7838) + chr(101) + '\x63' + '\157' + '\144' + '\x65')('\x75' + chr(289 - 173) + chr(0b1100110) + chr(0b101101) + chr(0b111000))) OcnR1hZ7pGdr = [AIvJRzLdDfgF.strip() for AIvJRzLdDfgF in OcnR1hZ7pGdr if AIvJRzLdDfgF.strip()] VHn4CV4Ymrei = IDJ2eXGCBCDu.constant(1.0) for AIvJRzLdDfgF in OcnR1hZ7pGdr: VHn4CV4Ymrei *= eEh1MPdafG_x(AIvJRzLdDfgF, s4MGxQMbnqrH, n4ljua2gi1Pr) return VHn4CV4Ymrei
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
legacy_learning_rate_schedule
def legacy_learning_rate_schedule(hparams): """Backwards-compatible learning-rate schedule.""" step_num = _global_step(hparams) warmup_steps = tf.to_float(hparams.learning_rate_warmup_steps) if hparams.learning_rate_decay_scheme == "noam": ret = 5000.0 * hparams.hidden_size**-0.5 * tf.minimum( (step_num + 1) * warmup_steps**-1.5, (step_num + 1)**-0.5) else: warmup_steps = hparams.learning_rate_warmup_steps warmup = _learning_rate_warmup(warmup_steps, hparams=hparams) decay = _learning_rate_decay(hparams, warmup_steps) ret = tf.where(step_num < warmup_steps, warmup, decay) optimizer_correction = 0.002 if "adam" in hparams.optimizer else 1.0 tf.logging.info("Base learning rate: %f", hparams.learning_rate) return ret * optimizer_correction * hparams.learning_rate
python
def legacy_learning_rate_schedule(hparams): """Backwards-compatible learning-rate schedule.""" step_num = _global_step(hparams) warmup_steps = tf.to_float(hparams.learning_rate_warmup_steps) if hparams.learning_rate_decay_scheme == "noam": ret = 5000.0 * hparams.hidden_size**-0.5 * tf.minimum( (step_num + 1) * warmup_steps**-1.5, (step_num + 1)**-0.5) else: warmup_steps = hparams.learning_rate_warmup_steps warmup = _learning_rate_warmup(warmup_steps, hparams=hparams) decay = _learning_rate_decay(hparams, warmup_steps) ret = tf.where(step_num < warmup_steps, warmup, decay) optimizer_correction = 0.002 if "adam" in hparams.optimizer else 1.0 tf.logging.info("Base learning rate: %f", hparams.learning_rate) return ret * optimizer_correction * hparams.learning_rate
[ "def", "legacy_learning_rate_schedule", "(", "hparams", ")", ":", "step_num", "=", "_global_step", "(", "hparams", ")", "warmup_steps", "=", "tf", ".", "to_float", "(", "hparams", ".", "learning_rate_warmup_steps", ")", "if", "hparams", ".", "learning_rate_decay_scheme", "==", "\"noam\"", ":", "ret", "=", "5000.0", "*", "hparams", ".", "hidden_size", "**", "-", "0.5", "*", "tf", ".", "minimum", "(", "(", "step_num", "+", "1", ")", "*", "warmup_steps", "**", "-", "1.5", ",", "(", "step_num", "+", "1", ")", "**", "-", "0.5", ")", "else", ":", "warmup_steps", "=", "hparams", ".", "learning_rate_warmup_steps", "warmup", "=", "_learning_rate_warmup", "(", "warmup_steps", ",", "hparams", "=", "hparams", ")", "decay", "=", "_learning_rate_decay", "(", "hparams", ",", "warmup_steps", ")", "ret", "=", "tf", ".", "where", "(", "step_num", "<", "warmup_steps", ",", "warmup", ",", "decay", ")", "optimizer_correction", "=", "0.002", "if", "\"adam\"", "in", "hparams", ".", "optimizer", "else", "1.0", "tf", ".", "logging", ".", "info", "(", "\"Base learning rate: %f\"", ",", "hparams", ".", "learning_rate", ")", "return", "ret", "*", "optimizer_correction", "*", "hparams", ".", "learning_rate" ]
Backwards-compatible learning-rate schedule.
[ "Backwards", "-", "compatible", "learning", "-", "rate", "schedule", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L88-L102
train
Backwards - compatible learning - rate schedule.
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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I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2162 - 2112) + chr(2006 - 1956) + '\x36', 35999 - 35991), ehT0Px3KOsy9('\060' + chr(0b100111 + 0o110) + chr(0b110011) + '\065' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(5312 - 5201) + chr(0b110010) + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\065' + chr(1974 - 1926), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1229 - 1118) + chr(0b100011 + 0o20) + '\066' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(11506 - 11395) + chr(49) + '\066' + chr(0b0 + 0o66), 58907 - 58899), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b11101 + 0o30) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(8031 - 7920) + chr(0b10101 + 0o36) + chr(531 - 478) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + '\x33' + chr(1612 - 1564) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101100 + 0o3) + chr(0b101001 + 0o10) + chr(0b1101 + 0o46) + chr(592 - 543), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(0b10010 + 0o36) + '\x32', 4651 - 4643), ehT0Px3KOsy9(chr(874 - 826) + chr(11753 - 11642) + '\061' + '\x30' + chr(2180 - 2131), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101101 + 0o5) + chr(52) + chr(1174 - 1125), 953 - 945), ehT0Px3KOsy9(chr(48) + '\157' + '\067' + chr(0b11101 + 0o25), 1027 - 1019), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(3865 - 3754) + chr(55) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101101 + 0o5) + '\063' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b111101 + 0o62) + '\063' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x34' + '\060', 0o10), ehT0Px3KOsy9(chr(2164 - 2116) + chr(0b1101111) + '\062' + '\066' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b110011) + chr(0b100010 + 0o21), ord("\x08")), ehT0Px3KOsy9(chr(945 - 897) + chr(11785 - 11674) + chr(1439 - 1388) + chr(0b110000) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10000 + 0o41) + chr(0b10100 + 0o42) + chr(1968 - 1914), 8), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1100 + 0o143) + chr(54) + chr(0b100000 + 0o20), 4307 - 4299), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(104 - 49) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\065' + chr(1164 - 1110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(939 - 884) + chr(55), 46600 - 46592), ehT0Px3KOsy9('\x30' + '\x6f' + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8814 - 8703) + chr(0b110011) + chr(0b100101 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(85 - 37) + chr(111) + chr(0b11 + 0o60) + chr(1302 - 1251) + '\x30', 8072 - 8064), ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(0b110010) + chr(0b110 + 0o60), ord("\x08")), ehT0Px3KOsy9(chr(1281 - 1233) + chr(111) + '\x31' + chr(0b110001) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x36' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\061' + '\067', 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1111 + 0o140) + chr(0b110010) + chr(402 - 350) + chr(0b11111 + 0o21), 8), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(0b10101 + 0o41) + chr(931 - 881), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b10 + 0o63) + chr(52), 34374 - 34366), ehT0Px3KOsy9(chr(1440 - 1392) + '\x6f' + chr(49) + chr(0b110001) + chr(48), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(50) + chr(0b100111 + 0o20), 62118 - 62110), ehT0Px3KOsy9(chr(122 - 74) + '\157' + chr(52) + chr(0b110010), 49236 - 49228), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110111) + chr(654 - 604), 8)][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'\xb8'), '\x64' + chr(0b11 + 0o142) + chr(99) + '\x6f' + '\x64' + chr(0b101011 + 0o72))(chr(0b1010101 + 0o40) + chr(0b1100011 + 0o21) + chr(0b1100110) + chr(0b101101) + chr(0b10 + 0o66)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def BtZjIfsBs4dS(n4ljua2gi1Pr): s4MGxQMbnqrH = GBPY9HD7XOxV(n4ljua2gi1Pr) p2epArE4laJj = IDJ2eXGCBCDu.to_float(n4ljua2gi1Pr.fHyhoyGmdvM9) if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0\xd8\xe6\xc6\xbe3\xd3\xa2\xa2,\xe0p'), chr(0b1100100) + '\145' + '\x63' + '\157' + '\144' + '\145')('\x75' + chr(0b1101111 + 0o5) + chr(0b11001 + 0o115) + chr(697 - 652) + '\x38')) == xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8\x84\xdd\xc5'), '\x64' + '\145' + chr(99) + '\x6f' + '\x64' + '\x65')(chr(10332 - 10215) + chr(116) + chr(2188 - 2086) + '\055' + chr(0b111000)): VHn4CV4Ymrei = 5000.0 * n4ljua2gi1Pr.qzoyXN3kdhDL ** (-0.5) * IDJ2eXGCBCDu.minimum((s4MGxQMbnqrH + ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(659 - 610), 0o10)) * p2epArE4laJj ** (-1.5), (s4MGxQMbnqrH + ehT0Px3KOsy9(chr(48) + chr(0b101 + 0o152) + chr(1357 - 1308), 8)) ** (-0.5)) else: p2epArE4laJj = n4ljua2gi1Pr.fHyhoyGmdvM9 MSPsFj9ZRl2M = pOqr8QQgnTGt(p2epArE4laJj, hparams=n4ljua2gi1Pr) eeyC5_0F9WOf = teSMijFXA7g0(n4ljua2gi1Pr, p2epArE4laJj) VHn4CV4Ymrei = IDJ2eXGCBCDu.dRFAC59yQBm_(s4MGxQMbnqrH < p2epArE4laJj, MSPsFj9ZRl2M, eeyC5_0F9WOf) gs0ZhN2zedXq = 0.002 if xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7\x8f\xdd\xc5'), '\x64' + chr(7739 - 7638) + '\x63' + chr(432 - 321) + chr(0b100111 + 0o75) + '\145')('\x75' + chr(0b11101 + 0o127) + '\146' + '\x2d' + '\x38') in n4ljua2gi1Pr.XdKNcYRObPK3 else 1.0 xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xdc\xf4\xd0\x81\x15\x8d\xdd\xac5\xd8*'), '\x64' + chr(101) + '\x63' + '\x6f' + chr(100) + chr(0b10010 + 0o123))(chr(117) + '\164' + chr(3447 - 3345) + chr(0b101101) + chr(0b100101 + 0o23)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4\x8a\xcf\xcd\xd4\x1a\x8f\x8b\xb47\xeb/\xc6\x1aN\xffn\xc5\x89\xbb\xe7\x10'), chr(503 - 403) + chr(0b111 + 0o136) + '\x63' + chr(0b110000 + 0o77) + '\x64' + '\145')(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(56)), xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\xac\xef\xe1\x84\x12\xb5\x93\x93\x17\xf8\x14'), chr(0b101111 + 0o65) + chr(0b1001 + 0o134) + chr(99) + '\157' + chr(3908 - 3808) + chr(5957 - 5856))(chr(6221 - 6104) + '\164' + '\146' + chr(0b100011 + 0o12) + chr(0b111000)))) return VHn4CV4Ymrei * gs0ZhN2zedXq * xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc7\xac\xef\xe1\x84\x12\xb5\x93\x93\x17\xf8\x14'), chr(0b110100 + 0o60) + '\x65' + '\143' + chr(0b11110 + 0o121) + chr(7123 - 7023) + chr(101))(chr(0b1001110 + 0o47) + '\x74' + chr(102) + chr(0b1000 + 0o45) + '\070'))
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
_global_step
def _global_step(hparams): """Adjust global step if a multi-step optimizer is used.""" step = tf.to_float(tf.train.get_or_create_global_step()) multiplier = hparams.optimizer_multistep_accumulate_steps if not multiplier: return step tf.logging.info("Dividing global step by %d for multi-step optimizer." % multiplier) return step / tf.to_float(multiplier)
python
def _global_step(hparams): """Adjust global step if a multi-step optimizer is used.""" step = tf.to_float(tf.train.get_or_create_global_step()) multiplier = hparams.optimizer_multistep_accumulate_steps if not multiplier: return step tf.logging.info("Dividing global step by %d for multi-step optimizer." % multiplier) return step / tf.to_float(multiplier)
[ "def", "_global_step", "(", "hparams", ")", ":", "step", "=", "tf", ".", "to_float", "(", "tf", ".", "train", ".", "get_or_create_global_step", "(", ")", ")", "multiplier", "=", "hparams", ".", "optimizer_multistep_accumulate_steps", "if", "not", "multiplier", ":", "return", "step", "tf", ".", "logging", ".", "info", "(", "\"Dividing global step by %d for multi-step optimizer.\"", "%", "multiplier", ")", "return", "step", "/", "tf", ".", "to_float", "(", "multiplier", ")" ]
Adjust global step if a multi-step optimizer is used.
[ "Adjust", "global", "step", "if", "a", "multi", "-", "step", "optimizer", "is", "used", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L105-L114
train
Adjust global step if a multi - step optimizer is used.
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,DXjfarvg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kUe,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(50) + '\064' + chr(0b101010 + 0o12), ord("\x08")), ehT0Px3KOsy9(chr(1742 - 1694) + '\x6f' + '\x33' + '\067' + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\060' + chr(0b10001 + 0o42), ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(11861 - 11750) + chr(0b110011) + chr(0b11100 + 0o26) + chr(0b110011 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(50) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(411 - 362) + chr(0b10011 + 0o40) + chr(0b10001 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2391 - 2340) + '\x32', 7017 - 7009), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(111) + '\061' + '\x36' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(3382 - 3271) + chr(51) + chr(1182 - 1129) + chr(55), 0o10), ehT0Px3KOsy9(chr(1986 - 1938) + '\x6f' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b110101) + chr(0b10011 + 0o37), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(363 - 313) + '\x30' + chr(2063 - 2010), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(52) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(1662 - 1614) + chr(1285 - 1174) + chr(159 - 108) + '\x35' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(5795 - 5684) + chr(437 - 387) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(0b1 + 0o57) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(55) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(2025 - 1974) + '\x34' + chr(757 - 707), 50165 - 50157), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\x36' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10591 - 10480) + '\x33' + chr(1264 - 1215) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + '\062' + chr(2316 - 2262) + chr(1521 - 1468), 59891 - 59883), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(52) + '\063', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\060' + chr(0b1 + 0o64), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\x36' + chr(0b110111), 18913 - 18905), ehT0Px3KOsy9('\x30' + chr(10277 - 10166) + chr(2160 - 2109) + '\x34' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1782 - 1731) + '\065' + chr(581 - 531), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\065' + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b1101 + 0o43) + chr(0b101010 + 0o7), 1214 - 1206), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1552 - 1502) + chr(0b0 + 0o62) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(1074 - 1026) + '\157' + chr(55) + chr(53), 37925 - 37917), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\x32' + chr(645 - 594) + chr(0b110100), 21418 - 21410), ehT0Px3KOsy9(chr(2272 - 2224) + chr(111) + chr(0b10 + 0o57) + chr(1258 - 1203) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(50) + '\067' + '\x37', 0o10), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + chr(0b100111 + 0o13) + '\x33' + chr(2654 - 2599), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001100 + 0o43) + chr(0b110110) + chr(52), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(554 - 505) + chr(0b11100 + 0o31) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(54) + chr(0b10111 + 0o33), 0b1000), ehT0Px3KOsy9('\060' + chr(10786 - 10675) + chr(0b110011) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(54) + chr(129 - 74), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(9970 - 9859) + chr(53) + chr(0b1001 + 0o47), 40964 - 40956)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a'), '\144' + '\x65' + chr(0b1100011) + chr(12013 - 11902) + chr(5322 - 5222) + '\x65')('\x75' + chr(0b1110100) + chr(0b11011 + 0o113) + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def GBPY9HD7XOxV(n4ljua2gi1Pr): kDuFsAhEatcU = IDJ2eXGCBCDu.to_float(IDJ2eXGCBCDu.train.get_or_create_global_step()) S0Mp0SOoXply = n4ljua2gi1Pr.optimizer_multistep_accumulate_steps if not S0Mp0SOoXply: return kDuFsAhEatcU xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b"\xf7\xc8\xcb\xab'9}F\x85m\xf0\xee"), '\x64' + chr(101) + '\x63' + chr(5978 - 5867) + chr(223 - 123) + chr(0b1100101))('\165' + '\x74' + chr(102) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xe0\x96\xf5\xba63t\x16\xcff\xc6\xeaA\x89{\xa0\xca\x96\xd1\xbc\x95A\xbc\xd7\xc0\x8e\r'\xfaO\xbc\x12\xca\xf3@\x03!AjR\xd4\xdf\xec\xa3&3w\x18\x95d\xd8\xab"), '\x64' + chr(9775 - 9674) + chr(99) + chr(0b110010 + 0o75) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(1719 - 1674) + chr(0b10111 + 0o41)) % S0Mp0SOoXply) return kDuFsAhEatcU / xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0\x90\xdc\xb5>5{\x05'), chr(7972 - 7872) + chr(101) + chr(99) + chr(0b1011001 + 0o26) + chr(7519 - 7419) + chr(7690 - 7589))(chr(0b100111 + 0o116) + '\164' + chr(0b1100110) + '\055' + '\x38'))(S0Mp0SOoXply)
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
_piecewise_learning_rate
def _piecewise_learning_rate(step, boundaries, values): """Scale learning rate according to the given schedule. Multipliers are not cumulative. Args: step: global step boundaries: List of steps to transition on. values: Multiplier to apply at each boundary transition. Returns: Scaled value for the learning rate. """ values = [1.0] + values boundaries = [float(x) for x in boundaries] return tf.train.piecewise_constant( step, boundaries, values, name="piecewise_lr")
python
def _piecewise_learning_rate(step, boundaries, values): """Scale learning rate according to the given schedule. Multipliers are not cumulative. Args: step: global step boundaries: List of steps to transition on. values: Multiplier to apply at each boundary transition. Returns: Scaled value for the learning rate. """ values = [1.0] + values boundaries = [float(x) for x in boundaries] return tf.train.piecewise_constant( step, boundaries, values, name="piecewise_lr")
[ "def", "_piecewise_learning_rate", "(", "step", ",", "boundaries", ",", "values", ")", ":", "values", "=", "[", "1.0", "]", "+", "values", "boundaries", "=", "[", "float", "(", "x", ")", "for", "x", "in", "boundaries", "]", "return", "tf", ".", "train", ".", "piecewise_constant", "(", "step", ",", "boundaries", ",", "values", ",", "name", "=", "\"piecewise_lr\"", ")" ]
Scale learning rate according to the given schedule. Multipliers are not cumulative. Args: step: global step boundaries: List of steps to transition on. values: Multiplier to apply at each boundary transition. Returns: Scaled value for the learning rate.
[ "Scale", "learning", "rate", "according", "to", "the", "given", "schedule", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L122-L138
train
Scale learning rate according to the given schedule.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZz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FWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(380 - 331) + '\x30' + chr(1075 - 1023), 61086 - 61078), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101001 + 0o11) + chr(0b11010 + 0o31) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11100 + 0o25) + '\066' + chr(755 - 706), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1590 - 1540) + '\x35' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1100001 + 0o16) + '\x33' + '\067' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9032 - 8921) + chr(50) + '\064' + chr(0b100001 + 0o20), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110110) + '\x33', 47013 - 47005), ehT0Px3KOsy9(chr(48) + chr(8832 - 8721) + chr(50) + '\063' + chr(1241 - 1190), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110110) + chr(0b101 + 0o62), ord("\x08")), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101111) + '\x33' + chr(0b110011) + chr(0b110110), 51645 - 51637), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b111 + 0o52) + chr(0b1100 + 0o46) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1343 - 1295) + chr(0b1101111) + '\064' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(266 - 217) + chr(1351 - 1296) + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(11464 - 11353) + chr(0b110010) + '\065' + '\063', 36817 - 36809), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(55) + chr(1145 - 1090), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b110010) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2069 - 2021) + chr(0b1101111) + '\061' + chr(0b100111 + 0o17) + chr(1719 - 1670), 8), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + chr(0b110001) + '\066' + '\065', 4902 - 4894), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(8223 - 8112) + '\x32' + chr(0b11010 + 0o35) + chr(0b1011 + 0o45), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b111 + 0o56) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\062' + chr(1507 - 1458), 0b1000), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(11744 - 11633) + '\063' + chr(51) + '\x30', 28088 - 28080), ehT0Px3KOsy9(chr(48) + chr(11457 - 11346) + chr(49) + chr(0b11001 + 0o35) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(0b11101 + 0o24) + '\062' + chr(0b110011), 44617 - 44609), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x31' + chr(49), 13706 - 13698), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(149 - 99) + '\060' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011101 + 0o22) + chr(0b110011) + '\062' + chr(49), 63934 - 63926), ehT0Px3KOsy9(chr(48) + chr(0b11110 + 0o121) + chr(0b110001) + chr(52) + '\x30', 3153 - 3145), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x31' + chr(54), 13764 - 13756), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b110010) + chr(52) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(1888 - 1833) + chr(1571 - 1521), 35607 - 35599), ehT0Px3KOsy9(chr(906 - 858) + chr(111) + chr(50) + '\063' + chr(0b101100 + 0o5), 0o10), ehT0Px3KOsy9(chr(48) + chr(1303 - 1192) + chr(0b110010) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1110 + 0o43) + chr(802 - 751) + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + chr(0b110010) + '\064' + chr(1054 - 1003), 57178 - 57170), ehT0Px3KOsy9(chr(804 - 756) + chr(11952 - 11841) + chr(49) + chr(48) + chr(2027 - 1972), 0b1000), ehT0Px3KOsy9(chr(48) + chr(11656 - 11545) + chr(49) + chr(0b110010) + '\x32', 8), ehT0Px3KOsy9(chr(1010 - 962) + chr(0b111010 + 0o65) + chr(0b10 + 0o61) + chr(0b110011) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b1111 + 0o43), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(4467 - 4356) + chr(0b110101) + chr(48), 42008 - 42000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'6'), chr(0b1010110 + 0o16) + chr(0b1111 + 0o126) + '\x63' + chr(0b100100 + 0o113) + '\x64' + chr(101))(chr(9473 - 9356) + chr(116) + chr(0b1100110) + '\055' + chr(0b101 + 0o63)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WRYqXTn2Wj7b(kDuFsAhEatcU, n7rrZRZYkBNq, SPnCNu54H1db): SPnCNu54H1db = [1.0] + SPnCNu54H1db n7rrZRZYkBNq = [kkSX4ccExqw4(OeWW0F1dBPRQ) for OeWW0F1dBPRQ in n7rrZRZYkBNq] return xafqLlk3kkUe(IDJ2eXGCBCDu.train, xafqLlk3kkUe(SXOLrMavuUCe(b'h-\xfe\x12\xcb\x8d\xc8@\xfeh\xbd=K\x0b\xdf\x9e\xfd\x05'), chr(0b1100100) + '\x65' + chr(0b101100 + 0o67) + chr(0b11010 + 0o125) + '\x64' + chr(5299 - 5198))('\x75' + chr(6267 - 6151) + '\x66' + '\055' + '\070'))(kDuFsAhEatcU, n7rrZRZYkBNq, SPnCNu54H1db, name=xafqLlk3kkUe(SXOLrMavuUCe(b'h-\xfe\x12\xcb\x8d\xc8@\xfeh\xb2 '), chr(0b1100100) + chr(3858 - 3757) + chr(6143 - 6044) + chr(0b1101111) + chr(0b10100 + 0o120) + chr(0b1100101))(chr(0b111111 + 0o66) + chr(0b101100 + 0o110) + '\x66' + chr(45) + chr(0b111000)))
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
_learning_rate_decay
def _learning_rate_decay(hparams, warmup_steps=0): """Learning rate decay multiplier.""" scheme = hparams.learning_rate_decay_scheme warmup_steps = tf.to_float(warmup_steps) global_step = _global_step(hparams) if not scheme or scheme == "none": return tf.constant(1.) tf.logging.info("Applying learning rate decay: %s.", scheme) if scheme == "exp": decay_steps = hparams.learning_rate_decay_steps p = (global_step - warmup_steps) / decay_steps if hparams.learning_rate_decay_staircase: p = tf.floor(p) return tf.pow(hparams.learning_rate_decay_rate, p) if scheme == "piecewise": return _piecewise_learning_rate(global_step, hparams.learning_rate_boundaries, hparams.learning_rate_multiples) if scheme == "cosine": cycle_steps = hparams.learning_rate_cosine_cycle_steps cycle_position = global_step % (2 * cycle_steps) cycle_position = cycle_steps - tf.abs(cycle_steps - cycle_position) return 0.5 * (1 + tf.cos(np.pi * cycle_position / cycle_steps)) if scheme == "cyclelinear10x": # Cycle the rate linearly by 10x every warmup_steps, up and down. cycle_steps = warmup_steps cycle_position = global_step % (2 * cycle_steps) cycle_position = tf.to_float( # Normalize to the interval [-1, 1]. cycle_position - cycle_steps) / float(cycle_steps) cycle_position = 1.0 - tf.abs(cycle_position) # 0 to 1 and back to 0. return (cycle_position + 0.1) * 3.0 # 10x difference each cycle (0.3-3). if scheme == "sqrt": return _legacy_sqrt_decay(global_step - warmup_steps) raise ValueError("Unrecognized learning rate decay scheme: %s" % hparams.learning_rate_decay_scheme)
python
def _learning_rate_decay(hparams, warmup_steps=0): """Learning rate decay multiplier.""" scheme = hparams.learning_rate_decay_scheme warmup_steps = tf.to_float(warmup_steps) global_step = _global_step(hparams) if not scheme or scheme == "none": return tf.constant(1.) tf.logging.info("Applying learning rate decay: %s.", scheme) if scheme == "exp": decay_steps = hparams.learning_rate_decay_steps p = (global_step - warmup_steps) / decay_steps if hparams.learning_rate_decay_staircase: p = tf.floor(p) return tf.pow(hparams.learning_rate_decay_rate, p) if scheme == "piecewise": return _piecewise_learning_rate(global_step, hparams.learning_rate_boundaries, hparams.learning_rate_multiples) if scheme == "cosine": cycle_steps = hparams.learning_rate_cosine_cycle_steps cycle_position = global_step % (2 * cycle_steps) cycle_position = cycle_steps - tf.abs(cycle_steps - cycle_position) return 0.5 * (1 + tf.cos(np.pi * cycle_position / cycle_steps)) if scheme == "cyclelinear10x": # Cycle the rate linearly by 10x every warmup_steps, up and down. cycle_steps = warmup_steps cycle_position = global_step % (2 * cycle_steps) cycle_position = tf.to_float( # Normalize to the interval [-1, 1]. cycle_position - cycle_steps) / float(cycle_steps) cycle_position = 1.0 - tf.abs(cycle_position) # 0 to 1 and back to 0. return (cycle_position + 0.1) * 3.0 # 10x difference each cycle (0.3-3). if scheme == "sqrt": return _legacy_sqrt_decay(global_step - warmup_steps) raise ValueError("Unrecognized learning rate decay scheme: %s" % hparams.learning_rate_decay_scheme)
[ "def", "_learning_rate_decay", "(", "hparams", ",", "warmup_steps", "=", "0", ")", ":", "scheme", "=", "hparams", ".", "learning_rate_decay_scheme", "warmup_steps", "=", "tf", ".", "to_float", "(", "warmup_steps", ")", "global_step", "=", "_global_step", "(", "hparams", ")", "if", "not", "scheme", "or", "scheme", "==", "\"none\"", ":", "return", "tf", ".", "constant", "(", "1.", ")", "tf", ".", "logging", ".", "info", "(", "\"Applying learning rate decay: %s.\"", ",", "scheme", ")", "if", "scheme", "==", "\"exp\"", ":", "decay_steps", "=", "hparams", ".", "learning_rate_decay_steps", "p", "=", "(", "global_step", "-", "warmup_steps", ")", "/", "decay_steps", "if", "hparams", ".", "learning_rate_decay_staircase", ":", "p", "=", "tf", ".", "floor", "(", "p", ")", "return", "tf", ".", "pow", "(", "hparams", ".", "learning_rate_decay_rate", ",", "p", ")", "if", "scheme", "==", "\"piecewise\"", ":", "return", "_piecewise_learning_rate", "(", "global_step", ",", "hparams", ".", "learning_rate_boundaries", ",", "hparams", ".", "learning_rate_multiples", ")", "if", "scheme", "==", "\"cosine\"", ":", "cycle_steps", "=", "hparams", ".", "learning_rate_cosine_cycle_steps", "cycle_position", "=", "global_step", "%", "(", "2", "*", "cycle_steps", ")", "cycle_position", "=", "cycle_steps", "-", "tf", ".", "abs", "(", "cycle_steps", "-", "cycle_position", ")", "return", "0.5", "*", "(", "1", "+", "tf", ".", "cos", "(", "np", ".", "pi", "*", "cycle_position", "/", "cycle_steps", ")", ")", "if", "scheme", "==", "\"cyclelinear10x\"", ":", "# Cycle the rate linearly by 10x every warmup_steps, up and down.", "cycle_steps", "=", "warmup_steps", "cycle_position", "=", "global_step", "%", "(", "2", "*", "cycle_steps", ")", "cycle_position", "=", "tf", ".", "to_float", "(", "# Normalize to the interval [-1, 1].", "cycle_position", "-", "cycle_steps", ")", "/", "float", "(", "cycle_steps", ")", "cycle_position", "=", "1.0", "-", "tf", ".", "abs", "(", "cycle_position", ")", "# 0 to 1 and back to 0.", "return", "(", "cycle_position", "+", "0.1", ")", "*", "3.0", "# 10x difference each cycle (0.3-3).", "if", "scheme", "==", "\"sqrt\"", ":", "return", "_legacy_sqrt_decay", "(", "global_step", "-", "warmup_steps", ")", "raise", "ValueError", "(", "\"Unrecognized learning rate decay scheme: %s\"", "%", "hparams", ".", "learning_rate_decay_scheme", ")" ]
Learning rate decay multiplier.
[ "Learning", "rate", "decay", "multiplier", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L141-L183
train
Learning rate decay multiplier.
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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4,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(362 - 314) + chr(3049 - 2938) + chr(0b110010) + '\063' + chr(1529 - 1479), 0o10), ehT0Px3KOsy9(chr(184 - 136) + '\x6f' + chr(50) + chr(378 - 326) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(395 - 347) + '\x6f' + chr(0b110011) + '\x32' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2112 - 2058) + '\x33', 1054 - 1046), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(166 - 111) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1281 - 1231) + chr(0b10 + 0o62) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10219 - 10108) + chr(0b110011) + chr(1535 - 1484) + chr(647 - 593), 39045 - 39037), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1444 - 1389) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110001) + chr(1407 - 1352) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(3853 - 3742) + '\062' + '\061' + chr(0b100000 + 0o20), 0o10), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(7693 - 7582) + '\061' + chr(0b110100) + '\060', 42792 - 42784), ehT0Px3KOsy9(chr(1927 - 1879) + chr(0b101111 + 0o100) + chr(268 - 218) + chr(764 - 714) + '\x34', 0o10), ehT0Px3KOsy9(chr(1237 - 1189) + chr(0b1011011 + 0o24) + chr(823 - 774) + chr(0b110001) + chr(0b11100 + 0o25), 56665 - 56657), ehT0Px3KOsy9('\060' + '\157' + '\062' + chr(0b110101) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + '\x33' + chr(0b110111) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\x36' + chr(0b10111 + 0o37), 0o10), ehT0Px3KOsy9(chr(2104 - 2056) + '\x6f' + chr(0b101100 + 0o5), 29780 - 29772), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(0b110100) + chr(1037 - 988), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1100010 + 0o15) + chr(2490 - 2440) + chr(0b11011 + 0o26) + '\064', 31787 - 31779), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(6512 - 6401) + chr(0b110011) + chr(0b101 + 0o62) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x32' + '\064' + chr(1997 - 1945), 8), ehT0Px3KOsy9(chr(492 - 444) + chr(0b1011010 + 0o25) + chr(49) + chr(0b110111) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + '\062' + '\060' + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(1015 - 967) + chr(0b110100), 58679 - 58671), ehT0Px3KOsy9(chr(48) + chr(2304 - 2193) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + chr(0b111 + 0o150) + chr(0b11011 + 0o26) + chr(0b110010) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b100 + 0o63) + '\064', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + '\x30' + '\065', 51256 - 51248), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(123 - 73) + '\060' + chr(0b11111 + 0o25), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5450 - 5339) + chr(49) + chr(0b101 + 0o61) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2167 - 2118) + '\060' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(466 - 416) + chr(155 - 107) + '\061', 8), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b101111 + 0o4) + '\x30' + chr(1224 - 1169), ord("\x08")), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(10570 - 10459) + chr(49) + '\x35' + chr(1948 - 1899), 0b1000), ehT0Px3KOsy9(chr(394 - 346) + chr(111) + '\x34' + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b10001 + 0o40) + '\x30' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + '\x6f' + '\x31' + chr(0b110110) + '\060', 43195 - 43187), ehT0Px3KOsy9(chr(1629 - 1581) + chr(111) + chr(2096 - 2041) + chr(683 - 628), 0b1000), ehT0Px3KOsy9(chr(1209 - 1161) + '\157' + chr(2005 - 1956) + '\066' + chr(2153 - 2098), 17460 - 17452)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110101) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4'), '\x64' + chr(0b1100101) + '\143' + chr(0b101111 + 0o100) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def teSMijFXA7g0(n4ljua2gi1Pr, p2epArE4laJj=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(48), 35393 - 35385)): nh0h0JN0W0q6 = n4ljua2gi1Pr.v3ZnJE9Hdub1 p2epArE4laJj = IDJ2eXGCBCDu.to_float(p2epArE4laJj) tnqEWmPx71Oj = GBPY9HD7XOxV(n4ljua2gi1Pr) if not nh0h0JN0W0q6 or nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xf4\xcb\xbfV'), chr(8754 - 8654) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(6099 - 5998))(chr(3611 - 3494) + '\164' + chr(102) + chr(45) + chr(956 - 900)): return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xcb\xbf@bX\xcf\xaa'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b11001 + 0o126) + '\x64' + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(0b11100 + 0o21) + chr(0b111000)))(1.0) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9\x93\x99KcZ\xc6\xe9Q\x14\xd2\x0b'), '\x64' + chr(2744 - 2643) + chr(0b1011111 + 0o4) + chr(111) + chr(0b100110 + 0o76) + chr(0b1010 + 0o133))(chr(117) + chr(116) + chr(0b11100 + 0o112) + chr(0b11001 + 0o24) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b"\xdb\xd4\xa1_oP\xcf\xb9\x1b\x14\xed\x01\xe6'\xc7\x91\x11!S\xed\x8d\xc1\\\xe5!g6\x05\xff\xa4V6\xaf"), '\144' + chr(4740 - 4639) + '\143' + chr(0b110111 + 0o70) + chr(2613 - 2513) + chr(101))(chr(0b1110101) + '\164' + chr(4944 - 4842) + chr(45) + chr(2165 - 2109)), nh0h0JN0W0q6) if nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xff\xdc\xa1'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(188 - 87))(chr(117) + '\x74' + chr(8226 - 8124) + chr(0b1100 + 0o41) + chr(0b10011 + 0o45)): IyD5QShhvvmp = n4ljua2gi1Pr.YBAB1XyoxOc5 UyakMW2IMFEj = (tnqEWmPx71Oj - p2epArE4laJj) / IyD5QShhvvmp if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xc1\xb0AxP\xcf\xb9d\n\xe9\x14\xf1\x16\xca\x9a\x15`X\xd3\x8a\xd0\x1d\xe86g6\x0f\xa0'), chr(879 - 779) + chr(0b111011 + 0o52) + chr(99) + '\x6f' + '\144' + chr(101))('\x75' + chr(116) + chr(102) + '\055' + '\070')): UyakMW2IMFEj = IDJ2eXGCBCDu.floor(UyakMW2IMFEj) return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xcb\xa6'), chr(0b1100100) + chr(0b1011011 + 0o12) + '\x63' + chr(111) + chr(100) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(0b10110 + 0o27) + '\x38'))(xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xc1\xb0AxP\xcf\xb9d\n\xe9\x14\xf1\x16\xca\x9a\x15`X\xd3\x8b\xc5\x08\xe4'), '\x64' + chr(10155 - 10054) + chr(2015 - 1916) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + '\x74' + chr(0b1000111 + 0o37) + '\x2d' + chr(1764 - 1708))), UyakMW2IMFEj) if nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xcd\xb4PsN\xc8\xad^'), chr(0b1100100) + chr(0b1100101) + chr(0b10011 + 0o120) + chr(0b110 + 0o151) + chr(0b1100100) + chr(0b1000001 + 0o44))(chr(793 - 676) + chr(0b10001 + 0o143) + chr(0b1100110) + chr(0b11010 + 0o23) + chr(56)): return WRYqXTn2Wj7b(tnqEWmPx71Oj, xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xc1\xb0AxP\xcf\xb9d\n\xe9\x14\xf1\x16\xcc\x90\x03oE\xed\x8b\xcd\x19\xf2'), chr(0b1100100) + chr(0b1100101) + chr(1860 - 1761) + '\157' + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b11111 + 0o107) + chr(0b101101) + chr(2798 - 2742))), xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xc1\xb0AxP\xcf\xb9d\n\xe9\x14\xf1\x16\xc3\x8a\x1auH\xfc\x95\xc1\x0f'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + chr(100) + chr(0b1011111 + 0o6))('\165' + '\164' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(56)))) if nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xcb\xa2Zx\\'), '\x64' + chr(0b1100101) + chr(0b10001 + 0o122) + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b0 + 0o164) + chr(0b10101 + 0o121) + chr(1457 - 1412) + chr(2245 - 2189)): F20AcumCJ62k = n4ljua2gi1Pr.Wnk8oTekUy10 FzLr1Ejd8K8N = tnqEWmPx71Oj % (ehT0Px3KOsy9(chr(1823 - 1775) + chr(0b1101111) + '\x32', 0b1000) * F20AcumCJ62k) FzLr1Ejd8K8N = F20AcumCJ62k - IDJ2eXGCBCDu.abs(F20AcumCJ62k - FzLr1Ejd8K8N) return 0.5 * (ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 8) + xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xcb\xa2'), chr(0b1100100) + chr(0b10010 + 0o123) + chr(0b1000 + 0o133) + chr(0b1000101 + 0o52) + chr(100) + chr(0b1100101))(chr(5647 - 5530) + '\x74' + chr(8509 - 8407) + chr(657 - 612) + chr(0b10001 + 0o47)))(xafqLlk3kkUe(WqUC3KWvYVup, xafqLlk3kkUe(SXOLrMavuUCe(b'\xea\xcd'), chr(0b1100100) + '\145' + chr(0b1011010 + 0o11) + chr(111) + '\x64' + chr(5683 - 5582))(chr(0b1110101) + chr(0b1110100) + chr(936 - 834) + '\x2d' + '\070')) * FzLr1Ejd8K8N / F20AcumCJ62k)) if nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9\xdd\xb2_sU\xc8\xb0^\x19\xfaQ\xa41'), chr(100) + chr(101) + '\x63' + '\x6f' + '\x64' + '\x65')(chr(117) + chr(0b110011 + 0o101) + chr(102) + chr(576 - 531) + chr(56)): F20AcumCJ62k = p2epArE4laJj FzLr1Ejd8K8N = tnqEWmPx71Oj % (ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(50), 8) * F20AcumCJ62k) FzLr1Ejd8K8N = IDJ2eXGCBCDu.to_float(FzLr1Ejd8K8N - F20AcumCJ62k) / kkSX4ccExqw4(F20AcumCJ62k) FzLr1Ejd8K8N = 1.0 - IDJ2eXGCBCDu.abs(FzLr1Ejd8K8N) return (FzLr1Ejd8K8N + 0.1) * 3.0 if nh0h0JN0W0q6 == xafqLlk3kkUe(SXOLrMavuUCe(b'\xe9\xd5\xa3G'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b111000)): return BAFpDOMFXmDv(tnqEWmPx71Oj - p2epArE4laJj) raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\xca\xa3VuV\xc6\xb0R\x02\xed\x04\xb4%\xcb\x9e\x04oH\xe2\x9e\x84\x0e\xe00aw\x18\xa0\xe7\x12<\xa1\xb4\nH&\x1dZM\xba\x81\xa2'), '\144' + '\145' + chr(0b11101 + 0o106) + '\157' + chr(1917 - 1817) + '\145')(chr(12500 - 12383) + chr(116) + chr(0b1100110) + '\055' + chr(405 - 349)) % xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x97\x8b]\\|\x98\x96_\r\xeaQ'), chr(100) + '\145' + chr(8590 - 8491) + chr(0b1101111) + chr(0b111000 + 0o54) + '\x65')(chr(0b1100000 + 0o25) + '\x74' + chr(102) + chr(0b11010 + 0o23) + chr(517 - 461))))
tensorflow/tensor2tensor
tensor2tensor/utils/learning_rate.py
_learning_rate_warmup
def _learning_rate_warmup(warmup_steps, warmup_schedule="exp", hparams=None): """Learning rate warmup multiplier.""" if not warmup_steps: return tf.constant(1.) tf.logging.info("Applying %s learning rate warmup for %d steps", warmup_schedule, warmup_steps) warmup_steps = tf.to_float(warmup_steps) global_step = _global_step(hparams) if warmup_schedule == "exp": return tf.exp(tf.log(0.01) / warmup_steps)**(warmup_steps - global_step) else: assert warmup_schedule == "linear" start = tf.constant(0.35) return ((tf.constant(1.) - start) / warmup_steps) * global_step + start
python
def _learning_rate_warmup(warmup_steps, warmup_schedule="exp", hparams=None): """Learning rate warmup multiplier.""" if not warmup_steps: return tf.constant(1.) tf.logging.info("Applying %s learning rate warmup for %d steps", warmup_schedule, warmup_steps) warmup_steps = tf.to_float(warmup_steps) global_step = _global_step(hparams) if warmup_schedule == "exp": return tf.exp(tf.log(0.01) / warmup_steps)**(warmup_steps - global_step) else: assert warmup_schedule == "linear" start = tf.constant(0.35) return ((tf.constant(1.) - start) / warmup_steps) * global_step + start
[ "def", "_learning_rate_warmup", "(", "warmup_steps", ",", "warmup_schedule", "=", "\"exp\"", ",", "hparams", "=", "None", ")", ":", "if", "not", "warmup_steps", ":", "return", "tf", ".", "constant", "(", "1.", ")", "tf", ".", "logging", ".", "info", "(", "\"Applying %s learning rate warmup for %d steps\"", ",", "warmup_schedule", ",", "warmup_steps", ")", "warmup_steps", "=", "tf", ".", "to_float", "(", "warmup_steps", ")", "global_step", "=", "_global_step", "(", "hparams", ")", "if", "warmup_schedule", "==", "\"exp\"", ":", "return", "tf", ".", "exp", "(", "tf", ".", "log", "(", "0.01", ")", "/", "warmup_steps", ")", "**", "(", "warmup_steps", "-", "global_step", ")", "else", ":", "assert", "warmup_schedule", "==", "\"linear\"", "start", "=", "tf", ".", "constant", "(", "0.35", ")", "return", "(", "(", "tf", ".", "constant", "(", "1.", ")", "-", "start", ")", "/", "warmup_steps", ")", "*", "global_step", "+", "start" ]
Learning rate warmup multiplier.
[ "Learning", "rate", "warmup", "multiplier", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/learning_rate.py#L186-L202
train
Learning rate warmup multiplier.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHA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kZvXL8qwsX,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(0b1011 + 0o45) + '\x6f' + '\x32' + '\x34' + chr(177 - 129), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(1773 - 1725) + '\x37', 0o10), ehT0Px3KOsy9(chr(290 - 242) + chr(5168 - 5057) + chr(0b110001) + chr(1633 - 1578) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + '\x33' + '\x36' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(48) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\066' + chr(252 - 199), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(54) + chr(54), 0o10), ehT0Px3KOsy9(chr(248 - 200) + '\x6f' + chr(1063 - 1013) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(394 - 344) + chr(0b110000 + 0o3) + chr(0b110010), 10291 - 10283), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(1407 - 1353) + chr(50), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110110) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(459 - 411) + chr(7236 - 7125) + '\063' + chr(2308 - 2257) + chr(0b11 + 0o61), 0o10), ehT0Px3KOsy9(chr(1263 - 1215) + chr(0b1101111) + chr(54) + chr(0b1010 + 0o51), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1426 - 1376) + chr(0b110001) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(54) + chr(54), 22822 - 22814), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\066' + chr(48), 19124 - 19116), ehT0Px3KOsy9('\x30' + chr(5831 - 5720) + '\x37' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\061' + chr(1339 - 1288) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110100) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(635 - 582) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10011 + 0o36), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + '\x33' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(195 - 144) + chr(53) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110001 + 0o4) + chr(2308 - 2256), 43472 - 43464), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(1766 - 1716) + chr(2133 - 2078) + chr(0b11101 + 0o25), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(730 - 677) + chr(1085 - 1036), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b101010 + 0o13) + chr(2788 - 2734), 12314 - 12306), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(9532 - 9421) + chr(814 - 764) + '\x33' + chr(0b110110 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001 + 0o2) + chr(0b101110 + 0o2), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\065' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(1874 - 1823) + '\061' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + '\063' + chr(49) + chr(2219 - 2165), 0b1000), ehT0Px3KOsy9('\060' + chr(10744 - 10633) + chr(51) + chr(1118 - 1063), ord("\x08")), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b110010) + chr(995 - 945) + '\x36', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(7387 - 7276) + '\063' + chr(0b110000) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x35' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\157' + chr(0b1011 + 0o47) + '\063' + chr(89 - 37), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(5920 - 5809) + chr(0b110101) + chr(531 - 483), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8e'), '\x64' + '\145' + chr(0b100001 + 0o102) + chr(111) + chr(0b1000000 + 0o44) + '\x65')(chr(5686 - 5569) + chr(0b10001 + 0o143) + chr(0b1100110) + chr(45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def pOqr8QQgnTGt(p2epArE4laJj, Y_RcEFxgsRzb=xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xff\r'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1000010 + 0o42) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b100111 + 0o6) + chr(0b11100 + 0o34)), n4ljua2gi1Pr=None): if not p2epArE4laJj: return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3\xe8\x13\x82\xb3\x14\x98\xdc'), chr(7974 - 7874) + '\145' + chr(99) + chr(111) + chr(8522 - 8422) + chr(6853 - 6752))(chr(2467 - 2350) + '\164' + chr(0b110111 + 0o57) + '\055' + chr(0b111000)))(1.0) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3\xb05\x89\xb2\x16\x91\x9f\xf0\x9ei\xb7'), chr(0b1100100) + chr(0b1000000 + 0o45) + chr(4453 - 4354) + chr(0b1101001 + 0o6) + chr(100) + '\x65')('\x75' + chr(5724 - 5608) + chr(7965 - 7863) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xe1\xf7\r\x9d\xbe\x1c\x98\xcf\xba\xd7@\xfc_\xe9\x17\x82P6LN!k\x8b~\t\x9a\xde\x0f\xedun\x1a\xed\xa8p\xe4\xf2\xe5\xce\xbc\xd3\xf3\x18\x81\xb4'), chr(0b110100 + 0o60) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1001 + 0o133) + chr(0b1100101))('\165' + '\164' + '\x66' + '\055' + '\x38'), Y_RcEFxgsRzb, p2epArE4laJj) p2epArE4laJj = IDJ2eXGCBCDu.to_float(p2epArE4laJj) tnqEWmPx71Oj = GBPY9HD7XOxV(n4ljua2gi1Pr) if Y_RcEFxgsRzb == xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xff\r'), '\144' + chr(101) + chr(6983 - 6884) + '\x6f' + chr(0b101010 + 0o72) + chr(0b1100101))(chr(7292 - 7175) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(1842 - 1786)): return xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\xff\r'), chr(100) + chr(0b1100101) + '\143' + chr(2362 - 2251) + chr(0b1100100) + chr(0b10001 + 0o124))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xe8\x1a'), chr(100) + '\x65' + '\x63' + chr(111) + chr(2984 - 2884) + chr(5973 - 5872))(chr(0b1010100 + 0o41) + '\x74' + '\x66' + '\x2d' + '\x38'))(0.01) / p2epArE4laJj) ** (p2epArE4laJj - tnqEWmPx71Oj) else: assert Y_RcEFxgsRzb == xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\xee\x13\x94\xa6\x07'), '\144' + chr(2738 - 2637) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + chr(0b1111 + 0o145) + '\x66' + '\x2d' + chr(0b11001 + 0o37)) avRbFsnfJxQj = IDJ2eXGCBCDu.constant(0.35) return (xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc3\xe8\x13\x82\xb3\x14\x98\xdc'), chr(100) + chr(4782 - 4681) + chr(1561 - 1462) + '\x6f' + chr(0b1100100) + chr(2601 - 2500))(chr(0b111000 + 0o75) + chr(116) + chr(6187 - 6085) + chr(45) + '\070'))(1.0) - avRbFsnfJxQj) / p2epArE4laJj * tnqEWmPx71Oj + avRbFsnfJxQj
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
is_in_expr
def is_in_expr(expr, find): """Returns True if `find` is a subtree of `expr`.""" return expr == find or (isinstance(expr, ExprNode) and expr.is_in(find))
python
def is_in_expr(expr, find): """Returns True if `find` is a subtree of `expr`.""" return expr == find or (isinstance(expr, ExprNode) and expr.is_in(find))
[ "def", "is_in_expr", "(", "expr", ",", "find", ")", ":", "return", "expr", "==", "find", "or", "(", "isinstance", "(", "expr", ",", "ExprNode", ")", "and", "expr", ".", "is_in", "(", "find", ")", ")" ]
Returns True if `find` is a subtree of `expr`.
[ "Returns", "True", "if", "find", "is", "a", "subtree", "of", "expr", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L90-L92
train
Returns True if expr is a subtree of find.
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,FXUco0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a1WNS,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(795 - 747) + chr(0b1101111) + chr(50) + '\062' + chr(1027 - 975), ord("\x08")), ehT0Px3KOsy9(chr(521 - 473) + chr(0b1101111) + chr(0b110001) + chr(418 - 365) + chr(0b100100 + 0o15), 24502 - 24494), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10010 + 0o40) + chr(0b110011) + chr(0b11001 + 0o33), 0o10), ehT0Px3KOsy9(chr(2086 - 2038) + '\x6f' + chr(50) + chr(1851 - 1800), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b11010 + 0o31) + '\063' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x35' + chr(108 - 58), 0o10), ehT0Px3KOsy9('\x30' + chr(12232 - 12121) + '\063' + chr(251 - 196) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + '\062' + chr(0b110100) + '\064', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(325 - 276) + chr(0b11011 + 0o30) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110111 + 0o70) + chr(1672 - 1617) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b10101 + 0o36), 0o10), ehT0Px3KOsy9(chr(1416 - 1368) + '\x6f' + '\x33' + chr(1358 - 1305) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1010011 + 0o34) + chr(0b10011 + 0o40) + chr(0b110001) + chr(55), 27574 - 27566), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110110) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\061' + chr(54), 50258 - 50250), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101010 + 0o11) + '\x30' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\157' + '\x31' + chr(189 - 138), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100 + 0o60) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1011110 + 0o21) + chr(0b110001) + '\x34' + chr(0b110111), 30085 - 30077), ehT0Px3KOsy9(chr(48) + chr(0b100000 + 0o117) + chr(52) + chr(49), 8), ehT0Px3KOsy9(chr(458 - 410) + '\x6f' + chr(2389 - 2337) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + chr(2724 - 2613) + chr(0b110011) + chr(55) + '\062', 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101 + 0o142) + '\061' + chr(0b100111 + 0o11) + '\x36', 50224 - 50216), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + chr(48) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(1550 - 1502) + chr(0b111001 + 0o66) + '\063' + chr(50) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110111) + chr(2169 - 2118), 0o10), ehT0Px3KOsy9(chr(1476 - 1428) + chr(0b1101111) + '\x33' + chr(571 - 522) + chr(0b10011 + 0o44), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(5054 - 4943) + '\x31' + chr(0b110010) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(88 - 40) + chr(6372 - 6261) + chr(0b110010) + '\x32' + '\061', 1947 - 1939), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(52) + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1478 - 1429) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(738 - 690) + '\x6f' + '\x31' + chr(0b1 + 0o63) + chr(1579 - 1526), 0o10), ehT0Px3KOsy9('\060' + chr(10267 - 10156) + '\x34' + '\x32', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x33' + chr(0b10110 + 0o41), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(11852 - 11741) + chr(50) + '\066' + chr(0b101101 + 0o12), 0b1000), ehT0Px3KOsy9(chr(48) + chr(767 - 656) + '\062' + chr(0b110110) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1 + 0o62) + chr(53) + chr(1539 - 1487), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(51) + chr(0b110101) + '\060', 0b1000), ehT0Px3KOsy9(chr(611 - 563) + '\x6f' + chr(49) + '\x31' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1417 - 1368) + '\067' + chr(54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(111) + chr(0b1110 + 0o47) + chr(0b110000), 41286 - 41278)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xba'), '\x64' + chr(101) + chr(8575 - 8476) + chr(0b1101111) + chr(0b1001110 + 0o26) + chr(0b1100101))('\165' + chr(0b1110100) + chr(7359 - 7257) + '\x2d' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def JYfCeK9WjyXW(uI2evTH5km5q, tU2t5Xw4d56f): return uI2evTH5km5q == tU2t5Xw4d56f or (PlSM16l2KDPD(uI2evTH5km5q, MX_oDU8Fv4tE) and xafqLlk3kkUe(uI2evTH5km5q, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\x1a\xc3z\xb2'), '\x64' + chr(0b1011011 + 0o12) + chr(0b111111 + 0o44) + '\157' + chr(1466 - 1366) + chr(101))(chr(12014 - 11897) + chr(0b1010101 + 0o37) + chr(102) + chr(0b101101) + '\x38'))(tU2t5Xw4d56f))
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
random_expr_with_required_var
def random_expr_with_required_var(depth, required_var, optional_list, ops): """Generate a random expression tree with a required variable. The required variable appears exactly once in the expression. Args: depth: At least one leaf will be this many levels down from the top. required_var: A char. This char is guaranteed to be placed exactly once at a leaf somewhere in the tree. This is the var to solve for. optional_list: A list of chars. These chars are randomly selected as leaf values. These are constant vars. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree. """ if not depth: if required_var: return required_var return str(optional_list[random.randrange(len(optional_list))]) max_depth_side = random.randrange(2) other_side_depth = random.randrange(depth) required_var_side = random.randrange(2) left = random_expr_with_required_var( depth - 1 if max_depth_side else other_side_depth, required_var if required_var_side else None, optional_list, ops) right = random_expr_with_required_var( depth - 1 if not max_depth_side else other_side_depth, required_var if not required_var_side else None, optional_list, ops) op = ops[random.randrange(len(ops))] return ExprNode(left, right, op)
python
def random_expr_with_required_var(depth, required_var, optional_list, ops): """Generate a random expression tree with a required variable. The required variable appears exactly once in the expression. Args: depth: At least one leaf will be this many levels down from the top. required_var: A char. This char is guaranteed to be placed exactly once at a leaf somewhere in the tree. This is the var to solve for. optional_list: A list of chars. These chars are randomly selected as leaf values. These are constant vars. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree. """ if not depth: if required_var: return required_var return str(optional_list[random.randrange(len(optional_list))]) max_depth_side = random.randrange(2) other_side_depth = random.randrange(depth) required_var_side = random.randrange(2) left = random_expr_with_required_var( depth - 1 if max_depth_side else other_side_depth, required_var if required_var_side else None, optional_list, ops) right = random_expr_with_required_var( depth - 1 if not max_depth_side else other_side_depth, required_var if not required_var_side else None, optional_list, ops) op = ops[random.randrange(len(ops))] return ExprNode(left, right, op)
[ "def", "random_expr_with_required_var", "(", "depth", ",", "required_var", ",", "optional_list", ",", "ops", ")", ":", "if", "not", "depth", ":", "if", "required_var", ":", "return", "required_var", "return", "str", "(", "optional_list", "[", "random", ".", "randrange", "(", "len", "(", "optional_list", ")", ")", "]", ")", "max_depth_side", "=", "random", ".", "randrange", "(", "2", ")", "other_side_depth", "=", "random", ".", "randrange", "(", "depth", ")", "required_var_side", "=", "random", ".", "randrange", "(", "2", ")", "left", "=", "random_expr_with_required_var", "(", "depth", "-", "1", "if", "max_depth_side", "else", "other_side_depth", ",", "required_var", "if", "required_var_side", "else", "None", ",", "optional_list", ",", "ops", ")", "right", "=", "random_expr_with_required_var", "(", "depth", "-", "1", "if", "not", "max_depth_side", "else", "other_side_depth", ",", "required_var", "if", "not", "required_var_side", "else", "None", ",", "optional_list", ",", "ops", ")", "op", "=", "ops", "[", "random", ".", "randrange", "(", "len", "(", "ops", ")", ")", "]", "return", "ExprNode", "(", "left", ",", "right", ",", "op", ")" ]
Generate a random expression tree with a required variable. The required variable appears exactly once in the expression. Args: depth: At least one leaf will be this many levels down from the top. required_var: A char. This char is guaranteed to be placed exactly once at a leaf somewhere in the tree. This is the var to solve for. optional_list: A list of chars. These chars are randomly selected as leaf values. These are constant vars. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree.
[ "Generate", "a", "random", "expression", "tree", "with", "a", "required", "variable", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L95-L129
train
Generate a random expression tree with a required variable.
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,q1QCh3W88sg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xBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b1000 + 0o57) + chr(0b101110 + 0o2), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\063' + chr(395 - 343), 13902 - 13894), ehT0Px3KOsy9(chr(612 - 564) + chr(111) + chr(0b1110 + 0o45) + chr(180 - 130) + chr(0b110 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + chr(9369 - 9258) + chr(53), 55440 - 55432), ehT0Px3KOsy9(chr(583 - 535) + chr(0b111 + 0o150) + '\x33' + chr(0b110110) + '\062', 34339 - 34331), ehT0Px3KOsy9(chr(0b110000) + chr(10751 - 10640) + '\061' + chr(0b1100 + 0o50) + chr(0b1010 + 0o50), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000111 + 0o50) + chr(50) + '\x35' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(150 - 100) + chr(55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100010 + 0o115) + '\061' + '\x36' + chr(50), 52861 - 52853), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + '\061' + chr(0b11110 + 0o25) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7724 - 7613) + chr(0b11011 + 0o30) + chr(588 - 533) + '\061', 50997 - 50989), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(438 - 387) + '\065' + chr(0b11101 + 0o24), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(0b100001 + 0o21) + chr(53) + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x32' + chr(0b110100), 36378 - 36370), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + chr(51) + chr(51) + chr(0b110110), 23130 - 23122), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + chr(0b110100) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(5957 - 5846) + chr(49) + chr(0b110000) + '\x35', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(0b110001) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(923 - 868), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2162 - 2051) + chr(0b10 + 0o57) + chr(257 - 207), ord("\x08")), ehT0Px3KOsy9(chr(169 - 121) + '\x6f' + '\x32' + chr(0b100011 + 0o21) + chr(0b101111 + 0o2), ord("\x08")), ehT0Px3KOsy9(chr(1301 - 1253) + '\x6f' + '\062' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(3499 - 3388) + '\061' + '\066' + chr(722 - 674), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(0b110001) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(2644 - 2592) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\x34' + '\x34', 39185 - 39177), ehT0Px3KOsy9('\x30' + chr(11392 - 11281) + '\061' + chr(54) + chr(0b10 + 0o63), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b110000 + 0o77) + chr(51) + '\x33' + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100000 + 0o23) + chr(50) + chr(0b110110), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x36' + chr(0b101101 + 0o10), 62911 - 62903), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(1972 - 1919) + chr(53), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(55) + chr(0b100110 + 0o20), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + '\x31' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(1185 - 1137) + chr(0b1101111) + chr(0b100001 + 0o21) + '\x31' + chr(0b111 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101 + 0o142) + chr(1056 - 1006) + chr(0b1 + 0o60) + chr(233 - 181), 15381 - 15373), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(111) + chr(51) + '\061' + chr(0b11001 + 0o31), 53810 - 53802), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b100010 + 0o115) + chr(0b10000 + 0o41) + chr(0b101110 + 0o2) + chr(1425 - 1373), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110110 + 0o71) + '\x32' + chr(0b110101) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(48) + '\064', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x30' + chr(51), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x16'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1011111 + 0o5) + '\x65')('\165' + '\x74' + chr(102) + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def yY9aQyYE0SZh(UEys4_lSwsID, PmhitHUxomZI, vdSMxqZncn80, _nu2um5Q5WJf): if not UEys4_lSwsID: if PmhitHUxomZI: return PmhitHUxomZI return M8_cKLkHVB2V(vdSMxqZncn80[xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'J\xfd\xbba\x80\x03\xc10\x17'), '\144' + '\x65' + chr(0b1111 + 0o124) + chr(0b110 + 0o151) + chr(0b1100100) + '\x65')(chr(156 - 39) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(c2A0yzQpDQB3(vdSMxqZncn80))]) jGjSGWTGinHS = drxw09AdRdci.randrange(ehT0Px3KOsy9(chr(1618 - 1570) + chr(0b1101111) + chr(0b10001 + 0o41), ord("\x08"))) FPFseLtOdSrS = drxw09AdRdci.randrange(UEys4_lSwsID) mipkTE_eL5Bx = drxw09AdRdci.randrange(ehT0Px3KOsy9(chr(2236 - 2188) + chr(0b1101111) + '\062', 8)) mtX6HPOlWiYu = yY9aQyYE0SZh(UEys4_lSwsID - ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(0b110001), 27286 - 27278) if jGjSGWTGinHS else FPFseLtOdSrS, PmhitHUxomZI if mipkTE_eL5Bx else None, vdSMxqZncn80, _nu2um5Q5WJf) isOYmsUx1jxa = yY9aQyYE0SZh(UEys4_lSwsID - ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + chr(0b110001), 8) if not jGjSGWTGinHS else FPFseLtOdSrS, PmhitHUxomZI if not mipkTE_eL5Bx else None, vdSMxqZncn80, _nu2um5Q5WJf) C8dAr6Ujq2Tn = _nu2um5Q5WJf[drxw09AdRdci.randrange(c2A0yzQpDQB3(_nu2um5Q5WJf))] return MX_oDU8Fv4tE(mtX6HPOlWiYu, isOYmsUx1jxa, C8dAr6Ujq2Tn)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
random_expr
def random_expr(depth, vlist, ops): """Generate a random expression tree. Args: depth: At least one leaf will be this many levels down from the top. vlist: A list of chars. These chars are randomly selected as leaf values. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree. """ if not depth: return str(vlist[random.randrange(len(vlist))]) max_depth_side = random.randrange(2) other_side_depth = random.randrange(depth) left = random_expr(depth - 1 if max_depth_side else other_side_depth, vlist, ops) right = random_expr(depth - 1 if not max_depth_side else other_side_depth, vlist, ops) op = ops[random.randrange(len(ops))] return ExprNode(left, right, op)
python
def random_expr(depth, vlist, ops): """Generate a random expression tree. Args: depth: At least one leaf will be this many levels down from the top. vlist: A list of chars. These chars are randomly selected as leaf values. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree. """ if not depth: return str(vlist[random.randrange(len(vlist))]) max_depth_side = random.randrange(2) other_side_depth = random.randrange(depth) left = random_expr(depth - 1 if max_depth_side else other_side_depth, vlist, ops) right = random_expr(depth - 1 if not max_depth_side else other_side_depth, vlist, ops) op = ops[random.randrange(len(ops))] return ExprNode(left, right, op)
[ "def", "random_expr", "(", "depth", ",", "vlist", ",", "ops", ")", ":", "if", "not", "depth", ":", "return", "str", "(", "vlist", "[", "random", ".", "randrange", "(", "len", "(", "vlist", ")", ")", "]", ")", "max_depth_side", "=", "random", ".", "randrange", "(", "2", ")", "other_side_depth", "=", "random", ".", "randrange", "(", "depth", ")", "left", "=", "random_expr", "(", "depth", "-", "1", "if", "max_depth_side", "else", "other_side_depth", ",", "vlist", ",", "ops", ")", "right", "=", "random_expr", "(", "depth", "-", "1", "if", "not", "max_depth_side", "else", "other_side_depth", ",", "vlist", ",", "ops", ")", "op", "=", "ops", "[", "random", ".", "randrange", "(", "len", "(", "ops", ")", ")", "]", "return", "ExprNode", "(", "left", ",", "right", ",", "op", ")" ]
Generate a random expression tree. Args: depth: At least one leaf will be this many levels down from the top. vlist: A list of chars. These chars are randomly selected as leaf values. ops: A list of ExprOp instances. Returns: An ExprNode instance which is the root of the generated expression tree.
[ "Generate", "a", "random", "expression", "tree", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L132-L155
train
Generate a random expression tree.
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(0b1001 + 0o47) + '\x6f' + chr(51) + chr(0b101011 + 0o6) + '\065', 7900 - 7892), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100011 + 0o16) + '\067' + chr(0b1001 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b1101111) + chr(50) + chr(0b110111) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(1402 - 1354) + chr(0b1101111) + chr(0b1 + 0o62) + chr(0b110000) + chr(1781 - 1733), 63020 - 63012), ehT0Px3KOsy9('\x30' + chr(0b10110 + 0o131) + chr(2509 - 2458) + chr(0b101100 + 0o11), 13533 - 13525), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + '\x33' + chr(0b110001 + 0o1) + chr(430 - 382), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101010 + 0o7) + '\x36' + '\064', 51387 - 51379), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(681 - 633) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(90 - 42) + chr(111) + '\x32' + chr(0b110011) + chr(1994 - 1939), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6903 - 6792) + chr(50) + chr(2074 - 2026) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(53) + chr(2797 - 2742), 35972 - 35964), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101101 + 0o6) + chr(976 - 927) + chr(0b10001 + 0o42), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(897 - 847) + chr(48), 47350 - 47342), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + chr(0b110001 + 0o1) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3043 - 2932) + chr(0b110001) + '\066' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(1056 - 1007) + chr(0b101111 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b1001 + 0o54) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(0b10100 + 0o43), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110111) + chr(1479 - 1427), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2351 - 2301) + '\x30' + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + '\066' + chr(739 - 685), 8), ehT0Px3KOsy9('\x30' + chr(0b1001100 + 0o43) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + '\x32' + chr(1694 - 1643) + chr(0b110101 + 0o0), 0b1000), ehT0Px3KOsy9(chr(2000 - 1952) + chr(0b1101111) + chr(0b110010) + chr(0b100011 + 0o21) + chr(1691 - 1638), 0o10), ehT0Px3KOsy9(chr(1822 - 1774) + '\x6f' + chr(49) + chr(54) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1100110 + 0o11) + chr(0b100101 + 0o16) + '\x37' + chr(0b1010 + 0o55), 53074 - 53066), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(6440 - 6329) + '\062' + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110001), 45977 - 45969), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1001100 + 0o43) + chr(0b11010 + 0o27) + chr(0b110011) + chr(0b110010), 36709 - 36701), ehT0Px3KOsy9(chr(2177 - 2129) + '\157' + '\x31' + chr(0b0 + 0o61) + chr(2338 - 2289), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(111) + chr(0b101110 + 0o3) + '\066', 0o10), ehT0Px3KOsy9(chr(1705 - 1657) + chr(3645 - 3534) + '\061' + '\066' + chr(0b101111 + 0o4), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1277 - 1228) + chr(50) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(2508 - 2397) + '\065' + chr(0b11010 + 0o33), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(338 - 283) + chr(1460 - 1406), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b111101 + 0o62) + '\x32' + chr(0b110111) + chr(0b110110), 311 - 303), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(690 - 639) + '\062', 8), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + '\x33' + chr(0b110101) + chr(48), 32981 - 32973), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(628 - 576) + '\x34', 46647 - 46639), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b10010 + 0o37) + chr(0b110110) + '\060', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1849 - 1801) + chr(0b1101111) + chr(2488 - 2435) + chr(457 - 409), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3'), '\x64' + chr(0b111010 + 0o53) + '\x63' + chr(4824 - 4713) + '\144' + '\x65')(chr(117) + chr(6727 - 6611) + chr(0b10010 + 0o124) + chr(0b11011 + 0o22) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def aLl18m884oms(UEys4_lSwsID, cDNokUnR7MCJ, _nu2um5Q5WJf): if not UEys4_lSwsID: return M8_cKLkHVB2V(cDNokUnR7MCJ[xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf\x1c\xd2\xa4o\xb1\x1a\xa6\xfa'), chr(9022 - 8922) + '\145' + chr(0b1101 + 0o126) + chr(0b10 + 0o155) + '\x64' + chr(101))(chr(12177 - 12060) + chr(0b1110100) + '\146' + chr(45) + chr(2126 - 2070)))(c2A0yzQpDQB3(cDNokUnR7MCJ))]) jGjSGWTGinHS = drxw09AdRdci.randrange(ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101001 + 0o6) + chr(50), 0b1000)) FPFseLtOdSrS = drxw09AdRdci.randrange(UEys4_lSwsID) mtX6HPOlWiYu = aLl18m884oms(UEys4_lSwsID - ehT0Px3KOsy9(chr(703 - 655) + '\x6f' + '\x31', 0b1000) if jGjSGWTGinHS else FPFseLtOdSrS, cDNokUnR7MCJ, _nu2um5Q5WJf) isOYmsUx1jxa = aLl18m884oms(UEys4_lSwsID - ehT0Px3KOsy9(chr(431 - 383) + '\157' + chr(0b101001 + 0o10), 8) if not jGjSGWTGinHS else FPFseLtOdSrS, cDNokUnR7MCJ, _nu2um5Q5WJf) C8dAr6Ujq2Tn = _nu2um5Q5WJf[drxw09AdRdci.randrange(c2A0yzQpDQB3(_nu2um5Q5WJf))] return MX_oDU8Fv4tE(mtX6HPOlWiYu, isOYmsUx1jxa, C8dAr6Ujq2Tn)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
algebra_inverse_solve
def algebra_inverse_solve(left, right, var, solve_ops): """Solves for the value of the given var in an expression. Args: left: The root of the ExprNode tree on the left side of the equals sign. right: The root of the ExprNode tree on the right side of the equals sign. var: A char. The variable to solve for. solve_ops: A dictionary with the following properties. * For each operator in the expression, there is a rule that determines how to cancel out a value either to the left or the right of that operator. * For each rule, there is an entry in the dictionary. The key is two chars- the op char, and either 'l' or 'r' meaning rule for canceling out the left or right sides. For example, '+l', '+r', '-l', '-r'. * The value of each entry is a function with the following signature: (left, right, to_tree) -> (new_from_tree, new_to_tree) left- Expression on left side of the op. right- Expression on the right side of the op. to_tree- The tree on the other side of the equal sign. The canceled out expression will be moved here. new_from_tree- The resulting from_tree after the algebraic manipulation. new_to_tree- The resulting to_tree after the algebraic manipulation. Returns: The root of an ExprNode tree which holds the value of `var` after solving. Raises: ValueError: If `var` does not appear exactly once in the equation (which includes the left and right sides). """ is_in_left = is_in_expr(left, var) is_in_right = is_in_expr(right, var) if is_in_left == is_in_right: if is_in_left: raise ValueError("Solve-variable '%s' is on both sides of the equation. " "Only equations where the solve variable-appears once " "are supported by this solver. Left: '%s', right: '%s'" % (var, str(left), str(right))) else: raise ValueError("Solve-variable '%s' is not present in the equation. It " "must appear once. Left: '%s', right: '%s'" % (var, str(left), str(right))) from_tree = left if is_in_left else right to_tree = left if not is_in_left else right while from_tree != var: is_in_left = is_in_expr(from_tree.left, var) is_in_right = is_in_expr(from_tree.right, var) from_tree, to_tree = (solve_ops[str(from_tree.op) + ("l" if is_in_left else "r")]( from_tree.left, from_tree.right, to_tree)) return to_tree
python
def algebra_inverse_solve(left, right, var, solve_ops): """Solves for the value of the given var in an expression. Args: left: The root of the ExprNode tree on the left side of the equals sign. right: The root of the ExprNode tree on the right side of the equals sign. var: A char. The variable to solve for. solve_ops: A dictionary with the following properties. * For each operator in the expression, there is a rule that determines how to cancel out a value either to the left or the right of that operator. * For each rule, there is an entry in the dictionary. The key is two chars- the op char, and either 'l' or 'r' meaning rule for canceling out the left or right sides. For example, '+l', '+r', '-l', '-r'. * The value of each entry is a function with the following signature: (left, right, to_tree) -> (new_from_tree, new_to_tree) left- Expression on left side of the op. right- Expression on the right side of the op. to_tree- The tree on the other side of the equal sign. The canceled out expression will be moved here. new_from_tree- The resulting from_tree after the algebraic manipulation. new_to_tree- The resulting to_tree after the algebraic manipulation. Returns: The root of an ExprNode tree which holds the value of `var` after solving. Raises: ValueError: If `var` does not appear exactly once in the equation (which includes the left and right sides). """ is_in_left = is_in_expr(left, var) is_in_right = is_in_expr(right, var) if is_in_left == is_in_right: if is_in_left: raise ValueError("Solve-variable '%s' is on both sides of the equation. " "Only equations where the solve variable-appears once " "are supported by this solver. Left: '%s', right: '%s'" % (var, str(left), str(right))) else: raise ValueError("Solve-variable '%s' is not present in the equation. It " "must appear once. Left: '%s', right: '%s'" % (var, str(left), str(right))) from_tree = left if is_in_left else right to_tree = left if not is_in_left else right while from_tree != var: is_in_left = is_in_expr(from_tree.left, var) is_in_right = is_in_expr(from_tree.right, var) from_tree, to_tree = (solve_ops[str(from_tree.op) + ("l" if is_in_left else "r")]( from_tree.left, from_tree.right, to_tree)) return to_tree
[ "def", "algebra_inverse_solve", "(", "left", ",", "right", ",", "var", ",", "solve_ops", ")", ":", "is_in_left", "=", "is_in_expr", "(", "left", ",", "var", ")", "is_in_right", "=", "is_in_expr", "(", "right", ",", "var", ")", "if", "is_in_left", "==", "is_in_right", ":", "if", "is_in_left", ":", "raise", "ValueError", "(", "\"Solve-variable '%s' is on both sides of the equation. \"", "\"Only equations where the solve variable-appears once \"", "\"are supported by this solver. Left: '%s', right: '%s'\"", "%", "(", "var", ",", "str", "(", "left", ")", ",", "str", "(", "right", ")", ")", ")", "else", ":", "raise", "ValueError", "(", "\"Solve-variable '%s' is not present in the equation. It \"", "\"must appear once. Left: '%s', right: '%s'\"", "%", "(", "var", ",", "str", "(", "left", ")", ",", "str", "(", "right", ")", ")", ")", "from_tree", "=", "left", "if", "is_in_left", "else", "right", "to_tree", "=", "left", "if", "not", "is_in_left", "else", "right", "while", "from_tree", "!=", "var", ":", "is_in_left", "=", "is_in_expr", "(", "from_tree", ".", "left", ",", "var", ")", "is_in_right", "=", "is_in_expr", "(", "from_tree", ".", "right", ",", "var", ")", "from_tree", ",", "to_tree", "=", "(", "solve_ops", "[", "str", "(", "from_tree", ".", "op", ")", "+", "(", "\"l\"", "if", "is_in_left", "else", "\"r\"", ")", "]", "(", "from_tree", ".", "left", ",", "from_tree", ".", "right", ",", "to_tree", ")", ")", "return", "to_tree" ]
Solves for the value of the given var in an expression. Args: left: The root of the ExprNode tree on the left side of the equals sign. right: The root of the ExprNode tree on the right side of the equals sign. var: A char. The variable to solve for. solve_ops: A dictionary with the following properties. * For each operator in the expression, there is a rule that determines how to cancel out a value either to the left or the right of that operator. * For each rule, there is an entry in the dictionary. The key is two chars- the op char, and either 'l' or 'r' meaning rule for canceling out the left or right sides. For example, '+l', '+r', '-l', '-r'. * The value of each entry is a function with the following signature: (left, right, to_tree) -> (new_from_tree, new_to_tree) left- Expression on left side of the op. right- Expression on the right side of the op. to_tree- The tree on the other side of the equal sign. The canceled out expression will be moved here. new_from_tree- The resulting from_tree after the algebraic manipulation. new_to_tree- The resulting to_tree after the algebraic manipulation. Returns: The root of an ExprNode tree which holds the value of `var` after solving. Raises: ValueError: If `var` does not appear exactly once in the equation (which includes the left and right sides).
[ "Solves", "for", "the", "value", "of", "the", "given", "var", "in", "an", "expression", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L158-L211
train
Solves for the value of the given var in an expression.
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,_bikz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IaWE,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(0b100011 + 0o15) + '\157' + chr(1002 - 952) + chr(0b110111) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(11952 - 11841) + chr(49) + chr(0b100100 + 0o17) + chr(0b110101), 32384 - 32376), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b1011 + 0o50) + chr(1142 - 1092), 0o10), ehT0Px3KOsy9(chr(2206 - 2158) + '\157' + '\x32' + chr(0b110101) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(255 - 205) + chr(0b110010) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\061' + chr(0b11 + 0o55), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(0b1 + 0o60) + chr(54) + chr(1485 - 1434), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b101110 + 0o4) + '\062', 60227 - 60219), ehT0Px3KOsy9('\x30' + chr(0b110101 + 0o72) + chr(49) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b0 + 0o62) + chr(1029 - 978) + chr(0b100100 + 0o17), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b10011 + 0o134) + '\063' + chr(0b110111) + chr(49), 27213 - 27205), ehT0Px3KOsy9(chr(1979 - 1931) + chr(7975 - 7864) + '\063' + chr(0b10111 + 0o33) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(4552 - 4441) + '\x33' + '\065' + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101 + 0o54) + chr(50) + chr(0b110011), 22862 - 22854), ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + '\062' + chr(843 - 793) + chr(1705 - 1650), 8), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + '\x33' + chr(52), 0o10), ehT0Px3KOsy9(chr(1173 - 1125) + chr(8583 - 8472) + chr(744 - 695) + '\x32' + '\x30', 22221 - 22213), ehT0Px3KOsy9('\x30' + chr(111) + chr(1246 - 1195) + chr(0b110111) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1135 - 1087) + chr(111) + chr(0b101111 + 0o6) + chr(53), 48481 - 48473), ehT0Px3KOsy9('\x30' + chr(0b111000 + 0o67) + chr(55) + '\062', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b100000 + 0o117) + chr(49) + chr(2596 - 2543) + chr(0b110000 + 0o7), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(1728 - 1673) + chr(1959 - 1905), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1042 - 991) + chr(1327 - 1278) + chr(0b10011 + 0o36), 21042 - 21034), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b111 + 0o150) + chr(0b1001 + 0o50) + '\067' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(159 - 111) + chr(0b1010 + 0o145) + '\x31' + '\063' + chr(1554 - 1502), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110000 + 0o4) + chr(0b11000 + 0o33), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + '\x36' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(200 - 152) + '\x6f' + '\063' + chr(0b110101) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(0b110110), 39495 - 39487), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(53), 0o10), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(0b110001) + '\x36' + chr(2576 - 2525), 8), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + '\062' + chr(91 - 39) + chr(1408 - 1354), ord("\x08")), ehT0Px3KOsy9(chr(1152 - 1104) + chr(7045 - 6934) + '\063' + '\x33' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110111) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + '\064' + chr(0b100010 + 0o23), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(4152 - 4041) + chr(51) + chr(0b11 + 0o56) + '\063', 40190 - 40182), ehT0Px3KOsy9('\060' + chr(6404 - 6293) + '\062' + chr(52) + chr(0b110010), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b110111) + chr(0b11 + 0o63), 33213 - 33205), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(2278 - 2228) + chr(1786 - 1737), 58103 - 58095), ehT0Px3KOsy9(chr(1698 - 1650) + chr(0b101010 + 0o105) + chr(0b110001) + '\067' + chr(0b10010 + 0o43), 48120 - 48112)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1813 - 1765) + '\157' + chr(0b1111 + 0o46) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x96'), chr(0b1100100) + chr(0b100110 + 0o77) + chr(211 - 112) + chr(0b11110 + 0o121) + '\x64' + chr(0b1001 + 0o134))('\x75' + chr(116) + '\x66' + chr(0b101101) + chr(1138 - 1082)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nGBWc5zniPEH(mtX6HPOlWiYu, isOYmsUx1jxa, l38lb8xQZNsE, zd2_K8SEGtuV): q_TNVeN8dLYc = JYfCeK9WjyXW(mtX6HPOlWiYu, l38lb8xQZNsE) zDOicTC8UI_5 = JYfCeK9WjyXW(isOYmsUx1jxa, l38lb8xQZNsE) if q_TNVeN8dLYc == zDOicTC8UI_5: if q_TNVeN8dLYc: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb2\xb6\xdf\xf2\xe5\x05\xf3\x7f\xf2\x98\xb2\x826\xb7;u\x8f\n\x1a\x06\x8d\xe9\x112\x03\xd5\x86buS\xd5\xb4_\x00\xb8\x82\xd1\xf7]\xcc5\xbf\x89\xf2\xb9\x06\xf3y\xf2\x96\xbe\xc0s\xd8r<\x85\r_\x1e\x8b\xa8\n5L\xd9\x9a6j\x1b\xc3\xaf^E\xbf\xca\xdb\xb1\x0e\xd71\xac\xcc\xb7\xbe\x12\xe0d\xfa\x9b\xbc\x8b~\xf6l \x99LH\x1c\xde\xa6\x10?F\x97\x88dxS\xd5\xa8K\x15\xa4\xd0\xca\xf4\x19\x98?\xa3\x89\xe3\xa0\x1a\xe1-\xe8\x96\xbc\x986\xe52p\xb0H\\\x1b\xc4\xe9YyP\x90\xc56o\x1a\xc1\xb5O_\xeb\x85\x9b\xe2Z'), '\144' + '\145' + chr(8118 - 8019) + chr(5853 - 5742) + chr(0b1010010 + 0o22) + chr(0b110100 + 0o61))(chr(117) + '\164' + '\146' + chr(0b101101) + '\x38') % (l38lb8xQZNsE, M8_cKLkHVB2V(mtX6HPOlWiYu), M8_cKLkHVB2V(isOYmsUx1jxa))) else: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b"\xeb2\xb6\xdf\xf2\xe5\x05\xf3\x7f\xf2\x98\xb2\x826\xb7;u\x8f\n\x1a\x06\x8d\xe9\x103W\x97\x99dx\x00\xc3\xb3OE\xa2\xcc\x9e\xe5\x15\xdd}\xbf\xd8\xe2\xa9\x07\xfbb\xf5\xd7\xf0\xa7'\xb7q%\x8fY\x1a\x0e\x8e\xb9\x1b=Q\x97\x86x~\x16\x88\xfdw\x00\xad\xd6\x84\xb1Z\x9d.\xfd\x85\xb7\xba\x1a\xf5e\xef\xc3\xf0\xc9v\xe4;"), chr(0b100101 + 0o77) + chr(0b11101 + 0o110) + chr(7511 - 7412) + chr(0b1101111) + chr(6430 - 6330) + '\x65')(chr(117) + '\164' + chr(0b11001 + 0o115) + '\055' + chr(3015 - 2959)) % (l38lb8xQZNsE, M8_cKLkHVB2V(mtX6HPOlWiYu), M8_cKLkHVB2V(isOYmsUx1jxa))) Y_CLSnUesJVy = mtX6HPOlWiYu if q_TNVeN8dLYc else isOYmsUx1jxa JiibdnW9popl = mtX6HPOlWiYu if not q_TNVeN8dLYc else isOYmsUx1jxa while Y_CLSnUesJVy != l38lb8xQZNsE: q_TNVeN8dLYc = JYfCeK9WjyXW(Y_CLSnUesJVy.mtX6HPOlWiYu, l38lb8xQZNsE) zDOicTC8UI_5 = JYfCeK9WjyXW(Y_CLSnUesJVy.isOYmsUx1jxa, l38lb8xQZNsE) (Y_CLSnUesJVy, JiibdnW9popl) = zd2_K8SEGtuV[M8_cKLkHVB2V(Y_CLSnUesJVy.C8dAr6Ujq2Tn) + (xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4'), chr(0b1000000 + 0o44) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(4644 - 4543))(chr(117) + chr(0b11100 + 0o130) + '\x66' + chr(0b101101) + chr(1449 - 1393)) if q_TNVeN8dLYc else xafqLlk3kkUe(SXOLrMavuUCe(b'\xca'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(4846 - 4735) + '\x64' + chr(8092 - 7991))(chr(117) + chr(0b1100110 + 0o16) + '\x66' + chr(1919 - 1874) + '\x38'))](Y_CLSnUesJVy.mtX6HPOlWiYu, Y_CLSnUesJVy.isOYmsUx1jxa, JiibdnW9popl) return JiibdnW9popl
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
format_sympy_expr
def format_sympy_expr(sympy_expr, functions=None): """Convert sympy expression into a string which can be encoded. Args: sympy_expr: Any sympy expression tree or string. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: A string representation of the expression suitable for encoding as a sequence input. """ if functions is None: functions = {} str_expr = str(sympy_expr) result = str_expr.replace(" ", "") for fn_name, char in six.iteritems(functions): result = result.replace(fn_name, char) return result
python
def format_sympy_expr(sympy_expr, functions=None): """Convert sympy expression into a string which can be encoded. Args: sympy_expr: Any sympy expression tree or string. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: A string representation of the expression suitable for encoding as a sequence input. """ if functions is None: functions = {} str_expr = str(sympy_expr) result = str_expr.replace(" ", "") for fn_name, char in six.iteritems(functions): result = result.replace(fn_name, char) return result
[ "def", "format_sympy_expr", "(", "sympy_expr", ",", "functions", "=", "None", ")", ":", "if", "functions", "is", "None", ":", "functions", "=", "{", "}", "str_expr", "=", "str", "(", "sympy_expr", ")", "result", "=", "str_expr", ".", "replace", "(", "\" \"", ",", "\"\"", ")", "for", "fn_name", ",", "char", "in", "six", ".", "iteritems", "(", "functions", ")", ":", "result", "=", "result", ".", "replace", "(", "fn_name", ",", "char", ")", "return", "result" ]
Convert sympy expression into a string which can be encoded. Args: sympy_expr: Any sympy expression tree or string. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: A string representation of the expression suitable for encoding as a sequence input.
[ "Convert", "sympy", "expression", "into", "a", "string", "which", "can", "be", "encoded", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L214-L233
train
Convert a sympy expression tree to a string which can be encoded.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IyS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BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(0b110100) + chr(0b101100 + 0o4), 7100 - 7092), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(7676 - 7565) + chr(0b110001) + chr(51) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(48) + chr(1515 - 1464), 0b1000), ehT0Px3KOsy9(chr(1521 - 1473) + '\157' + chr(51) + '\061' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + '\x31' + '\x37' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(7340 - 7229) + chr(1798 - 1747) + chr(0b110011 + 0o2), 54507 - 54499), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110111) + chr(51), 15054 - 15046), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(51) + '\x37' + chr(2684 - 2629), 0b1000), ehT0Px3KOsy9(chr(1004 - 956) + chr(111) + '\x33' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1033 - 922) + chr(281 - 232) + chr(357 - 302) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(138 - 90) + '\065', 26935 - 26927), ehT0Px3KOsy9(chr(531 - 483) + chr(10022 - 9911) + chr(658 - 609) + chr(782 - 733) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\064' + chr(1050 - 1002), 8), ehT0Px3KOsy9(chr(2010 - 1962) + chr(0b1101111) + '\061' + chr(0b110101) + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b100100 + 0o14) + chr(1630 - 1575), 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b101010 + 0o105) + chr(0b110010) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(1732 - 1684) + '\157' + '\062' + '\064' + chr(0b110011), 21862 - 21854), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b100011 + 0o20) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\x33' + chr(53) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1010111 + 0o30) + chr(139 - 90) + chr(1548 - 1494) + chr(1886 - 1831), ord("\x08")), ehT0Px3KOsy9(chr(2258 - 2210) + '\x6f' + chr(0b11001 + 0o32) + chr(52) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(2169 - 2058) + chr(0b11111 + 0o22) + chr(0b110000) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\065', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(1676 - 1623) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b100000 + 0o25) + chr(54), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + '\061' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b100100 + 0o22) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(985 - 937) + chr(0b1101111) + '\062' + chr(0b10000 + 0o41) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(7795 - 7684) + chr(50) + '\x32' + '\065', 12553 - 12545), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(0b10110 + 0o35) + chr(53) + '\x36', 8), ehT0Px3KOsy9(chr(550 - 502) + '\157' + chr(585 - 534) + chr(0b110001) + chr(0b11100 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101111) + chr(50) + chr(0b110110) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + '\x31' + chr(49) + '\062', 27293 - 27285), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(9090 - 8979) + '\062' + chr(50) + chr(0b10001 + 0o37), 40141 - 40133), ehT0Px3KOsy9(chr(1093 - 1045) + '\x6f' + chr(994 - 943) + chr(1713 - 1658) + '\x30', 59757 - 59749), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + chr(822 - 767) + '\067', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110 + 0o54) + '\063' + chr(0b11100 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + '\062' + '\x36' + chr(0b110101), 8)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(0b110101) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'N'), chr(100) + '\145' + chr(0b1001101 + 0o26) + chr(5272 - 5161) + chr(2107 - 2007) + chr(0b1011110 + 0o7))(chr(8360 - 8243) + chr(116) + chr(1610 - 1508) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KBStqstqOKEq(Ymg3yePuzaKI, C1R32KxhgJbQ=None): if C1R32KxhgJbQ is None: C1R32KxhgJbQ = {} hE4BAWPMksKz = M8_cKLkHVB2V(Ymg3yePuzaKI) ShZmEKfTkAOZ = hE4BAWPMksKz.replace(xafqLlk3kkUe(SXOLrMavuUCe(b'@'), chr(100) + chr(0b10011 + 0o122) + chr(1408 - 1309) + chr(111) + '\144' + chr(1854 - 1753))('\x75' + chr(6037 - 5921) + chr(102) + chr(45) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b''), '\144' + chr(101) + '\143' + chr(111) + chr(7730 - 7630) + chr(5231 - 5130))('\165' + chr(0b111100 + 0o70) + '\x66' + '\x2d' + chr(56))) for (IhN1Csmp_CpP, YKFKmmkH7bDH) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'\t)&\xbd\x11i V\x8c'), chr(8185 - 8085) + chr(4554 - 4453) + '\x63' + chr(111) + chr(2906 - 2806) + chr(0b1100101))(chr(0b110 + 0o157) + chr(0b1101011 + 0o11) + '\x66' + '\055' + chr(56)))(C1R32KxhgJbQ): ShZmEKfTkAOZ = ShZmEKfTkAOZ.replace(IhN1Csmp_CpP, YKFKmmkH7bDH) return ShZmEKfTkAOZ
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
generate_algebra_inverse_sample
def generate_algebra_inverse_sample(vlist, ops, solve_ops, min_depth, max_depth): """Randomly generate an algebra inverse dataset sample. Given an input equation and variable, produce the expression equal to the variable. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. solve_ops: See `solve_ops` documentation in `algebra_inverse_solve`. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. Will be of the form 'solve_var:left_side=right_side'. target: String representation of the solution. """ side = random.randrange(2) left_depth = random.randrange(min_depth if side else 0, max_depth + 1) right_depth = random.randrange(min_depth if not side else 0, max_depth + 1) var_index = random.randrange(len(vlist)) var = vlist[var_index] consts = vlist[:var_index] + vlist[var_index + 1:] left = random_expr_with_required_var(left_depth, var if side else None, consts, ops) right = random_expr_with_required_var(right_depth, var if not side else None, consts, ops) left_str = str(left) right_str = str(right) target = str(algebra_inverse_solve(left, right, var, solve_ops)) sample = "%s:%s=%s" % (var, left_str, right_str) return sample, target
python
def generate_algebra_inverse_sample(vlist, ops, solve_ops, min_depth, max_depth): """Randomly generate an algebra inverse dataset sample. Given an input equation and variable, produce the expression equal to the variable. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. solve_ops: See `solve_ops` documentation in `algebra_inverse_solve`. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. Will be of the form 'solve_var:left_side=right_side'. target: String representation of the solution. """ side = random.randrange(2) left_depth = random.randrange(min_depth if side else 0, max_depth + 1) right_depth = random.randrange(min_depth if not side else 0, max_depth + 1) var_index = random.randrange(len(vlist)) var = vlist[var_index] consts = vlist[:var_index] + vlist[var_index + 1:] left = random_expr_with_required_var(left_depth, var if side else None, consts, ops) right = random_expr_with_required_var(right_depth, var if not side else None, consts, ops) left_str = str(left) right_str = str(right) target = str(algebra_inverse_solve(left, right, var, solve_ops)) sample = "%s:%s=%s" % (var, left_str, right_str) return sample, target
[ "def", "generate_algebra_inverse_sample", "(", "vlist", ",", "ops", ",", "solve_ops", ",", "min_depth", ",", "max_depth", ")", ":", "side", "=", "random", ".", "randrange", "(", "2", ")", "left_depth", "=", "random", ".", "randrange", "(", "min_depth", "if", "side", "else", "0", ",", "max_depth", "+", "1", ")", "right_depth", "=", "random", ".", "randrange", "(", "min_depth", "if", "not", "side", "else", "0", ",", "max_depth", "+", "1", ")", "var_index", "=", "random", ".", "randrange", "(", "len", "(", "vlist", ")", ")", "var", "=", "vlist", "[", "var_index", "]", "consts", "=", "vlist", "[", ":", "var_index", "]", "+", "vlist", "[", "var_index", "+", "1", ":", "]", "left", "=", "random_expr_with_required_var", "(", "left_depth", ",", "var", "if", "side", "else", "None", ",", "consts", ",", "ops", ")", "right", "=", "random_expr_with_required_var", "(", "right_depth", ",", "var", "if", "not", "side", "else", "None", ",", "consts", ",", "ops", ")", "left_str", "=", "str", "(", "left", ")", "right_str", "=", "str", "(", "right", ")", "target", "=", "str", "(", "algebra_inverse_solve", "(", "left", ",", "right", ",", "var", ",", "solve_ops", ")", ")", "sample", "=", "\"%s:%s=%s\"", "%", "(", "var", ",", "left_str", ",", "right_str", ")", "return", "sample", ",", "target" ]
Randomly generate an algebra inverse dataset sample. Given an input equation and variable, produce the expression equal to the variable. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. solve_ops: See `solve_ops` documentation in `algebra_inverse_solve`. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. Will be of the form 'solve_var:left_side=right_side'. target: String representation of the solution.
[ "Randomly", "generate", "an", "algebra", "inverse", "dataset", "sample", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L236-L274
train
Generates an algebra inverse dataset sample.
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(chr(48) + chr(0b1101111) + '\x36', 17787 - 17779), ehT0Px3KOsy9(chr(1283 - 1235) + '\x6f' + chr(0b110011) + '\060' + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10 + 0o155) + chr(53) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(175 - 64) + '\061' + chr(0b110000) + '\x37', 59254 - 59246), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + '\x34' + chr(1308 - 1257), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1101111) + '\062' + '\066' + chr(0b110010), 30692 - 30684), ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + '\063' + chr(0b110000) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b0 + 0o62) + '\x37' + '\x34', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b101000 + 0o15) + chr(0b11 + 0o62), 64477 - 64469), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\064', 43249 - 43241), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101100 + 0o5) + '\062' + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(2285 - 2174) + chr(0b11101 + 0o25) + chr(1220 - 1165) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(52) + '\062', 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\x32' + '\x32' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(2071 - 2023) + '\157' + chr(0b110010) + chr(0b10 + 0o57), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1010 + 0o145) + chr(51) + chr(1298 - 1246) + chr(54), 28541 - 28533), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(0b11000 + 0o127) + chr(51) + chr(0b110001) + chr(0b10010 + 0o45), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x32' + chr(49), 22234 - 22226), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + chr(0b101001 + 0o11) + chr(0b1101 + 0o44) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(615 - 567) + chr(0b1101111) + chr(0b0 + 0o61) + chr(54) + '\x31', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10000 + 0o47) + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + chr(0b11111 + 0o23) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(1991 - 1943) + chr(0b101010 + 0o105) + '\063' + chr(1556 - 1504), 0o10), ehT0Px3KOsy9(chr(287 - 239) + chr(0b1011000 + 0o27) + '\x31' + chr(0b110110) + chr(1447 - 1392), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(917 - 867) + chr(0b110100), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(51), 63296 - 63288), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b10001 + 0o41) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b1101 + 0o45) + chr(49) + '\x36', 0o10), ehT0Px3KOsy9(chr(225 - 177) + chr(6475 - 6364) + chr(51) + chr(0b111 + 0o53) + '\x37', 61291 - 61283), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11111 + 0o23) + '\061' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9('\060' + chr(5594 - 5483) + chr(51) + chr(49) + chr(54), 26909 - 26901), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(50) + chr(0b110001) + chr(2289 - 2235), 8), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(51) + chr(50) + chr(850 - 796), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11111 + 0o24) + chr(52) + chr(1606 - 1555), 0b1000), ehT0Px3KOsy9(chr(1836 - 1788) + '\157' + chr(0b110001) + chr(1559 - 1510) + chr(49), 0b1000), ehT0Px3KOsy9('\x30' + chr(11539 - 11428) + '\063' + '\x30' + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(360 - 309) + chr(0b110000) + chr(0b110000), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001 + 0o2) + chr(0b101100 + 0o11) + chr(1290 - 1240), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b11001 + 0o33) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x35' + chr(0b101000 + 0o16), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\x6f' + '\x35' + '\060', 26486 - 26478)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'('), '\x64' + chr(6170 - 6069) + chr(0b1011111 + 0o4) + chr(0b1101111) + chr(514 - 414) + '\145')(chr(0b1110101) + '\164' + chr(4796 - 4694) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def jMENE2XJs_Xn(cDNokUnR7MCJ, _nu2um5Q5WJf, zd2_K8SEGtuV, SENJvPRDnSlL, U9fr9lFGWX80): Rub4guE5kYma = drxw09AdRdci.randrange(ehT0Px3KOsy9('\x30' + '\x6f' + '\x32', 12020 - 12012)) BGAlXn8ddprc = drxw09AdRdci.randrange(SENJvPRDnSlL if Rub4guE5kYma else ehT0Px3KOsy9('\x30' + chr(0b101110 + 0o101) + '\060', 0b1000), U9fr9lFGWX80 + ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001), 0b1000)) p5w5swGDwjJH = drxw09AdRdci.randrange(SENJvPRDnSlL if not Rub4guE5kYma else ehT0Px3KOsy9(chr(1604 - 1556) + '\157' + chr(48), 8), U9fr9lFGWX80 + ehT0Px3KOsy9('\060' + chr(7285 - 7174) + chr(664 - 615), 8)) O3UtvupPvWTs = drxw09AdRdci.randrange(c2A0yzQpDQB3(cDNokUnR7MCJ)) l38lb8xQZNsE = cDNokUnR7MCJ[O3UtvupPvWTs] TosUMqQTPBXl = cDNokUnR7MCJ[:O3UtvupPvWTs] + cDNokUnR7MCJ[O3UtvupPvWTs + ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49), 8):] mtX6HPOlWiYu = yY9aQyYE0SZh(BGAlXn8ddprc, l38lb8xQZNsE if Rub4guE5kYma else None, TosUMqQTPBXl, _nu2um5Q5WJf) isOYmsUx1jxa = yY9aQyYE0SZh(p5w5swGDwjJH, l38lb8xQZNsE if not Rub4guE5kYma else None, TosUMqQTPBXl, _nu2um5Q5WJf) VTeYj8jDqx4H = M8_cKLkHVB2V(mtX6HPOlWiYu) TepWiVl92vzo = M8_cKLkHVB2V(isOYmsUx1jxa) GR1581dR5rDS = M8_cKLkHVB2V(nGBWc5zniPEH(mtX6HPOlWiYu, isOYmsUx1jxa, l38lb8xQZNsE, zd2_K8SEGtuV)) aBu4gMMQp6Jg = xafqLlk3kkUe(SXOLrMavuUCe(b'#\xb2\x10bP\x8f\xe2\xcf'), chr(0b1100100) + chr(8521 - 8420) + '\x63' + '\157' + chr(0b1100100) + chr(101))(chr(2948 - 2831) + chr(10255 - 10139) + '\x66' + chr(1745 - 1700) + chr(0b111000)) % (l38lb8xQZNsE, VTeYj8jDqx4H, TepWiVl92vzo) return (aBu4gMMQp6Jg, GR1581dR5rDS)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
generate_algebra_simplify_sample
def generate_algebra_simplify_sample(vlist, ops, min_depth, max_depth): """Randomly generate an algebra simplify dataset sample. Given an input expression, produce the simplified expression. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. target: String representation of the solution. """ depth = random.randrange(min_depth, max_depth + 1) expr = random_expr(depth, vlist, ops) sample = str(expr) target = format_sympy_expr(sympy.simplify(sample)) return sample, target
python
def generate_algebra_simplify_sample(vlist, ops, min_depth, max_depth): """Randomly generate an algebra simplify dataset sample. Given an input expression, produce the simplified expression. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. target: String representation of the solution. """ depth = random.randrange(min_depth, max_depth + 1) expr = random_expr(depth, vlist, ops) sample = str(expr) target = format_sympy_expr(sympy.simplify(sample)) return sample, target
[ "def", "generate_algebra_simplify_sample", "(", "vlist", ",", "ops", ",", "min_depth", ",", "max_depth", ")", ":", "depth", "=", "random", ".", "randrange", "(", "min_depth", ",", "max_depth", "+", "1", ")", "expr", "=", "random_expr", "(", "depth", ",", "vlist", ",", "ops", ")", "sample", "=", "str", "(", "expr", ")", "target", "=", "format_sympy_expr", "(", "sympy", ".", "simplify", "(", "sample", ")", ")", "return", "sample", ",", "target" ]
Randomly generate an algebra simplify dataset sample. Given an input expression, produce the simplified expression. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. Returns: sample: String representation of the input. target: String representation of the solution.
[ "Randomly", "generate", "an", "algebra", "simplify", "dataset", "sample", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L277-L299
train
Generates an algebra simplify dataset sample.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg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8aZ6mjyZZT,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(0b11011 + 0o25) + chr(0b1101111) + chr(1175 - 1125) + chr(0b110000 + 0o0) + chr(2515 - 2464), 0b1000), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(49) + chr(0b100011 + 0o20) + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(1466 - 1416) + '\x34' + chr(0b101011 + 0o14), 0b1000), ehT0Px3KOsy9('\x30' + chr(4921 - 4810) + chr(2486 - 2435) + '\066' + '\067', 0b1000), ehT0Px3KOsy9(chr(2068 - 2020) + '\157' + '\x32' + chr(2643 - 2588) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\x31' + chr(0b101011 + 0o11), 56225 - 56217), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(0b110010) + chr(49) + chr(427 - 372), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(1315 - 1264) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b11000 + 0o31) + chr(0b11111 + 0o23), 0o10), ehT0Px3KOsy9(chr(48) + chr(11308 - 11197) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(355 - 300) + chr(0b11100 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(618 - 570) + chr(0b11000 + 0o127) + chr(49) + chr(0b10 + 0o62) + '\061', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110111) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b1000 + 0o57) + '\064', 0o10), ehT0Px3KOsy9(chr(2246 - 2198) + '\x6f' + chr(0b10010 + 0o45) + chr(2156 - 2105), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + '\066' + chr(2168 - 2116), 2232 - 2224), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100111 + 0o12) + '\065' + chr(0b110101), 60334 - 60326), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(48) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100001 + 0o21) + '\061', 0o10), ehT0Px3KOsy9(chr(1130 - 1082) + '\x6f' + chr(232 - 181) + chr(0b0 + 0o61), 0o10), ehT0Px3KOsy9(chr(2246 - 2198) + chr(0b1011111 + 0o20) + chr(0b11100 + 0o25) + '\x32' + '\x37', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(869 - 820) + chr(0b110000) + chr(55), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b100111 + 0o13) + chr(0b100111 + 0o12) + chr(0b11100 + 0o27), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + '\061' + chr(0b110 + 0o57) + '\062', 0o10), ehT0Px3KOsy9(chr(83 - 35) + '\157' + chr(1744 - 1689) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(9535 - 9424) + '\x35' + chr(0b110101 + 0o1), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + '\x31' + chr(2388 - 2335) + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(0b110101), 42795 - 42787), ehT0Px3KOsy9('\060' + chr(0b10001 + 0o136) + chr(57 - 7) + '\064' + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + chr(49) + chr(0b110001) + chr(255 - 200), 32329 - 32321), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(844 - 733) + chr(51) + chr(0b101100 + 0o11) + chr(0b101 + 0o53), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + chr(48) + chr(0b110011), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110110) + '\067', 0b1000), ehT0Px3KOsy9(chr(216 - 168) + '\x6f' + chr(0b110011) + chr(329 - 281) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(727 - 679) + '\157' + chr(0b110011) + '\061', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(1636 - 1585) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101010 + 0o10) + chr(0b100100 + 0o21) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(438 - 390) + chr(4971 - 4860) + '\064' + chr(0b1100 + 0o50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(2230 - 2179) + chr(1838 - 1789), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(53) + chr(0b1010 + 0o54), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(0b110101) + chr(290 - 242), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xad'), chr(100) + '\145' + chr(3285 - 3186) + chr(2712 - 2601) + chr(100) + chr(528 - 427))(chr(0b100000 + 0o125) + chr(0b1110100) + chr(0b110110 + 0o60) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def tNfOMV8HoA2o(cDNokUnR7MCJ, _nu2um5Q5WJf, SENJvPRDnSlL, U9fr9lFGWX80): UEys4_lSwsID = drxw09AdRdci.randrange(SENJvPRDnSlL, U9fr9lFGWX80 + ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001), 8)) uI2evTH5km5q = aLl18m884oms(UEys4_lSwsID, cDNokUnR7MCJ, _nu2um5Q5WJf) aBu4gMMQp6Jg = M8_cKLkHVB2V(uI2evTH5km5q) GR1581dR5rDS = KBStqstqOKEq(WKR5EXMnS6hY.simplify(aBu4gMMQp6Jg)) return (aBu4gMMQp6Jg, GR1581dR5rDS)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
generate_calculus_integrate_sample
def generate_calculus_integrate_sample(vlist, ops, min_depth, max_depth, functions): """Randomly generate a symbolic integral dataset sample. Given an input expression, produce the indefinite integral. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: sample: String representation of the input. Will be of the form 'var:expression'. target: String representation of the solution. """ var_index = random.randrange(len(vlist)) var = vlist[var_index] consts = vlist[:var_index] + vlist[var_index + 1:] depth = random.randrange(min_depth, max_depth + 1) expr = random_expr_with_required_var(depth, var, consts, ops) expr_str = str(expr) sample = var + ":" + expr_str target = format_sympy_expr( sympy.integrate(expr_str, sympy.Symbol(var)), functions=functions) return sample, target
python
def generate_calculus_integrate_sample(vlist, ops, min_depth, max_depth, functions): """Randomly generate a symbolic integral dataset sample. Given an input expression, produce the indefinite integral. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: sample: String representation of the input. Will be of the form 'var:expression'. target: String representation of the solution. """ var_index = random.randrange(len(vlist)) var = vlist[var_index] consts = vlist[:var_index] + vlist[var_index + 1:] depth = random.randrange(min_depth, max_depth + 1) expr = random_expr_with_required_var(depth, var, consts, ops) expr_str = str(expr) sample = var + ":" + expr_str target = format_sympy_expr( sympy.integrate(expr_str, sympy.Symbol(var)), functions=functions) return sample, target
[ "def", "generate_calculus_integrate_sample", "(", "vlist", ",", "ops", ",", "min_depth", ",", "max_depth", ",", "functions", ")", ":", "var_index", "=", "random", ".", "randrange", "(", "len", "(", "vlist", ")", ")", "var", "=", "vlist", "[", "var_index", "]", "consts", "=", "vlist", "[", ":", "var_index", "]", "+", "vlist", "[", "var_index", "+", "1", ":", "]", "depth", "=", "random", ".", "randrange", "(", "min_depth", ",", "max_depth", "+", "1", ")", "expr", "=", "random_expr_with_required_var", "(", "depth", ",", "var", ",", "consts", ",", "ops", ")", "expr_str", "=", "str", "(", "expr", ")", "sample", "=", "var", "+", "\":\"", "+", "expr_str", "target", "=", "format_sympy_expr", "(", "sympy", ".", "integrate", "(", "expr_str", ",", "sympy", ".", "Symbol", "(", "var", ")", ")", ",", "functions", "=", "functions", ")", "return", "sample", ",", "target" ]
Randomly generate a symbolic integral dataset sample. Given an input expression, produce the indefinite integral. Args: vlist: Variable list. List of chars that can be used in the expression. ops: List of ExprOp instances. The allowed operators for the expression. min_depth: Expression trees will not have a smaller depth than this. 0 means there is just a variable. 1 means there is one operation. max_depth: Expression trees will not have a larger depth than this. To make all trees have the same depth, set this equal to `min_depth`. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". Returns: sample: String representation of the input. Will be of the form 'var:expression'. target: String representation of the solution.
[ "Randomly", "generate", "a", "symbolic", "integral", "dataset", "sample", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L302-L335
train
Generates a symbolic integral dataset sample.
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,Kk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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('\x30' + chr(0b1101111) + '\x36' + '\067', 44507 - 44499), ehT0Px3KOsy9('\x30' + chr(2289 - 2178) + chr(50) + chr(0b110010), 31553 - 31545), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b111010 + 0o65) + chr(0b110011) + chr(53) + chr(1624 - 1570), 0b1000), ehT0Px3KOsy9(chr(1197 - 1149) + '\x6f' + chr(0b110011) + chr(0b11001 + 0o36) + chr(0b100100 + 0o23), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\157' + '\063' + '\x31' + chr(230 - 177), 65429 - 65421), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(405 - 356) + chr(54) + chr(0b10101 + 0o37), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\067' + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(576 - 465) + chr(1876 - 1827) + chr(54) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110100 + 0o1) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110010) + chr(2461 - 2408), 0o10), ehT0Px3KOsy9('\060' + chr(11511 - 11400) + chr(0b110001) + '\x30' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(54) + chr(55), 8), ehT0Px3KOsy9('\x30' + chr(0b110 + 0o151) + chr(0b11000 + 0o32) + chr(0b110000 + 0o3) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7340 - 7229) + chr(0b10000 + 0o43) + chr(0b111 + 0o51), 0o10), ehT0Px3KOsy9('\x30' + chr(0b101010 + 0o105) + chr(0b110110) + chr(0b101111 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(549 - 501) + '\x6f' + chr(889 - 839) + '\063' + chr(968 - 918), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110110) + chr(0b110011), 12200 - 12192), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1111 + 0o44) + chr(0b110010) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(645 - 596) + '\x30' + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(3778 - 3667) + chr(0b101110 + 0o5) + chr(1178 - 1127) + '\x34', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(55) + chr(0b110100), 40926 - 40918), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b110111) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110100) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4576 - 4465) + chr(0b1011 + 0o47) + '\062' + chr(51), 17826 - 17818), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1101111) + chr(763 - 713) + chr(51) + '\x33', 47530 - 47522), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2181 - 2131) + chr(2034 - 1979) + chr(2083 - 2032), ord("\x08")), ehT0Px3KOsy9(chr(704 - 656) + chr(0b1101111) + '\063' + chr(0b110011) + chr(49), 1169 - 1161), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + '\x36' + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(611 - 562) + chr(2569 - 2515) + chr(0b100111 + 0o17), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + '\064' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100000 + 0o23) + '\x30' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(1889 - 1841) + chr(111) + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6675 - 6564) + chr(0b11100 + 0o25) + '\064' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110010) + chr(285 - 235), ord("\x08")), ehT0Px3KOsy9(chr(1704 - 1656) + '\157' + chr(2559 - 2508) + '\x36' + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b110011 + 0o74) + chr(0b110011) + chr(0b110100) + chr(2038 - 1988), 0o10), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\157' + chr(49) + chr(0b110101) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + '\064', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b1111 + 0o46) + chr(206 - 158), 56922 - 56914)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x19'), chr(0b1100011 + 0o1) + '\145' + '\x63' + chr(4872 - 4761) + chr(0b1100100) + chr(1958 - 1857))('\165' + '\x74' + '\146' + chr(0b101101) + chr(0b110 + 0o62)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def rPbPf0VZSxuR(cDNokUnR7MCJ, _nu2um5Q5WJf, SENJvPRDnSlL, U9fr9lFGWX80, C1R32KxhgJbQ): O3UtvupPvWTs = drxw09AdRdci.randrange(c2A0yzQpDQB3(cDNokUnR7MCJ)) l38lb8xQZNsE = cDNokUnR7MCJ[O3UtvupPvWTs] TosUMqQTPBXl = cDNokUnR7MCJ[:O3UtvupPvWTs] + cDNokUnR7MCJ[O3UtvupPvWTs + ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101111) + chr(49), 8):] UEys4_lSwsID = drxw09AdRdci.randrange(SENJvPRDnSlL, U9fr9lFGWX80 + ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x31', 8)) uI2evTH5km5q = yY9aQyYE0SZh(UEys4_lSwsID, l38lb8xQZNsE, TosUMqQTPBXl, _nu2um5Q5WJf) rbeBXL4XsLPq = M8_cKLkHVB2V(uI2evTH5km5q) aBu4gMMQp6Jg = l38lb8xQZNsE + xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), chr(0b1100100) + chr(101) + chr(7398 - 7299) + chr(2833 - 2722) + chr(100) + '\145')(chr(2406 - 2289) + chr(0b1101 + 0o147) + chr(0b1100110) + '\055' + '\070') + rbeBXL4XsLPq GR1581dR5rDS = KBStqstqOKEq(WKR5EXMnS6hY.integrate(rbeBXL4XsLPq, WKR5EXMnS6hY.Symbol(l38lb8xQZNsE)), functions=C1R32KxhgJbQ) return (aBu4gMMQp6Jg, GR1581dR5rDS)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
math_dataset_init
def math_dataset_init(alphabet_size=26, digits=None, functions=None): """Initializes required objects to generate symbolic math datasets. Produces token set, ExprOp instances, solve_op dictionary, encoders, and decoders needed to generate the algebra inverse dataset. Args: alphabet_size: How many possible variables there are. Max 52. digits: How many numerical digits to encode as tokens, "0" through str(digits-1), or None to encode no digits. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". WARNING, Make sure these tokens do not conflict with the list of possible variable names. Returns: AlgebraConfig instance holding all the objects listed above. Raises: ValueError: If `alphabet_size` is not in range [2, 52]. """ ops_list = ["+", "-", "*", "/"] ops = { "+": ExprOp("+", 0, True), "-": ExprOp("-", 0, False), "*": ExprOp("*", 1, True), "/": ExprOp("/", 1, False) } solve_ops = { "+l": lambda l, r, to: (l, ExprNode(to, r, ops["-"])), "+r": lambda l, r, to: (r, ExprNode(to, l, ops["-"])), "-l": lambda l, r, to: (l, ExprNode(to, r, ops["+"])), "-r": lambda l, r, to: (r, ExprNode(l, to, ops["-"])), "*l": lambda l, r, to: (l, ExprNode(to, r, ops["/"])), "*r": lambda l, r, to: (r, ExprNode(to, l, ops["/"])), "/l": lambda l, r, to: (l, ExprNode(to, r, ops["*"])), "/r": lambda l, r, to: (r, ExprNode(l, to, ops["/"])), } alphabet = ( [six.int2byte(ord("a") + c).decode("utf-8") for c in range(26)] + [six.int2byte(ord("A") + c).decode("utf-8") for c in range(26)]) if alphabet_size > 52: raise ValueError( "alphabet_size cannot be greater than 52. Got %s." % alphabet_size) if alphabet_size < 2: raise ValueError( "alphabet_size cannot be less than 2. Got %s." % alphabet_size) if digits is not None and not 1 <= digits <= 10: raise ValueError("digits cannot must be between 1 and 10. Got %s." % digits) vlist = alphabet[:alphabet_size] if digits is not None: dlist = [str(d) for d in range(digits)] else: dlist = [] if functions is None: functions = {} flist = sorted(functions.values()) pad = "_" tokens = [pad] + [":", "(", ")", "="] + ops_list + vlist + dlist + flist if len(tokens) != len(set(tokens)): raise ValueError("Duplicate token. Tokens: %s" % tokens) token_map = dict([(t, i) for i, t in enumerate(tokens)]) def int_encoder(sequence): return [token_map[s] for s in sequence] def int_decoder(tensor_1d): return "".join([tokens[i] for i in tensor_1d]) return AlgebraConfig( vlist=vlist, dlist=dlist, flist=flist, functions=functions, ops=ops, solve_ops=solve_ops, int_encoder=int_encoder, int_decoder=int_decoder)
python
def math_dataset_init(alphabet_size=26, digits=None, functions=None): """Initializes required objects to generate symbolic math datasets. Produces token set, ExprOp instances, solve_op dictionary, encoders, and decoders needed to generate the algebra inverse dataset. Args: alphabet_size: How many possible variables there are. Max 52. digits: How many numerical digits to encode as tokens, "0" through str(digits-1), or None to encode no digits. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". WARNING, Make sure these tokens do not conflict with the list of possible variable names. Returns: AlgebraConfig instance holding all the objects listed above. Raises: ValueError: If `alphabet_size` is not in range [2, 52]. """ ops_list = ["+", "-", "*", "/"] ops = { "+": ExprOp("+", 0, True), "-": ExprOp("-", 0, False), "*": ExprOp("*", 1, True), "/": ExprOp("/", 1, False) } solve_ops = { "+l": lambda l, r, to: (l, ExprNode(to, r, ops["-"])), "+r": lambda l, r, to: (r, ExprNode(to, l, ops["-"])), "-l": lambda l, r, to: (l, ExprNode(to, r, ops["+"])), "-r": lambda l, r, to: (r, ExprNode(l, to, ops["-"])), "*l": lambda l, r, to: (l, ExprNode(to, r, ops["/"])), "*r": lambda l, r, to: (r, ExprNode(to, l, ops["/"])), "/l": lambda l, r, to: (l, ExprNode(to, r, ops["*"])), "/r": lambda l, r, to: (r, ExprNode(l, to, ops["/"])), } alphabet = ( [six.int2byte(ord("a") + c).decode("utf-8") for c in range(26)] + [six.int2byte(ord("A") + c).decode("utf-8") for c in range(26)]) if alphabet_size > 52: raise ValueError( "alphabet_size cannot be greater than 52. Got %s." % alphabet_size) if alphabet_size < 2: raise ValueError( "alphabet_size cannot be less than 2. Got %s." % alphabet_size) if digits is not None and not 1 <= digits <= 10: raise ValueError("digits cannot must be between 1 and 10. Got %s." % digits) vlist = alphabet[:alphabet_size] if digits is not None: dlist = [str(d) for d in range(digits)] else: dlist = [] if functions is None: functions = {} flist = sorted(functions.values()) pad = "_" tokens = [pad] + [":", "(", ")", "="] + ops_list + vlist + dlist + flist if len(tokens) != len(set(tokens)): raise ValueError("Duplicate token. Tokens: %s" % tokens) token_map = dict([(t, i) for i, t in enumerate(tokens)]) def int_encoder(sequence): return [token_map[s] for s in sequence] def int_decoder(tensor_1d): return "".join([tokens[i] for i in tensor_1d]) return AlgebraConfig( vlist=vlist, dlist=dlist, flist=flist, functions=functions, ops=ops, solve_ops=solve_ops, int_encoder=int_encoder, int_decoder=int_decoder)
[ "def", "math_dataset_init", "(", "alphabet_size", "=", "26", ",", "digits", "=", "None", ",", "functions", "=", "None", ")", ":", "ops_list", "=", "[", "\"+\"", ",", "\"-\"", ",", "\"*\"", ",", "\"/\"", "]", "ops", "=", "{", "\"+\"", ":", "ExprOp", "(", "\"+\"", ",", "0", ",", "True", ")", ",", "\"-\"", ":", "ExprOp", "(", "\"-\"", ",", "0", ",", "False", ")", ",", "\"*\"", ":", "ExprOp", "(", "\"*\"", ",", "1", ",", "True", ")", ",", "\"/\"", ":", "ExprOp", "(", "\"/\"", ",", "1", ",", "False", ")", "}", "solve_ops", "=", "{", "\"+l\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "l", ",", "ExprNode", "(", "to", ",", "r", ",", "ops", "[", "\"-\"", "]", ")", ")", ",", "\"+r\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "r", ",", "ExprNode", "(", "to", ",", "l", ",", "ops", "[", "\"-\"", "]", ")", ")", ",", "\"-l\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "l", ",", "ExprNode", "(", "to", ",", "r", ",", "ops", "[", "\"+\"", "]", ")", ")", ",", "\"-r\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "r", ",", "ExprNode", "(", "l", ",", "to", ",", "ops", "[", "\"-\"", "]", ")", ")", ",", "\"*l\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "l", ",", "ExprNode", "(", "to", ",", "r", ",", "ops", "[", "\"/\"", "]", ")", ")", ",", "\"*r\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "r", ",", "ExprNode", "(", "to", ",", "l", ",", "ops", "[", "\"/\"", "]", ")", ")", ",", "\"/l\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "l", ",", "ExprNode", "(", "to", ",", "r", ",", "ops", "[", "\"*\"", "]", ")", ")", ",", "\"/r\"", ":", "lambda", "l", ",", "r", ",", "to", ":", "(", "r", ",", "ExprNode", "(", "l", ",", "to", ",", "ops", "[", "\"/\"", "]", ")", ")", ",", "}", "alphabet", "=", "(", "[", "six", ".", "int2byte", "(", "ord", "(", "\"a\"", ")", "+", "c", ")", ".", "decode", "(", "\"utf-8\"", ")", "for", "c", "in", "range", "(", "26", ")", "]", "+", "[", "six", ".", "int2byte", "(", "ord", "(", "\"A\"", ")", "+", "c", ")", ".", "decode", "(", "\"utf-8\"", ")", "for", "c", "in", "range", "(", "26", ")", "]", ")", "if", "alphabet_size", ">", "52", ":", "raise", "ValueError", "(", "\"alphabet_size cannot be greater than 52. Got %s.\"", "%", "alphabet_size", ")", "if", "alphabet_size", "<", "2", ":", "raise", "ValueError", "(", "\"alphabet_size cannot be less than 2. Got %s.\"", "%", "alphabet_size", ")", "if", "digits", "is", "not", "None", "and", "not", "1", "<=", "digits", "<=", "10", ":", "raise", "ValueError", "(", "\"digits cannot must be between 1 and 10. Got %s.\"", "%", "digits", ")", "vlist", "=", "alphabet", "[", ":", "alphabet_size", "]", "if", "digits", "is", "not", "None", ":", "dlist", "=", "[", "str", "(", "d", ")", "for", "d", "in", "range", "(", "digits", ")", "]", "else", ":", "dlist", "=", "[", "]", "if", "functions", "is", "None", ":", "functions", "=", "{", "}", "flist", "=", "sorted", "(", "functions", ".", "values", "(", ")", ")", "pad", "=", "\"_\"", "tokens", "=", "[", "pad", "]", "+", "[", "\":\"", ",", "\"(\"", ",", "\")\"", ",", "\"=\"", "]", "+", "ops_list", "+", "vlist", "+", "dlist", "+", "flist", "if", "len", "(", "tokens", ")", "!=", "len", "(", "set", "(", "tokens", ")", ")", ":", "raise", "ValueError", "(", "\"Duplicate token. Tokens: %s\"", "%", "tokens", ")", "token_map", "=", "dict", "(", "[", "(", "t", ",", "i", ")", "for", "i", ",", "t", "in", "enumerate", "(", "tokens", ")", "]", ")", "def", "int_encoder", "(", "sequence", ")", ":", "return", "[", "token_map", "[", "s", "]", "for", "s", "in", "sequence", "]", "def", "int_decoder", "(", "tensor_1d", ")", ":", "return", "\"\"", ".", "join", "(", "[", "tokens", "[", "i", "]", "for", "i", "in", "tensor_1d", "]", ")", "return", "AlgebraConfig", "(", "vlist", "=", "vlist", ",", "dlist", "=", "dlist", ",", "flist", "=", "flist", ",", "functions", "=", "functions", ",", "ops", "=", "ops", ",", "solve_ops", "=", "solve_ops", ",", "int_encoder", "=", "int_encoder", ",", "int_decoder", "=", "int_decoder", ")" ]
Initializes required objects to generate symbolic math datasets. Produces token set, ExprOp instances, solve_op dictionary, encoders, and decoders needed to generate the algebra inverse dataset. Args: alphabet_size: How many possible variables there are. Max 52. digits: How many numerical digits to encode as tokens, "0" through str(digits-1), or None to encode no digits. functions: Defines special functions. A dict mapping human readable string names, like "log", "exp", "sin", "cos", etc., to single chars. Each function gets a unique token, like "L" for "log". WARNING, Make sure these tokens do not conflict with the list of possible variable names. Returns: AlgebraConfig instance holding all the objects listed above. Raises: ValueError: If `alphabet_size` is not in range [2, 52].
[ "Initializes", "required", "objects", "to", "generate", "symbolic", "math", "datasets", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L358-L436
train
Initializes the internal state of the symbolic math 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,yDcnbVVBZ5VZ,OTstrxJ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u4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(0b1010110 + 0o31) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(1790 - 1742) + chr(1152 - 1041) + '\062' + chr(0b110001) + chr(55), 5870 - 5862), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(6431 - 6320) + '\062' + chr(0b110111) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(49) + chr(0b10 + 0o63), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1010010 + 0o35) + '\x31' + chr(48) + chr(49), 27462 - 27454), ehT0Px3KOsy9(chr(983 - 935) + '\157' + '\x32' + chr(52) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(2350 - 2239) + '\x33' + chr(0b110011) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1541 - 1492) + chr(0b110101) + '\064', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\x36' + '\x32', 43428 - 43420), ehT0Px3KOsy9(chr(48) + chr(111) + chr(545 - 494) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(0b101001 + 0o12) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + '\060' + chr(2270 - 2222), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(532 - 421) + chr(0b110010) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(861 - 813) + chr(0b1101101 + 0o2) + '\x33' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1110 + 0o43) + chr(0b110001) + chr(0b10011 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10010 + 0o41) + chr(1938 - 1888) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(0b10010 + 0o42) + chr(267 - 214), 48974 - 48966), ehT0Px3KOsy9('\060' + '\x6f' + chr(2499 - 2448) + chr(0b110100) + chr(0b1 + 0o64), 29328 - 29320), ehT0Px3KOsy9(chr(268 - 220) + chr(111) + chr(0b101 + 0o56) + chr(51) + '\062', 42640 - 42632), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + '\x31' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(559 - 511) + '\x6f' + '\x36' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(886 - 836) + chr(52) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(514 - 466) + chr(0b1000001 + 0o56) + '\x33' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\061' + chr(119 - 65) + chr(0b110011), 9368 - 9360), ehT0Px3KOsy9(chr(746 - 698) + chr(111) + chr(0b101010 + 0o11) + chr(455 - 406) + chr(0b1101 + 0o45), 42766 - 42758), ehT0Px3KOsy9('\060' + chr(1305 - 1194) + chr(1764 - 1715) + '\065', 8), ehT0Px3KOsy9('\060' + chr(11326 - 11215) + chr(0b110011) + chr(51) + chr(51), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b100100 + 0o20) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b10 + 0o61) + '\x37' + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b110010) + chr(0b110000) + '\x30', 26123 - 26115), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + chr(1103 - 1054) + chr(0b11011 + 0o25) + chr(55), 2160 - 2152), ehT0Px3KOsy9(chr(48) + chr(4536 - 4425) + chr(51) + chr(51) + chr(925 - 877), 8), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(154 - 102) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b100001 + 0o20) + chr(0b110001) + '\063', 22736 - 22728), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + '\x31' + '\060', 0o10), ehT0Px3KOsy9(chr(323 - 275) + chr(111) + chr(51) + chr(55) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b110110) + chr(282 - 234), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(380 - 332) + chr(0b1101111) + chr(0b110101) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'/'), chr(7150 - 7050) + chr(0b10001 + 0o124) + chr(2381 - 2282) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(8103 - 7986) + chr(0b1110100) + '\x66' + chr(45) + chr(0b11 + 0o65)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Jo73bQiRAn6u(Xp0zaAcnRRfg=ehT0Px3KOsy9(chr(1344 - 1296) + chr(0b1010011 + 0o34) + chr(1823 - 1772) + '\x32', 8), MkjwSiNiIh4W=None, C1R32KxhgJbQ=None): rtLND_lZ2X1Z = [xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(100) + '\x65' + '\143' + chr(2848 - 2737) + chr(2356 - 2256) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(0b100110 + 0o7) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b','), '\144' + chr(0b1100101) + chr(0b1100011) + chr(4223 - 4112) + chr(9150 - 9050) + chr(3217 - 3116))('\165' + chr(0b1001000 + 0o54) + '\x66' + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'+'), chr(100) + '\x65' + '\143' + chr(9134 - 9023) + '\x64' + chr(0b111000 + 0o55))(chr(117) + '\164' + chr(0b100110 + 0o100) + chr(45) + chr(2138 - 2082)), xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(100) + chr(0b1011101 + 0o10) + '\143' + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(9576 - 9460) + chr(0b1100110) + '\x2d' + chr(56))] _nu2um5Q5WJf = {xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(0b1001110 + 0o26) + '\145' + chr(0b111001 + 0o52) + chr(0b1010110 + 0o31) + chr(0b1100100) + chr(5706 - 5605))('\165' + '\164' + chr(102) + '\055' + '\070'): GZPI9yS0LE1I(xafqLlk3kkUe(SXOLrMavuUCe(b'*'), chr(903 - 803) + '\145' + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(116) + chr(9469 - 9367) + chr(45) + '\070'), ehT0Px3KOsy9('\060' + '\157' + chr(0b1 + 0o57), 8), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(353 - 304), 8)), xafqLlk3kkUe(SXOLrMavuUCe(b','), '\144' + chr(2266 - 2165) + '\143' + chr(111) + chr(100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b100101 + 0o23)): GZPI9yS0LE1I(xafqLlk3kkUe(SXOLrMavuUCe(b','), '\144' + chr(101) + chr(0b1010100 + 0o17) + chr(111) + '\x64' + '\x65')('\165' + chr(326 - 210) + chr(0b1100110) + '\055' + chr(0b111000)), ehT0Px3KOsy9(chr(1724 - 1676) + chr(1239 - 1128) + '\x30', 8), ehT0Px3KOsy9(chr(316 - 268) + '\157' + chr(0b110000), 8)), xafqLlk3kkUe(SXOLrMavuUCe(b'+'), chr(100) + chr(101) + chr(0b11 + 0o140) + chr(1167 - 1056) + chr(5423 - 5323) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)): GZPI9yS0LE1I(xafqLlk3kkUe(SXOLrMavuUCe(b'+'), chr(8349 - 8249) + '\145' + chr(3620 - 3521) + chr(111) + '\x64' + chr(7550 - 7449))(chr(0b1110101) + chr(12818 - 12702) + chr(6791 - 6689) + '\x2d' + chr(56)), ehT0Px3KOsy9(chr(2050 - 2002) + '\157' + '\061', 8), ehT0Px3KOsy9(chr(48) + chr(0b111110 + 0o61) + chr(0b11010 + 0o27), 8)), xafqLlk3kkUe(SXOLrMavuUCe(b'.'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(0b100000 + 0o105))(chr(9819 - 9702) + chr(0b11010 + 0o132) + '\x66' + chr(45) + '\070'): GZPI9yS0LE1I(xafqLlk3kkUe(SXOLrMavuUCe(b'.'), '\144' + '\145' + '\143' + '\x6f' + '\x64' + '\x65')(chr(0b110111 + 0o76) + chr(0b110000 + 0o104) + '\x66' + '\055' + chr(2119 - 2063)), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1001001 + 0o46) + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(48), 8))} zd2_K8SEGtuV = {xafqLlk3kkUe(SXOLrMavuUCe(b'*\xe3'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b11 + 0o154) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b100000 + 0o30)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (aLoH_Mt0dzwO, MX_oDU8Fv4tE(FDVEvax7cqKh, JWG5qApaeJkp, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b','), chr(0b101010 + 0o72) + chr(0b1011110 + 0o7) + '\x63' + chr(0b1101000 + 0o7) + chr(8227 - 8127) + chr(6541 - 6440))('\x75' + chr(116) + chr(102) + '\x2d' + chr(0b111000))])), xafqLlk3kkUe(SXOLrMavuUCe(b'*\xfd'), chr(8256 - 8156) + '\x65' + chr(696 - 597) + chr(111) + chr(9934 - 9834) + '\145')('\x75' + chr(0b101000 + 0o114) + '\x66' + chr(1278 - 1233) + chr(56)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (JWG5qApaeJkp, MX_oDU8Fv4tE(FDVEvax7cqKh, aLoH_Mt0dzwO, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b','), chr(0b1100100) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + chr(0b110000 + 0o65))(chr(117) + chr(0b1010100 + 0o40) + chr(0b111100 + 0o52) + chr(0b101101) + chr(0b100100 + 0o24))])), xafqLlk3kkUe(SXOLrMavuUCe(b',\xe3'), '\144' + chr(4874 - 4773) + '\143' + '\157' + chr(0b1100100) + chr(0b1010 + 0o133))('\165' + chr(0b1011000 + 0o34) + chr(102) + '\x2d' + chr(1315 - 1259)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (aLoH_Mt0dzwO, MX_oDU8Fv4tE(FDVEvax7cqKh, JWG5qApaeJkp, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b'*'), '\144' + chr(0b101011 + 0o72) + chr(5072 - 4973) + chr(0b1101111) + chr(0b1100100) + chr(0b100010 + 0o103))(chr(9499 - 9382) + chr(116) + '\x66' + chr(0b101101) + chr(0b110111 + 0o1))])), xafqLlk3kkUe(SXOLrMavuUCe(b',\xfd'), chr(0b1001101 + 0o27) + '\x65' + chr(99) + chr(7211 - 7100) + '\144' + chr(6759 - 6658))(chr(0b100000 + 0o125) + chr(0b101011 + 0o111) + chr(7940 - 7838) + chr(0b100010 + 0o13) + chr(2553 - 2497)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (JWG5qApaeJkp, MX_oDU8Fv4tE(aLoH_Mt0dzwO, FDVEvax7cqKh, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b','), '\144' + chr(101) + chr(4253 - 4154) + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(4178 - 4076) + chr(0b101101) + chr(56))])), xafqLlk3kkUe(SXOLrMavuUCe(b'+\xe3'), '\144' + chr(0b1100101) + '\143' + chr(3644 - 3533) + '\144' + '\x65')('\165' + chr(0b1101011 + 0o11) + '\146' + '\x2d' + chr(0b100111 + 0o21)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (aLoH_Mt0dzwO, MX_oDU8Fv4tE(FDVEvax7cqKh, JWG5qApaeJkp, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(0b11011 + 0o111) + chr(0b101110 + 0o67) + chr(0b1100011) + chr(111) + '\144' + '\x65')(chr(0b1100000 + 0o25) + chr(0b10000 + 0o144) + '\146' + chr(0b101101) + '\070')])), xafqLlk3kkUe(SXOLrMavuUCe(b'+\xfd'), chr(396 - 296) + chr(0b11000 + 0o115) + chr(99) + chr(0b101010 + 0o105) + chr(7430 - 7330) + chr(0b1100101))('\165' + chr(0b1010001 + 0o43) + chr(0b1100110) + chr(826 - 781) + chr(0b1 + 0o67)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (JWG5qApaeJkp, MX_oDU8Fv4tE(FDVEvax7cqKh, aLoH_Mt0dzwO, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(0b1010111 + 0o15) + chr(4915 - 4814) + chr(0b1100011) + '\157' + '\144' + chr(0b1010010 + 0o23))('\x75' + chr(0b111111 + 0o65) + chr(0b1100110) + chr(46 - 1) + chr(2797 - 2741))])), xafqLlk3kkUe(SXOLrMavuUCe(b'.\xe3'), chr(0b1100100) + chr(0b1000101 + 0o40) + '\x63' + chr(5355 - 5244) + chr(100) + chr(101))('\165' + chr(0b10001 + 0o143) + chr(102) + chr(0b101101) + chr(56)): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (aLoH_Mt0dzwO, MX_oDU8Fv4tE(FDVEvax7cqKh, JWG5qApaeJkp, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b'+'), chr(0b100 + 0o140) + '\x65' + '\143' + '\x6f' + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(1338 - 1293) + '\x38')])), xafqLlk3kkUe(SXOLrMavuUCe(b'.\xfd'), chr(1127 - 1027) + '\x65' + '\x63' + chr(0b1011100 + 0o23) + '\144' + chr(101))(chr(0b1110101) + '\x74' + chr(7026 - 6924) + chr(0b101101) + '\x38'): lambda aLoH_Mt0dzwO, JWG5qApaeJkp, FDVEvax7cqKh: (JWG5qApaeJkp, MX_oDU8Fv4tE(aLoH_Mt0dzwO, FDVEvax7cqKh, _nu2um5Q5WJf[xafqLlk3kkUe(SXOLrMavuUCe(b'.'), chr(100) + chr(0b1100101) + chr(0b10010 + 0o121) + '\x6f' + chr(0b1100100) + chr(0b101010 + 0o73))(chr(117) + chr(0b1110100) + '\146' + chr(1547 - 1502) + '\x38')]))} RZN874cEaaNJ = [sYby0kpfssd4.int2byte(Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'`'), chr(5216 - 5116) + chr(0b1100101) + chr(0b1001000 + 0o33) + chr(0b1101111) + '\144' + chr(6496 - 6395))('\x75' + chr(1127 - 1011) + chr(0b1011 + 0o133) + chr(0b11110 + 0o17) + '\x38')) + qzn1Ctg9WgNh).decode(xafqLlk3kkUe(SXOLrMavuUCe(b't\xfb\xdb y'), '\x64' + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + '\x65')('\165' + chr(0b1001100 + 0o50) + chr(102) + '\x2d' + '\070')) for qzn1Ctg9WgNh in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(920 - 869) + chr(0b110010), 8))] + [sYby0kpfssd4.int2byte(Jp8aZ6mjyZZT(xafqLlk3kkUe(SXOLrMavuUCe(b'@'), '\144' + '\145' + '\x63' + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(116) + '\146' + chr(368 - 323) + chr(0b111000))) + qzn1Ctg9WgNh).decode(xafqLlk3kkUe(SXOLrMavuUCe(b't\xfb\xdb y'), '\144' + chr(0b1010011 + 0o22) + '\x63' + chr(111) + '\144' + chr(1573 - 1472))('\x75' + chr(0b1110100) + '\x66' + '\x2d' + '\070')) for qzn1Ctg9WgNh in vQr8gNKaIaWE(ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o33) + chr(0b110010), 8))] if Xp0zaAcnRRfg > ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(54) + '\064', 8): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'`\xe3\xcde \xc1\xbd\x18\xedm\xf1:s:)\xb5\x0b\x8b\xb5\xfa\x14\xc6|S\xad\x7f\xbe\x85s\x9e\xf2g\xac\x8b*f\xd95)\xde!\xc8\xd2ya\x86\xabB'), chr(100) + chr(0b1011001 + 0o14) + '\x63' + chr(111) + '\x64' + chr(3256 - 3155))('\165' + '\164' + '\x66' + chr(0b101101) + chr(56)) % Xp0zaAcnRRfg) if Xp0zaAcnRRfg < ehT0Px3KOsy9(chr(1313 - 1265) + chr(111) + '\062', 0b1000): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b"`\xe3\xcde \xc1\xbd\x18\xedm\xf1:s:)\xb5\x0b\x8b\xb5\xfa\x14\xc6|S\xa6h\xa8\x97'\x8f\xe8&\xb6\xc3y&\xd9Gt\x84!\xaa\xce#"), chr(0b1100100) + '\x65' + chr(99) + chr(128 - 17) + chr(100) + chr(101))(chr(0b0 + 0o165) + chr(0b1110100) + chr(0b10110 + 0o120) + '\x2d' + chr(0b1101 + 0o53)) % Xp0zaAcnRRfg) if MkjwSiNiIh4W is not None and (not ehT0Px3KOsy9('\x30' + '\157' + chr(49), 8) <= MkjwSiNiIh4W <= ehT0Px3KOsy9(chr(2281 - 2233) + '\x6f' + chr(49) + chr(0b100011 + 0o17), 32942 - 32934)): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b"e\xe6\xdad5\xd0\xf8\x0f\xd3p\xf6/b:'\xa1\x16\x91\xfa\xecQ\x84{\x16\xbez\xbe\x81i\xdb\xb1g\xb9\x8d/(\xc805\xd0F\xe0\xc9-d\xd0\xf6"), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1011110 + 0o27) + '\x74' + '\x66' + chr(1444 - 1399) + chr(56)) % MkjwSiNiIh4W) cDNokUnR7MCJ = RZN874cEaaNJ[:Xp0zaAcnRRfg] if MkjwSiNiIh4W is not None: NdJkVQCcns3t = [M8_cKLkHVB2V(pd3lxn9vqWxp) for pd3lxn9vqWxp in vQr8gNKaIaWE(MkjwSiNiIh4W)] else: NdJkVQCcns3t = [] if C1R32KxhgJbQ is None: C1R32KxhgJbQ = {} Bu0pqYkoM7IR = vUlqIvNSaRMa(C1R32KxhgJbQ.SPnCNu54H1db()) jq0C7ttmqXPS = xafqLlk3kkUe(SXOLrMavuUCe(b'^'), '\144' + chr(3467 - 3366) + chr(0b111000 + 0o53) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1000001 + 0o63) + chr(0b111100 + 0o52) + chr(0b10100 + 0o31) + chr(0b111000)) Sz7tXxaCGqJ1 = [jq0C7ttmqXPS] + [xafqLlk3kkUe(SXOLrMavuUCe(b';'), chr(0b1100100) + chr(101) + '\143' + chr(111) + chr(6164 - 6064) + chr(0b111011 + 0o52))(chr(0b1110101) + chr(116) + '\x66' + chr(45) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b')'), '\144' + chr(101) + chr(0b1100011) + '\157' + '\x64' + '\145')('\x75' + chr(9228 - 9112) + chr(0b101001 + 0o75) + chr(0b110 + 0o47) + chr(1715 - 1659)), xafqLlk3kkUe(SXOLrMavuUCe(b'('), chr(0b1011101 + 0o7) + chr(0b100111 + 0o76) + chr(0b11111 + 0o104) + chr(0b1101111) + chr(4271 - 4171) + chr(101))(chr(4361 - 4244) + '\x74' + chr(102) + '\055' + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'<'), '\x64' + chr(8207 - 8106) + '\143' + chr(111) + '\x64' + chr(101))(chr(8575 - 8458) + chr(116) + chr(102) + chr(157 - 112) + chr(56))] + rtLND_lZ2X1Z + cDNokUnR7MCJ + NdJkVQCcns3t + Bu0pqYkoM7IR if c2A0yzQpDQB3(Sz7tXxaCGqJ1) != c2A0yzQpDQB3(MVEN8G6CxlvR(Sz7tXxaCGqJ1)): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'E\xfa\xcda(\xc0\xb9\x18\xd7>\xec/}\x7f$\xfaE\xb1\xb5\xe5Q\xcajI\xea(\xa8'), '\144' + chr(0b10101 + 0o120) + chr(5122 - 5023) + '\157' + chr(100) + '\145')('\165' + chr(8874 - 8758) + '\146' + '\055' + chr(56)) % Sz7tXxaCGqJ1) JqmXf1_CnK1y = wLqBDw8l0eIm([(YeT3l7JgTbWR, WVxHKyX45z_L) for (WVxHKyX45z_L, YeT3l7JgTbWR) in YlkZvXL8qwsX(Sz7tXxaCGqJ1)]) def LQUG_Q0ljxAH(blgtMYjOOQgD): return [JqmXf1_CnK1y[vGrByMSYMp9h] for vGrByMSYMp9h in blgtMYjOOQgD] def Yb_wVEZpSYV3(dty8k0yJnApL): return xafqLlk3kkUe(xafqLlk3kkUe(SXOLrMavuUCe(b''), '\144' + chr(0b1001111 + 0o26) + chr(99) + chr(111) + '\144' + chr(0b11001 + 0o114))(chr(0b111001 + 0o74) + chr(0b1000011 + 0o61) + chr(0b1100110) + chr(45) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'k\xe0\xd4c'), chr(0b1100100) + chr(0b1100101) + chr(3072 - 2973) + '\x6f' + chr(100) + chr(0b1000110 + 0o37))(chr(11272 - 11155) + chr(0b111111 + 0o65) + chr(4457 - 4355) + chr(1766 - 1721) + chr(56)))([Sz7tXxaCGqJ1[WVxHKyX45z_L] for WVxHKyX45z_L in dty8k0yJnApL]) return sNTVGYfqRT_t(vlist=cDNokUnR7MCJ, dlist=NdJkVQCcns3t, flist=Bu0pqYkoM7IR, functions=C1R32KxhgJbQ, ops=_nu2um5Q5WJf, solve_ops=zd2_K8SEGtuV, int_encoder=LQUG_Q0ljxAH, int_decoder=Yb_wVEZpSYV3)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
algebra_inverse
def algebra_inverse(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the algebra inverse dataset. Each sample is a symbolic math equation involving unknown variables. The task is to solve for the given variable. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to solve for and the math equation, and target-list is a list of tokens encoding the resulting math expression after solving for the variable. Raises: ValueError: If `max_depth` < `min_depth`. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) alg_cfg = math_dataset_init(alphabet_size) for _ in range(nbr_cases): sample, target = generate_algebra_inverse_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), alg_cfg.solve_ops, min_depth, max_depth) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) }
python
def algebra_inverse(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the algebra inverse dataset. Each sample is a symbolic math equation involving unknown variables. The task is to solve for the given variable. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to solve for and the math equation, and target-list is a list of tokens encoding the resulting math expression after solving for the variable. Raises: ValueError: If `max_depth` < `min_depth`. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) alg_cfg = math_dataset_init(alphabet_size) for _ in range(nbr_cases): sample, target = generate_algebra_inverse_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), alg_cfg.solve_ops, min_depth, max_depth) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) }
[ "def", "algebra_inverse", "(", "alphabet_size", "=", "26", ",", "min_depth", "=", "0", ",", "max_depth", "=", "2", ",", "nbr_cases", "=", "10000", ")", ":", "if", "max_depth", "<", "min_depth", ":", "raise", "ValueError", "(", "\"max_depth must be greater than or equal to min_depth. \"", "\"Got max_depth=%s, min_depth=%s\"", "%", "(", "max_depth", ",", "min_depth", ")", ")", "alg_cfg", "=", "math_dataset_init", "(", "alphabet_size", ")", "for", "_", "in", "range", "(", "nbr_cases", ")", ":", "sample", ",", "target", "=", "generate_algebra_inverse_sample", "(", "alg_cfg", ".", "vlist", ",", "list", "(", "alg_cfg", ".", "ops", ".", "values", "(", ")", ")", ",", "alg_cfg", ".", "solve_ops", ",", "min_depth", ",", "max_depth", ")", "yield", "{", "\"inputs\"", ":", "alg_cfg", ".", "int_encoder", "(", "sample", ")", ",", "\"targets\"", ":", "alg_cfg", ".", "int_encoder", "(", "target", ")", "}" ]
Generate the algebra inverse dataset. Each sample is a symbolic math equation involving unknown variables. The task is to solve for the given variable. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to solve for and the math equation, and target-list is a list of tokens encoding the resulting math expression after solving for the variable. Raises: ValueError: If `max_depth` < `min_depth`.
[ "Generate", "the", "algebra", "inverse", "dataset", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L439-L477
train
Generate the algebra inverse 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,sbc9g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0Px3KOsy9,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(51) + chr(55) + chr(2000 - 1947), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\063' + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(149 - 98) + '\062' + chr(0b110010), 6698 - 6690), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1000011 + 0o54) + chr(1098 - 1047) + '\x37' + chr(1371 - 1323), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1827 - 1716) + chr(0b10001 + 0o40) + '\x31' + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1997 - 1946) + chr(51) + chr(610 - 562), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(656 - 605) + chr(212 - 162) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + chr(1397 - 1343), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b10000 + 0o42) + '\061', 0b1000), ehT0Px3KOsy9(chr(978 - 930) + '\x6f' + chr(647 - 597) + chr(0b100010 + 0o22) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\063' + chr(0b1 + 0o57), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(605 - 554) + chr(0b100 + 0o62) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101110 + 0o3) + '\063' + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101001 + 0o10) + chr(48) + chr(0b100001 + 0o20), 42674 - 42666), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10100 + 0o34), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11010 + 0o27) + chr(50) + chr(49), 0o10), ehT0Px3KOsy9(chr(1798 - 1750) + chr(9647 - 9536) + chr(0b10011 + 0o37) + chr(0b1011 + 0o51) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(1079 - 1031) + chr(0b100100 + 0o113) + chr(0b110 + 0o57) + chr(0b110111), 52810 - 52802), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(55) + chr(2001 - 1950), 0o10), ehT0Px3KOsy9(chr(469 - 421) + chr(0b1100111 + 0o10) + chr(51) + chr(75 - 25) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8576 - 8465) + '\064', 47845 - 47837), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b1101111) + chr(0b110010) + '\060' + '\063', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110010) + '\x36', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + '\062' + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010011 + 0o34) + chr(0b110011) + '\065' + chr(136 - 83), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b101110 + 0o6) + chr(210 - 160), 0o10), ehT0Px3KOsy9(chr(409 - 361) + chr(0b1101111) + chr(0b110001) + chr(0b110110) + '\064', 49867 - 49859), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(111) + chr(2356 - 2305) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(597 - 542) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\x32' + '\x32' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + chr(1446 - 1396) + chr(1040 - 986) + '\065', 0o10), ehT0Px3KOsy9(chr(1591 - 1543) + '\x6f' + '\x32' + chr(0b10001 + 0o46) + chr(0b110011), 8), ehT0Px3KOsy9(chr(0b110000) + chr(6700 - 6589) + chr(717 - 668) + '\x37' + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(48) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b1011 + 0o47) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(2590 - 2479) + chr(0b110001) + chr(0b110101) + chr(310 - 255), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(2273 - 2224) + chr(1571 - 1520) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(439 - 384) + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b1110 + 0o44) + '\067' + '\x36', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd3'), '\x64' + chr(0b1000100 + 0o41) + chr(0b101010 + 0o71) + chr(6904 - 6793) + chr(0b100001 + 0o103) + '\145')('\165' + '\164' + chr(102) + chr(0b111 + 0o46) + chr(1752 - 1696)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def IfeirN4kOjzk(Xp0zaAcnRRfg=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101110 + 0o5) + '\x32', 2893 - 2885), SENJvPRDnSlL=ehT0Px3KOsy9(chr(48) + chr(3491 - 3380) + '\060', 8), U9fr9lFGWX80=ehT0Px3KOsy9(chr(0b110000) + chr(2989 - 2878) + chr(0b110010), 0b1000), kKlybqgbD9mO=ehT0Px3KOsy9(chr(1832 - 1784) + chr(0b1101111) + '\062' + '\063' + chr(0b110001 + 0o3) + chr(0b110010) + '\060', 0o10)): if U9fr9lFGWX80 < SENJvPRDnSlL: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x908\xaa\xa7/\xbd\xa5r\xb9\x845\x85-eab4\x80H\xc9\xb3e\xf7\xb3 \xcdV\x1c~U\xb4\xda\xc9\\\xe5&\x1a;\xd5\x9e\x896\xf2\x95"\xb6\x8ab\xb4\xd4,\x98p1\x06o%\x80B\xda\xae[\xe7\xb3"\x99JI:H\xb8\x95\xd6\x15\xee\x08\x0b?\xc9\xca\x95d\xf7\x8b'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(3208 - 3108) + '\145')('\x75' + chr(0b1110100) + chr(3683 - 3581) + chr(0b101101) + chr(56)) % (U9fr9lFGWX80, SENJvPRDnSlL)) Awttr3kjH0zX = Jo73bQiRAn6u(Xp0zaAcnRRfg) for VNGQdHSFPrso in vQr8gNKaIaWE(kKlybqgbD9mO): (aBu4gMMQp6Jg, GR1581dR5rDS) = jMENE2XJs_Xn(Awttr3kjH0zX.vlist, YyaZ4tpXu4lf(Awttr3kjH0zX.ops.SPnCNu54H1db()), Awttr3kjH0zX.solve_ops, SENJvPRDnSlL, U9fr9lFGWX80) yield {xafqLlk3kkUe(SXOLrMavuUCe(b'\x947\xa2\x8d?\xab'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + '\144' + '\x65')(chr(0b1110101) + chr(0b111101 + 0o67) + chr(0b1100110) + '\x2d' + '\x38'): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x08\x87\xbf\x14\x89\xe5j\xbb\xdc\x19\xb8'), chr(100) + chr(0b1100101) + chr(9146 - 9047) + chr(0b110001 + 0o76) + '\x64' + chr(0b1100101))('\x75' + chr(0b1110000 + 0o4) + chr(0b1100110) + '\055' + chr(56)))(aBu4gMMQp6Jg), xafqLlk3kkUe(SXOLrMavuUCe(b'\x898\xa0\x9f.\xac\xa6'), chr(0b1110 + 0o126) + '\145' + chr(99) + chr(0b1101111) + '\144' + chr(4029 - 3928))('\165' + '\164' + chr(0b101100 + 0o72) + chr(1429 - 1384) + chr(0b111 + 0o61)): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\x08\x87\xbf\x14\x89\xe5j\xbb\xdc\x19\xb8'), chr(100) + chr(300 - 199) + chr(99) + '\x6f' + chr(0b1001001 + 0o33) + chr(101))('\165' + chr(116) + '\146' + '\x2d' + '\x38'))(GR1581dR5rDS)}
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
algebra_simplify
def algebra_simplify(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the algebra simplify dataset. Each sample is a symbolic math expression involving unknown variables. The task is to simplify the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the expression to simplify, and target-list is a list of tokens encoding the resulting math expression after simplifying. Raises: ValueError: If `max_depth` < `min_depth`. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) alg_cfg = math_dataset_init(alphabet_size, digits=5) for _ in range(nbr_cases): sample, target = generate_algebra_simplify_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), min_depth, max_depth) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) }
python
def algebra_simplify(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the algebra simplify dataset. Each sample is a symbolic math expression involving unknown variables. The task is to simplify the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the expression to simplify, and target-list is a list of tokens encoding the resulting math expression after simplifying. Raises: ValueError: If `max_depth` < `min_depth`. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) alg_cfg = math_dataset_init(alphabet_size, digits=5) for _ in range(nbr_cases): sample, target = generate_algebra_simplify_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), min_depth, max_depth) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) }
[ "def", "algebra_simplify", "(", "alphabet_size", "=", "26", ",", "min_depth", "=", "0", ",", "max_depth", "=", "2", ",", "nbr_cases", "=", "10000", ")", ":", "if", "max_depth", "<", "min_depth", ":", "raise", "ValueError", "(", "\"max_depth must be greater than or equal to min_depth. \"", "\"Got max_depth=%s, min_depth=%s\"", "%", "(", "max_depth", ",", "min_depth", ")", ")", "alg_cfg", "=", "math_dataset_init", "(", "alphabet_size", ",", "digits", "=", "5", ")", "for", "_", "in", "range", "(", "nbr_cases", ")", ":", "sample", ",", "target", "=", "generate_algebra_simplify_sample", "(", "alg_cfg", ".", "vlist", ",", "list", "(", "alg_cfg", ".", "ops", ".", "values", "(", ")", ")", ",", "min_depth", ",", "max_depth", ")", "yield", "{", "\"inputs\"", ":", "alg_cfg", ".", "int_encoder", "(", "sample", ")", ",", "\"targets\"", ":", "alg_cfg", ".", "int_encoder", "(", "target", ")", "}" ]
Generate the algebra simplify dataset. Each sample is a symbolic math expression involving unknown variables. The task is to simplify the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 52. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the expression to simplify, and target-list is a list of tokens encoding the resulting math expression after simplifying. Raises: ValueError: If `max_depth` < `min_depth`.
[ "Generate", "the", "algebra", "simplify", "dataset", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L480-L517
train
Generates the algebra simplify 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,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,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1393 - 1345) + chr(111) + chr(49) + '\062' + chr(2513 - 2458), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1010 + 0o54) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(577 - 528) + '\062', 0b1000), ehT0Px3KOsy9(chr(48) + chr(4168 - 4057) + chr(1923 - 1874) + chr(699 - 650) + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1773 - 1722) + chr(2369 - 2316) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1241 - 1191) + chr(0b110100 + 0o1) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2497 - 2446) + chr(0b110010 + 0o4) + chr(48), 14084 - 14076), ehT0Px3KOsy9(chr(1634 - 1586) + chr(4027 - 3916) + chr(1117 - 1063) + chr(1928 - 1880), 0b1000), ehT0Px3KOsy9('\060' + chr(11270 - 11159) + chr(51) + chr(846 - 791), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b110011) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + '\061' + chr(2234 - 2180) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b10011 + 0o37) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1111 + 0o140) + '\x33' + chr(0b110000) + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + '\064' + chr(53), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\062' + '\x34' + chr(0b110111), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100111 + 0o10) + chr(1911 - 1862) + chr(0b110100) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(135 - 87) + chr(2285 - 2174) + chr(51) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(352 - 299) + chr(0b11000 + 0o34), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + chr(49) + chr(1725 - 1675), 0b1000), ehT0Px3KOsy9(chr(1774 - 1726) + chr(4862 - 4751) + chr(1667 - 1617) + chr(1013 - 960) + chr(54), 0b1000), ehT0Px3KOsy9(chr(121 - 73) + chr(0b1101111) + chr(50) + chr(51) + chr(0b1110 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + chr(0b110010) + chr(0b0 + 0o66) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110110 + 0o0) + chr(0b1111 + 0o46), 0b1000), ehT0Px3KOsy9(chr(1673 - 1625) + chr(666 - 555) + chr(0b11101 + 0o25) + '\x32' + chr(1428 - 1375), 0b1000), ehT0Px3KOsy9(chr(1522 - 1474) + '\x6f' + chr(2242 - 2191), 0b1000), ehT0Px3KOsy9(chr(1433 - 1385) + '\157' + chr(50) + '\062' + '\x31', 12115 - 12107), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + chr(54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1070 - 1020) + '\x33' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(0b1110 + 0o45) + chr(0b110110) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1001000 + 0o47) + '\x33' + chr(55) + chr(426 - 375), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b101000 + 0o12) + chr(0b110101), 32994 - 32986), ehT0Px3KOsy9(chr(1992 - 1944) + '\x6f' + '\x33' + chr(1540 - 1491) + '\x31', 34887 - 34879), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + chr(0b110010) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1000111 + 0o50) + '\062' + '\066' + chr(0b110010 + 0o0), 33091 - 33083), ehT0Px3KOsy9('\x30' + chr(0b1100 + 0o143) + chr(55) + chr(0b11000 + 0o30), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + chr(11111 - 11000) + chr(51) + chr(0b110100) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + chr(10203 - 10092) + chr(0b101110 + 0o5) + '\060' + chr(1819 - 1765), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\066' + chr(0b11100 + 0o33), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b101111 + 0o100) + chr(0b110101) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'y'), '\144' + chr(101) + chr(0b1100011) + chr(5306 - 5195) + chr(100) + chr(0b1001010 + 0o33))(chr(0b1110101) + chr(116) + chr(102) + chr(45) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WoHR6jnXeZoR(Xp0zaAcnRRfg=ehT0Px3KOsy9('\x30' + chr(111) + chr(2146 - 2095) + chr(0b10110 + 0o34), ord("\x08")), SENJvPRDnSlL=ehT0Px3KOsy9('\060' + chr(8582 - 8471) + chr(48), 0o10), U9fr9lFGWX80=ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50), ord("\x08")), kKlybqgbD9mO=ehT0Px3KOsy9('\060' + '\157' + chr(1958 - 1908) + '\x33' + chr(0b10100 + 0o40) + '\x32' + chr(0b101001 + 0o7), 0o10)): if U9fr9lFGWX80 < SENJvPRDnSlL: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b':Sr\x17\x8c\xca\x80Dwz\x1f\xe3\xb3\x91\x87\x07}L\xad\xdc\xfb\xd1A\xf0q\xb1z\xf5\x97\x95u\xa6e\x92]J\x94y\xaa\x17#]*%\x81\xc1\xafTz*\x06\xfe\xee\xc5\xe0\nlL\xa7\xcf\xe6\xefQ\xf0s\xe5f\xa0\xd3\x88y\xe9z\xdbVd\x85}\xb6C?\x0f/;'), chr(0b1100100) + chr(0b1100101 + 0o0) + '\143' + chr(0b1101111) + '\x64' + chr(101))('\x75' + '\x74' + chr(4354 - 4252) + chr(0b101101) + '\070') % (U9fr9lFGWX80, SENJvPRDnSlL)) Awttr3kjH0zX = Jo73bQiRAn6u(Xp0zaAcnRRfg, digits=ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(10171 - 10060) + '\065', 21640 - 21632)) for VNGQdHSFPrso in vQr8gNKaIaWE(kKlybqgbD9mO): (aBu4gMMQp6Jg, GR1581dR5rDS) = tNfOMV8HoA2o(Awttr3kjH0zX.vlist, YyaZ4tpXu4lf(Awttr3kjH0zX.ops.SPnCNu54H1db()), SENJvPRDnSlL, U9fr9lFGWX80) yield {xafqLlk3kkUe(SXOLrMavuUCe(b'>\\z=\x9c\xdc'), chr(0b1100100) + chr(0b101110 + 0o67) + chr(0b1100011) + '\x6f' + chr(100) + '\x65')('\165' + '\x74' + chr(102) + chr(0b100010 + 0o13) + chr(56)): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1bc_\x0f\xb7\xfe\xc0\\u"3\xde'), chr(5575 - 5475) + chr(0b1100101) + '\x63' + chr(111) + chr(0b100010 + 0o102) + chr(101))(chr(117) + chr(0b1110100) + chr(0b101010 + 0o74) + chr(0b100101 + 0o10) + chr(0b111000)))(aBu4gMMQp6Jg), xafqLlk3kkUe(SXOLrMavuUCe(b'#Sx/\x8d\xdb\x83'), chr(0b1100100) + '\x65' + chr(6469 - 6370) + chr(111) + chr(0b1000111 + 0o35) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(1642 - 1597) + chr(332 - 276)): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1bc_\x0f\xb7\xfe\xc0\\u"3\xde'), chr(0b1000010 + 0o42) + chr(0b1100101) + '\143' + chr(0b1011010 + 0o25) + chr(0b1001101 + 0o27) + '\x65')(chr(0b1111 + 0o146) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'))(GR1581dR5rDS)}
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
calculus_integrate
def calculus_integrate(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the calculus integrate dataset. Each sample is a symbolic math expression involving unknown variables. The task is to take the indefinite integral of the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 26. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to integrate with respect to and the expression to integrate, and target-list is a list of tokens encoding the resulting math expression after integrating. Raises: ValueError: If `max_depth` < `min_depth`, or if alphabet_size > 26. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) # Don't allow alphabet to use capital letters. Those are reserved for function # names. if alphabet_size > 26: raise ValueError( "alphabet_size must not be greater than 26. Got %s." % alphabet_size) functions = {"log": "L"} alg_cfg = math_dataset_init(alphabet_size, digits=5, functions=functions) nbr_case = 0 while nbr_case < nbr_cases: try: sample, target = generate_calculus_integrate_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), min_depth, max_depth, alg_cfg.functions) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) } except: # pylint:disable=bare-except continue if nbr_case % 10000 == 0: print(" calculus_integrate: generating case %d." % nbr_case) nbr_case += 1
python
def calculus_integrate(alphabet_size=26, min_depth=0, max_depth=2, nbr_cases=10000): """Generate the calculus integrate dataset. Each sample is a symbolic math expression involving unknown variables. The task is to take the indefinite integral of the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 26. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to integrate with respect to and the expression to integrate, and target-list is a list of tokens encoding the resulting math expression after integrating. Raises: ValueError: If `max_depth` < `min_depth`, or if alphabet_size > 26. """ if max_depth < min_depth: raise ValueError("max_depth must be greater than or equal to min_depth. " "Got max_depth=%s, min_depth=%s" % (max_depth, min_depth)) # Don't allow alphabet to use capital letters. Those are reserved for function # names. if alphabet_size > 26: raise ValueError( "alphabet_size must not be greater than 26. Got %s." % alphabet_size) functions = {"log": "L"} alg_cfg = math_dataset_init(alphabet_size, digits=5, functions=functions) nbr_case = 0 while nbr_case < nbr_cases: try: sample, target = generate_calculus_integrate_sample( alg_cfg.vlist, list(alg_cfg.ops.values()), min_depth, max_depth, alg_cfg.functions) yield { "inputs": alg_cfg.int_encoder(sample), "targets": alg_cfg.int_encoder(target) } except: # pylint:disable=bare-except continue if nbr_case % 10000 == 0: print(" calculus_integrate: generating case %d." % nbr_case) nbr_case += 1
[ "def", "calculus_integrate", "(", "alphabet_size", "=", "26", ",", "min_depth", "=", "0", ",", "max_depth", "=", "2", ",", "nbr_cases", "=", "10000", ")", ":", "if", "max_depth", "<", "min_depth", ":", "raise", "ValueError", "(", "\"max_depth must be greater than or equal to min_depth. \"", "\"Got max_depth=%s, min_depth=%s\"", "%", "(", "max_depth", ",", "min_depth", ")", ")", "# Don't allow alphabet to use capital letters. Those are reserved for function", "# names.", "if", "alphabet_size", ">", "26", ":", "raise", "ValueError", "(", "\"alphabet_size must not be greater than 26. Got %s.\"", "%", "alphabet_size", ")", "functions", "=", "{", "\"log\"", ":", "\"L\"", "}", "alg_cfg", "=", "math_dataset_init", "(", "alphabet_size", ",", "digits", "=", "5", ",", "functions", "=", "functions", ")", "nbr_case", "=", "0", "while", "nbr_case", "<", "nbr_cases", ":", "try", ":", "sample", ",", "target", "=", "generate_calculus_integrate_sample", "(", "alg_cfg", ".", "vlist", ",", "list", "(", "alg_cfg", ".", "ops", ".", "values", "(", ")", ")", ",", "min_depth", ",", "max_depth", ",", "alg_cfg", ".", "functions", ")", "yield", "{", "\"inputs\"", ":", "alg_cfg", ".", "int_encoder", "(", "sample", ")", ",", "\"targets\"", ":", "alg_cfg", ".", "int_encoder", "(", "target", ")", "}", "except", ":", "# pylint:disable=bare-except", "continue", "if", "nbr_case", "%", "10000", "==", "0", ":", "print", "(", "\" calculus_integrate: generating case %d.\"", "%", "nbr_case", ")", "nbr_case", "+=", "1" ]
Generate the calculus integrate dataset. Each sample is a symbolic math expression involving unknown variables. The task is to take the indefinite integral of the expression. The target is the resulting expression. Args: alphabet_size: How many possible variables there are. Max 26. min_depth: Minimum depth of the expression trees on both sides of the equals sign in the equation. max_depth: Maximum depth of the expression trees on both sides of the equals sign in the equation. nbr_cases: The number of cases to generate. Yields: A dictionary {"inputs": input-list, "targets": target-list} where input-list are the tokens encoding the variable to integrate with respect to and the expression to integrate, and target-list is a list of tokens encoding the resulting math expression after integrating. Raises: ValueError: If `max_depth` < `min_depth`, or if alphabet_size > 26.
[ "Generate", "the", "calculus", "integrate", "dataset", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L520-L573
train
Generates the calculus integrate 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,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,I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VCGgtAN,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(0b110011) + '\062' + chr(856 - 802), 54067 - 54059), ehT0Px3KOsy9(chr(633 - 585) + '\x6f' + chr(0b11000 + 0o33) + '\x33' + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(0b10010 + 0o44) + '\x37', 53297 - 53289), ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + chr(0b100010 + 0o20) + chr(1652 - 1604) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(53) + chr(687 - 632), 0b1000), ehT0Px3KOsy9(chr(425 - 377) + chr(0b1101111) + chr(49) + chr(2661 - 2607) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b110011) + '\x35' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1724 - 1676) + '\x6f' + chr(568 - 519) + chr(2241 - 2192) + chr(1408 - 1356), 0o10), ehT0Px3KOsy9('\060' + chr(0b11101 + 0o122) + '\x35' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(111) + chr(0b100100 + 0o17) + chr(327 - 277) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x35' + '\065', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + '\067' + chr(0b101 + 0o57), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b110010) + chr(0b110100), 8), ehT0Px3KOsy9(chr(1691 - 1643) + chr(111) + chr(0b100001 + 0o22) + chr(1213 - 1159), 28053 - 28045), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + chr(0b110110) + '\x34', 53534 - 53526), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(52) + chr(1072 - 1021), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b110000) + chr(0b110100), 18114 - 18106), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(50) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100010 + 0o115) + chr(49) + chr(963 - 913) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101110 + 0o1) + chr(50) + chr(0b110000) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10 + 0o61) + chr(0b101110 + 0o6) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(1155 - 1106), 0b1000), ehT0Px3KOsy9(chr(1265 - 1217) + '\157' + chr(0b110001) + chr(0b110101) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(11950 - 11839) + chr(0b100101 + 0o14) + chr(0b110001) + chr(0b100 + 0o55), 0o10), ehT0Px3KOsy9(chr(2179 - 2131) + chr(0b1101111) + '\x31' + '\061', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(111) + chr(0b11000 + 0o32) + '\x37' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + chr(0b110010) + chr(537 - 482) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\x30' + chr(0b110011), 19335 - 19327), ehT0Px3KOsy9(chr(48) + chr(0b1001100 + 0o43) + chr(49) + chr(52) + '\066', 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\157' + chr(0b110011) + '\x36' + chr(1317 - 1262), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2252 - 2201) + chr(968 - 915) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(1877 - 1766) + chr(0b11101 + 0o31), 0b1000), ehT0Px3KOsy9('\060' + chr(1365 - 1254) + '\063' + chr(55) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011 + 0o144) + '\062' + chr(0b10011 + 0o36) + '\x31', 33423 - 33415), ehT0Px3KOsy9(chr(195 - 147) + chr(332 - 221) + chr(51) + chr(0b110100) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\064', 64378 - 64370), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b101001 + 0o12) + '\064', 33880 - 33872), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(1122 - 1073) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(67 - 19) + '\x6f' + chr(0b11100 + 0o27) + '\x30' + chr(0b11010 + 0o33), 29971 - 29963)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1287 - 1239) + chr(111) + chr(53) + '\060', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf8'), chr(0b111011 + 0o51) + '\x65' + chr(8645 - 8546) + chr(111) + chr(0b1100100) + chr(0b111001 + 0o54))(chr(0b1110101) + chr(1538 - 1422) + '\146' + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def LW6WB7kTG4qL(Xp0zaAcnRRfg=ehT0Px3KOsy9(chr(1509 - 1461) + chr(111) + chr(2254 - 2203) + chr(0b110010), 0o10), SENJvPRDnSlL=ehT0Px3KOsy9('\060' + chr(111) + chr(0b110000), 0o10), U9fr9lFGWX80=ehT0Px3KOsy9(chr(48) + chr(8483 - 8372) + chr(0b11001 + 0o31), 55466 - 55458), kKlybqgbD9mO=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(50) + '\x33' + chr(0b1110 + 0o46) + chr(50) + chr(0b110000 + 0o0), 0o10)): if U9fr9lFGWX80 < SENJvPRDnSlL: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbb\xb8\x8f\xde\x0b\x11\x9c8D\xf4@\x89\xa7j\x94\x81\xa176\xf0\x87`U\x0b;)\xc9\xd7\xa2\x08\xd7\x80t\xd9\xec\x94q}\xe2\xe5\xa2\xb6\xd7\xec\x06\x1a\xb3(I\xa4Y\x94\xfa>\xf3\x8c\xb07<\xe3\x9a^E\x0b9}\xd5\x82\xe6\x15\xdb\xcfk\x90\xe7\xba`y\xfe\xb1\xbe\xe4\xd2\xf2'), chr(8796 - 8696) + '\x65' + chr(4118 - 4019) + chr(0b1101111) + chr(6223 - 6123) + chr(4615 - 4514))('\165' + '\x74' + '\x66' + '\x2d' + chr(0b0 + 0o70)) % (U9fr9lFGWX80, SENJvPRDnSlL)) if Xp0zaAcnRRfg > ehT0Px3KOsy9(chr(48) + '\157' + chr(739 - 688) + chr(0b100001 + 0o21), 8): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xb5\x87\xe9\x0e\x16\x898s\xa7D\x86\xb1>\xd9\x96\xb7cq\xec\x8du\x01\x0c,)\xda\xcd\xa6\x07\x83\x8at\xd9\xfd\x8der\xae\xf7\xe0\xf7\xd7\xc6\x00\x00\xcci_\xfa'), chr(0b1100100) + '\145' + chr(2596 - 2497) + chr(0b1101111) + '\144' + chr(1635 - 1534))('\165' + '\x74' + chr(102) + chr(0b100011 + 0o12) + '\070') % Xp0zaAcnRRfg) C1R32KxhgJbQ = {xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\xb6\x90'), '\144' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b11110 + 0o107))('\165' + chr(0b1010010 + 0o42) + chr(0b1011000 + 0o16) + chr(45) + chr(56)): xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a'), '\x64' + chr(0b1000101 + 0o40) + chr(7550 - 7451) + '\x6f' + chr(100) + chr(101))('\165' + '\164' + chr(10226 - 10124) + chr(0b101010 + 0o3) + chr(0b111000))} Awttr3kjH0zX = Jo73bQiRAn6u(Xp0zaAcnRRfg, digits=ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(0b110101 + 0o0), 0b1000), functions=C1R32KxhgJbQ) fi59hflS5c_U = ehT0Px3KOsy9(chr(1283 - 1235) + chr(0b10010 + 0o135) + '\x30', 8) while fi59hflS5c_U < kKlybqgbD9mO: try: (aBu4gMMQp6Jg, GR1581dR5rDS) = rPbPf0VZSxuR(Awttr3kjH0zX.vlist, YyaZ4tpXu4lf(Awttr3kjH0zX.ops.SPnCNu54H1db()), SENJvPRDnSlL, U9fr9lFGWX80, Awttr3kjH0zX.functions) yield {xafqLlk3kkUe(SXOLrMavuUCe(b'\xbf\xb7\x87\xf4\x1b\x07'), chr(1959 - 1859) + '\x65' + chr(99) + chr(0b10011 + 0o134) + '\x64' + chr(4798 - 4697))(chr(0b1000010 + 0o63) + chr(0b111 + 0o155) + chr(0b1000101 + 0o41) + chr(45) + chr(0b10111 + 0o41)): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\x88\xa2\xc60%\xdc F\xacl\xb4'), '\x64' + chr(9781 - 9680) + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))(aBu4gMMQp6Jg), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa2\xb8\x85\xe6\n\x00\x9f'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(7480 - 7363) + chr(0b1110100) + '\146' + chr(45) + '\070'): xafqLlk3kkUe(Awttr3kjH0zX, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\x88\xa2\xc60%\xdc F\xacl\xb4'), chr(0b1010101 + 0o17) + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(101))('\x75' + chr(2900 - 2784) + '\x66' + chr(1214 - 1169) + chr(0b11111 + 0o31)))(GR1581dR5rDS)} except ZVWAAMjVVHHl: continue if fi59hflS5c_U % ehT0Px3KOsy9(chr(1231 - 1183) + chr(111) + chr(0b1101 + 0o45) + chr(106 - 55) + chr(0b1001 + 0o53) + chr(0b110000 + 0o2) + '\x30', 8) == ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b110001 + 0o76) + '\x30', 8): zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\xba\x96\xed\x0c\x01\x809_\x8bD\x92\xa0{\xd3\x91\xa5c4\xb8\xc2fD\x00,{\xdc\xcb\xaa\x08\x90\xcfe\x98\xfa\x80$9\xea\xeb'), chr(5903 - 5803) + '\x65' + chr(9705 - 9606) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(7754 - 7652) + chr(0b101101) + chr(0b111000)) % fi59hflS5c_U) fi59hflS5c_U += ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(10365 - 10254) + chr(49), 8)
tensorflow/tensor2tensor
tensor2tensor/data_generators/algorithmic_math.py
ExprNode.is_in
def is_in(self, expr): """Returns True if `expr` is a subtree.""" if expr == self: return True is_in_left = is_in_expr(self.left, expr) is_in_right = is_in_expr(self.right, expr) return is_in_left or is_in_right
python
def is_in(self, expr): """Returns True if `expr` is a subtree.""" if expr == self: return True is_in_left = is_in_expr(self.left, expr) is_in_right = is_in_expr(self.right, expr) return is_in_left or is_in_right
[ "def", "is_in", "(", "self", ",", "expr", ")", ":", "if", "expr", "==", "self", ":", "return", "True", "is_in_left", "=", "is_in_expr", "(", "self", ".", "left", ",", "expr", ")", "is_in_right", "=", "is_in_expr", "(", "self", ".", "right", ",", "expr", ")", "return", "is_in_left", "or", "is_in_right" ]
Returns True if `expr` is a subtree.
[ "Returns", "True", "if", "expr", "is", "a", "subtree", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/algorithmic_math.py#L81-L87
train
Returns True if expr is a subtree.
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,sznFqDbN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O0,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(2139 - 2091) + '\157' + '\061' + '\062' + chr(152 - 103), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2675 - 2564) + '\062' + chr(1701 - 1647) + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(2369 - 2258) + chr(50) + chr(0b110110) + chr(0b110011), 64451 - 64443), ehT0Px3KOsy9('\x30' + chr(3555 - 3444) + '\x31' + chr(0b110110) + chr(2031 - 1980), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000000 + 0o57) + '\x32' + '\x36' + '\065', 4042 - 4034), ehT0Px3KOsy9(chr(874 - 826) + chr(111) + '\061' + chr(48) + '\060', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101101 + 0o5) + chr(53) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(2228 - 2180) + '\x6f' + chr(0b101101 + 0o10) + chr(685 - 630), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3721 - 3610) + chr(0b101110 + 0o4) + '\x33' + chr(844 - 792), ord("\x08")), ehT0Px3KOsy9('\060' + chr(3304 - 3193) + '\x33' + chr(1649 - 1596) + chr(0b101101 + 0o10), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + '\157' + '\x31' + chr(0b110110) + chr(55), 0b1000), ehT0Px3KOsy9(chr(1993 - 1945) + chr(111) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + chr(49) + chr(0b100110 + 0o17) + chr(0b110110 + 0o0), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b11011 + 0o124) + '\x33' + chr(53) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\x6f' + chr(50) + chr(0b101010 + 0o10) + chr(0b1100 + 0o53), 28544 - 28536), ehT0Px3KOsy9(chr(1515 - 1467) + chr(0b1101111) + '\066', 11749 - 11741), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(12019 - 11908) + chr(1421 - 1372) + '\061' + '\061', 3489 - 3481), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110111) + chr(53), 303 - 295), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\065' + chr(0b100111 + 0o15), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + '\066' + chr(0b10000 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1893 - 1844) + '\x30' + chr(2048 - 1994), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(0b110000 + 0o4) + '\060', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1011100 + 0o23) + chr(0b110011) + '\x31' + chr(89 - 38), 9406 - 9398), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x33' + '\x36' + chr(433 - 382), 3158 - 3150), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(404 - 353) + '\065' + chr(52), 1020 - 1012), ehT0Px3KOsy9(chr(48) + chr(8993 - 8882) + '\x32' + chr(353 - 302) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\x33' + '\x30' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1443 - 1394) + chr(51) + chr(54), 40904 - 40896), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\157' + chr(1817 - 1766) + chr(0b110100) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(362 - 311) + '\x35' + chr(430 - 381), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(321 - 270) + '\x35' + chr(2394 - 2345), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b111110 + 0o61) + chr(0b1110 + 0o43) + '\x30' + '\x32', 6333 - 6325), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(0b11010 + 0o33), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x34' + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b11110 + 0o25) + chr(49) + '\061', 7460 - 7452), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\x36' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b110100 + 0o73) + chr(2368 - 2319) + chr(0b101010 + 0o6) + '\060', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101110 + 0o1) + '\x35' + chr(0b10000 + 0o40), 46942 - 46934)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f'), '\x64' + '\x65' + chr(8618 - 8519) + chr(4363 - 4252) + chr(0b11010 + 0o112) + '\145')('\x75' + '\x74' + chr(0b1100110) + chr(1333 - 1288) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nXQgLPZkvE3s(oVre8I6UXc3b, uI2evTH5km5q): if uI2evTH5km5q == oVre8I6UXc3b: return ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + chr(49), 0o10) q_TNVeN8dLYc = JYfCeK9WjyXW(oVre8I6UXc3b.mtX6HPOlWiYu, uI2evTH5km5q) zDOicTC8UI_5 = JYfCeK9WjyXW(oVre8I6UXc3b.isOYmsUx1jxa, uI2evTH5km5q) return q_TNVeN8dLYc or zDOicTC8UI_5
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
preprocess_example_common
def preprocess_example_common(example, mode, hparams): """Preprocessing steps common to all models.""" if "inputs" in example and hparams.max_input_seq_length > 0: example["inputs"] = example["inputs"][:hparams.max_input_seq_length] if hparams.prepend_mode != "none": if mode == tf.estimator.ModeKeys.PREDICT: example["partial_targets"] = tf.concat([example["inputs"], [0]], 0) else: example["targets"] = tf.concat( [example["inputs"], [0], example["targets"]], 0) if "targets" in example and hparams.max_target_seq_length > 0: example["targets"] = example["targets"][:hparams.max_target_seq_length] if hparams.split_to_length: new_example = {} for k, v in six.iteritems(example): if k == "targets" or k == "inputs": new_example[k] = tf.reshape(v, [-1, hparams.split_to_length, 1, 1]) else: tf.logging.warning("Dropping feature %s" % k) return tf.data.Dataset.from_tensor_slices(new_example) return example
python
def preprocess_example_common(example, mode, hparams): """Preprocessing steps common to all models.""" if "inputs" in example and hparams.max_input_seq_length > 0: example["inputs"] = example["inputs"][:hparams.max_input_seq_length] if hparams.prepend_mode != "none": if mode == tf.estimator.ModeKeys.PREDICT: example["partial_targets"] = tf.concat([example["inputs"], [0]], 0) else: example["targets"] = tf.concat( [example["inputs"], [0], example["targets"]], 0) if "targets" in example and hparams.max_target_seq_length > 0: example["targets"] = example["targets"][:hparams.max_target_seq_length] if hparams.split_to_length: new_example = {} for k, v in six.iteritems(example): if k == "targets" or k == "inputs": new_example[k] = tf.reshape(v, [-1, hparams.split_to_length, 1, 1]) else: tf.logging.warning("Dropping feature %s" % k) return tf.data.Dataset.from_tensor_slices(new_example) return example
[ "def", "preprocess_example_common", "(", "example", ",", "mode", ",", "hparams", ")", ":", "if", "\"inputs\"", "in", "example", "and", "hparams", ".", "max_input_seq_length", ">", "0", ":", "example", "[", "\"inputs\"", "]", "=", "example", "[", "\"inputs\"", "]", "[", ":", "hparams", ".", "max_input_seq_length", "]", "if", "hparams", ".", "prepend_mode", "!=", "\"none\"", ":", "if", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "PREDICT", ":", "example", "[", "\"partial_targets\"", "]", "=", "tf", ".", "concat", "(", "[", "example", "[", "\"inputs\"", "]", ",", "[", "0", "]", "]", ",", "0", ")", "else", ":", "example", "[", "\"targets\"", "]", "=", "tf", ".", "concat", "(", "[", "example", "[", "\"inputs\"", "]", ",", "[", "0", "]", ",", "example", "[", "\"targets\"", "]", "]", ",", "0", ")", "if", "\"targets\"", "in", "example", "and", "hparams", ".", "max_target_seq_length", ">", "0", ":", "example", "[", "\"targets\"", "]", "=", "example", "[", "\"targets\"", "]", "[", ":", "hparams", ".", "max_target_seq_length", "]", "if", "hparams", ".", "split_to_length", ":", "new_example", "=", "{", "}", "for", "k", ",", "v", "in", "six", ".", "iteritems", "(", "example", ")", ":", "if", "k", "==", "\"targets\"", "or", "k", "==", "\"inputs\"", ":", "new_example", "[", "k", "]", "=", "tf", ".", "reshape", "(", "v", ",", "[", "-", "1", ",", "hparams", ".", "split_to_length", ",", "1", ",", "1", "]", ")", "else", ":", "tf", ".", "logging", ".", "warning", "(", "\"Dropping feature %s\"", "%", "k", ")", "return", "tf", ".", "data", ".", "Dataset", ".", "from_tensor_slices", "(", "new_example", ")", "return", "example" ]
Preprocessing steps common to all models.
[ "Preprocessing", "steps", "common", "to", "all", "models", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L142-L162
train
Preprocessing steps common to all models.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjA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Q_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1459 - 1410) + chr(52) + chr(0b110101), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(186 - 135) + chr(0b10101 + 0o35) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(1923 - 1872) + '\x33', 56183 - 56175), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\064' + '\x32', 16424 - 16416), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(51) + chr(51) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(311 - 262) + chr(0b10101 + 0o34) + '\065', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\062' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\x6f' + chr(0b110011) + chr(0b100 + 0o55) + chr(2974 - 2919), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(1868 - 1757) + chr(0b110001) + chr(0b110111) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101010 + 0o14) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(808 - 759) + chr(52) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(2144 - 2094) + '\x34' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1010001 + 0o36) + chr(0b110101) + chr(0b100110 + 0o12), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b110101) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + '\x31' + chr(0b110110) + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(795 - 744) + chr(0b110010) + '\x37', 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x34' + '\067', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(54) + chr(0b10 + 0o62), 5975 - 5967), ehT0Px3KOsy9(chr(48) + chr(0b1010011 + 0o34) + chr(0b1111 + 0o44) + chr(54) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1827 - 1779) + '\x6f' + chr(215 - 166) + chr(2174 - 2124) + chr(0b1000 + 0o50), 0b1000), ehT0Px3KOsy9(chr(202 - 154) + chr(0b1101111) + chr(1463 - 1412) + chr(54) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1001000 + 0o47) + chr(1531 - 1482) + chr(1653 - 1599), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b100011 + 0o114) + chr(49) + '\067' + '\x34', 0b1000), ehT0Px3KOsy9('\060' + chr(8704 - 8593) + '\x33' + '\063' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b10001 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b111000 + 0o67) + chr(51) + '\x37' + chr(877 - 827), 0o10), ehT0Px3KOsy9(chr(48) + chr(10336 - 10225) + chr(1703 - 1652) + '\x34' + chr(0b110111), 41541 - 41533), ehT0Px3KOsy9(chr(539 - 491) + '\x6f' + '\x32' + chr(55) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10000 + 0o42) + chr(51) + chr(0b1100 + 0o53), 0o10), ehT0Px3KOsy9(chr(2250 - 2202) + chr(0b1001101 + 0o42) + chr(977 - 928) + '\067' + chr(615 - 566), 0b1000), ehT0Px3KOsy9(chr(1577 - 1529) + '\157' + chr(0b0 + 0o61) + chr(0b1111 + 0o43), 0b1000), ehT0Px3KOsy9('\060' + chr(5384 - 5273) + chr(0b10011 + 0o36) + chr(0b110001) + '\064', 6485 - 6477), ehT0Px3KOsy9('\x30' + chr(0b1101000 + 0o7) + chr(51) + chr(494 - 446) + chr(0b101010 + 0o13), 50612 - 50604), ehT0Px3KOsy9('\060' + chr(1774 - 1663) + chr(2394 - 2344) + chr(0b110000) + '\061', 717 - 709), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\x33' + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x35' + chr(53), 0o10), ehT0Px3KOsy9('\x30' + chr(9410 - 9299) + chr(0b110100) + '\x36', 43327 - 43319)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x35' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'9'), chr(100) + chr(7813 - 7712) + '\x63' + '\157' + '\x64' + chr(731 - 630))('\x75' + '\164' + chr(102) + '\055' + chr(0b101101 + 0o13)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Jopgi_LpD3Ng(kP4qaKv0ZkGv, holLFgwB7vsP, n4ljua2gi1Pr): if xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), chr(3303 - 3203) + '\x65' + chr(0b100011 + 0o100) + '\x6f' + chr(6636 - 6536) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b100110 + 0o22)) in kP4qaKv0ZkGv and xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'o`P\xe7\xd3\xa5\x93>Y\x1b\xae-'), chr(100) + '\x65' + chr(0b100 + 0o137) + '\x6f' + chr(0b10111 + 0o115) + chr(0b1100101))(chr(0b1001010 + 0o53) + chr(116) + '\146' + chr(45) + chr(0b1000 + 0o60))) > ehT0Px3KOsy9('\x30' + chr(0b100001 + 0o116) + chr(48), 2559 - 2551): kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), chr(0b1100100) + '\x65' + '\x63' + '\157' + chr(2122 - 2022) + chr(0b1100101))(chr(0b1110101) + chr(12577 - 12461) + chr(0b111110 + 0o50) + chr(0b101101) + '\x38')] = kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(0b100010 + 0o102) + chr(0b1100101))('\165' + chr(116) + '\146' + '\055' + '\x38')][:n4ljua2gi1Pr.xa50HGLsAIaS] if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'fs:\xe0\xf7\x83\x95$j\x13\xa1L'), chr(0b1100100) + chr(101) + chr(99) + chr(0b101110 + 0o101) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b110 + 0o47) + '\070')) != xafqLlk3kkUe(SXOLrMavuUCe(b'yn\x0b\xb2'), chr(0b1100100) + chr(3126 - 3025) + chr(0b1100011) + chr(9030 - 8919) + '\144' + '\145')(chr(6635 - 6518) + '\164' + '\146' + '\x2d' + '\070'): if holLFgwB7vsP == xafqLlk3kkUe(IDJ2eXGCBCDu.estimator.ModeKeys, xafqLlk3kkUe(SXOLrMavuUCe(b'GS \x93\xd2\xa1\x8b'), chr(1077 - 977) + chr(0b1010 + 0o133) + chr(4932 - 4833) + chr(0b1100010 + 0o15) + '\x64' + '\x65')(chr(0b1110101) + chr(0b100001 + 0o123) + '\146' + '\055' + chr(56))): kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'g`\x17\xa3\xf2\x83\xb3\x12l3\xbd\x19W\x15\xd7'), chr(0b1000101 + 0o37) + chr(3714 - 3613) + chr(0b110001 + 0o62) + '\157' + chr(0b1100100) + chr(0b1010110 + 0o17))(chr(0b1010001 + 0o44) + chr(0b1011 + 0o151) + chr(102) + chr(1013 - 968) + '\x38')] = IDJ2eXGCBCDu.concat([kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), chr(100) + chr(0b10 + 0o143) + chr(99) + chr(820 - 709) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + '\146' + chr(0b101101 + 0o0) + chr(0b111000))], [ehT0Px3KOsy9('\x30' + chr(1425 - 1314) + chr(48), 8)]], ehT0Px3KOsy9('\x30' + chr(0b110110 + 0o71) + chr(1871 - 1823), 8)) else: kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), chr(3604 - 3504) + chr(101) + chr(99) + '\157' + chr(100) + chr(0b1100101))(chr(240 - 123) + '\164' + '\x66' + chr(0b101101) + chr(56))] = IDJ2eXGCBCDu.concat([kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), chr(0b1100100) + '\x65' + chr(0b10001 + 0o122) + chr(11754 - 11643) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b110 + 0o156) + chr(0b1100110) + chr(45) + chr(2863 - 2807))], [ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110000), 8)], kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), chr(0b1100100) + chr(6228 - 6127) + '\x63' + '\157' + chr(100) + '\145')('\x75' + chr(6215 - 6099) + '\x66' + '\x2d' + chr(0b111000))]], ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1556 - 1508), 8)) if xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), chr(0b11 + 0o141) + chr(0b1100101) + chr(3378 - 3279) + '\x6f' + chr(0b1001101 + 0o27) + chr(242 - 141))(chr(117) + chr(116) + '\x66' + chr(0b10111 + 0o26) + chr(147 - 91)) in kP4qaKv0ZkGv and xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'bK\x10\xa3\xd7\xa0\xea\t~\x02\xa2<'), '\x64' + chr(2862 - 2761) + '\x63' + chr(0b1011001 + 0o26) + '\144' + '\145')('\165' + chr(0b1110100) + chr(10332 - 10230) + chr(0b11111 + 0o16) + '\x38')) > ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110000), 8): kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + '\164' + '\146' + chr(45) + chr(0b111000))] = kP4qaKv0ZkGv[xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), '\x64' + '\145' + chr(7605 - 7506) + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(6352 - 6250) + '\055' + chr(2701 - 2645))][:n4ljua2gi1Pr.uJutLB5DfPmB] if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'dq\t\xbe\xef\xbd\xab"G>\xaa\x10U\x15\xcc'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1001100 + 0o43) + chr(100) + '\145')(chr(8024 - 7907) + '\x74' + chr(102) + '\055' + chr(111 - 55))): PTHa4fKFxPzV = {} for (OolUPRJhRaJd, cMbll0QYhULo) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'~u\x00\xa5\xf2\x96\xba k'), chr(0b1100100) + chr(215 - 114) + chr(99) + '\x6f' + '\144' + chr(7110 - 7009))(chr(0b11001 + 0o134) + chr(116) + chr(0b110100 + 0o62) + chr(0b10010 + 0o33) + chr(0b111000)))(kP4qaKv0ZkGv): if OolUPRJhRaJd == xafqLlk3kkUe(SXOLrMavuUCe(b'c`\x17\xb0\xfe\x96\xac'), '\144' + chr(101) + chr(0b1000111 + 0o34) + chr(0b100010 + 0o115) + chr(100) + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(56)) or OolUPRJhRaJd == xafqLlk3kkUe(SXOLrMavuUCe(b'~o\x15\xa2\xef\x91'), chr(0b1100100) + chr(8358 - 8257) + '\143' + chr(111) + chr(0b11100 + 0o110) + chr(0b1100101))(chr(6071 - 5954) + '\x74' + chr(0b101110 + 0o70) + '\x2d' + chr(56)): PTHa4fKFxPzV[OolUPRJhRaJd] = IDJ2eXGCBCDu.reshape(cMbll0QYhULo, [-ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b101101 + 0o4), 8), n4ljua2gi1Pr.split_to_length, ehT0Px3KOsy9('\060' + '\x6f' + chr(49), 8), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b110 + 0o151) + chr(49), 8)]) else: xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'``\x17\xb9\xf2\x8c\xb8'), chr(7912 - 7812) + '\145' + '\x63' + chr(0b101010 + 0o105) + '\x64' + chr(1956 - 1855))(chr(0b101000 + 0o115) + '\x74' + chr(8922 - 8820) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'Ss\n\xa7\xeb\x8b\xb1*84\xaa\x1fF\x14\xd6MOP\xa4'), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(100) + chr(101))(chr(13468 - 13351) + chr(0b1110100) + chr(1664 - 1562) + chr(45) + chr(56)) % OolUPRJhRaJd) return xafqLlk3kkUe(IDJ2eXGCBCDu.data.Dataset, xafqLlk3kkUe(SXOLrMavuUCe(b'qs\n\xba\xc4\x96\xba#k=\xbd!A\r\xcdK\n\x06'), chr(0b110110 + 0o56) + chr(101) + chr(7559 - 7460) + chr(0b1100011 + 0o14) + '\144' + chr(101))(chr(0b1000011 + 0o62) + '\x74' + '\x66' + chr(0b11100 + 0o21) + '\070'))(PTHa4fKFxPzV) return kP4qaKv0ZkGv
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
_copy_problem_hparams
def _copy_problem_hparams(p_hparams): """Use input modality, vocab, and space id for target.""" p = p_hparams # Duplicate input modality. p.modality["targets"] = p.modality["inputs"] # Duplicate input vocab size. p.vocab_size["targets"] = p.vocab_size["inputs"] # Duplicate input vocabulary. p.vocabulary["targets"] = p.vocabulary["inputs"] # Duplicate input space ids. p.target_space_id = p.input_space_id # Mark that p was reversed. p.was_copy = True
python
def _copy_problem_hparams(p_hparams): """Use input modality, vocab, and space id for target.""" p = p_hparams # Duplicate input modality. p.modality["targets"] = p.modality["inputs"] # Duplicate input vocab size. p.vocab_size["targets"] = p.vocab_size["inputs"] # Duplicate input vocabulary. p.vocabulary["targets"] = p.vocabulary["inputs"] # Duplicate input space ids. p.target_space_id = p.input_space_id # Mark that p was reversed. p.was_copy = True
[ "def", "_copy_problem_hparams", "(", "p_hparams", ")", ":", "p", "=", "p_hparams", "# Duplicate input modality.", "p", ".", "modality", "[", "\"targets\"", "]", "=", "p", ".", "modality", "[", "\"inputs\"", "]", "# Duplicate input vocab size.", "p", ".", "vocab_size", "[", "\"targets\"", "]", "=", "p", ".", "vocab_size", "[", "\"inputs\"", "]", "# Duplicate input vocabulary.", "p", ".", "vocabulary", "[", "\"targets\"", "]", "=", "p", ".", "vocabulary", "[", "\"inputs\"", "]", "# Duplicate input space ids.", "p", ".", "target_space_id", "=", "p", ".", "input_space_id", "# Mark that p was reversed.", "p", ".", "was_copy", "=", "True" ]
Use input modality, vocab, and space id for target.
[ "Use", "input", "modality", "vocab", "and", "space", "id", "for", "target", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L947-L959
train
Copy problem hparams to target modality vocab and space ids.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6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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(0b100101 + 0o112) + chr(51) + chr(49) + chr(0b110101), 12565 - 12557), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x37' + '\065', 0o10), ehT0Px3KOsy9(chr(1578 - 1530) + chr(0b10010 + 0o135) + '\061' + chr(49) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(1446 - 1335) + '\x32' + '\x30' + '\063', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1270 - 1220) + chr(578 - 530) + chr(0b110001 + 0o5), 0o10), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(168 - 119) + '\x36' + chr(54), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(835 - 780), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1588 - 1540) + '\157' + '\x32' + chr(0b10111 + 0o32) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\x6f' + chr(49) + chr(0b100100 + 0o17) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000000 + 0o57) + chr(50) + '\x30' + '\061', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x32' + '\x31', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b1010 + 0o46) + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10000 + 0o137) + chr(50) + chr(0b100001 + 0o22) + '\061', 35042 - 35034), ehT0Px3KOsy9(chr(884 - 836) + chr(111) + chr(0b110010) + chr(0b110110) + chr(1474 - 1424), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b100111 + 0o12) + chr(75 - 27) + chr(0b10011 + 0o44), 0b1000), ehT0Px3KOsy9('\x30' + chr(11098 - 10987) + chr(0b1110 + 0o45) + '\x34' + '\x34', 7658 - 7650), ehT0Px3KOsy9(chr(1839 - 1791) + '\x6f' + '\x31' + '\063' + chr(0b0 + 0o63), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010 + 0o1) + chr(0b10100 + 0o43) + chr(0b10101 + 0o37), 0o10), ehT0Px3KOsy9('\x30' + chr(1830 - 1719) + chr(49) + '\067' + chr(0b101110 + 0o6), 28873 - 28865), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(7251 - 7140) + chr(0b110001) + '\061' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6132 - 6021) + chr(0b110010) + chr(1420 - 1371) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(55) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5288 - 5177) + chr(0b100000 + 0o23) + chr(951 - 902) + chr(52), 40225 - 40217), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(921 - 872) + chr(1647 - 1592), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011 + 0o0) + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1097 - 1049) + chr(8673 - 8562) + chr(367 - 315) + chr(55), 0b1000), ehT0Px3KOsy9(chr(933 - 885) + '\157' + chr(0b100010 + 0o17) + '\064' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b10101 + 0o33), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011100 + 0o23) + chr(310 - 259) + chr(0b110001) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(3133 - 3022) + '\061' + chr(0b110000) + '\067', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b110001) + chr(161 - 111), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(10398 - 10287) + '\x31' + '\064' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(863 - 815) + chr(6320 - 6209) + '\x33' + '\064' + '\x36', 15939 - 15931), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + '\x32' + '\063' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7026 - 6915) + '\061' + chr(0b11110 + 0o31) + chr(0b100010 + 0o25), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110111) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(316 - 268) + chr(0b110110), 18744 - 18736)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2568 - 2515) + chr(0b1001 + 0o47), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe3'), '\x64' + '\145' + chr(0b1001111 + 0o24) + chr(0b1001 + 0o146) + chr(0b111011 + 0o51) + '\145')(chr(117) + chr(9602 - 9486) + '\x66' + chr(0b1101 + 0o40) + chr(2109 - 2053)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def uTu2RWd3Etri(bb9KhnGWdDAt): UyakMW2IMFEj = bb9KhnGWdDAt UyakMW2IMFEj.bYPswhysd3s2[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\\;c\xe6\xf2\x05'), '\144' + '\145' + '\143' + '\157' + chr(100) + chr(101))(chr(0b110110 + 0o77) + '\x74' + '\146' + chr(45) + '\070')] = UyakMW2IMFEj.bYPswhysd3s2[xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4S9q\xf7\xf5'), '\144' + chr(101) + '\x63' + chr(111) + '\144' + chr(0b101111 + 0o66))('\x75' + chr(116) + '\146' + chr(461 - 416) + chr(0b1100 + 0o54))] UyakMW2IMFEj.CeyMIoSyrpkQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\\;c\xe6\xf2\x05'), chr(0b1100100) + '\145' + '\x63' + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1001000 + 0o36) + '\055' + '\070')] = UyakMW2IMFEj.CeyMIoSyrpkQ[xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4S9q\xf7\xf5'), chr(8658 - 8558) + chr(3865 - 3764) + '\x63' + '\x6f' + '\144' + '\145')('\165' + '\164' + chr(0b1100110) + chr(45) + '\x38')] UyakMW2IMFEj.Vemi1XCgm0ph[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\\;c\xe6\xf2\x05'), chr(0b10111 + 0o115) + '\145' + '\x63' + chr(111) + chr(0b11101 + 0o107) + chr(0b100100 + 0o101))(chr(2578 - 2461) + '\x74' + chr(496 - 394) + chr(0b101011 + 0o2) + chr(0b111000))] = UyakMW2IMFEj.Vemi1XCgm0ph[xafqLlk3kkUe(SXOLrMavuUCe(b'\xa4S9q\xf7\xf5'), '\144' + '\145' + chr(0b100000 + 0o103) + chr(2466 - 2355) + chr(0b1100100) + chr(0b1100101))(chr(3657 - 3540) + '\x74' + '\146' + chr(1050 - 1005) + chr(0b100100 + 0o24))] UyakMW2IMFEj.F_zsiH5GNezn = UyakMW2IMFEj.input_space_id UyakMW2IMFEj.zg_4HQZzGKi4 = ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(752 - 641) + '\x31', 38295 - 38287)
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
_reverse_problem_hparams
def _reverse_problem_hparams(p_hparams): """Swap input/output modalities, vocab, and space ids.""" p = p_hparams # Swap modalities. # TODO(trandustin): Note this assumes target modalities have feature name # 'target', and each intended feature to swap has feature name 'input'. # In the future, remove need for this behavior. reversed_modality = {} for feature_name in p.modality: reversed_feature_name = feature_name.replace("target", "input") if "target" in feature_name and reversed_feature_name in p.modality: reversed_modality[feature_name] = p.modality[reversed_feature_name] reversed_modality[reversed_feature_name] = p.modality[feature_name] else: reversed_modality[feature_name] = p.modality[feature_name] p.modality = reversed_modality # Swap vocab sizes. reversed_vocab_size = {} for feature_name in p.vocab_size: reversed_feature_name = feature_name.replace("target", "input") if "target" in feature_name and reversed_feature_name in p.vocab_size: reversed_vocab_size[feature_name] = p.vocab_size[reversed_feature_name] reversed_vocab_size[reversed_feature_name] = p.vocab_size[feature_name] else: reversed_vocab_size[feature_name] = p.vocab_size[feature_name] p.vocab_size = reversed_vocab_size # Swap vocabularies. input_vocabulary = p.vocabulary.pop("inputs", None) target_vocabulary = p.vocabulary.pop("targets", None) if input_vocabulary is not None: p.vocabulary["targets"] = input_vocabulary if target_vocabulary is not None: p.vocabulary["inputs"] = target_vocabulary # Swap input/target space ids. input_space_id = p.input_space_id target_space_id = p.target_space_id if input_space_id is not None: p.target_space_id = input_space_id else: p.target_space_id = SpaceID.GENERIC if target_space_id is not None: p.input_space_id = target_space_id else: p.input_space_id = SpaceID.GENERIC # Mark that p was reversed. p.was_reversed = True
python
def _reverse_problem_hparams(p_hparams): """Swap input/output modalities, vocab, and space ids.""" p = p_hparams # Swap modalities. # TODO(trandustin): Note this assumes target modalities have feature name # 'target', and each intended feature to swap has feature name 'input'. # In the future, remove need for this behavior. reversed_modality = {} for feature_name in p.modality: reversed_feature_name = feature_name.replace("target", "input") if "target" in feature_name and reversed_feature_name in p.modality: reversed_modality[feature_name] = p.modality[reversed_feature_name] reversed_modality[reversed_feature_name] = p.modality[feature_name] else: reversed_modality[feature_name] = p.modality[feature_name] p.modality = reversed_modality # Swap vocab sizes. reversed_vocab_size = {} for feature_name in p.vocab_size: reversed_feature_name = feature_name.replace("target", "input") if "target" in feature_name and reversed_feature_name in p.vocab_size: reversed_vocab_size[feature_name] = p.vocab_size[reversed_feature_name] reversed_vocab_size[reversed_feature_name] = p.vocab_size[feature_name] else: reversed_vocab_size[feature_name] = p.vocab_size[feature_name] p.vocab_size = reversed_vocab_size # Swap vocabularies. input_vocabulary = p.vocabulary.pop("inputs", None) target_vocabulary = p.vocabulary.pop("targets", None) if input_vocabulary is not None: p.vocabulary["targets"] = input_vocabulary if target_vocabulary is not None: p.vocabulary["inputs"] = target_vocabulary # Swap input/target space ids. input_space_id = p.input_space_id target_space_id = p.target_space_id if input_space_id is not None: p.target_space_id = input_space_id else: p.target_space_id = SpaceID.GENERIC if target_space_id is not None: p.input_space_id = target_space_id else: p.input_space_id = SpaceID.GENERIC # Mark that p was reversed. p.was_reversed = True
[ "def", "_reverse_problem_hparams", "(", "p_hparams", ")", ":", "p", "=", "p_hparams", "# Swap modalities.", "# TODO(trandustin): Note this assumes target modalities have feature name", "# 'target', and each intended feature to swap has feature name 'input'.", "# In the future, remove need for this behavior.", "reversed_modality", "=", "{", "}", "for", "feature_name", "in", "p", ".", "modality", ":", "reversed_feature_name", "=", "feature_name", ".", "replace", "(", "\"target\"", ",", "\"input\"", ")", "if", "\"target\"", "in", "feature_name", "and", "reversed_feature_name", "in", "p", ".", "modality", ":", "reversed_modality", "[", "feature_name", "]", "=", "p", ".", "modality", "[", "reversed_feature_name", "]", "reversed_modality", "[", "reversed_feature_name", "]", "=", "p", ".", "modality", "[", "feature_name", "]", "else", ":", "reversed_modality", "[", "feature_name", "]", "=", "p", ".", "modality", "[", "feature_name", "]", "p", ".", "modality", "=", "reversed_modality", "# Swap vocab sizes.", "reversed_vocab_size", "=", "{", "}", "for", "feature_name", "in", "p", ".", "vocab_size", ":", "reversed_feature_name", "=", "feature_name", ".", "replace", "(", "\"target\"", ",", "\"input\"", ")", "if", "\"target\"", "in", "feature_name", "and", "reversed_feature_name", "in", "p", ".", "vocab_size", ":", "reversed_vocab_size", "[", "feature_name", "]", "=", "p", ".", "vocab_size", "[", "reversed_feature_name", "]", "reversed_vocab_size", "[", "reversed_feature_name", "]", "=", "p", ".", "vocab_size", "[", "feature_name", "]", "else", ":", "reversed_vocab_size", "[", "feature_name", "]", "=", "p", ".", "vocab_size", "[", "feature_name", "]", "p", ".", "vocab_size", "=", "reversed_vocab_size", "# Swap vocabularies.", "input_vocabulary", "=", "p", ".", "vocabulary", ".", "pop", "(", "\"inputs\"", ",", "None", ")", "target_vocabulary", "=", "p", ".", "vocabulary", ".", "pop", "(", "\"targets\"", ",", "None", ")", "if", "input_vocabulary", "is", "not", "None", ":", "p", ".", "vocabulary", "[", "\"targets\"", "]", "=", "input_vocabulary", "if", "target_vocabulary", "is", "not", "None", ":", "p", ".", "vocabulary", "[", "\"inputs\"", "]", "=", "target_vocabulary", "# Swap input/target space ids.", "input_space_id", "=", "p", ".", "input_space_id", "target_space_id", "=", "p", ".", "target_space_id", "if", "input_space_id", "is", "not", "None", ":", "p", ".", "target_space_id", "=", "input_space_id", "else", ":", "p", ".", "target_space_id", "=", "SpaceID", ".", "GENERIC", "if", "target_space_id", "is", "not", "None", ":", "p", ".", "input_space_id", "=", "target_space_id", "else", ":", "p", ".", "input_space_id", "=", "SpaceID", ".", "GENERIC", "# Mark that p was reversed.", "p", ".", "was_reversed", "=", "True" ]
Swap input/output modalities, vocab, and space ids.
[ "Swap", "input", "/", "output", "modalities", "vocab", "and", "space", "ids", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L962-L1014
train
Swap input output modalities vocab and space ids.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n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eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(445 - 397) + '\x6f' + '\065' + chr(1409 - 1356), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(51) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(1148 - 1100) + chr(0b1101111) + chr(860 - 811) + chr(2357 - 2302) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(2098 - 2049) + chr(0b110110) + chr(53), 0b1000), ehT0Px3KOsy9(chr(309 - 261) + '\x6f' + chr(1422 - 1372) + chr(49) + chr(0b110100), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b100001 + 0o22) + chr(0b110 + 0o60) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + chr(2125 - 2075) + '\x33' + '\x37', 38180 - 38172), ehT0Px3KOsy9('\060' + '\x6f' + chr(202 - 151) + '\065' + chr(0b11111 + 0o24), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + '\063' + '\x36' + chr(0b110110), 13170 - 13162), ehT0Px3KOsy9('\x30' + chr(209 - 98) + '\x33' + chr(49) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x33' + chr(54), 26074 - 26066), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(49) + chr(2086 - 2034) + '\063', 0o10), ehT0Px3KOsy9('\x30' + chr(7965 - 7854) + '\x32' + chr(0b10101 + 0o42), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2129 - 2080) + '\x35' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x37' + chr(0b1001 + 0o54), ord("\x08")), ehT0Px3KOsy9(chr(223 - 175) + chr(0b10010 + 0o135) + chr(0b10001 + 0o40) + '\x37' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101010 + 0o5) + chr(0b110011) + chr(48) + '\x33', 17383 - 17375), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(111) + chr(79 - 28) + chr(53) + '\x36', 64907 - 64899), ehT0Px3KOsy9(chr(738 - 690) + chr(0b1101011 + 0o4) + chr(51) + chr(52), 45332 - 45324), ehT0Px3KOsy9(chr(394 - 346) + chr(0b1101111) + '\062' + chr(821 - 768) + '\x32', 0o10), ehT0Px3KOsy9(chr(490 - 442) + chr(0b1101111) + chr(119 - 70) + chr(0b11010 + 0o26) + chr(53), 31466 - 31458), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(111) + chr(0b110010) + chr(2206 - 2154) + chr(0b111 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + '\061' + '\066' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b10 + 0o60) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(1713 - 1665) + chr(8322 - 8211) + chr(51) + chr(367 - 318) + chr(1622 - 1569), 0b1000), ehT0Px3KOsy9('\060' + chr(6497 - 6386) + chr(51) + chr(0b110010 + 0o3) + '\067', 0o10), ehT0Px3KOsy9(chr(1531 - 1483) + chr(2873 - 2762) + chr(49) + '\x32' + chr(1426 - 1372), 45699 - 45691), ehT0Px3KOsy9(chr(0b110000) + chr(0b100000 + 0o117) + chr(1084 - 1031) + chr(0b11 + 0o55), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(5803 - 5692) + chr(0b10101 + 0o36) + chr(0b110011) + chr(0b1101 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(817 - 769) + chr(0b1101111) + chr(0b110011) + chr(0b101000 + 0o14) + chr(0b101110 + 0o3), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b10000 + 0o43) + '\064' + chr(53), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(52) + chr(0b110011 + 0o2), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(2760 - 2649) + chr(0b110001) + '\062' + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063', 23443 - 23435), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101100 + 0o3) + '\x37' + chr(1478 - 1430), 0b1000), ehT0Px3KOsy9(chr(1575 - 1527) + chr(4229 - 4118) + chr(0b110001) + chr(0b110100) + chr(2125 - 2077), 0o10), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(224 - 174) + '\x32' + '\064', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1000111 + 0o50) + chr(1091 - 1039) + '\063', 0o10), ehT0Px3KOsy9(chr(127 - 79) + chr(11060 - 10949) + chr(0b100100 + 0o16) + '\066' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1321 - 1210) + '\063' + chr(0b110100) + '\066', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + '\x35' + chr(0b11100 + 0o24), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x03'), chr(0b111 + 0o135) + chr(0b101011 + 0o72) + '\143' + '\x6f' + '\144' + '\x65')(chr(0b1110101) + chr(0b11101 + 0o127) + chr(0b11100 + 0o112) + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def OsG8dJorx4EL(bb9KhnGWdDAt): UyakMW2IMFEj = bb9KhnGWdDAt iqiQqMIAGgxc = {} for lPuZQT6rFAxL in xafqLlk3kkUe(UyakMW2IMFEj, xafqLlk3kkUe(SXOLrMavuUCe(b'O\x80+\x06\xfb\x9f\xe6\x98\x92\xfb\xedQ'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + chr(0b1010101 + 0o20))('\x75' + '\164' + chr(102) + '\055' + '\070')): DY9cD7aS_ukN = lPuZQT6rFAxL.replace(xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b0 + 0o165) + chr(11609 - 11493) + chr(102) + '\x2d' + chr(0b110001 + 0o7)), xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb7\x0b\x00\xf8'), chr(100) + chr(0b1100101) + '\143' + '\157' + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(0b100000 + 0o15) + chr(0b111000))) if xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83'), '\144' + chr(0b100001 + 0o104) + chr(99) + '\157' + chr(735 - 635) + chr(0b1100101))('\165' + chr(10209 - 10093) + chr(0b1100110) + chr(1157 - 1112) + chr(297 - 241)) in lPuZQT6rFAxL and DY9cD7aS_ukN in xafqLlk3kkUe(UyakMW2IMFEj, xafqLlk3kkUe(SXOLrMavuUCe(b'O\x80+\x06\xfb\x9f\xe6\x98\x92\xfb\xedQ'), chr(100) + '\x65' + '\143' + chr(0b11011 + 0o124) + chr(1943 - 1843) + '\x65')(chr(2043 - 1926) + chr(4263 - 4147) + '\x66' + chr(45) + '\070')): iqiQqMIAGgxc[lPuZQT6rFAxL] = UyakMW2IMFEj.bYPswhysd3s2[DY9cD7aS_ukN] iqiQqMIAGgxc[DY9cD7aS_ukN] = UyakMW2IMFEj.bYPswhysd3s2[lPuZQT6rFAxL] else: iqiQqMIAGgxc[lPuZQT6rFAxL] = UyakMW2IMFEj.bYPswhysd3s2[lPuZQT6rFAxL] UyakMW2IMFEj.bYPswhysd3s2 = iqiQqMIAGgxc YX1Qq_1GP4mC = {} for lPuZQT6rFAxL in xafqLlk3kkUe(UyakMW2IMFEj, xafqLlk3kkUe(SXOLrMavuUCe(b'n\xbc\x028\xc5\x98\xcc\x92\x84\xb8\xf52'), '\144' + chr(0b1100101) + chr(5989 - 5890) + chr(0b1101111) + '\x64' + chr(4708 - 4607))('\165' + chr(116) + chr(0b1100001 + 0o5) + '\x2d' + chr(0b111000))): DY9cD7aS_ukN = lPuZQT6rFAxL.replace(xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83'), chr(6884 - 6784) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1000001 + 0o43) + '\145')('\x75' + chr(116) + chr(102) + chr(1927 - 1882) + '\070'), xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb7\x0b\x00\xf8'), '\x64' + chr(101) + chr(8895 - 8796) + chr(10308 - 10197) + chr(0b1100100) + chr(0b1100101))(chr(5125 - 5008) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38')) if xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83'), chr(0b1100100) + chr(0b110100 + 0o61) + chr(0b1100011) + '\157' + chr(0b10111 + 0o115) + '\x65')(chr(9560 - 9443) + chr(0b1110100) + '\146' + '\055' + chr(777 - 721)) in lPuZQT6rFAxL and DY9cD7aS_ukN in xafqLlk3kkUe(UyakMW2IMFEj, xafqLlk3kkUe(SXOLrMavuUCe(b'n\xbc\x028\xc5\x98\xcc\x92\x84\xb8\xf52'), chr(9701 - 9601) + chr(0b1100000 + 0o5) + chr(0b111110 + 0o45) + '\157' + chr(0b100101 + 0o77) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(1049 - 1004) + '\070')): YX1Qq_1GP4mC[lPuZQT6rFAxL] = UyakMW2IMFEj.CeyMIoSyrpkQ[DY9cD7aS_ukN] YX1Qq_1GP4mC[DY9cD7aS_ukN] = UyakMW2IMFEj.CeyMIoSyrpkQ[lPuZQT6rFAxL] else: YX1Qq_1GP4mC[lPuZQT6rFAxL] = UyakMW2IMFEj.CeyMIoSyrpkQ[lPuZQT6rFAxL] UyakMW2IMFEj.CeyMIoSyrpkQ = YX1Qq_1GP4mC PJcSjxkYbqIi = UyakMW2IMFEj.vocabulary.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb7\x0b\x00\xf8\x84'), '\x64' + chr(101) + '\x63' + '\157' + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)), None) iv1eofdU4lz_ = UyakMW2IMFEj.vocabulary.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83\xec'), chr(0b1010111 + 0o15) + '\145' + chr(0b1100011) + chr(10870 - 10759) + '\x64' + chr(0b1100101))(chr(6355 - 6238) + chr(2186 - 2070) + '\x66' + chr(0b101101) + '\070'), None) if PJcSjxkYbqIi is not None: UyakMW2IMFEj.Vemi1XCgm0ph[xafqLlk3kkUe(SXOLrMavuUCe(b'Y\xb8\t\x12\xe9\x83\xec'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(0b1011 + 0o131) + '\145')('\165' + chr(116) + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b100010 + 0o26))] = PJcSjxkYbqIi if iv1eofdU4lz_ is not None: UyakMW2IMFEj.Vemi1XCgm0ph[xafqLlk3kkUe(SXOLrMavuUCe(b'D\xb7\x0b\x00\xf8\x84'), chr(2505 - 2405) + chr(0b100010 + 0o103) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(12022 - 11905) + chr(424 - 308) + chr(0b1100110) + chr(45) + chr(56))] = iv1eofdU4lz_ Fj2ITAWgKC7G = UyakMW2IMFEj.input_space_id F_zsiH5GNezn = UyakMW2IMFEj.F_zsiH5GNezn if Fj2ITAWgKC7G is not None: UyakMW2IMFEj.F_zsiH5GNezn = Fj2ITAWgKC7G else: UyakMW2IMFEj.F_zsiH5GNezn = dvFEBJoThaWD.GENERIC if F_zsiH5GNezn is not None: UyakMW2IMFEj.Fj2ITAWgKC7G = F_zsiH5GNezn else: UyakMW2IMFEj.Fj2ITAWgKC7G = dvFEBJoThaWD.GENERIC UyakMW2IMFEj.CvzTzbr5MGz4 = ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(1143 - 1094), 0o10)
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
_default_hparams
def _default_hparams(): """A set of basic model hyperparameters.""" return hparam.HParams( # Use this parameter to get comparable perplexity numbers with different # tokenizations. This value should be set to the ratio of the number of # tokens in the test set according to the tokenization used to the number # of tokens in the test set in the "official" tokenization. For # example, if we are using a word-piece based model and we want to # compute per-word perplexity, then we set loss_multiplier to the number # of wordpieces per word in the test set. loss_multiplier=1.0, # Use this parameter to allow for larger sequences in the batch. Without # the use of this parameter, the size of the inner two dimensions will # be used to judge the sequence length. batch_size_multiplier=1, # During inference for autoregressive problems, if the batch_size is 1, # the inference will stop when the model predict a text_encoder.EOS_ID # token. stop_at_eos=False, # Modalities used to map from features to a space compatible with # chosen model architecture. It comprises key-value pairs of a feature # name (str) and its modality type. modality={}, vocab_size={}, # Identifiers used to tell the model which input/target space will be # expected. For example, it can tell that we expect French as characters # as output, or Spanish as sound. Spaces defined as constants in SpaceID # class. input_space_id=SpaceID.GENERIC, target_space_id=SpaceID.GENERIC)
python
def _default_hparams(): """A set of basic model hyperparameters.""" return hparam.HParams( # Use this parameter to get comparable perplexity numbers with different # tokenizations. This value should be set to the ratio of the number of # tokens in the test set according to the tokenization used to the number # of tokens in the test set in the "official" tokenization. For # example, if we are using a word-piece based model and we want to # compute per-word perplexity, then we set loss_multiplier to the number # of wordpieces per word in the test set. loss_multiplier=1.0, # Use this parameter to allow for larger sequences in the batch. Without # the use of this parameter, the size of the inner two dimensions will # be used to judge the sequence length. batch_size_multiplier=1, # During inference for autoregressive problems, if the batch_size is 1, # the inference will stop when the model predict a text_encoder.EOS_ID # token. stop_at_eos=False, # Modalities used to map from features to a space compatible with # chosen model architecture. It comprises key-value pairs of a feature # name (str) and its modality type. modality={}, vocab_size={}, # Identifiers used to tell the model which input/target space will be # expected. For example, it can tell that we expect French as characters # as output, or Spanish as sound. Spaces defined as constants in SpaceID # class. input_space_id=SpaceID.GENERIC, target_space_id=SpaceID.GENERIC)
[ "def", "_default_hparams", "(", ")", ":", "return", "hparam", ".", "HParams", "(", "# Use this parameter to get comparable perplexity numbers with different", "# tokenizations. This value should be set to the ratio of the number of", "# tokens in the test set according to the tokenization used to the number", "# of tokens in the test set in the \"official\" tokenization. For", "# example, if we are using a word-piece based model and we want to", "# compute per-word perplexity, then we set loss_multiplier to the number", "# of wordpieces per word in the test set.", "loss_multiplier", "=", "1.0", ",", "# Use this parameter to allow for larger sequences in the batch. Without", "# the use of this parameter, the size of the inner two dimensions will", "# be used to judge the sequence length.", "batch_size_multiplier", "=", "1", ",", "# During inference for autoregressive problems, if the batch_size is 1,", "# the inference will stop when the model predict a text_encoder.EOS_ID", "# token.", "stop_at_eos", "=", "False", ",", "# Modalities used to map from features to a space compatible with", "# chosen model architecture. It comprises key-value pairs of a feature", "# name (str) and its modality type.", "modality", "=", "{", "}", ",", "vocab_size", "=", "{", "}", ",", "# Identifiers used to tell the model which input/target space will be", "# expected. For example, it can tell that we expect French as characters", "# as output, or Spanish as sound. Spaces defined as constants in SpaceID", "# class.", "input_space_id", "=", "SpaceID", ".", "GENERIC", ",", "target_space_id", "=", "SpaceID", ".", "GENERIC", ")" ]
A set of basic model hyperparameters.
[ "A", "set", "of", "basic", "model", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L1017-L1050
train
A set of basic 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,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk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Bmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b110111) + chr(0b110010), 30447 - 30439), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(0b110001) + chr(416 - 367), 24375 - 24367), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(0b110010) + '\067' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(11832 - 11721) + '\x31' + chr(1537 - 1486), 26801 - 26793), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b110001) + chr(1133 - 1079) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\062' + '\x33' + '\060', 58935 - 58927), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11000 + 0o32) + chr(0b110111) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + '\066' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + chr(0b10 + 0o56) + chr(49), 7350 - 7342), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b1001011 + 0o44) + '\x34' + '\064', 18187 - 18179), ehT0Px3KOsy9(chr(0b110000) + chr(5655 - 5544) + chr(49) + chr(54) + chr(0b100111 + 0o16), 8), ehT0Px3KOsy9(chr(342 - 294) + chr(0b11001 + 0o126) + chr(51) + chr(53) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(238 - 190) + chr(0b1101111) + chr(50) + chr(0b110000) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(2344 - 2293) + '\064' + chr(48), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101011 + 0o10) + chr(1958 - 1908) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + '\x37' + chr(55), 2710 - 2702), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\157' + chr(49) + chr(1926 - 1878) + chr(52), 0b1000), ehT0Px3KOsy9(chr(701 - 653) + chr(0b110101 + 0o72) + '\061' + chr(0b11011 + 0o30) + '\066', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(48) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(873 - 762) + chr(0b110010) + chr(0b110000) + chr(0b11000 + 0o34), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10101 + 0o34) + chr(52) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111100 + 0o63) + chr(1549 - 1500), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010010 + 0o35) + '\063' + chr(1932 - 1877) + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x34' + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + chr(4311 - 4200) + '\061' + chr(454 - 404) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(2262 - 2214) + '\157' + '\065' + chr(0b110010 + 0o0), 25082 - 25074), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(1214 - 1164), ord("\x08")), ehT0Px3KOsy9('\060' + chr(2772 - 2661) + '\x33' + chr(0b11101 + 0o27) + chr(0b101110 + 0o4), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(0b110111) + chr(52), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b100 + 0o57) + '\x35' + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(0b100110 + 0o15) + chr(2531 - 2477), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(0b1000101 + 0o52) + chr(50) + chr(0b110111) + chr(52), 8), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + '\x33' + chr(0b110100) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33', 61505 - 61497), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\064' + chr(0b100010 + 0o25), 0o10), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(111) + '\063' + chr(53) + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(53) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2386 - 2337) + chr(0b100110 + 0o13) + chr(0b110110), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + chr(0b101011 + 0o5), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4'), '\x64' + chr(0b1111 + 0o126) + '\x63' + chr(0b1101111) + chr(0b100110 + 0o76) + '\x65')(chr(117) + '\x74' + chr(0b110001 + 0o65) + chr(340 - 295) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Ey0q4VtBSGcj(): return xafqLlk3kkUe(guRGmljwUVnc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\x19\xd9y\x14\xf5\xcf'), chr(5436 - 5336) + chr(9228 - 9127) + '\143' + '\157' + chr(100) + chr(2875 - 2774))(chr(0b1110101) + chr(12323 - 12207) + chr(0b1011001 + 0o15) + '\x2d' + chr(0b1010 + 0o56)))(loss_multiplier=1.0, batch_size_multiplier=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31', 8), stop_at_eos=ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(572 - 524), 394 - 386), modality={}, vocab_size={}, input_space_id=xafqLlk3kkUe(dvFEBJoThaWD, xafqLlk3kkUe(SXOLrMavuUCe(b"\xbd\x0c\xf6N'\xd1\xff"), '\x64' + chr(4252 - 4151) + '\143' + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + '\x74' + '\146' + chr(113 - 68) + chr(0b111000))), target_space_id=xafqLlk3kkUe(dvFEBJoThaWD, xafqLlk3kkUe(SXOLrMavuUCe(b"\xbd\x0c\xf6N'\xd1\xff"), '\144' + chr(9505 - 9404) + chr(99) + chr(8441 - 8330) + chr(100) + chr(101))('\x75' + chr(0b1110100) + chr(917 - 815) + chr(0b101101) + chr(56))))
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.tpu_batch_size_per_shard
def tpu_batch_size_per_shard(self, model_hparams): """Batch size in examples per TPU core. Args: model_hparams: model hyperparameters Returns: an integer """ if self.batch_size_means_tokens and not model_hparams.use_fixed_batch_size: return model_hparams.batch_size // self.max_length(model_hparams) else: return model_hparams.batch_size
python
def tpu_batch_size_per_shard(self, model_hparams): """Batch size in examples per TPU core. Args: model_hparams: model hyperparameters Returns: an integer """ if self.batch_size_means_tokens and not model_hparams.use_fixed_batch_size: return model_hparams.batch_size // self.max_length(model_hparams) else: return model_hparams.batch_size
[ "def", "tpu_batch_size_per_shard", "(", "self", ",", "model_hparams", ")", ":", "if", "self", ".", "batch_size_means_tokens", "and", "not", "model_hparams", ".", "use_fixed_batch_size", ":", "return", "model_hparams", ".", "batch_size", "//", "self", ".", "max_length", "(", "model_hparams", ")", "else", ":", "return", "model_hparams", ".", "batch_size" ]
Batch size in examples per TPU core. Args: model_hparams: model hyperparameters Returns: an integer
[ "Batch", "size", "in", "examples", "per", "TPU", "core", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L272-L283
train
Batch size in examples per TPU core.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVH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AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(0b110110) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10101 + 0o35) + chr(0b101011 + 0o10), 64864 - 64856), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(0b101000 + 0o16) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(50) + '\x31' + chr(884 - 833), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + chr(54) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100101 + 0o15) + chr(55) + chr(260 - 208), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(7081 - 6970) + chr(0b110010) + chr(0b100001 + 0o23) + chr(0b110011), 5343 - 5335), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2102 - 2050) + chr(0b100110 + 0o20), 18114 - 18106), ehT0Px3KOsy9(chr(821 - 773) + '\157' + chr(459 - 410) + chr(0b11 + 0o56) + '\065', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(51) + chr(0b110000 + 0o5) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b110001 + 0o76) + '\x37' + chr(994 - 944), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(3409 - 3298) + chr(0b110010) + chr(735 - 682) + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(136 - 87) + '\x30' + '\065', 0o10), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1101111) + '\x33' + '\x36' + chr(0b1000 + 0o54), 0b1000), ehT0Px3KOsy9(chr(310 - 262) + chr(0b1101111) + '\062' + chr(0b110001) + chr(499 - 446), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101011 + 0o4) + '\x32' + '\060' + chr(0b0 + 0o64), 9132 - 9124), ehT0Px3KOsy9('\x30' + chr(0b1101110 + 0o1) + chr(0b110001) + '\062' + chr(0b110 + 0o54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(9716 - 9605) + '\x31' + chr(48) + chr(261 - 210), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(0b10111 + 0o37) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10709 - 10598) + chr(50) + chr(1688 - 1640) + chr(1019 - 964), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\x37' + '\061', 43555 - 43547), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b101001 + 0o11) + chr(0b110001), 52659 - 52651), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + '\x33' + chr(51) + chr(0b11 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063' + '\063' + '\063', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\066' + chr(49), 0o10), ehT0Px3KOsy9(chr(130 - 82) + '\157' + '\063' + chr(0b100011 + 0o17), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b11100 + 0o26) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(6518 - 6407) + '\063' + chr(0b110011) + chr(0b10000 + 0o45), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10010 + 0o37) + chr(936 - 888) + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000010 + 0o55) + '\x32' + chr(53) + chr(52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x35' + '\060', 26969 - 26961), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b110010) + chr(689 - 634) + '\x33', 19751 - 19743), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x32' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1110 + 0o141) + chr(0b110110) + chr(1231 - 1179), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1 + 0o62) + chr(51) + chr(49), 60121 - 60113), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(0b0 + 0o63) + chr(0b101100 + 0o11) + '\062', 32250 - 32242), ehT0Px3KOsy9('\x30' + chr(0b11011 + 0o124) + chr(0b100011 + 0o16) + chr(1905 - 1854) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(49) + chr(0b110010), 37762 - 37754)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(738 - 690) + chr(0b1101111) + chr(0b110000 + 0o5) + chr(1917 - 1869), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a'), chr(0b1100100) + '\x65' + chr(5400 - 5301) + '\x6f' + chr(0b1011 + 0o131) + chr(240 - 139))(chr(0b1110101) + '\164' + chr(10275 - 10173) + '\055' + chr(1952 - 1896)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def awz2at55gm5n(oVre8I6UXc3b, tq24Tk6UZ6u1): if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xd6rb\x10\xe3i\xcf\xca\\(\xb7W\xc9$\x9a\xfe\xdb&,\x9c\xe2\xd7"'), '\144' + chr(0b1100101) + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\x75' + chr(0b10110 + 0o136) + '\146' + chr(53 - 8) + '\x38')) and (not xafqLlk3kkUe(tq24Tk6UZ6u1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1`s,\xed_\xc4\xc6B\x12\x8a[\xd8&\x9c\xd2\xf7;9\x92'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b110100 + 0o60) + chr(0b1010000 + 0o25))(chr(0b1010001 + 0o44) + chr(1103 - 987) + chr(2954 - 2852) + chr(0b101101) + '\070'))): return xafqLlk3kkUe(tq24Tk6UZ6u1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xddk/\x17\xd1O\xd9\xe2K\x18\x90c'), '\x64' + chr(0b111100 + 0o51) + chr(0b1001011 + 0o30) + chr(8599 - 8488) + '\x64' + '\x65')('\165' + '\x74' + chr(0b1100110) + chr(0b11011 + 0o22) + chr(56))) // xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb|!\x03\xddn\xfd\xc7i\x0e\xbaC'), chr(0b10101 + 0o117) + chr(0b1100101) + chr(0b1100011) + chr(0b101101 + 0o102) + chr(0b1100100) + chr(8073 - 7972))(chr(117) + '\164' + chr(0b1100110) + chr(45) + chr(1683 - 1627)))(tq24Tk6UZ6u1) else: return xafqLlk3kkUe(tq24Tk6UZ6u1, xafqLlk3kkUe(SXOLrMavuUCe(b'\xddk/\x17\xd1O\xd9\xe2K\x18\x90c'), chr(6625 - 6525) + '\145' + chr(0b100011 + 0o100) + chr(111) + '\144' + chr(2584 - 2483))('\165' + chr(0b1110100) + chr(102) + chr(45) + chr(0b1110 + 0o52)))
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.preprocess
def preprocess(self, dataset, mode, hparams, interleave=True): """Runtime preprocessing on the whole dataset. Return a tf.data.Datset -- the preprocessed version of the given one. By default this function calls preprocess_example. Args: dataset: the Dataset of already decoded but not yet preprocessed features. mode: tf.estimator.ModeKeys hparams: HParams, model hyperparameters interleave: bool, whether to use parallel_interleave, which is faster but will alter the order of samples non-deterministically, or flat_map, which is slower but will preserve the sample order. Returns: a Dataset """ def _preprocess(example): examples = self.preprocess_example(example, mode, hparams) if not isinstance(examples, tf.data.Dataset): examples = tf.data.Dataset.from_tensors(examples) return examples if interleave: dataset = dataset.apply( tf.data.experimental.parallel_interleave( _preprocess, sloppy=True, cycle_length=8)) else: dataset = dataset.flat_map(_preprocess) return dataset
python
def preprocess(self, dataset, mode, hparams, interleave=True): """Runtime preprocessing on the whole dataset. Return a tf.data.Datset -- the preprocessed version of the given one. By default this function calls preprocess_example. Args: dataset: the Dataset of already decoded but not yet preprocessed features. mode: tf.estimator.ModeKeys hparams: HParams, model hyperparameters interleave: bool, whether to use parallel_interleave, which is faster but will alter the order of samples non-deterministically, or flat_map, which is slower but will preserve the sample order. Returns: a Dataset """ def _preprocess(example): examples = self.preprocess_example(example, mode, hparams) if not isinstance(examples, tf.data.Dataset): examples = tf.data.Dataset.from_tensors(examples) return examples if interleave: dataset = dataset.apply( tf.data.experimental.parallel_interleave( _preprocess, sloppy=True, cycle_length=8)) else: dataset = dataset.flat_map(_preprocess) return dataset
[ "def", "preprocess", "(", "self", ",", "dataset", ",", "mode", ",", "hparams", ",", "interleave", "=", "True", ")", ":", "def", "_preprocess", "(", "example", ")", ":", "examples", "=", "self", ".", "preprocess_example", "(", "example", ",", "mode", ",", "hparams", ")", "if", "not", "isinstance", "(", "examples", ",", "tf", ".", "data", ".", "Dataset", ")", ":", "examples", "=", "tf", ".", "data", ".", "Dataset", ".", "from_tensors", "(", "examples", ")", "return", "examples", "if", "interleave", ":", "dataset", "=", "dataset", ".", "apply", "(", "tf", ".", "data", ".", "experimental", ".", "parallel_interleave", "(", "_preprocess", ",", "sloppy", "=", "True", ",", "cycle_length", "=", "8", ")", ")", "else", ":", "dataset", "=", "dataset", ".", "flat_map", "(", "_preprocess", ")", "return", "dataset" ]
Runtime preprocessing on the whole dataset. Return a tf.data.Datset -- the preprocessed version of the given one. By default this function calls preprocess_example. Args: dataset: the Dataset of already decoded but not yet preprocessed features. mode: tf.estimator.ModeKeys hparams: HParams, model hyperparameters interleave: bool, whether to use parallel_interleave, which is faster but will alter the order of samples non-deterministically, or flat_map, which is slower but will preserve the sample order. Returns: a Dataset
[ "Runtime", "preprocessing", "on", "the", "whole", "dataset", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462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gRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(175 - 125) + chr(0b110111) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x34' + chr(1335 - 1284), ord("\x08")), ehT0Px3KOsy9(chr(1295 - 1247) + chr(0b1101111) + chr(1526 - 1475) + chr(48) + chr(0b100111 + 0o16), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(1069 - 1019), ord("\x08")), ehT0Px3KOsy9('\060' + chr(5569 - 5458) + '\064' + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(1723 - 1674) + chr(49), 37590 - 37582), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b1100100 + 0o13) + chr(0b101010 + 0o10) + '\061' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + chr(50) + chr(48) + chr(0b101110 + 0o10), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(54) + chr(864 - 815), 48774 - 48766), ehT0Px3KOsy9('\060' + chr(3753 - 3642) + chr(647 - 597) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\x6f' + chr(0b11000 + 0o33) + chr(1926 - 1875) + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\066' + chr(0b101 + 0o54), 0b1000), ehT0Px3KOsy9(chr(2267 - 2219) + '\157' + chr(172 - 121) + '\061' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + '\x31' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110010) + chr(54) + chr(0b101101 + 0o12), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\066' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(51) + chr(1722 - 1671) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(3806 - 3695) + chr(663 - 613) + chr(0b1110 + 0o46) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\x31' + '\066', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x34' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b110100) + chr(1500 - 1451), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(2664 - 2610), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b10010 + 0o43) + '\062', 773 - 765), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110100) + chr(2492 - 2440), 49647 - 49639), ehT0Px3KOsy9(chr(255 - 207) + chr(3066 - 2955) + '\065' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(928 - 880) + chr(0b11100 + 0o123) + '\x33' + chr(0b110110) + '\x32', 23234 - 23226), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101011 + 0o4) + '\062' + chr(55) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(1604 - 1555) + chr(0b110000) + chr(0b10111 + 0o32), 45538 - 45530), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(51) + '\x31' + chr(0b10000 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\062' + chr(0b11010 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6943 - 6832) + chr(0b111 + 0o53) + chr(55), 26028 - 26020), ehT0Px3KOsy9(chr(1185 - 1137) + '\x6f' + '\x34' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(1619 - 1568) + chr(0b110101) + chr(1998 - 1943), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + chr(51) + chr(1322 - 1270), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(4566 - 4455) + chr(432 - 382) + chr(0b110111), 8), ehT0Px3KOsy9('\x30' + chr(11082 - 10971) + '\063' + '\x37' + '\x35', 0o10), ehT0Px3KOsy9(chr(1427 - 1379) + '\157' + '\061' + chr(2172 - 2121) + chr(0b110100), 7927 - 7919), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(727 - 674) + '\x36', 24613 - 24605), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(0b1101 + 0o43) + chr(547 - 499), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + chr(0b1000 + 0o51) + chr(0b10000 + 0o45) + chr(0b110001), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(11072 - 10961) + '\x35' + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x91'), chr(0b101111 + 0o65) + '\x65' + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(117) + chr(116) + chr(0b1011 + 0o133) + '\x2d' + chr(2812 - 2756)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def n8IJXbSueTJV(oVre8I6UXc3b, xQt6gV9VfTO3, holLFgwB7vsP, n4ljua2gi1Pr, AVD5GSbwJiwQ=ehT0Px3KOsy9(chr(48) + '\157' + '\061', 0o10)): def ap5hzmAnnS5F(kP4qaKv0ZkGv): uyAR7jUe1VQb = oVre8I6UXc3b.preprocess_example(kP4qaKv0ZkGv, holLFgwB7vsP, n4ljua2gi1Pr) if not PlSM16l2KDPD(uyAR7jUe1VQb, xafqLlk3kkUe(IDJ2eXGCBCDu.data, xafqLlk3kkUe(SXOLrMavuUCe(b'\xfbB\xb1kR,\xfa'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + '\x65')('\x75' + chr(0b11001 + 0o133) + chr(7745 - 7643) + '\055' + chr(0b1000 + 0o60)))): uyAR7jUe1VQb = IDJ2eXGCBCDu.data.Dataset.from_tensors(uyAR7jUe1VQb) return uyAR7jUe1VQb if AVD5GSbwJiwQ: xQt6gV9VfTO3 = xQt6gV9VfTO3.apply(IDJ2eXGCBCDu.data.experimental.parallel_interleave(ap5hzmAnnS5F, sloppy=ehT0Px3KOsy9(chr(48) + chr(111) + chr(1230 - 1181), 8), cycle_length=ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b1110 + 0o42), ord("\x08")))) else: xQt6gV9VfTO3 = xQt6gV9VfTO3.flat_map(ap5hzmAnnS5F) return xQt6gV9VfTO3
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.filepattern
def filepattern(self, data_dir, mode, shard=None): """Get filepattern for data files for mode. Matches mode to a suffix. * DatasetSplit.TRAIN: train * DatasetSplit.EVAL: dev * DatasetSplit.TEST: test * tf.estimator.ModeKeys.PREDICT: dev Args: data_dir: str, data directory. mode: DatasetSplit shard: int, if provided, will only read data from the specified shard. Returns: filepattern str """ path = os.path.join(data_dir, self.dataset_filename()) shard_str = "-%05d" % shard if shard is not None else "" if mode == DatasetSplit.TRAIN: suffix = "train" elif mode in [DatasetSplit.EVAL, tf.estimator.ModeKeys.PREDICT]: suffix = "dev" else: assert mode == DatasetSplit.TEST suffix = "test" return "%s-%s%s*" % (path, suffix, shard_str)
python
def filepattern(self, data_dir, mode, shard=None): """Get filepattern for data files for mode. Matches mode to a suffix. * DatasetSplit.TRAIN: train * DatasetSplit.EVAL: dev * DatasetSplit.TEST: test * tf.estimator.ModeKeys.PREDICT: dev Args: data_dir: str, data directory. mode: DatasetSplit shard: int, if provided, will only read data from the specified shard. Returns: filepattern str """ path = os.path.join(data_dir, self.dataset_filename()) shard_str = "-%05d" % shard if shard is not None else "" if mode == DatasetSplit.TRAIN: suffix = "train" elif mode in [DatasetSplit.EVAL, tf.estimator.ModeKeys.PREDICT]: suffix = "dev" else: assert mode == DatasetSplit.TEST suffix = "test" return "%s-%s%s*" % (path, suffix, shard_str)
[ "def", "filepattern", "(", "self", ",", "data_dir", ",", "mode", ",", "shard", "=", "None", ")", ":", "path", "=", "os", ".", "path", ".", "join", "(", "data_dir", ",", "self", ".", "dataset_filename", "(", ")", ")", "shard_str", "=", "\"-%05d\"", "%", "shard", "if", "shard", "is", "not", "None", "else", "\"\"", "if", "mode", "==", "DatasetSplit", ".", "TRAIN", ":", "suffix", "=", "\"train\"", "elif", "mode", "in", "[", "DatasetSplit", ".", "EVAL", ",", "tf", ".", "estimator", ".", "ModeKeys", ".", "PREDICT", "]", ":", "suffix", "=", "\"dev\"", "else", ":", "assert", "mode", "==", "DatasetSplit", ".", "TEST", "suffix", "=", "\"test\"", "return", "\"%s-%s%s*\"", "%", "(", "path", ",", "suffix", ",", "shard_str", ")" ]
Get filepattern for data files for mode. Matches mode to a suffix. * DatasetSplit.TRAIN: train * DatasetSplit.EVAL: dev * DatasetSplit.TEST: test * tf.estimator.ModeKeys.PREDICT: dev Args: data_dir: str, data directory. mode: DatasetSplit shard: int, if provided, will only read data from the specified shard. Returns: filepattern str
[ "Get", "filepattern", "for", "data", "files", "for", "mode", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L458-L485
train
Returns the filepattern for data files for mode.
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,y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UdZtaORwo4,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' + '\x33' + chr(423 - 374) + '\061', 15547 - 15539), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\065' + chr(50), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\065' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(185 - 137) + chr(10322 - 10211) + '\061' + chr(0b1110 + 0o43) + chr(0b100 + 0o54), 58387 - 58379), ehT0Px3KOsy9(chr(416 - 368) + chr(7414 - 7303) + chr(49) + '\x35' + chr(0b11100 + 0o27), 32158 - 32150), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x33' + chr(48) + '\067', 0o10), ehT0Px3KOsy9('\060' + chr(3262 - 3151) + chr(2494 - 2444) + chr(49) + chr(1000 - 949), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1100 + 0o46) + '\064' + chr(185 - 136), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110011) + chr(152 - 103) + '\x31', 8), ehT0Px3KOsy9(chr(1867 - 1819) + '\157' + '\062' + '\x33' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(3809 - 3698) + '\063' + chr(0b1001 + 0o52) + chr(1549 - 1496), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b111010 + 0o65) + '\x31' + chr(50) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(1076 - 1028) + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b101110 + 0o11), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(0b110110) + chr(330 - 276), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(644 - 592), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x31' + '\x34' + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101 + 0o55) + '\x35' + '\x32', 65389 - 65381), ehT0Px3KOsy9(chr(0b110000) + chr(640 - 529) + chr(382 - 329) + chr(0b11101 + 0o27), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(2710 - 2657) + '\x35', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b100 + 0o57) + chr(49), 8), ehT0Px3KOsy9(chr(48) + chr(10029 - 9918) + '\062' + chr(382 - 327) + '\067', 53827 - 53819), ehT0Px3KOsy9(chr(1069 - 1021) + '\157' + '\x32' + '\x30' + '\067', ord("\x08")), ehT0Px3KOsy9(chr(2162 - 2114) + chr(0b101100 + 0o103) + '\062' + '\x31' + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x32' + chr(1160 - 1109), 31897 - 31889), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(2413 - 2360) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b100011 + 0o114) + '\x33' + chr(0b1110 + 0o51) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(705 - 657) + '\157' + chr(90 - 41) + '\x36' + chr(537 - 485), ord("\x08")), ehT0Px3KOsy9(chr(403 - 355) + '\157' + chr(50) + '\061', 0b1000), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + '\063' + chr(0b110100) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1007 - 959) + '\157' + chr(50) + chr(1184 - 1135), 8), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b111011 + 0o64) + '\x34' + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + chr(7377 - 7266) + chr(0b110010) + chr(0b110100) + '\060', 0o10), ehT0Px3KOsy9(chr(0b100111 + 0o11) + '\x6f' + chr(55) + chr(53), 27401 - 27393), ehT0Px3KOsy9(chr(2164 - 2116) + chr(0b1001101 + 0o42) + chr(0b110000 + 0o3) + '\061' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(926 - 876) + chr(0b100010 + 0o16), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011000 + 0o27) + chr(0b110001) + chr(0b110100) + chr(1502 - 1452), 6752 - 6744), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101000 + 0o12) + chr(0b11010 + 0o35) + chr(0b111 + 0o54), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + chr(0b110010) + '\x30', 0b1000), ehT0Px3KOsy9(chr(1254 - 1206) + chr(8507 - 8396) + '\063' + '\x35' + chr(1630 - 1580), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(892 - 837) + '\067', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100011 + 0o22) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xe7'), chr(7636 - 7536) + chr(101) + chr(0b1100011) + chr(0b1101011 + 0o4) + chr(9618 - 9518) + chr(0b1100101))(chr(0b1000101 + 0o60) + chr(8625 - 8509) + '\x66' + '\x2d' + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def mnAeTPQPQgT_(oVre8I6UXc3b, kVFRD544hi_1, holLFgwB7vsP, pn2mJYbTTPyv=None): EaCjyhZptSer = oqhJDdMJfuwx.path.join(kVFRD544hi_1, oVre8I6UXc3b.dataset_filename()) gkBFrIYfgJz6 = xafqLlk3kkUe(SXOLrMavuUCe(b'\xe4O\xdd}\x0f'), chr(0b1100100) + chr(101) + chr(0b11000 + 0o113) + chr(0b101111 + 0o100) + chr(0b100010 + 0o102) + chr(3759 - 3658))(chr(0b1100001 + 0o24) + chr(0b1011110 + 0o26) + chr(0b0 + 0o146) + '\x2d' + chr(0b111000)) % pn2mJYbTTPyv if pn2mJYbTTPyv is not None else xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b1100100) + '\x65' + chr(0b1100011) + '\157' + chr(100) + chr(0b110100 + 0o61))(chr(0b101111 + 0o106) + '\164' + chr(0b11 + 0o143) + chr(458 - 413) + chr(56)) if holLFgwB7vsP == xafqLlk3kkUe(EaivMkvPNXwB, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d8\xac\x01%'), '\144' + chr(1075 - 974) + '\x63' + chr(0b1101111) + chr(100) + chr(9189 - 9088))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\x38')): YhhkyMvxPIjH = xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x18\x8c!\x05'), chr(0b1100100) + chr(6641 - 6540) + chr(99) + chr(0b10010 + 0o135) + '\x64' + chr(101))(chr(9082 - 8965) + '\164' + '\146' + chr(45) + chr(56)) elif holLFgwB7vsP in [xafqLlk3kkUe(EaivMkvPNXwB, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8c<\xac\x04'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(100) + chr(3934 - 3833))(chr(12886 - 12769) + chr(0b1010000 + 0o44) + '\x66' + chr(45) + chr(0b111000))), xafqLlk3kkUe(IDJ2eXGCBCDu.estimator.ModeKeys, xafqLlk3kkUe(SXOLrMavuUCe(b'\x998\xa8\x0c"\x84\xdf'), chr(9059 - 8959) + chr(9062 - 8961) + '\x63' + chr(111) + chr(5719 - 5619) + '\x65')(chr(117) + chr(0b1110100) + chr(0b110000 + 0o66) + '\x2d' + '\070'))]: YhhkyMvxPIjH = xafqLlk3kkUe(SXOLrMavuUCe(b'\xad\x0f\x9b'), chr(9392 - 9292) + '\x65' + '\143' + chr(0b101111 + 0o100) + chr(770 - 670) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(56)) else: assert holLFgwB7vsP == xafqLlk3kkUe(EaivMkvPNXwB, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9d/\xbe\x1c'), '\144' + '\145' + '\143' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(2703 - 2601) + '\x2d' + chr(0b100000 + 0o30))) YhhkyMvxPIjH = xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd\x0f\x9e<'), '\x64' + chr(3000 - 2899) + chr(0b1100011) + chr(111) + chr(2267 - 2167) + chr(0b110001 + 0o64))('\x75' + '\x74' + chr(0b111001 + 0o55) + chr(629 - 584) + chr(541 - 485)) return xafqLlk3kkUe(SXOLrMavuUCe(b'\xec\x19\xc0m\x18\xe2\xf8\x8b'), '\144' + chr(5989 - 5888) + chr(6641 - 6542) + '\157' + chr(100) + chr(0b111100 + 0o51))(chr(0b1110101) + '\164' + chr(102) + chr(1530 - 1485) + chr(0b101111 + 0o11)) % (EaCjyhZptSer, YhhkyMvxPIjH, gkBFrIYfgJz6)
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.get_hparams
def get_hparams(self, model_hparams=None): """Returns problem_hparams.""" if self._hparams is not None: return self._hparams if model_hparams is None: model_hparams = default_model_hparams() if self._encoders is None: data_dir = (model_hparams and hasattr(model_hparams, "data_dir") and model_hparams.data_dir) or None self.get_feature_encoders(data_dir) hp = _default_hparams() ret = self.hparams(hp, model_hparams) if ret is not None: raise ValueError("The Problem subclass hparams function should mutate " "the defaults passed in and return None.") hp.add_hparam("vocabulary", self._encoders) hp.add_hparam("was_reversed", self._was_reversed) hp.add_hparam("was_copy", self._was_copy) if self._was_reversed: _reverse_problem_hparams(hp) if self._was_copy: _copy_problem_hparams(hp) self._hparams = hp return self._hparams
python
def get_hparams(self, model_hparams=None): """Returns problem_hparams.""" if self._hparams is not None: return self._hparams if model_hparams is None: model_hparams = default_model_hparams() if self._encoders is None: data_dir = (model_hparams and hasattr(model_hparams, "data_dir") and model_hparams.data_dir) or None self.get_feature_encoders(data_dir) hp = _default_hparams() ret = self.hparams(hp, model_hparams) if ret is not None: raise ValueError("The Problem subclass hparams function should mutate " "the defaults passed in and return None.") hp.add_hparam("vocabulary", self._encoders) hp.add_hparam("was_reversed", self._was_reversed) hp.add_hparam("was_copy", self._was_copy) if self._was_reversed: _reverse_problem_hparams(hp) if self._was_copy: _copy_problem_hparams(hp) self._hparams = hp return self._hparams
[ "def", "get_hparams", "(", "self", ",", "model_hparams", "=", "None", ")", ":", "if", "self", ".", "_hparams", "is", "not", "None", ":", "return", "self", ".", "_hparams", "if", "model_hparams", "is", "None", ":", "model_hparams", "=", "default_model_hparams", "(", ")", "if", "self", ".", "_encoders", "is", "None", ":", "data_dir", "=", "(", "model_hparams", "and", "hasattr", "(", "model_hparams", ",", "\"data_dir\"", ")", "and", "model_hparams", ".", "data_dir", ")", "or", "None", "self", ".", "get_feature_encoders", "(", "data_dir", ")", "hp", "=", "_default_hparams", "(", ")", "ret", "=", "self", ".", "hparams", "(", "hp", ",", "model_hparams", ")", "if", "ret", "is", "not", "None", ":", "raise", "ValueError", "(", "\"The Problem subclass hparams function should mutate \"", "\"the defaults passed in and return None.\"", ")", "hp", ".", "add_hparam", "(", "\"vocabulary\"", ",", "self", ".", "_encoders", ")", "hp", ".", "add_hparam", "(", "\"was_reversed\"", ",", "self", ".", "_was_reversed", ")", "hp", ".", "add_hparam", "(", "\"was_copy\"", ",", "self", ".", "_was_copy", ")", "if", "self", ".", "_was_reversed", ":", "_reverse_problem_hparams", "(", "hp", ")", "if", "self", ".", "_was_copy", ":", "_copy_problem_hparams", "(", "hp", ")", "self", ".", "_hparams", "=", "hp", "return", "self", ".", "_hparams" ]
Returns problem_hparams.
[ "Returns", "problem_hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L513-L542
train
Returns problem_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,V5s4UV3vwo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bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11110 + 0o23) + '\x32' + chr(0b101011 + 0o6), 32815 - 32807), ehT0Px3KOsy9(chr(1096 - 1048) + chr(0b1000001 + 0o56) + '\062' + chr(1037 - 982) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1872 - 1761) + '\x36' + '\x37', 31410 - 31402), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x32' + '\x33', 0o10), ehT0Px3KOsy9(chr(742 - 694) + chr(111) + chr(926 - 875) + '\x37' + chr(0b110 + 0o55), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\063' + '\063' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(682 - 633) + chr(1799 - 1744) + chr(2294 - 2244), 20699 - 20691), ehT0Px3KOsy9('\060' + chr(6353 - 6242) + '\061' + chr(0b110101) + chr(49), 18697 - 18689), ehT0Px3KOsy9('\x30' + chr(111) + '\x35' + chr(0b1110 + 0o50), 826 - 818), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101011 + 0o6) + chr(848 - 794), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b101001 + 0o10) + chr(67 - 12) + chr(2700 - 2645), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(9242 - 9131) + chr(0b110010) + chr(52) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x36' + '\x36', 65411 - 65403), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x30' + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\066' + '\065', 0o10), ehT0Px3KOsy9(chr(688 - 640) + chr(0b1101111) + chr(0b10 + 0o60) + '\061' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + '\063' + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(9878 - 9767) + '\x32' + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11010 + 0o30) + chr(0b110010) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(315 - 266) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(367 - 319) + chr(0b1101111) + chr(51) + '\063' + '\067', 59856 - 59848), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(51) + chr(50) + chr(0b1010 + 0o51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(52) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101011 + 0o10) + '\x32' + '\x33', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110001) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(770 - 722) + chr(111) + chr(0b101100 + 0o6) + '\x34' + chr(0b110010), 8), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + '\x31' + chr(50) + '\067', 0o10), ehT0Px3KOsy9(chr(426 - 378) + chr(3915 - 3804) + '\x31' + '\x30' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + chr(0b110001) + chr(0b110111) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110010 + 0o75) + chr(113 - 64) + '\x36' + chr(0b110110), 46063 - 46055), ehT0Px3KOsy9(chr(1260 - 1212) + chr(0b111101 + 0o62) + chr(0b1001 + 0o55) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110111) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(51) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110110) + '\x32', 30112 - 30104), ehT0Px3KOsy9(chr(2215 - 2167) + chr(111) + chr(51) + chr(350 - 300) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b100101 + 0o14) + chr(146 - 96) + chr(54), 57857 - 57849), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(0b110100) + '\062', 8), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2311 - 2259) + '\062', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100000 + 0o22) + chr(2141 - 2086) + '\x36', 8), ehT0Px3KOsy9('\060' + chr(520 - 409) + chr(0b11011 + 0o27) + chr(53) + chr(53), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + '\x35' + chr(0b11001 + 0o27), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x7f'), '\144' + '\x65' + chr(99) + '\157' + chr(100) + '\145')(chr(117) + chr(0b1110100) + chr(0b1100 + 0o132) + '\x2d' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def EJaeSbxHaaG8(oVre8I6UXc3b, tq24Tk6UZ6u1=None): if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xd6G2\x89\xb9\x17\x1a'), chr(4454 - 4354) + '\145' + chr(0b1100011) + '\x6f' + chr(0b111011 + 0o51) + chr(3727 - 3626))('\x75' + chr(116) + chr(0b110111 + 0o57) + chr(0b11110 + 0o17) + chr(895 - 839))) is not None: return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xd6G2\x89\xb9\x17\x1a'), chr(100) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(8327 - 8211) + chr(0b1100110) + chr(0b11100 + 0o21) + chr(0b10011 + 0o45))) if tq24Tk6UZ6u1 is None: tq24Tk6UZ6u1 = puU4RVZmqwNK() if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xdbY0\x94\xbc\x1f\x1b]'), '\x64' + chr(0b110101 + 0o60) + '\x63' + chr(111) + chr(0b1100100) + chr(4005 - 3904))('\165' + chr(5595 - 5479) + chr(102) + chr(45) + '\070')) is None: kVFRD544hi_1 = tq24Tk6UZ6u1 and lot1PSoAwYhj(tq24Tk6UZ6u1, xafqLlk3kkUe(SXOLrMavuUCe(b'5\xdfC2\xa4\xbc\x13\x1b'), chr(6044 - 5944) + chr(0b110001 + 0o64) + chr(0b1100011) + chr(111) + chr(0b10010 + 0o122) + '\x65')('\x75' + '\x74' + '\x66' + chr(569 - 524) + '\070')) and tq24Tk6UZ6u1.data_dir or None xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'6\xdbC\x0c\x9d\xbd\x1b\x1d[|\x1a\xfdS\xaa\xd6\xe1~v\xe0\x7f'), chr(1888 - 1788) + '\x65' + '\143' + chr(7818 - 7707) + chr(6632 - 6532) + chr(101))(chr(117) + '\164' + chr(0b11100 + 0o112) + chr(0b101101) + '\x38'))(kVFRD544hi_1) ny6shRSJO9Wm = Ey0q4VtBSGcj() VHn4CV4Ymrei = oVre8I6UXc3b.hparams(ny6shRSJO9Wm, tq24Tk6UZ6u1) if VHn4CV4Ymrei is not None: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\x05\xd6Rs\xab\xaa\x15\x0bBk\x12\x82E\xb1\xd7\xedvr\xe1\x7f\xff\xbbT\xb2{\xc3:0]\x10D\x12\xffF\xbe9\xcc\x02\xcd\xc5>\xcb[7\xdb\xb5\x0f\x1dOz\x1a\x82B\xac\xd0\xae~v\xf4m\xaa\xbfP\xa0)\xd260\x0e\x13U\\\xf5\\\xf77\xccF\x9e\xdf4\xcaB!\x95\xf84\x06@kQ'), chr(0b10000 + 0o124) + chr(0b1100101) + '\x63' + '\157' + chr(0b100100 + 0o100) + chr(0b111000 + 0o55))(chr(0b1010101 + 0o40) + '\164' + '\146' + chr(1316 - 1271) + '\x38')) xafqLlk3kkUe(ny6shRSJO9Wm, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xdaS\x0c\x93\xa8\x1b\x1bOc'), chr(100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100011 + 0o1) + '\x65')(chr(0b1110010 + 0o3) + '\164' + chr(2091 - 1989) + '\x2d' + chr(858 - 802)))(xafqLlk3kkUe(SXOLrMavuUCe(b"'\xd1T2\x99\xad\x16\x08\\w"), '\144' + chr(101) + '\143' + chr(0b11110 + 0o121) + chr(0b101110 + 0o66) + '\x65')(chr(117) + chr(5295 - 5179) + '\146' + '\x2d' + chr(0b111000)), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xdbY0\x94\xbc\x1f\x1b]'), '\144' + '\x65' + '\143' + chr(1740 - 1629) + chr(6497 - 6397) + '\x65')('\x75' + '\164' + '\x66' + '\055' + chr(0b110001 + 0o7)))) xafqLlk3kkUe(ny6shRSJO9Wm, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xdaS\x0c\x93\xa8\x1b\x1bOc'), '\144' + chr(9653 - 9552) + chr(99) + chr(0b111001 + 0o66) + '\x64' + chr(0b1100101))('\165' + chr(0b111111 + 0o65) + chr(102) + chr(0b100110 + 0o7) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'&\xdfD\x0c\x89\xbd\x0c\x0c\\}\x1a\xc6'), chr(4315 - 4215) + chr(0b100010 + 0o103) + chr(99) + chr(0b1101111) + '\144' + '\x65')('\165' + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b111000)), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xc9V \xa4\xaa\x1f\x1fK|\x0c\xc7R'), chr(0b1100100) + '\x65' + '\143' + chr(5743 - 5632) + '\144' + chr(8767 - 8666))(chr(117) + chr(0b1110100) + chr(102) + '\055' + '\x38'))) xafqLlk3kkUe(ny6shRSJO9Wm, xafqLlk3kkUe(SXOLrMavuUCe(b'0\xdaS\x0c\x93\xa8\x1b\x1bOc'), chr(0b110110 + 0o56) + chr(4444 - 4343) + '\143' + chr(111) + chr(2947 - 2847) + '\x65')(chr(9588 - 9471) + chr(4370 - 4254) + chr(6130 - 6028) + chr(0b1 + 0o54) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'&\xdfD\x0c\x98\xb7\n\x10'), '\x64' + chr(0b11110 + 0o107) + '\143' + '\157' + '\144' + '\x65')(chr(0b1111 + 0o146) + chr(0b1100000 + 0o24) + '\x66' + '\055' + '\070'), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xc9V \xa4\xbb\x15\x19W'), chr(2422 - 2322) + chr(0b1100101) + '\x63' + '\157' + chr(0b1011011 + 0o11) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(0b1000 + 0o45) + chr(0b111000)))) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xc9V \xa4\xaa\x1f\x1fK|\x0c\xc7R'), chr(0b1100100) + chr(101) + '\x63' + '\x6f' + chr(5085 - 4985) + '\x65')(chr(117) + chr(0b1101001 + 0o13) + '\x66' + chr(0b11000 + 0o25) + chr(56))): OsG8dJorx4EL(ny6shRSJO9Wm) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e\xc9V \xa4\xbb\x15\x19W'), chr(2089 - 1989) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1011111 + 0o6))(chr(117) + chr(6919 - 6803) + '\146' + '\x2d' + '\070')): uTu2RWd3Etri(ny6shRSJO9Wm) oVre8I6UXc3b.nPO5Cxv_RSQQ = ny6shRSJO9Wm return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'?\xeexf\xb8\xa0\x0c6|].\xf3'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + chr(0b1000001 + 0o63) + chr(0b10100 + 0o122) + chr(1214 - 1169) + chr(56)))
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.maybe_reverse_features
def maybe_reverse_features(self, feature_map): """Reverse features between inputs and targets if the problem is '_rev'.""" if not self._was_reversed: return inputs = feature_map.pop("inputs", None) targets = feature_map.pop("targets", None) inputs_seg = feature_map.pop("inputs_segmentation", None) targets_seg = feature_map.pop("targets_segmentation", None) inputs_pos = feature_map.pop("inputs_position", None) targets_pos = feature_map.pop("targets_position", None) if inputs is not None: feature_map["targets"] = inputs if targets is not None: feature_map["inputs"] = targets if inputs_seg is not None: feature_map["targets_segmentation"] = inputs_seg if targets_seg is not None: feature_map["inputs_segmentation"] = targets_seg if inputs_pos is not None: feature_map["targets_position"] = inputs_pos if targets_pos is not None: feature_map["inputs_position"] = targets_pos
python
def maybe_reverse_features(self, feature_map): """Reverse features between inputs and targets if the problem is '_rev'.""" if not self._was_reversed: return inputs = feature_map.pop("inputs", None) targets = feature_map.pop("targets", None) inputs_seg = feature_map.pop("inputs_segmentation", None) targets_seg = feature_map.pop("targets_segmentation", None) inputs_pos = feature_map.pop("inputs_position", None) targets_pos = feature_map.pop("targets_position", None) if inputs is not None: feature_map["targets"] = inputs if targets is not None: feature_map["inputs"] = targets if inputs_seg is not None: feature_map["targets_segmentation"] = inputs_seg if targets_seg is not None: feature_map["inputs_segmentation"] = targets_seg if inputs_pos is not None: feature_map["targets_position"] = inputs_pos if targets_pos is not None: feature_map["inputs_position"] = targets_pos
[ "def", "maybe_reverse_features", "(", "self", ",", "feature_map", ")", ":", "if", "not", "self", ".", "_was_reversed", ":", "return", "inputs", "=", "feature_map", ".", "pop", "(", "\"inputs\"", ",", "None", ")", "targets", "=", "feature_map", ".", "pop", "(", "\"targets\"", ",", "None", ")", "inputs_seg", "=", "feature_map", ".", "pop", "(", "\"inputs_segmentation\"", ",", "None", ")", "targets_seg", "=", "feature_map", ".", "pop", "(", "\"targets_segmentation\"", ",", "None", ")", "inputs_pos", "=", "feature_map", ".", "pop", "(", "\"inputs_position\"", ",", "None", ")", "targets_pos", "=", "feature_map", ".", "pop", "(", "\"targets_position\"", ",", "None", ")", "if", "inputs", "is", "not", "None", ":", "feature_map", "[", "\"targets\"", "]", "=", "inputs", "if", "targets", "is", "not", "None", ":", "feature_map", "[", "\"inputs\"", "]", "=", "targets", "if", "inputs_seg", "is", "not", "None", ":", "feature_map", "[", "\"targets_segmentation\"", "]", "=", "inputs_seg", "if", "targets_seg", "is", "not", "None", ":", "feature_map", "[", "\"inputs_segmentation\"", "]", "=", "targets_seg", "if", "inputs_pos", "is", "not", "None", ":", "feature_map", "[", "\"targets_position\"", "]", "=", "inputs_pos", "if", "targets_pos", "is", "not", "None", ":", "feature_map", "[", "\"inputs_position\"", "]", "=", "targets_pos" ]
Reverse features between inputs and targets if the problem is '_rev'.
[ "Reverse", "features", "between", "inputs", "and", "targets", "if", "the", "problem", "is", "_rev", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L544-L565
train
Reverse features between inputs and targets if the problem is _rev.
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(0b110000) + chr(278 - 167) + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111011 + 0o64) + '\063' + '\x31' + chr(51), 11845 - 11837), ehT0Px3KOsy9(chr(0b110000) + chr(0b100111 + 0o110) + chr(0b110011) + chr(0b101 + 0o56) + chr(1021 - 973), 0o10), ehT0Px3KOsy9('\x30' + chr(11675 - 11564) + chr(0b11010 + 0o30) + '\x30' + chr(1897 - 1849), 0b1000), ehT0Px3KOsy9(chr(501 - 453) + '\157' + chr(0b110001) + '\066' + chr(0b11011 + 0o25), 5008 - 5000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(2183 - 2128) + chr(2108 - 2053), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b101111 + 0o100) + '\064' + '\062', 0b1000), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(8870 - 8759) + chr(163 - 113) + '\066' + chr(55), 7964 - 7956), ehT0Px3KOsy9(chr(1986 - 1938) + chr(0b10100 + 0o133) + chr(55) + '\065', 38013 - 38005), ehT0Px3KOsy9('\060' + chr(111) + chr(55) + '\062', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\062' + chr(0b10110 + 0o40), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2025 - 1976) + '\061' + chr(49), 51106 - 51098), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x30' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b1111 + 0o50) + '\x37', 0o10), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(0b110011) + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(0b1111 + 0o140) + '\061' + chr(52) + chr(0b100100 + 0o20), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\x33' + '\062', 6205 - 6197), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10011 + 0o40) + chr(49) + chr(1667 - 1613), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b100 + 0o153) + chr(0b10001 + 0o40) + chr(0b11011 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + '\x31' + '\x31', 8), ehT0Px3KOsy9(chr(264 - 216) + chr(0b1011101 + 0o22) + chr(0b110010) + chr(0b10011 + 0o42), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b101011 + 0o5) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(10425 - 10314) + '\x32' + '\x35' + '\x36', 40964 - 40956), ehT0Px3KOsy9('\060' + chr(0b10100 + 0o133) + chr(543 - 492) + '\x32' + '\063', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(111) + chr(0b110011) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1441 - 1393) + '\157' + chr(0b110011) + chr(49), 61635 - 61627), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1101111) + '\x31' + chr(2540 - 2487) + chr(51), 18804 - 18796), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\x32' + chr(1476 - 1423), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(251 - 202) + chr(0b1001 + 0o53) + chr(1464 - 1409), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1721 - 1670) + '\x34' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1011011 + 0o24) + chr(0b101110 + 0o4) + chr(0b100000 + 0o22) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(792 - 744) + chr(0b1101111) + chr(51) + '\063' + '\x33', 35425 - 35417), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110010) + '\x32', 53388 - 53380), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\x35' + chr(0b110010), 24120 - 24112), ehT0Px3KOsy9(chr(48) + chr(0b111 + 0o150) + '\064' + chr(2536 - 2482), 14261 - 14253), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(0b1101111) + chr(1891 - 1837) + chr(51), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011011 + 0o24) + chr(2162 - 2113) + '\067' + chr(0b110111), 8), ehT0Px3KOsy9('\060' + chr(0b10010 + 0o135) + chr(53) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(663 - 614) + chr(0b110100) + chr(0b1 + 0o57), 0b1000), ehT0Px3KOsy9(chr(2170 - 2122) + '\157' + chr(52) + '\064', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10111 + 0o36) + chr(48), 56525 - 56517)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\r'), '\144' + chr(0b110100 + 0o61) + '\143' + chr(0b1101111) + '\144' + '\145')(chr(0b101100 + 0o111) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def pL02WoO42kk3(oVre8I6UXc3b, _kv7JS3YtL4P): if not xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'|\xbc\xb9\xf3/\xcdG\xc1XHe,\xe1'), chr(4715 - 4615) + chr(0b1100101) + chr(99) + chr(7932 - 7821) + chr(100) + chr(0b0 + 0o145))('\165' + chr(116) + chr(3715 - 3613) + '\x2d' + '\070')): return vXoupepMtCXU = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc'), chr(8952 - 8852) + chr(9292 - 9191) + chr(99) + chr(0b100 + 0o153) + chr(8881 - 8781) + chr(0b100001 + 0o104))('\165' + chr(6623 - 6507) + chr(4166 - 4064) + chr(0b101101) + chr(0b10001 + 0o47)), None) xIEmRseySp3z = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'W\xaa\xaa\xe7\x15\xcbQ'), chr(0b110010 + 0o62) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + '\145')(chr(9822 - 9705) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(56)), None) ruxIMNKGki1f = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc}\xc4X]{,\xeb\x0b:\x103\xa1g'), chr(2733 - 2633) + chr(0b1011101 + 0o10) + chr(99) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b10001 + 0o143) + chr(0b1100110) + chr(0b110 + 0o47) + chr(1281 - 1225)), None) Xxd4KBRptWMq = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b"W\xaa\xaa\xe7\x15\xcbQ\xe8N_q$\xe0\x11/\x05.\xa7f'"), chr(100) + '\x65' + chr(99) + chr(111) + chr(0b110110 + 0o56) + '\x65')(chr(0b1110101) + '\164' + chr(8426 - 8324) + chr(0b11110 + 0o17) + chr(0b111000)), None) NWgGtLjFEzgv = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc}\xc7RI\x7f=\xec\x105'), '\144' + chr(7709 - 7608) + '\x63' + '\x6f' + chr(100) + chr(101))(chr(0b1000111 + 0o56) + chr(0b11001 + 0o133) + chr(0b1100100 + 0o2) + chr(0b101000 + 0o5) + '\x38'), None) EeyNMc5lAAYu = _kv7JS3YtL4P.pop(xafqLlk3kkUe(SXOLrMavuUCe(b'W\xaa\xaa\xe7\x15\xcbQ\xe8MUe \xf1\x164\n'), chr(100) + chr(101) + '\x63' + chr(111) + '\144' + '\x65')(chr(10612 - 10495) + chr(11447 - 11331) + '\146' + chr(0b100011 + 0o12) + chr(0b111000)), None) if vXoupepMtCXU is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b'W\xaa\xaa\xe7\x15\xcbQ'), chr(100) + chr(3816 - 3715) + chr(99) + chr(8645 - 8534) + chr(120 - 20) + chr(4828 - 4727))(chr(117) + '\x74' + chr(2962 - 2860) + chr(0b101101) + chr(56))] = vXoupepMtCXU if xIEmRseySp3z is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc'), '\x64' + '\x65' + chr(99) + '\x6f' + '\x64' + chr(2162 - 2061))(chr(117) + '\164' + chr(102) + chr(1013 - 968) + '\x38')] = xIEmRseySp3z if ruxIMNKGki1f is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b"W\xaa\xaa\xe7\x15\xcbQ\xe8N_q$\xe0\x11/\x05.\xa7f'"), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(3847 - 3746))('\x75' + '\x74' + '\x66' + chr(778 - 733) + chr(0b111000))] = ruxIMNKGki1f if Xxd4KBRptWMq is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc}\xc4X]{,\xeb\x0b:\x103\xa1g'), chr(0b1100100) + chr(9173 - 9072) + '\143' + chr(111) + '\144' + '\145')('\x75' + chr(116) + '\146' + '\x2d' + '\070')] = Xxd4KBRptWMq if NWgGtLjFEzgv is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b'W\xaa\xaa\xe7\x15\xcbQ\xe8MUe \xf1\x164\n'), chr(7844 - 7744) + chr(101) + chr(0b1100011) + chr(0b0 + 0o157) + chr(0b0 + 0o144) + '\145')(chr(0b1100100 + 0o21) + chr(0b1110001 + 0o3) + '\146' + chr(45) + chr(2583 - 2527))] = NWgGtLjFEzgv if EeyNMc5lAAYu is not None: _kv7JS3YtL4P[xafqLlk3kkUe(SXOLrMavuUCe(b'J\xa5\xa8\xf5\x04\xcc}\xc7RI\x7f=\xec\x105'), chr(0b1100100) + chr(0b1100101) + chr(2818 - 2719) + '\x6f' + '\144' + '\145')('\x75' + chr(0b1001111 + 0o45) + chr(0b110110 + 0o60) + chr(0b101101) + '\070')] = EeyNMc5lAAYu
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.dataset
def dataset(self, mode, data_dir=None, num_threads=None, output_buffer_size=None, shuffle_files=None, hparams=None, preprocess=True, dataset_split=None, shard=None, partition_id=0, num_partitions=1, shuffle_buffer_size=1024, max_records=-1): """Build a Dataset for this problem. Args: mode: tf.estimator.ModeKeys; determines which files to read from. data_dir: directory that contains data files. num_threads: int, number of threads to use for decode and preprocess Dataset.map calls. output_buffer_size: int, how many elements to prefetch at end of pipeline. shuffle_files: whether to shuffle input files. Default behavior (i.e. when shuffle_files=None) is to shuffle if mode == TRAIN. hparams: HParams; hparams to be passed to Problem.preprocess_example and Problem.hparams. If None, will use a default set that is a no-op. preprocess: bool, whether to map the Dataset through Problem.preprocess_example. dataset_split: DatasetSplit, which split to read data from (TRAIN:"-train", EVAL:"-dev", "test":"-test"). Defaults to mode. shard: int, if provided, will only read data from the specified shard. partition_id: integer - which partition of the dataset to read from num_partitions: how many partitions in the dataset shuffle_buffer_size: if shuffle_files is True, this is the buffer size used to shuffle records. max_records: int, number of records to truncate to. Returns: Dataset containing dict<feature name, Tensor>. Raises: ValueError: if num_partitions is greater than the number of data files. """ is_training = mode == tf.estimator.ModeKeys.TRAIN shuffle_files = shuffle_files or shuffle_files is None and is_training dataset_split = dataset_split or mode assert data_dir if hparams is None: hparams = default_model_hparams() if not hasattr(hparams, "data_dir"): hparams.add_hparam("data_dir", data_dir) if not hparams.data_dir: hparams.data_dir = data_dir # Construct the Problem's hparams so that items within it are accessible _ = self.get_hparams(hparams) data_filepattern = self.filepattern(data_dir, dataset_split, shard=shard) tf.logging.info("Reading data files from %s", data_filepattern) data_files = sorted(tf.contrib.slim.parallel_reader.get_data_files( data_filepattern)) # Functions used in dataset transforms below. `filenames` can be either a # `tf.string` tensor or `tf.data.Dataset` containing one or more filenames. def _load_records_and_preprocess(filenames): """Reads files from a string tensor or a dataset of filenames.""" # Load records from file(s) with an 8MiB read buffer. dataset = tf.data.TFRecordDataset(filenames, buffer_size=8 * 1024 * 1024) # Decode. dataset = dataset.map(self.decode_example, num_parallel_calls=num_threads) # Preprocess if requested. # Note that preprocessing should happen per-file as order may matter. if preprocess: dataset = self.preprocess(dataset, mode, hparams, interleave=shuffle_files) return dataset if len(data_files) < num_partitions: raise ValueError( "number of data files (%d) must be at least the number of hosts (%d)" % (len(data_files), num_partitions)) data_files = [f for (i, f) in enumerate(data_files) if i % num_partitions == partition_id] tf.logging.info( "partition: %d num_data_files: %d" % (partition_id, len(data_files))) if shuffle_files: mlperf_log.transformer_print(key=mlperf_log.INPUT_ORDER) random.shuffle(data_files) dataset = tf.data.Dataset.from_tensor_slices(tf.constant(data_files)) # Create data-set from files by parsing, pre-processing and interleaving. if shuffle_files: dataset = dataset.apply( tf.data.experimental.parallel_interleave( _load_records_and_preprocess, sloppy=True, cycle_length=8)) else: dataset = _load_records_and_preprocess(dataset) dataset = dataset.map( self.maybe_reverse_and_copy, num_parallel_calls=num_threads) dataset = dataset.take(max_records) ## Shuffle records only for training examples. if shuffle_files and is_training: dataset = dataset.shuffle(shuffle_buffer_size) if hparams.get("pack_dataset", False): dataset = generator_utils.pack_dataset( dataset, hparams.max_length, keys=["inputs", "targets"], use_custom_ops=hparams.get("use_custom_ops", False)) if output_buffer_size: dataset = dataset.prefetch(output_buffer_size) return dataset
python
def dataset(self, mode, data_dir=None, num_threads=None, output_buffer_size=None, shuffle_files=None, hparams=None, preprocess=True, dataset_split=None, shard=None, partition_id=0, num_partitions=1, shuffle_buffer_size=1024, max_records=-1): """Build a Dataset for this problem. Args: mode: tf.estimator.ModeKeys; determines which files to read from. data_dir: directory that contains data files. num_threads: int, number of threads to use for decode and preprocess Dataset.map calls. output_buffer_size: int, how many elements to prefetch at end of pipeline. shuffle_files: whether to shuffle input files. Default behavior (i.e. when shuffle_files=None) is to shuffle if mode == TRAIN. hparams: HParams; hparams to be passed to Problem.preprocess_example and Problem.hparams. If None, will use a default set that is a no-op. preprocess: bool, whether to map the Dataset through Problem.preprocess_example. dataset_split: DatasetSplit, which split to read data from (TRAIN:"-train", EVAL:"-dev", "test":"-test"). Defaults to mode. shard: int, if provided, will only read data from the specified shard. partition_id: integer - which partition of the dataset to read from num_partitions: how many partitions in the dataset shuffle_buffer_size: if shuffle_files is True, this is the buffer size used to shuffle records. max_records: int, number of records to truncate to. Returns: Dataset containing dict<feature name, Tensor>. Raises: ValueError: if num_partitions is greater than the number of data files. """ is_training = mode == tf.estimator.ModeKeys.TRAIN shuffle_files = shuffle_files or shuffle_files is None and is_training dataset_split = dataset_split or mode assert data_dir if hparams is None: hparams = default_model_hparams() if not hasattr(hparams, "data_dir"): hparams.add_hparam("data_dir", data_dir) if not hparams.data_dir: hparams.data_dir = data_dir # Construct the Problem's hparams so that items within it are accessible _ = self.get_hparams(hparams) data_filepattern = self.filepattern(data_dir, dataset_split, shard=shard) tf.logging.info("Reading data files from %s", data_filepattern) data_files = sorted(tf.contrib.slim.parallel_reader.get_data_files( data_filepattern)) # Functions used in dataset transforms below. `filenames` can be either a # `tf.string` tensor or `tf.data.Dataset` containing one or more filenames. def _load_records_and_preprocess(filenames): """Reads files from a string tensor or a dataset of filenames.""" # Load records from file(s) with an 8MiB read buffer. dataset = tf.data.TFRecordDataset(filenames, buffer_size=8 * 1024 * 1024) # Decode. dataset = dataset.map(self.decode_example, num_parallel_calls=num_threads) # Preprocess if requested. # Note that preprocessing should happen per-file as order may matter. if preprocess: dataset = self.preprocess(dataset, mode, hparams, interleave=shuffle_files) return dataset if len(data_files) < num_partitions: raise ValueError( "number of data files (%d) must be at least the number of hosts (%d)" % (len(data_files), num_partitions)) data_files = [f for (i, f) in enumerate(data_files) if i % num_partitions == partition_id] tf.logging.info( "partition: %d num_data_files: %d" % (partition_id, len(data_files))) if shuffle_files: mlperf_log.transformer_print(key=mlperf_log.INPUT_ORDER) random.shuffle(data_files) dataset = tf.data.Dataset.from_tensor_slices(tf.constant(data_files)) # Create data-set from files by parsing, pre-processing and interleaving. if shuffle_files: dataset = dataset.apply( tf.data.experimental.parallel_interleave( _load_records_and_preprocess, sloppy=True, cycle_length=8)) else: dataset = _load_records_and_preprocess(dataset) dataset = dataset.map( self.maybe_reverse_and_copy, num_parallel_calls=num_threads) dataset = dataset.take(max_records) ## Shuffle records only for training examples. if shuffle_files and is_training: dataset = dataset.shuffle(shuffle_buffer_size) if hparams.get("pack_dataset", False): dataset = generator_utils.pack_dataset( dataset, hparams.max_length, keys=["inputs", "targets"], use_custom_ops=hparams.get("use_custom_ops", False)) if output_buffer_size: dataset = dataset.prefetch(output_buffer_size) return dataset
[ "def", "dataset", "(", "self", ",", "mode", ",", "data_dir", "=", "None", ",", "num_threads", "=", "None", ",", "output_buffer_size", "=", "None", ",", "shuffle_files", "=", "None", ",", "hparams", "=", "None", ",", "preprocess", "=", "True", ",", "dataset_split", "=", "None", ",", "shard", "=", "None", ",", "partition_id", "=", "0", ",", "num_partitions", "=", "1", ",", "shuffle_buffer_size", "=", "1024", ",", "max_records", "=", "-", "1", ")", ":", "is_training", "=", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "TRAIN", "shuffle_files", "=", "shuffle_files", "or", "shuffle_files", "is", "None", "and", "is_training", "dataset_split", "=", "dataset_split", "or", "mode", "assert", "data_dir", "if", "hparams", "is", "None", ":", "hparams", "=", "default_model_hparams", "(", ")", "if", "not", "hasattr", "(", "hparams", ",", "\"data_dir\"", ")", ":", "hparams", ".", "add_hparam", "(", "\"data_dir\"", ",", "data_dir", ")", "if", "not", "hparams", ".", "data_dir", ":", "hparams", ".", "data_dir", "=", "data_dir", "# Construct the Problem's hparams so that items within it are accessible", "_", "=", "self", ".", "get_hparams", "(", "hparams", ")", "data_filepattern", "=", "self", ".", "filepattern", "(", "data_dir", ",", "dataset_split", ",", "shard", "=", "shard", ")", "tf", ".", "logging", ".", "info", "(", "\"Reading data files from %s\"", ",", "data_filepattern", ")", "data_files", "=", "sorted", "(", "tf", ".", "contrib", ".", "slim", ".", "parallel_reader", ".", "get_data_files", "(", "data_filepattern", ")", ")", "# Functions used in dataset transforms below. `filenames` can be either a", "# `tf.string` tensor or `tf.data.Dataset` containing one or more filenames.", "def", "_load_records_and_preprocess", "(", "filenames", ")", ":", "\"\"\"Reads files from a string tensor or a dataset of filenames.\"\"\"", "# Load records from file(s) with an 8MiB read buffer.", "dataset", "=", "tf", ".", "data", ".", "TFRecordDataset", "(", "filenames", ",", "buffer_size", "=", "8", "*", "1024", "*", "1024", ")", "# Decode.", "dataset", "=", "dataset", ".", "map", "(", "self", ".", "decode_example", ",", "num_parallel_calls", "=", "num_threads", ")", "# Preprocess if requested.", "# Note that preprocessing should happen per-file as order may matter.", "if", "preprocess", ":", "dataset", "=", "self", ".", "preprocess", "(", "dataset", ",", "mode", ",", "hparams", ",", "interleave", "=", "shuffle_files", ")", "return", "dataset", "if", "len", "(", "data_files", ")", "<", "num_partitions", ":", "raise", "ValueError", "(", "\"number of data files (%d) must be at least the number of hosts (%d)\"", "%", "(", "len", "(", "data_files", ")", ",", "num_partitions", ")", ")", "data_files", "=", "[", "f", "for", "(", "i", ",", "f", ")", "in", "enumerate", "(", "data_files", ")", "if", "i", "%", "num_partitions", "==", "partition_id", "]", "tf", ".", "logging", ".", "info", "(", "\"partition: %d num_data_files: %d\"", "%", "(", "partition_id", ",", "len", "(", "data_files", ")", ")", ")", "if", "shuffle_files", ":", "mlperf_log", ".", "transformer_print", "(", "key", "=", "mlperf_log", ".", "INPUT_ORDER", ")", "random", ".", "shuffle", "(", "data_files", ")", "dataset", "=", "tf", ".", "data", ".", "Dataset", ".", "from_tensor_slices", "(", "tf", ".", "constant", "(", "data_files", ")", ")", "# Create data-set from files by parsing, pre-processing and interleaving.", "if", "shuffle_files", ":", "dataset", "=", "dataset", ".", "apply", "(", "tf", ".", "data", ".", "experimental", ".", "parallel_interleave", "(", "_load_records_and_preprocess", ",", "sloppy", "=", "True", ",", "cycle_length", "=", "8", ")", ")", "else", ":", "dataset", "=", "_load_records_and_preprocess", "(", "dataset", ")", "dataset", "=", "dataset", ".", "map", "(", "self", ".", "maybe_reverse_and_copy", ",", "num_parallel_calls", "=", "num_threads", ")", "dataset", "=", "dataset", ".", "take", "(", "max_records", ")", "## Shuffle records only for training examples.", "if", "shuffle_files", "and", "is_training", ":", "dataset", "=", "dataset", ".", "shuffle", "(", "shuffle_buffer_size", ")", "if", "hparams", ".", "get", "(", "\"pack_dataset\"", ",", "False", ")", ":", "dataset", "=", "generator_utils", ".", "pack_dataset", "(", "dataset", ",", "hparams", ".", "max_length", ",", "keys", "=", "[", "\"inputs\"", ",", "\"targets\"", "]", ",", "use_custom_ops", "=", "hparams", ".", "get", "(", "\"use_custom_ops\"", ",", "False", ")", ")", "if", "output_buffer_size", ":", "dataset", "=", "dataset", ".", "prefetch", "(", "output_buffer_size", ")", "return", "dataset" ]
Build a Dataset for this problem. Args: mode: tf.estimator.ModeKeys; determines which files to read from. data_dir: directory that contains data files. num_threads: int, number of threads to use for decode and preprocess Dataset.map calls. output_buffer_size: int, how many elements to prefetch at end of pipeline. shuffle_files: whether to shuffle input files. Default behavior (i.e. when shuffle_files=None) is to shuffle if mode == TRAIN. hparams: HParams; hparams to be passed to Problem.preprocess_example and Problem.hparams. If None, will use a default set that is a no-op. preprocess: bool, whether to map the Dataset through Problem.preprocess_example. dataset_split: DatasetSplit, which split to read data from (TRAIN:"-train", EVAL:"-dev", "test":"-test"). Defaults to mode. shard: int, if provided, will only read data from the specified shard. partition_id: integer - which partition of the dataset to read from num_partitions: how many partitions in the dataset shuffle_buffer_size: if shuffle_files is True, this is the buffer size used to shuffle records. max_records: int, number of records to truncate to. Returns: Dataset containing dict<feature name, Tensor>. Raises: ValueError: if num_partitions is greater than the number of data files.
[ "Build", "a", "Dataset", "for", "this", "problem", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L583-L698
train
Build a Dataset for this problem.
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,yg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iEdDQ,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(49) + '\x33' + '\061', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(48) + chr(1649 - 1599), 0b1000), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101010 + 0o5) + chr(0b110011) + '\x35' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(53) + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2133 - 2083) + chr(0b101 + 0o57) + chr(509 - 456), 0o10), ehT0Px3KOsy9(chr(1766 - 1718) + chr(5915 - 5804) + chr(49) + '\x37' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(1002 - 953) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10111 + 0o32) + '\063' + '\063', 0o10), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + chr(50) + chr(49) + '\x31', 0b1000), ehT0Px3KOsy9(chr(48) + chr(10092 - 9981) + '\065' + '\x33', 0o10), ehT0Px3KOsy9(chr(1818 - 1770) + chr(0b1101111) + chr(0b100101 + 0o14) + chr(52) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11010 + 0o35), 26158 - 26150), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + '\x32' + chr(0b100 + 0o55) + '\065', 8), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(0b110010 + 0o3) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(51) + chr(0b1000 + 0o53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1100 + 0o47) + chr(54) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\x33' + chr(0b101101 + 0o10), ord("\x08")), ehT0Px3KOsy9(chr(380 - 332) + chr(0b1101111) + chr(49) + chr(0b110101) + chr(1570 - 1516), 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + '\065' + chr(2384 - 2329), 8), ehT0Px3KOsy9('\060' + chr(155 - 44) + chr(0b0 + 0o62) + chr(676 - 628) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(0b110111) + chr(0b110011), 38858 - 38850), ehT0Px3KOsy9(chr(723 - 675) + chr(1028 - 917) + '\x36' + '\x34', 55799 - 55791), ehT0Px3KOsy9(chr(48) + chr(0b1010101 + 0o32) + '\062' + chr(718 - 669) + '\067', 64844 - 64836), ehT0Px3KOsy9(chr(1130 - 1082) + chr(0b1101111) + chr(52) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(523 - 412) + '\x31' + chr(0b110111) + chr(54), 0o10), ehT0Px3KOsy9(chr(2029 - 1981) + '\157' + chr(49) + chr(630 - 576) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\x33' + chr(162 - 108) + '\x30', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b110010) + chr(0b110011), 16313 - 16305), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\x37' + chr(0b1 + 0o63), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2338 - 2287) + chr(50) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(120 - 71) + chr(514 - 460) + chr(52), 0o10), ehT0Px3KOsy9(chr(1105 - 1057) + chr(0b10 + 0o155) + chr(0b10001 + 0o40) + chr(1420 - 1372) + '\x33', 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(9141 - 9030) + chr(52) + chr(0b10100 + 0o42), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\063' + '\065' + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b101000 + 0o13) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o32) + chr(53) + chr(1951 - 1899), 57237 - 57229), ehT0Px3KOsy9(chr(1076 - 1028) + chr(6602 - 6491) + '\061' + chr(0b110000 + 0o3) + chr(435 - 382), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(49) + chr(0b110000) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b1011110 + 0o21) + chr(49) + '\x35' + '\065', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(1738 - 1685) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'w'), chr(0b1100100) + chr(101) + chr(2747 - 2648) + chr(0b101 + 0o152) + chr(0b1100100) + '\145')(chr(117) + chr(0b11 + 0o161) + chr(6823 - 6721) + chr(301 - 256) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def xQt6gV9VfTO3(oVre8I6UXc3b, holLFgwB7vsP, kVFRD544hi_1=None, pCw22JJnmDr0=None, Yj4oyyXOEZhc=None, EiFJq1ArTGUJ=None, n4ljua2gi1Pr=None, n8IJXbSueTJV=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49), 11122 - 11114), XqbfPmad1kJ4=None, pn2mJYbTTPyv=None, yEGKPIAOGxSd=ehT0Px3KOsy9(chr(1188 - 1140) + chr(11170 - 11059) + chr(0b100010 + 0o16), 0o10), uriDfeyzD72A=ehT0Px3KOsy9('\060' + chr(0b1011110 + 0o21) + '\x31', 8), ETi1MWPlKt6h=ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(0b110010) + chr(0b11010 + 0o26) + chr(48) + chr(0b110000), ord("\x08")), dNgL2nrNj1NG=-ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061', 8)): XQJVi3cQFN5l = holLFgwB7vsP == IDJ2eXGCBCDu.estimator.ModeKeys.TRAIN EiFJq1ArTGUJ = EiFJq1ArTGUJ or (EiFJq1ArTGUJ is None and XQJVi3cQFN5l) XqbfPmad1kJ4 = XqbfPmad1kJ4 or holLFgwB7vsP assert kVFRD544hi_1 if n4ljua2gi1Pr is None: n4ljua2gi1Pr = puU4RVZmqwNK() if not lot1PSoAwYhj(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=#\x9c\x8b\xfa\x18\xe4)'), '\x64' + chr(101) + '\x63' + chr(111) + chr(881 - 781) + '\x65')('\x75' + chr(8015 - 7899) + chr(0b111001 + 0o55) + chr(1193 - 1148) + '\070')): xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'8&\x8c\xb5\xcd\x0c\xec)\xe8F'), chr(0b1111 + 0o125) + '\x65' + '\143' + chr(2389 - 2278) + chr(100) + chr(101))(chr(4307 - 4190) + '\x74' + chr(2528 - 2426) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'=#\x9c\x8b\xfa\x18\xe4)'), chr(0b1100100) + '\x65' + chr(99) + chr(8665 - 8554) + chr(100) + chr(1301 - 1200))(chr(0b1110101) + chr(6267 - 6151) + chr(0b1001110 + 0o30) + '\055' + chr(56)), kVFRD544hi_1) if not xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'=#\x9c\x8b\xfa\x18\xe4)'), chr(0b111110 + 0o46) + '\145' + chr(942 - 843) + chr(111) + chr(100) + chr(101))(chr(3346 - 3229) + '\164' + chr(0b1100110) + '\055' + chr(0b111000))): n4ljua2gi1Pr.kVFRD544hi_1 = kVFRD544hi_1 VNGQdHSFPrso = oVre8I6UXc3b.get_hparams(n4ljua2gi1Pr) NlO6lNe7NgYC = oVre8I6UXc3b.filepattern(kVFRD544hi_1, XqbfPmad1kJ4, shard=pn2mJYbTTPyv) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\nu\xa0\x92\xd0\x1f\xeal\xe3G8l'), '\x64' + chr(0b1100101) + chr(3395 - 3296) + '\157' + chr(0b1100100) + chr(101))(chr(6784 - 6667) + chr(0b1000 + 0o154) + chr(5783 - 5681) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b"\x0b'\x89\x8e\xcc\x12\xea{\xedJ\x16f\xadI\xb2\x9f\xf8\x1d\x0f\xe7\x89[\xe2\x07[\x04"), '\x64' + chr(1064 - 963) + '\143' + chr(0b110000 + 0o77) + '\144' + chr(4279 - 4178))(chr(0b1110101) + chr(0b1110100) + '\146' + '\055' + chr(0b10110 + 0o42)), NlO6lNe7NgYC) KAyZjSEftgFC = vUlqIvNSaRMa(IDJ2eXGCBCDu.contrib.slim.parallel_reader.get_data_files(NlO6lNe7NgYC)) def q9Ow5rIi9TBA(Xs6zu3BFE2Ws): xQt6gV9VfTO3 = IDJ2eXGCBCDu.data.TFRecordDataset(Xs6zu3BFE2Ws, buffer_size=ehT0Px3KOsy9('\060' + chr(111) + chr(0b101000 + 0o11) + '\060', 0o10) * ehT0Px3KOsy9('\x30' + chr(1848 - 1737) + chr(0b11000 + 0o32) + chr(1764 - 1716) + '\060' + chr(0b100110 + 0o12), 8) * ehT0Px3KOsy9(chr(48) + chr(5363 - 5252) + chr(2497 - 2447) + '\x30' + chr(48) + chr(0b100110 + 0o12), 8)) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(oVre8I6UXc3b.decode_example, num_parallel_calls=pCw22JJnmDr0) if n8IJXbSueTJV: xQt6gV9VfTO3 = oVre8I6UXc3b.preprocess(xQt6gV9VfTO3, holLFgwB7vsP, n4ljua2gi1Pr, interleave=EiFJq1ArTGUJ) return xQt6gV9VfTO3 if c2A0yzQpDQB3(KAyZjSEftgFC) < uriDfeyzD72A: raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'77\x85\x88\xc0\x0e\xad4\xef\x0b\x06f\xf9N\xfb\x95\xf4\x02J\xf2\xdb\x1c\xaaCWW\x9d\xe6\x8f\xa7T!C\xca{]\xcc1%\x0c*6\xc8\x9e\xcd\x19\xad5\xfcF\x00b\xff\x0f\xb4\x95\xbd\x06@\xf2\x8fG\xaf\x0f[\x13\xd9'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + '\145')('\165' + chr(12442 - 12326) + chr(0b1100110) + chr(45) + chr(1900 - 1844)) % (c2A0yzQpDQB3(KAyZjSEftgFC), uriDfeyzD72A)) KAyZjSEftgFC = [EGyt1xfPT1P6 for (WVxHKyX45z_L, EGyt1xfPT1P6) in YlkZvXL8qwsX(KAyZjSEftgFC) if WVxHKyX45z_L % uriDfeyzD72A == yEGKPIAOGxSd] xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\nu\xa0\x92\xd0\x1f\xeal\xe3G8l'), chr(2162 - 2062) + chr(0b100010 + 0o103) + chr(0b1100011) + chr(111) + chr(0b100010 + 0o102) + chr(0b101111 + 0o66))(chr(13032 - 12915) + '\x74' + '\x66' + chr(0b101 + 0o50) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b')#\x9a\x9e\xcc\x08\xe44\xe7\x11B"\xe9\x0f\xb5\x86\xf01K\xe0\x8fU\xd0A\x17\x1b\x95\xe0\xc6\xf3Q\''), '\144' + chr(0b1010 + 0o133) + chr(0b11110 + 0o105) + chr(3198 - 3087) + chr(0b1001110 + 0o26) + chr(6711 - 6610))(chr(117) + chr(0b1110100) + chr(102) + chr(1859 - 1814) + '\070') % (yEGKPIAOGxSd, c2A0yzQpDQB3(KAyZjSEftgFC))) if EiFJq1ArTGUJ: xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'-0\x89\x84\xd6\x1a\xe2)\xe4N\x10X\xfd]\xb2\x9d\xe9'), '\144' + chr(3176 - 3075) + chr(0b1100011) + chr(12276 - 12165) + chr(1044 - 944) + chr(6305 - 6204))(chr(0b1110101) + chr(12117 - 12001) + chr(102) + chr(222 - 177) + chr(2783 - 2727)))(key=xafqLlk3kkUe(mcP9wB7s3wV8, xafqLlk3kkUe(SXOLrMavuUCe(b'\x10\x0c\xb8\xbf\xf1#\xc2\t\xcdn0'), chr(1526 - 1426) + chr(9804 - 9703) + '\143' + chr(9811 - 9700) + chr(100) + '\x65')(chr(0b1010 + 0o153) + '\164' + chr(102) + chr(45) + chr(1890 - 1834)))) xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'**\x9d\x8c\xc3\x10\xe8'), chr(0b101010 + 0o72) + chr(6869 - 6768) + chr(0b1100000 + 0o3) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + chr(6864 - 6748) + '\x66' + '\x2d' + chr(2105 - 2049)))(KAyZjSEftgFC) xQt6gV9VfTO3 = IDJ2eXGCBCDu.data.Dataset.from_tensor_slices(IDJ2eXGCBCDu.constant(KAyZjSEftgFC)) if EiFJq1ArTGUJ: xQt6gV9VfTO3 = xQt6gV9VfTO3.apply(IDJ2eXGCBCDu.data.experimental.parallel_interleave(q9Ow5rIi9TBA, sloppy=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8), cycle_length=ehT0Px3KOsy9(chr(48) + chr(5381 - 5270) + '\x31' + '\060', 8))) else: xQt6gV9VfTO3 = q9Ow5rIi9TBA(xQt6gV9VfTO3) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(oVre8I6UXc3b.maybe_reverse_and_copy, num_parallel_calls=pCw22JJnmDr0) xQt6gV9VfTO3 = xQt6gV9VfTO3.take(dNgL2nrNj1NG) if EiFJq1ArTGUJ and XQJVi3cQFN5l: xQt6gV9VfTO3 = xQt6gV9VfTO3.shuffle(ETi1MWPlKt6h) if xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b">'\x9c"), chr(0b111101 + 0o47) + '\x65' + chr(99) + '\157' + '\x64' + chr(101))('\x75' + chr(0b110010 + 0o102) + '\x66' + '\055' + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b')#\x8b\x81\xfa\x18\xec/\xe8X\x07s'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101 + 0o142) + '\x64' + chr(0b100110 + 0o77))(chr(0b1010 + 0o153) + chr(2416 - 2300) + '\146' + chr(0b101001 + 0o4) + '\x38'), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x30', 8)): xQt6gV9VfTO3 = g1Z_RG9zP4cD.pack_dataset(xQt6gV9VfTO3, n4ljua2gi1Pr._o7pVXAdOCRy, keys=[xafqLlk3kkUe(SXOLrMavuUCe(b'0,\x98\x9f\xd1\x0f'), chr(0b1100100) + '\x65' + '\x63' + chr(3927 - 3816) + chr(0b1100100) + chr(3806 - 3705))(chr(0b1110101) + chr(116) + '\146' + chr(1785 - 1740) + chr(2918 - 2862)), xafqLlk3kkUe(SXOLrMavuUCe(b'-#\x9a\x8d\xc0\x08\xfe'), '\x64' + chr(101) + chr(99) + '\157' + chr(0b1100010 + 0o2) + chr(541 - 440))(chr(0b1110101) + chr(0b110010 + 0o102) + chr(0b1100110) + chr(0b11010 + 0o23) + chr(0b110000 + 0o10))], use_custom_ops=n4ljua2gi1Pr.get(xafqLlk3kkUe(SXOLrMavuUCe(b',1\x8d\xb5\xc6\t\xfe/\xe6F=h\xfd\\'), chr(2195 - 2095) + chr(0b1100101) + chr(9643 - 9544) + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(5993 - 5891) + chr(45) + chr(0b101 + 0o63)), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(11825 - 11714) + '\060', 8))) if Yj4oyyXOEZhc: xQt6gV9VfTO3 = xQt6gV9VfTO3.prefetch(Yj4oyyXOEZhc) return xQt6gV9VfTO3
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.decode_example
def decode_example(self, serialized_example): """Return a dict of Tensors from a serialized tensorflow.Example.""" data_fields, data_items_to_decoders = self.example_reading_spec() # Necessary to rejoin examples in the correct order with the Cloud ML Engine # batch prediction API. data_fields["batch_prediction_key"] = tf.FixedLenFeature([1], tf.int64, 0) if data_items_to_decoders is None: data_items_to_decoders = { field: tf.contrib.slim.tfexample_decoder.Tensor(field) for field in data_fields } decoder = tf.contrib.slim.tfexample_decoder.TFExampleDecoder( data_fields, data_items_to_decoders) decode_items = list(sorted(data_items_to_decoders)) decoded = decoder.decode(serialized_example, items=decode_items) return dict(zip(decode_items, decoded))
python
def decode_example(self, serialized_example): """Return a dict of Tensors from a serialized tensorflow.Example.""" data_fields, data_items_to_decoders = self.example_reading_spec() # Necessary to rejoin examples in the correct order with the Cloud ML Engine # batch prediction API. data_fields["batch_prediction_key"] = tf.FixedLenFeature([1], tf.int64, 0) if data_items_to_decoders is None: data_items_to_decoders = { field: tf.contrib.slim.tfexample_decoder.Tensor(field) for field in data_fields } decoder = tf.contrib.slim.tfexample_decoder.TFExampleDecoder( data_fields, data_items_to_decoders) decode_items = list(sorted(data_items_to_decoders)) decoded = decoder.decode(serialized_example, items=decode_items) return dict(zip(decode_items, decoded))
[ "def", "decode_example", "(", "self", ",", "serialized_example", ")", ":", "data_fields", ",", "data_items_to_decoders", "=", "self", ".", "example_reading_spec", "(", ")", "# Necessary to rejoin examples in the correct order with the Cloud ML Engine", "# batch prediction API.", "data_fields", "[", "\"batch_prediction_key\"", "]", "=", "tf", ".", "FixedLenFeature", "(", "[", "1", "]", ",", "tf", ".", "int64", ",", "0", ")", "if", "data_items_to_decoders", "is", "None", ":", "data_items_to_decoders", "=", "{", "field", ":", "tf", ".", "contrib", ".", "slim", ".", "tfexample_decoder", ".", "Tensor", "(", "field", ")", "for", "field", "in", "data_fields", "}", "decoder", "=", "tf", ".", "contrib", ".", "slim", ".", "tfexample_decoder", ".", "TFExampleDecoder", "(", "data_fields", ",", "data_items_to_decoders", ")", "decode_items", "=", "list", "(", "sorted", "(", "data_items_to_decoders", ")", ")", "decoded", "=", "decoder", ".", "decode", "(", "serialized_example", ",", "items", "=", "decode_items", ")", "return", "dict", "(", "zip", "(", "decode_items", ",", "decoded", ")", ")" ]
Return a dict of Tensors from a serialized tensorflow.Example.
[ "Return", "a", "dict", "of", "Tensors", "from", "a", "serialized", "tensorflow", ".", "Example", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L700-L717
train
Return a dict of Tensors from a serialized tensorflow. Example.
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,KlPSlj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978XkGspL,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(11917 - 11806) + chr(0b110001) + '\066' + '\x31', 56781 - 56773), ehT0Px3KOsy9(chr(1843 - 1795) + chr(0b1101111) + chr(0b101011 + 0o10) + '\x32' + chr(0b110 + 0o61), 0b1000), ehT0Px3KOsy9(chr(1497 - 1449) + chr(5901 - 5790) + chr(0b100100 + 0o17) + chr(1454 - 1401) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(1031 - 983) + chr(9428 - 9317) + '\061' + chr(0b101000 + 0o12) + chr(0b110001 + 0o3), 29641 - 29633), ehT0Px3KOsy9(chr(0b110000) + chr(2951 - 2840) + chr(50) + '\066' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(1934 - 1886) + chr(111) + chr(55) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(111) + chr(51) + chr(0b100100 + 0o15) + chr(1240 - 1191), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + '\062' + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(2006 - 1958) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(0b110110) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1451 - 1402) + '\x34' + chr(402 - 352), 21967 - 21959), ehT0Px3KOsy9(chr(48) + chr(111) + chr(2229 - 2177), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(0b1101111) + chr(49) + chr(50) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1100001 + 0o16) + '\061' + chr(0b110101) + '\067', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b11110 + 0o24) + '\x31' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(0b110001 + 0o3) + chr(2203 - 2152), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001 + 0o146) + chr(49) + chr(1575 - 1526) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(2226 - 2178) + chr(111) + chr(0b110001) + chr(0b100101 + 0o17) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(369 - 321) + '\157' + '\061' + '\x31' + '\x36', 43981 - 43973), ehT0Px3KOsy9(chr(1558 - 1510) + '\157' + '\062' + '\061' + chr(0b10111 + 0o33), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1387 - 1335) + '\066', 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b0 + 0o61) + '\061' + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x33' + '\064' + '\065', 49098 - 49090), ehT0Px3KOsy9(chr(48) + chr(111) + chr(617 - 567) + '\x37' + chr(1001 - 951), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1200 - 1149) + chr(0b10000 + 0o43) + chr(2536 - 2483), 0b1000), ehT0Px3KOsy9('\x30' + chr(477 - 366) + '\061' + '\063' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(9252 - 9141) + '\x32' + '\x33' + chr(2048 - 2000), 7845 - 7837), ehT0Px3KOsy9(chr(2284 - 2236) + chr(0b1101111) + chr(51) + chr(51) + chr(0b110111), 46431 - 46423), ehT0Px3KOsy9('\x30' + '\x6f' + chr(50) + chr(0b100001 + 0o21) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(53) + chr(54), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + '\x34' + chr(51), 62688 - 62680), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x35' + chr(0b110010), 1445 - 1437), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b111000 + 0o67) + '\x32' + chr(0b101010 + 0o6) + chr(0b110111), 22803 - 22795), ehT0Px3KOsy9(chr(48) + chr(5298 - 5187) + chr(0b1111 + 0o43) + '\060' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(965 - 917) + chr(0b111101 + 0o62) + chr(1176 - 1125) + '\061' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010 + 0o145) + '\062' + chr(0b11000 + 0o32) + chr(49), 0b1000), ehT0Px3KOsy9(chr(706 - 658) + chr(0b1011101 + 0o22) + chr(1485 - 1436) + chr(0b110100) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(490 - 442) + chr(0b1001001 + 0o46) + chr(49) + '\060' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\060' + '\063', 0b1000), ehT0Px3KOsy9(chr(1509 - 1461) + '\157' + '\x31' + '\x33', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(53) + chr(1345 - 1297), 17922 - 17914)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'_'), chr(0b110001 + 0o63) + chr(0b1100101) + chr(1240 - 1141) + '\157' + '\144' + '\x65')('\165' + '\164' + chr(0b11010 + 0o114) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Z4LORr9gAxO6(oVre8I6UXc3b, dP29lsCkOGW4): (NcaloodHmi5p, IU0p0SPK4Dei) = oVre8I6UXc3b.example_reading_spec() NcaloodHmi5p[xafqLlk3kkUe(SXOLrMavuUCe(b'\x13\xb6\x9f7\xd9d\xb9\xe4\xa5\x12\x0bg"\x06\xe2\x8d\x10\n+\xf3'), chr(3427 - 3327) + chr(0b111001 + 0o54) + chr(99) + chr(5974 - 5863) + chr(3711 - 3611) + '\145')(chr(10860 - 10743) + chr(0b110010 + 0o102) + '\x66' + '\x2d' + chr(0b11000 + 0o40))] = IDJ2eXGCBCDu.FixedLenFeature([ehT0Px3KOsy9(chr(286 - 238) + chr(0b1101111) + chr(49), 58518 - 58510)], IDJ2eXGCBCDu.int64, ehT0Px3KOsy9(chr(0b110000) + chr(0b101010 + 0o105) + chr(0b110000), 0b1000)) if IU0p0SPK4Dei is None: IU0p0SPK4Dei = {fEcfxx4smAdS: IDJ2eXGCBCDu.contrib.slim.tfexample_decoder.Tensor(fEcfxx4smAdS) for fEcfxx4smAdS in NcaloodHmi5p} tLRvilnXU7wb = IDJ2eXGCBCDu.contrib.slim.tfexample_decoder.TFExampleDecoder(NcaloodHmi5p, IU0p0SPK4Dei) Bs9WCr1c7VVA = YyaZ4tpXu4lf(vUlqIvNSaRMa(IU0p0SPK4Dei)) xv8V2FHKfu8K = tLRvilnXU7wb.decode(dP29lsCkOGW4, items=Bs9WCr1c7VVA) return wLqBDw8l0eIm(pZ0NK2y6HRbn(Bs9WCr1c7VVA, xv8V2FHKfu8K))
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.feature_info
def feature_info(self): """Retrieve dict<feature name, FeatureInfo>. Must first call Problem.get_hparams or Problem.dataset to have the problem's internal hparams already constructed. Returns: dict<feature name, FeatureInfo> """ if self._feature_info is not None: return self._feature_info assert self._hparams is not None hp = self.get_hparams() if self.has_inputs: in_id = hp.input_space_id out_id = hp.target_space_id features = collections.defaultdict(FeatureInfo) for feature_name, modality_cls in six.iteritems(hp.modality): finfo = features[feature_name] finfo.modality = modality_cls finfo.vocab_size = hp.vocab_size[feature_name] vocabs = hp.vocabulary for name, encoder in six.iteritems(vocabs): features[name].encoder = encoder if self.has_inputs: features["inputs"].space_id = in_id features["targets"].space_id = out_id self._feature_info = features return features
python
def feature_info(self): """Retrieve dict<feature name, FeatureInfo>. Must first call Problem.get_hparams or Problem.dataset to have the problem's internal hparams already constructed. Returns: dict<feature name, FeatureInfo> """ if self._feature_info is not None: return self._feature_info assert self._hparams is not None hp = self.get_hparams() if self.has_inputs: in_id = hp.input_space_id out_id = hp.target_space_id features = collections.defaultdict(FeatureInfo) for feature_name, modality_cls in six.iteritems(hp.modality): finfo = features[feature_name] finfo.modality = modality_cls finfo.vocab_size = hp.vocab_size[feature_name] vocabs = hp.vocabulary for name, encoder in six.iteritems(vocabs): features[name].encoder = encoder if self.has_inputs: features["inputs"].space_id = in_id features["targets"].space_id = out_id self._feature_info = features return features
[ "def", "feature_info", "(", "self", ")", ":", "if", "self", ".", "_feature_info", "is", "not", "None", ":", "return", "self", ".", "_feature_info", "assert", "self", ".", "_hparams", "is", "not", "None", "hp", "=", "self", ".", "get_hparams", "(", ")", "if", "self", ".", "has_inputs", ":", "in_id", "=", "hp", ".", "input_space_id", "out_id", "=", "hp", ".", "target_space_id", "features", "=", "collections", ".", "defaultdict", "(", "FeatureInfo", ")", "for", "feature_name", ",", "modality_cls", "in", "six", ".", "iteritems", "(", "hp", ".", "modality", ")", ":", "finfo", "=", "features", "[", "feature_name", "]", "finfo", ".", "modality", "=", "modality_cls", "finfo", ".", "vocab_size", "=", "hp", ".", "vocab_size", "[", "feature_name", "]", "vocabs", "=", "hp", ".", "vocabulary", "for", "name", ",", "encoder", "in", "six", ".", "iteritems", "(", "vocabs", ")", ":", "features", "[", "name", "]", ".", "encoder", "=", "encoder", "if", "self", ".", "has_inputs", ":", "features", "[", "\"inputs\"", "]", ".", "space_id", "=", "in_id", "features", "[", "\"targets\"", "]", ".", "space_id", "=", "out_id", "self", ".", "_feature_info", "=", "features", "return", "features" ]
Retrieve dict<feature name, FeatureInfo>. Must first call Problem.get_hparams or Problem.dataset to have the problem's internal hparams already constructed. Returns: dict<feature name, FeatureInfo>
[ "Retrieve", "dict<feature", "name", "FeatureInfo", ">", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L735-L769
train
Retrieve dict<feature name FeatureInfo >.
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,ZMHESM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xd4bh,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(580 - 532) + '\157' + chr(51) + chr(0b110110) + chr(0b11001 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(852 - 804) + chr(1626 - 1515) + '\x31' + chr(53) + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(4261 - 4150) + '\x34' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101000 + 0o7) + chr(2002 - 1951) + chr(53) + chr(53), 11933 - 11925), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2106 - 2055) + chr(0b1111 + 0o44) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + chr(357 - 306) + chr(0b110001) + chr(676 - 624), 0o10), ehT0Px3KOsy9(chr(913 - 865) + chr(1998 - 1887) + chr(0b10001 + 0o40) + '\065' + '\064', 4721 - 4713), ehT0Px3KOsy9(chr(48) + '\157' + chr(1982 - 1933) + chr(0b101100 + 0o4) + chr(1843 - 1794), ord("\x08")), ehT0Px3KOsy9(chr(2121 - 2073) + chr(0b101111 + 0o100) + chr(0b100100 + 0o15) + chr(0b110001) + '\066', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1010 + 0o47) + chr(0b10011 + 0o44), 23258 - 23250), ehT0Px3KOsy9('\060' + '\157' + chr(50) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(1062 - 1014) + '\157' + '\x33' + chr(0b1110 + 0o51) + '\x33', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2702 - 2649) + chr(0b101000 + 0o10), 32395 - 32387), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + '\x32' + '\x31' + chr(1494 - 1441), 14271 - 14263), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1076 - 1025) + chr(0b1010 + 0o50) + '\x30', 0b1000), ehT0Px3KOsy9(chr(1332 - 1284) + '\x6f' + '\x31' + chr(352 - 302) + chr(53), 0o10), ehT0Px3KOsy9(chr(823 - 775) + '\x6f' + '\062' + '\063' + chr(0b110101), 64365 - 64357), ehT0Px3KOsy9(chr(48) + chr(0b1001010 + 0o45) + chr(2496 - 2446) + chr(0b101001 + 0o11) + '\x37', 0b1000), ehT0Px3KOsy9(chr(722 - 674) + '\x6f' + chr(0b110010) + chr(2192 - 2141) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001 + 0o2) + chr(0b110001) + '\x34', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + chr(661 - 613) + chr(0b100110 + 0o21), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + chr(2842 - 2788) + chr(1454 - 1405), 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1010010 + 0o35) + chr(50) + '\x32' + chr(0b110111), 8), ehT0Px3KOsy9(chr(0b110000) + chr(4257 - 4146) + chr(0b10101 + 0o35) + chr(0b110110) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b110110), 38163 - 38155), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(2212 - 2163) + chr(236 - 183), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2263 - 2152) + '\062' + chr(0b110001) + '\x35', 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(1131 - 1081) + chr(1638 - 1584), 36786 - 36778), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100110 + 0o14) + chr(2160 - 2107) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b1101001 + 0o6) + chr(0b110011) + chr(340 - 285) + '\062', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + chr(0b10111 + 0o32), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + '\066' + chr(1883 - 1828), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + '\064' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1323 - 1274) + '\x33' + chr(0b110001), 57795 - 57787), ehT0Px3KOsy9(chr(1385 - 1337) + chr(6207 - 6096) + chr(1264 - 1215) + chr(0b10001 + 0o37) + chr(1664 - 1613), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b110101) + chr(0b110010 + 0o1), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(570 - 520) + chr(0b110101) + '\x34', 8), ehT0Px3KOsy9('\060' + chr(4009 - 3898) + chr(1822 - 1772) + chr(1782 - 1727) + chr(51), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(52) + '\x30', 59438 - 59430), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\061' + chr(0b110010 + 0o3), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + '\x35' + chr(0b11110 + 0o22), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8'), chr(3639 - 3539) + '\145' + chr(0b1000010 + 0o41) + '\x6f' + chr(100) + chr(0b1100101))('\165' + '\164' + '\146' + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def BACxa4XKHvRJ(oVre8I6UXc3b): if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\tA\x8c\xaf\xb9\x1e$\x11fx\x9dG'), '\x64' + chr(1533 - 1432) + chr(8545 - 8446) + chr(111) + chr(0b100011 + 0o101) + chr(9740 - 9639))(chr(117) + chr(2758 - 2642) + '\146' + chr(45) + '\x38')) is not None: return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9\tA\x8c\xaf\xb9\x1e$\x11fx\x9dG'), chr(100) + chr(7818 - 7717) + chr(5539 - 5440) + chr(0b1101111) + chr(0b1100100) + '\x65')('\x75' + chr(0b1110100) + chr(6677 - 6575) + '\055' + '\x38')) assert xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x98?k\xd8\x98\xb4\x1a\x1e\x1c\\G\xaa'), chr(100) + chr(948 - 847) + chr(0b100110 + 0o75) + chr(8489 - 8378) + chr(8423 - 8323) + '\x65')(chr(0b1011111 + 0o26) + '\x74' + '\146' + '\x2d' + chr(0b110010 + 0o6))) is not None ny6shRSJO9Wm = oVre8I6UXc3b.get_hparams() if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e\x0eW\xb2\xb2\xa2\x1c4:|'), chr(100) + chr(0b1100001 + 0o4) + '\x63' + '\157' + chr(0b1100100) + chr(6262 - 6161))(chr(0b1110101) + '\x74' + chr(102) + chr(1248 - 1203) + '\070')): tz1niMQDhngA = ny6shRSJO9Wm.Fj2ITAWgKC7G XVwGXsKhUaUF = ny6shRSJO9Wm.F_zsiH5GNezn EEf4r9nUvta_ = FGhnnwoh1Dd8.defaultdict(xqjQ9hZfY27i) for (lPuZQT6rFAxL, ftgLRZxlsP3U) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\x1bA\x9f\xb2\xb8\t,='), chr(0b1001 + 0o133) + '\x65' + chr(0b100001 + 0o102) + chr(0b1101111) + chr(9519 - 9419) + chr(8771 - 8670))('\165' + chr(601 - 485) + chr(0b1100110) + chr(45) + chr(540 - 484)))(xafqLlk3kkUe(ny6shRSJO9Wm, xafqLlk3kkUe(SXOLrMavuUCe(b'\x946t\x9e\xac\xa4\x152*<e\xc9'), '\144' + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b11011 + 0o132) + '\x74' + chr(0b1100110) + chr(0b10101 + 0o30) + chr(0b100011 + 0o25)))): hixBIyQlqVhY = EEf4r9nUvta_[lPuZQT6rFAxL] hixBIyQlqVhY.bYPswhysd3s2 = ftgLRZxlsP3U hixBIyQlqVhY.CeyMIoSyrpkQ = ny6shRSJO9Wm.CeyMIoSyrpkQ[lPuZQT6rFAxL] Yy2ql4EMxN7M = ny6shRSJO9Wm.Vemi1XCgm0ph for (AIvJRzLdDfgF, hoK3K1TwFlkr) in xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\x1bA\x9f\xb2\xb8\t,='), chr(100) + chr(0b1001111 + 0o26) + chr(0b10010 + 0o121) + chr(0b1101111) + '\144' + chr(2968 - 2867))(chr(8712 - 8595) + chr(0b100000 + 0o124) + '\x66' + '\x2d' + '\070'))(Yy2ql4EMxN7M): EEf4r9nUvta_[AIvJRzLdDfgF].hoK3K1TwFlkr = hoK3K1TwFlkr if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9e\x0eW\xb2\xb2\xa2\x1c4:|'), chr(0b101111 + 0o65) + '\145' + chr(6910 - 6811) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + '\146' + chr(966 - 921) + chr(56))): EEf4r9nUvta_[xafqLlk3kkUe(SXOLrMavuUCe(b'\x9f\x01T\x98\xaf\xbf'), chr(0b1000 + 0o134) + '\145' + '\143' + chr(0b1101111) + chr(5229 - 5129) + chr(0b1100101))('\165' + chr(810 - 694) + '\x66' + '\x2d' + chr(0b111000))].kp7SWJIrqOPL = tz1niMQDhngA EEf4r9nUvta_[xafqLlk3kkUe(SXOLrMavuUCe(b'\x82\x0eV\x8a\xbe\xb8\x1f'), chr(0b1000 + 0o134) + '\x65' + '\x63' + chr(3593 - 3482) + '\x64' + chr(4394 - 4293))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(1659 - 1614) + chr(0b111000))].kp7SWJIrqOPL = XVwGXsKhUaUF oVre8I6UXc3b.EttHyH39XlM7 = EEf4r9nUvta_ return EEf4r9nUvta_
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.make_estimator_input_fn
def make_estimator_input_fn(self, mode, hparams, data_dir=None, force_repeat=False, prevent_repeat=False, dataset_kwargs=None): """Return input_fn wrapped for Estimator.""" def estimator_input_fn(params, config): return self.input_fn( mode, hparams, data_dir=data_dir, params=params, config=config, force_repeat=force_repeat, prevent_repeat=prevent_repeat, dataset_kwargs=dataset_kwargs) return estimator_input_fn
python
def make_estimator_input_fn(self, mode, hparams, data_dir=None, force_repeat=False, prevent_repeat=False, dataset_kwargs=None): """Return input_fn wrapped for Estimator.""" def estimator_input_fn(params, config): return self.input_fn( mode, hparams, data_dir=data_dir, params=params, config=config, force_repeat=force_repeat, prevent_repeat=prevent_repeat, dataset_kwargs=dataset_kwargs) return estimator_input_fn
[ "def", "make_estimator_input_fn", "(", "self", ",", "mode", ",", "hparams", ",", "data_dir", "=", "None", ",", "force_repeat", "=", "False", ",", "prevent_repeat", "=", "False", ",", "dataset_kwargs", "=", "None", ")", ":", "def", "estimator_input_fn", "(", "params", ",", "config", ")", ":", "return", "self", ".", "input_fn", "(", "mode", ",", "hparams", ",", "data_dir", "=", "data_dir", ",", "params", "=", "params", ",", "config", "=", "config", ",", "force_repeat", "=", "force_repeat", ",", "prevent_repeat", "=", "prevent_repeat", ",", "dataset_kwargs", "=", "dataset_kwargs", ")", "return", "estimator_input_fn" ]
Return input_fn wrapped for Estimator.
[ "Return", "input_fn", "wrapped", "for", "Estimator", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L771-L791
train
Returns input_fn wrapped for Estimator.
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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vR,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(0b100110 + 0o12) + chr(111) + chr(1729 - 1678) + chr(0b110000) + '\063', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b1 + 0o62) + chr(1449 - 1401) + chr(55), 9637 - 9629), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(51) + chr(0b101010 + 0o15) + '\x34', 22100 - 22092), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(1195 - 1144) + chr(0b110011), 11633 - 11625), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1001 + 0o55) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(1671 - 1623) + chr(111) + chr(1790 - 1741) + chr(53) + chr(0b1 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(49) + '\x33' + '\066', 8576 - 8568), ehT0Px3KOsy9('\060' + chr(0b100001 + 0o116) + chr(2090 - 2039) + chr(90 - 41) + chr(1841 - 1792), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\062' + '\062' + chr(0b100011 + 0o17), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(54) + '\064', 8), ehT0Px3KOsy9(chr(969 - 921) + chr(0b110100 + 0o73) + '\067' + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x35' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10111 + 0o34) + '\x32' + '\060', 1041 - 1033), ehT0Px3KOsy9('\060' + chr(111) + '\x31' + chr(49) + chr(0b100101 + 0o14), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(0b11100 + 0o31) + chr(1591 - 1536), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b100101 + 0o112) + chr(51) + chr(0b110100) + chr(0b110101 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(51) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(8798 - 8687) + chr(121 - 70) + chr(0b110101) + chr(0b1 + 0o57), 50588 - 50580), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(53) + chr(70 - 16), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10009 - 9898) + chr(0b110010) + chr(2605 - 2550) + chr(1034 - 980), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11001 + 0o30) + '\x32' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b11101 + 0o122) + chr(50) + chr(0b110000) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + '\062' + chr(1027 - 977) + chr(0b110010), 8), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(212 - 163) + '\x32' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1165 - 1117) + chr(1496 - 1385) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\x6f' + chr(0b110011) + chr(2660 - 2606) + chr(2139 - 2091), 0b1000), ehT0Px3KOsy9(chr(0b101111 + 0o1) + chr(111) + chr(50) + chr(50) + chr(1190 - 1142), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + '\x32' + chr(0b11100 + 0o27), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(2144 - 2093) + chr(0b101101 + 0o3), 4398 - 4390), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b100011 + 0o16) + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(51) + '\x33' + chr(1250 - 1200), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110010) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(666 - 618) + '\x6f' + chr(0b101100 + 0o5) + chr(48) + chr(660 - 607), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + '\x32' + chr(0b11011 + 0o31), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(1386 - 1338) + chr(0b110001 + 0o0), 3696 - 3688), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x37' + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b111110 + 0o61) + chr(51) + chr(0b110111) + chr(534 - 481), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + '\x34' + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10111 + 0o34) + chr(49) + chr(0b101110 + 0o2), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1010 + 0o145) + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xed'), '\x64' + '\x65' + chr(7635 - 7536) + chr(0b1101111) + '\144' + chr(0b1011100 + 0o11))(chr(0b1110101 + 0o0) + chr(0b1010100 + 0o40) + chr(0b10010 + 0o124) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def KrGnE5_B457o(oVre8I6UXc3b, holLFgwB7vsP, n4ljua2gi1Pr, kVFRD544hi_1=None, Q5HlHwWjWXJy=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1100 + 0o44), 8), kcD5_yICCeDt=ehT0Px3KOsy9(chr(48) + '\157' + chr(605 - 557), 8), Sa4GuE_apyvu=None): def k2AeHVk_0mtn(nEbJZ4wfte2w, jAj7S20Ct06o): return xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa\xa9\x8c\xee@78\xa7'), chr(100) + '\x65' + chr(2545 - 2446) + '\157' + chr(100) + '\x65')(chr(0b11001 + 0o134) + '\x74' + chr(0b1100110) + chr(0b10001 + 0o34) + '\070'))(holLFgwB7vsP, n4ljua2gi1Pr, data_dir=kVFRD544hi_1, params=nEbJZ4wfte2w, config=jAj7S20Ct06o, force_repeat=Q5HlHwWjWXJy, prevent_repeat=kcD5_yICCeDt, dataset_kwargs=Sa4GuE_apyvu) return k2AeHVk_0mtn
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem._dataset_partition
def _dataset_partition(self, mode, config, params): """Which part of the training data to read. If there are multiple parallel calls to input_fn (multiple TPU hosts), then we want each one to read from a separate partition of the training data. Args: mode: tf.estimator.ModeKeys config: RunConfig params: A dict that contains parameters. Returns: partition_id: an integer num_partitions: an integer """ if mode != tf.estimator.ModeKeys.TRAIN or not hasattr(config, "tpu_config"): # Reset in the case when using TPU but alternating TRAIN and EVAL. self._next_partition_id = 0 return 0, 1 phift = config.tpu_config.per_host_input_for_training # This is the mesh-tensorflow case. if (hasattr(tpu_config.InputPipelineConfig, "BROADCAST") and phift == tpu_config.InputPipelineConfig.BROADCAST): return 0, 1 if phift: num_hosts = (params["context"].num_hosts if "context" in params else config.tpu_config.num_shards // 8) num_partitions = max(num_hosts, 1) else: num_partitions = config.tpu_config.num_shards partition_id = getattr(self, "_next_partition_id", 0) self._next_partition_id = partition_id + 1 tf.logging.info("num_partitions = %d partition_id = %d" % (num_partitions, partition_id)) assert partition_id < num_partitions return partition_id, num_partitions
python
def _dataset_partition(self, mode, config, params): """Which part of the training data to read. If there are multiple parallel calls to input_fn (multiple TPU hosts), then we want each one to read from a separate partition of the training data. Args: mode: tf.estimator.ModeKeys config: RunConfig params: A dict that contains parameters. Returns: partition_id: an integer num_partitions: an integer """ if mode != tf.estimator.ModeKeys.TRAIN or not hasattr(config, "tpu_config"): # Reset in the case when using TPU but alternating TRAIN and EVAL. self._next_partition_id = 0 return 0, 1 phift = config.tpu_config.per_host_input_for_training # This is the mesh-tensorflow case. if (hasattr(tpu_config.InputPipelineConfig, "BROADCAST") and phift == tpu_config.InputPipelineConfig.BROADCAST): return 0, 1 if phift: num_hosts = (params["context"].num_hosts if "context" in params else config.tpu_config.num_shards // 8) num_partitions = max(num_hosts, 1) else: num_partitions = config.tpu_config.num_shards partition_id = getattr(self, "_next_partition_id", 0) self._next_partition_id = partition_id + 1 tf.logging.info("num_partitions = %d partition_id = %d" % (num_partitions, partition_id)) assert partition_id < num_partitions return partition_id, num_partitions
[ "def", "_dataset_partition", "(", "self", ",", "mode", ",", "config", ",", "params", ")", ":", "if", "mode", "!=", "tf", ".", "estimator", ".", "ModeKeys", ".", "TRAIN", "or", "not", "hasattr", "(", "config", ",", "\"tpu_config\"", ")", ":", "# Reset in the case when using TPU but alternating TRAIN and EVAL.", "self", ".", "_next_partition_id", "=", "0", "return", "0", ",", "1", "phift", "=", "config", ".", "tpu_config", ".", "per_host_input_for_training", "# This is the mesh-tensorflow case.", "if", "(", "hasattr", "(", "tpu_config", ".", "InputPipelineConfig", ",", "\"BROADCAST\"", ")", "and", "phift", "==", "tpu_config", ".", "InputPipelineConfig", ".", "BROADCAST", ")", ":", "return", "0", ",", "1", "if", "phift", ":", "num_hosts", "=", "(", "params", "[", "\"context\"", "]", ".", "num_hosts", "if", "\"context\"", "in", "params", "else", "config", ".", "tpu_config", ".", "num_shards", "//", "8", ")", "num_partitions", "=", "max", "(", "num_hosts", ",", "1", ")", "else", ":", "num_partitions", "=", "config", ".", "tpu_config", ".", "num_shards", "partition_id", "=", "getattr", "(", "self", ",", "\"_next_partition_id\"", ",", "0", ")", "self", ".", "_next_partition_id", "=", "partition_id", "+", "1", "tf", ".", "logging", ".", "info", "(", "\"num_partitions = %d partition_id = %d\"", "%", "(", "num_partitions", ",", "partition_id", ")", ")", "assert", "partition_id", "<", "num_partitions", "return", "partition_id", ",", "num_partitions" ]
Which part of the training data to read. If there are multiple parallel calls to input_fn (multiple TPU hosts), then we want each one to read from a separate partition of the training data. Args: mode: tf.estimator.ModeKeys config: RunConfig params: A dict that contains parameters. Returns: partition_id: an integer num_partitions: an integer
[ "Which", "part", "of", "the", "training", "data", "to", "read", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L793-L828
train
This function returns the partition_id and number of partitions that can be used to read training data from the training data.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,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' + chr(0b1101111) + '\x33' + '\x35' + chr(0b11101 + 0o31), 44138 - 44130), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(2834 - 2723) + '\x33' + chr(0b110000) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b10010 + 0o135) + chr(0b110010) + chr(49) + chr(0b11010 + 0o27), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(6816 - 6705) + chr(1355 - 1306) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(1482 - 1432) + '\062' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110111) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(340 - 229) + '\063' + chr(55) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(7367 - 7256) + '\062' + chr(872 - 824), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b101011 + 0o10) + '\061' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b110000) + chr(0b110111), 1398 - 1390), ehT0Px3KOsy9(chr(0b100001 + 0o17) + '\157' + chr(833 - 782) + chr(53) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(1655 - 1607) + chr(0b100010 + 0o115) + chr(0b110001) + chr(2353 - 2303) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101011 + 0o6) + chr(0b100101 + 0o16) + '\067', 10385 - 10377), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110101) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(1755 - 1707) + '\x6f' + chr(0b100110 + 0o14) + '\x35' + chr(0b10010 + 0o40), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110011 + 0o3) + chr(0b110101), 50620 - 50612), ehT0Px3KOsy9(chr(2082 - 2034) + '\x6f' + chr(51) + chr(1448 - 1394) + '\060', 0o10), ehT0Px3KOsy9(chr(900 - 852) + '\x6f' + chr(51) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(2156 - 2108) + chr(813 - 702) + chr(1569 - 1520) + '\061' + chr(50 - 2), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x33' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b10001 + 0o42) + chr(0b110000) + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(4593 - 4482) + chr(0b110001) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(0b10011 + 0o44) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(911 - 863) + chr(11538 - 11427) + '\067' + '\x35', 49979 - 49971), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b101101 + 0o102) + '\061' + chr(0b110101) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(54) + chr(590 - 540), 7770 - 7762), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b0 + 0o66) + '\066', 15058 - 15050), ehT0Px3KOsy9(chr(2016 - 1968) + '\x6f' + chr(49) + chr(55) + '\065', 13725 - 13717), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + chr(941 - 891), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + chr(847 - 795) + chr(0b11000 + 0o32), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110111) + '\x30', 0b1000), ehT0Px3KOsy9(chr(1095 - 1047) + chr(2052 - 1941) + chr(53), 30442 - 30434), ehT0Px3KOsy9(chr(48) + chr(4170 - 4059) + chr(0b110001) + '\x30' + chr(2501 - 2449), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(1196 - 1142) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + '\x34' + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010100 + 0o33) + '\062' + chr(0b110110) + '\060', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(54) + '\x30', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1010 + 0o51) + chr(0b110101) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062', 1784 - 1776), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b1011 + 0o54) + '\x32', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(0b10001 + 0o44) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0'), chr(100) + chr(0b1100101) + chr(0b1001100 + 0o27) + '\157' + chr(985 - 885) + '\x65')(chr(0b1110101) + chr(479 - 363) + '\146' + chr(0b101101) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def nVYDl3_vZ_Z5(oVre8I6UXc3b, holLFgwB7vsP, jAj7S20Ct06o, nEbJZ4wfte2w): if holLFgwB7vsP != xafqLlk3kkUe(IDJ2eXGCBCDu.estimator.ModeKeys, xafqLlk3kkUe(SXOLrMavuUCe(b'\xba\x93\xc8C\xd8'), '\144' + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b11000 + 0o116) + chr(45) + '\x38')) or not lot1PSoAwYhj(jAj7S20Ct06o, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9a\xb1\xfcU\xf5\xd0\x96v\xa2 '), '\144' + chr(3977 - 3876) + '\143' + chr(111) + '\144' + chr(1841 - 1740))(chr(0b101111 + 0o106) + chr(0b1110100) + chr(6565 - 6463) + chr(1173 - 1128) + chr(0b110000 + 0o10))): oVre8I6UXc3b.l1wJKJFXV2sR = ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1010 + 0o46), ord("\x08")) return (ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110000), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49), 0b1000)) f4Xkl7TAtgzg = jAj7S20Ct06o.tpu_config.per_host_input_for_training if lot1PSoAwYhj(xafqLlk3kkUe(Ghj8YXKiaKb5, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa7\xaf\xf9\x7f\xe2\xef\x91`\xae+\x84<:k\xc5\x9b\x96w/'), '\x64' + chr(101) + '\x63' + chr(0b0 + 0o157) + '\144' + chr(0b10011 + 0o122))(chr(9982 - 9865) + '\164' + chr(102) + chr(45) + '\x38')), xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\x93\xc6K\xd2\xfc\xb9C\x9f'), chr(0b1100100) + '\x65' + '\x63' + chr(0b101101 + 0o102) + chr(7229 - 7129) + '\x65')(chr(13068 - 12951) + '\164' + chr(7832 - 7730) + chr(0b101101) + chr(0b111000))) and f4Xkl7TAtgzg == xafqLlk3kkUe(Ghj8YXKiaKb5.InputPipelineConfig, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\x93\xc6K\xd2\xfc\xb9C\x9f'), chr(0b1010010 + 0o22) + chr(0b110110 + 0o57) + '\143' + chr(0b1101111) + chr(5002 - 4902) + chr(101))(chr(0b1010100 + 0o41) + chr(116) + '\146' + chr(0b101101) + '\x38')): return (ehT0Px3KOsy9('\060' + '\x6f' + '\x30', 8), ehT0Px3KOsy9(chr(1263 - 1215) + chr(0b100001 + 0o116) + '\x31', 8)) if f4Xkl7TAtgzg: OCU13lDxa_u4 = nEbJZ4wfte2w[xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\xae\xe7~\xf3\xc7\x8c'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b110011 + 0o74) + chr(6150 - 6050) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(56))].num_hosts if xafqLlk3kkUe(SXOLrMavuUCe(b'\x8d\xae\xe7~\xf3\xc7\x8c'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(111) + '\144' + '\145')(chr(0b1001001 + 0o54) + chr(0b1110100) + chr(102) + '\055' + chr(56)) in nEbJZ4wfte2w else jAj7S20Ct06o.tpu_config.num_shards // ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(48), 0o10) uriDfeyzD72A = tsdjvlgh9gDP(OCU13lDxa_u4, ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b10011 + 0o36), 8)) else: uriDfeyzD72A = jAj7S20Ct06o.tpu_config.num_shards yEGKPIAOGxSd = xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb1\xaf\xecr\xe2\xe0\x88q\xb93\x84&6G\xc4\xaa\x99z'), '\144' + chr(0b1100101) + chr(3870 - 3771) + '\x6f' + chr(0b1011110 + 0o6) + chr(101))('\x75' + chr(11006 - 10890) + chr(9706 - 9604) + chr(45) + '\070'), ehT0Px3KOsy9('\x30' + chr(111) + '\060', 8)) oVre8I6UXc3b.l1wJKJFXV2sR = yEGKPIAOGxSd + ehT0Px3KOsy9(chr(268 - 220) + chr(111) + chr(49), 8) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b"\xbd\xf6\xc1r\xe3\xdc\x9f'\xa1+\xb79"), '\144' + '\145' + chr(0b110 + 0o135) + chr(0b1101111) + chr(0b1 + 0o143) + chr(2918 - 2817))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(663 - 618) + chr(0b1011 + 0o55)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x80\xb4\xe4U\xe6\xde\x8ad\xa23\x84=1[\x8a\xc8\xd0;,\xff\xb4n\x8bI\x04F\x9f\x12D=Qad\rG\x95\xd4'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(9564 - 9447) + chr(0b100100 + 0o120) + chr(102) + chr(855 - 810) + chr(0b111000)) % (uriDfeyzD72A, yEGKPIAOGxSd)) assert yEGKPIAOGxSd < uriDfeyzD72A return (yEGKPIAOGxSd, uriDfeyzD72A)
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.input_fn
def input_fn(self, mode, hparams, data_dir=None, params=None, config=None, force_repeat=False, prevent_repeat=False, dataset_kwargs=None): """Builds input pipeline for problem. Args: mode: tf.estimator.ModeKeys hparams: HParams, model hparams data_dir: str, data directory; if None, will use hparams.data_dir params: dict, may include "batch_size" config: RunConfig; should have the data_parallelism attribute if not using TPU force_repeat: bool, whether to repeat the data even if not training prevent_repeat: bool, whether to not repeat when in training mode. Overrides force_repeat. dataset_kwargs: dict, if passed, will pass as kwargs to self.dataset method when called Returns: (features_dict<str name, Tensor feature>, Tensor targets) """ partition_id, num_partitions = self._dataset_partition(mode, config, params) is_training = mode == tf.estimator.ModeKeys.TRAIN if config and config.use_tpu: num_threads = 64 else: num_threads = data_reader.cpu_count() if is_training else 1 data_dir = data_dir or (hasattr(hparams, "data_dir") and hparams.data_dir) dataset_kwargs = dataset_kwargs or {} dataset_kwargs.update({ "mode": mode, "data_dir": data_dir, "num_threads": num_threads, "hparams": hparams, "partition_id": partition_id, "num_partitions": num_partitions, }) return data_reader.input_fn( self.dataset(**dataset_kwargs), self.filepattern(data_dir, mode), self.skip_random_fraction_when_training, self.batch_size_means_tokens, self.get_hparams().batch_size_multiplier, self.max_length(hparams), mode, hparams, data_dir=data_dir, params=params, config=config, force_repeat=force_repeat, prevent_repeat=prevent_repeat)
python
def input_fn(self, mode, hparams, data_dir=None, params=None, config=None, force_repeat=False, prevent_repeat=False, dataset_kwargs=None): """Builds input pipeline for problem. Args: mode: tf.estimator.ModeKeys hparams: HParams, model hparams data_dir: str, data directory; if None, will use hparams.data_dir params: dict, may include "batch_size" config: RunConfig; should have the data_parallelism attribute if not using TPU force_repeat: bool, whether to repeat the data even if not training prevent_repeat: bool, whether to not repeat when in training mode. Overrides force_repeat. dataset_kwargs: dict, if passed, will pass as kwargs to self.dataset method when called Returns: (features_dict<str name, Tensor feature>, Tensor targets) """ partition_id, num_partitions = self._dataset_partition(mode, config, params) is_training = mode == tf.estimator.ModeKeys.TRAIN if config and config.use_tpu: num_threads = 64 else: num_threads = data_reader.cpu_count() if is_training else 1 data_dir = data_dir or (hasattr(hparams, "data_dir") and hparams.data_dir) dataset_kwargs = dataset_kwargs or {} dataset_kwargs.update({ "mode": mode, "data_dir": data_dir, "num_threads": num_threads, "hparams": hparams, "partition_id": partition_id, "num_partitions": num_partitions, }) return data_reader.input_fn( self.dataset(**dataset_kwargs), self.filepattern(data_dir, mode), self.skip_random_fraction_when_training, self.batch_size_means_tokens, self.get_hparams().batch_size_multiplier, self.max_length(hparams), mode, hparams, data_dir=data_dir, params=params, config=config, force_repeat=force_repeat, prevent_repeat=prevent_repeat)
[ "def", "input_fn", "(", "self", ",", "mode", ",", "hparams", ",", "data_dir", "=", "None", ",", "params", "=", "None", ",", "config", "=", "None", ",", "force_repeat", "=", "False", ",", "prevent_repeat", "=", "False", ",", "dataset_kwargs", "=", "None", ")", ":", "partition_id", ",", "num_partitions", "=", "self", ".", "_dataset_partition", "(", "mode", ",", "config", ",", "params", ")", "is_training", "=", "mode", "==", "tf", ".", "estimator", ".", "ModeKeys", ".", "TRAIN", "if", "config", "and", "config", ".", "use_tpu", ":", "num_threads", "=", "64", "else", ":", "num_threads", "=", "data_reader", ".", "cpu_count", "(", ")", "if", "is_training", "else", "1", "data_dir", "=", "data_dir", "or", "(", "hasattr", "(", "hparams", ",", "\"data_dir\"", ")", "and", "hparams", ".", "data_dir", ")", "dataset_kwargs", "=", "dataset_kwargs", "or", "{", "}", "dataset_kwargs", ".", "update", "(", "{", "\"mode\"", ":", "mode", ",", "\"data_dir\"", ":", "data_dir", ",", "\"num_threads\"", ":", "num_threads", ",", "\"hparams\"", ":", "hparams", ",", "\"partition_id\"", ":", "partition_id", ",", "\"num_partitions\"", ":", "num_partitions", ",", "}", ")", "return", "data_reader", ".", "input_fn", "(", "self", ".", "dataset", "(", "*", "*", "dataset_kwargs", ")", ",", "self", ".", "filepattern", "(", "data_dir", ",", "mode", ")", ",", "self", ".", "skip_random_fraction_when_training", ",", "self", ".", "batch_size_means_tokens", ",", "self", ".", "get_hparams", "(", ")", ".", "batch_size_multiplier", ",", "self", ".", "max_length", "(", "hparams", ")", ",", "mode", ",", "hparams", ",", "data_dir", "=", "data_dir", ",", "params", "=", "params", ",", "config", "=", "config", ",", "force_repeat", "=", "force_repeat", ",", "prevent_repeat", "=", "prevent_repeat", ")" ]
Builds input pipeline for problem. Args: mode: tf.estimator.ModeKeys hparams: HParams, model hparams data_dir: str, data directory; if None, will use hparams.data_dir params: dict, may include "batch_size" config: RunConfig; should have the data_parallelism attribute if not using TPU force_repeat: bool, whether to repeat the data even if not training prevent_repeat: bool, whether to not repeat when in training mode. Overrides force_repeat. dataset_kwargs: dict, if passed, will pass as kwargs to self.dataset method when called Returns: (features_dict<str name, Tensor feature>, Tensor targets)
[ "Builds", "input", "pipeline", "for", "problem", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L830-L886
train
Builds input pipeline for problem.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IyS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BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(337 - 289) + '\x6f' + chr(0b1110 + 0o43) + '\062' + chr(51), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110110) + chr(0b110010), 27272 - 27264), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b110010) + chr(2057 - 2007), 13901 - 13893), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(51) + '\x31' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + chr(2403 - 2349) + chr(717 - 666), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + chr(1801 - 1750) + '\067', 0b1000), ehT0Px3KOsy9('\060' + chr(0b110 + 0o151) + '\x31' + chr(407 - 356) + chr(1836 - 1787), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + '\061' + chr(0b110100) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + chr(6686 - 6575) + '\x31' + chr(48) + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10101 + 0o35) + chr(1156 - 1104) + '\x31', 38608 - 38600), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110 + 0o55) + chr(0b110010) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(663 - 615) + chr(0b10 + 0o155) + chr(520 - 471) + chr(472 - 420) + '\065', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(258 - 208) + chr(0b110000) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1238 - 1190) + chr(111) + '\x32' + chr(0b1001 + 0o47) + chr(0b10011 + 0o42), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + chr(2628 - 2573) + chr(2313 - 2260), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b10101 + 0o132) + chr(0b110010) + chr(0b110010) + chr(2225 - 2175), 0b1000), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1011001 + 0o26) + chr(745 - 696) + chr(0b100011 + 0o22) + '\x37', 0b1000), ehT0Px3KOsy9(chr(1642 - 1594) + '\157' + chr(0b110001) + chr(0b110001) + chr(1934 - 1884), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b100101 + 0o112) + chr(49) + chr(0b110010) + chr(0b110001), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b10011 + 0o43) + chr(1770 - 1721), ord("\x08")), ehT0Px3KOsy9(chr(635 - 587) + chr(0b1101111) + chr(0b110011) + chr(0b110111) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(48) + chr(2390 - 2279) + chr(93 - 44) + '\x32' + chr(51), 8), ehT0Px3KOsy9('\x30' + chr(429 - 318) + chr(0b110001) + '\067' + '\065', 0o10), ehT0Px3KOsy9(chr(273 - 225) + chr(111) + chr(50) + chr(49) + '\067', 40562 - 40554), ehT0Px3KOsy9(chr(0b101111 + 0o1) + '\157' + '\064' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8923 - 8812) + '\063' + chr(0b10110 + 0o32) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b110101) + chr(0b100010 + 0o23), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(2288 - 2236) + '\067', 8), ehT0Px3KOsy9(chr(992 - 944) + chr(3154 - 3043) + '\062' + chr(2243 - 2193) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b100 + 0o60), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1 + 0o156) + chr(0b1000 + 0o52) + chr(50) + '\061', 62954 - 62946), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(50) + chr(49) + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\063' + chr(0b0 + 0o62) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\157' + chr(0b110 + 0o54) + chr(1441 - 1388) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(51) + '\063' + chr(2526 - 2472), 12971 - 12963), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101010 + 0o10) + chr(0b101000 + 0o11) + '\060', 46829 - 46821), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(0b10101 + 0o36) + chr(0b10011 + 0o42), 30333 - 30325), ehT0Px3KOsy9(chr(215 - 167) + '\x6f' + chr(0b110011) + chr(0b110010) + chr(906 - 855), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1001111 + 0o40) + chr(0b110101) + '\x30', 28468 - 28460)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'}'), chr(100) + '\x65' + chr(0b110000 + 0o63) + chr(6358 - 6247) + '\144' + chr(101))(chr(134 - 17) + chr(0b1110100) + chr(2779 - 2677) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def MVwQV4Upte2X(oVre8I6UXc3b, holLFgwB7vsP, n4ljua2gi1Pr, kVFRD544hi_1=None, nEbJZ4wfte2w=None, jAj7S20Ct06o=None, Q5HlHwWjWXJy=ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b1101111) + '\x30', ord("\x08")), kcD5_yICCeDt=ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(2280 - 2232), 8), Sa4GuE_apyvu=None): (yEGKPIAOGxSd, uriDfeyzD72A) = oVre8I6UXc3b._dataset_partition(holLFgwB7vsP, jAj7S20Ct06o, nEbJZ4wfte2w) XQJVi3cQFN5l = holLFgwB7vsP == IDJ2eXGCBCDu.estimator.ModeKeys.TRAIN if jAj7S20Ct06o and xafqLlk3kkUe(jAj7S20Ct06o, xafqLlk3kkUe(SXOLrMavuUCe(b'&A\xb7\x92\xc7\xef,'), chr(100) + '\x65' + chr(5316 - 5217) + chr(111) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + chr(0b101010 + 0o3) + chr(56))): pCw22JJnmDr0 = ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\060' + chr(0b10101 + 0o33), 0b1000) else: pCw22JJnmDr0 = oPPijFrlo4k2.cpu_count() if XQJVi3cQFN5l else ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001), 6812 - 6804) kVFRD544hi_1 = kVFRD544hi_1 or (lot1PSoAwYhj(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'7S\xa6\xac\xec\xfb0\x15'), chr(0b1100100) + '\145' + chr(3797 - 3698) + chr(111) + chr(0b111101 + 0o47) + '\x65')(chr(12716 - 12599) + chr(0b1110100) + chr(2584 - 2482) + '\x2d' + '\070')) and n4ljua2gi1Pr.kVFRD544hi_1) Sa4GuE_apyvu = Sa4GuE_apyvu or {} xafqLlk3kkUe(Sa4GuE_apyvu, xafqLlk3kkUe(SXOLrMavuUCe(b'\tF\x93\x88\xda\xd1\x13\t<\x95\xb3U'), chr(0b1010110 + 0o16) + '\145' + chr(0b100101 + 0o76) + chr(0b1101111) + '\x64' + '\145')(chr(5297 - 5180) + chr(116) + chr(0b1100110) + '\x2d' + '\x38'))({xafqLlk3kkUe(SXOLrMavuUCe(b'>]\xb6\xa8'), chr(236 - 136) + chr(101) + '\143' + chr(6670 - 6559) + chr(0b1001000 + 0o34) + chr(0b1000010 + 0o43))(chr(11421 - 11304) + '\164' + chr(0b1100110) + chr(0b11011 + 0o22) + '\x38'): holLFgwB7vsP, xafqLlk3kkUe(SXOLrMavuUCe(b'7S\xa6\xac\xec\xfb0\x15'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(10513 - 10402) + '\144' + chr(10061 - 9960))(chr(12249 - 12132) + chr(4533 - 4417) + '\146' + '\055' + chr(0b110011 + 0o5)): kVFRD544hi_1, xafqLlk3kkUe(SXOLrMavuUCe(b'=G\xbf\x92\xc7\xf7+\x02$\xc5\xa5'), '\x64' + '\x65' + chr(2597 - 2498) + chr(0b1001100 + 0o43) + chr(0b1010000 + 0o24) + '\145')(chr(0b1110000 + 0o5) + '\x74' + '\146' + chr(0b101101) + chr(56)): pCw22JJnmDr0, xafqLlk3kkUe(SXOLrMavuUCe(b';B\xb3\xbf\xd2\xf2*'), '\144' + chr(5739 - 5638) + '\143' + chr(111) + chr(100) + chr(0b10011 + 0o122))('\165' + chr(0b1110100) + '\x66' + chr(0b11 + 0o52) + '\070'): n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'#S\xa0\xb9\xda\xeb0\x08+\xfe\xbf\x01'), chr(0b1001111 + 0o25) + '\x65' + chr(2255 - 2156) + chr(111) + chr(0b100010 + 0o102) + '\x65')('\x75' + chr(0b1110100) + chr(0b10000 + 0o126) + '\055' + chr(3031 - 2975)): yEGKPIAOGxSd, xafqLlk3kkUe(SXOLrMavuUCe(b'=G\xbf\x92\xc3\xfe+\x13,\xd5\xbf\n\xe8\xf6'), '\144' + chr(8553 - 8452) + '\143' + '\x6f' + chr(100) + chr(5395 - 5294))('\x75' + chr(0b1110100) + chr(102) + chr(0b10000 + 0o35) + chr(0b101110 + 0o12)): uriDfeyzD72A}) return xafqLlk3kkUe(oPPijFrlo4k2, xafqLlk3kkUe(SXOLrMavuUCe(b':\\\xa2\xb8\xc7\xc0?\t'), '\144' + '\x65' + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\x75' + chr(0b1100011 + 0o21) + chr(102) + chr(1470 - 1425) + chr(1647 - 1591)))(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'7S\xa6\xac\xc0\xfa-'), chr(100) + '\145' + '\x63' + chr(111) + '\144' + '\145')(chr(0b1110001 + 0o4) + chr(0b11111 + 0o125) + chr(102) + '\055' + '\070'))(**Sa4GuE_apyvu), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'5[\xbe\xa8\xc3\xfe-\x13 \xd3\xb8'), '\144' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1010011 + 0o21) + chr(4753 - 4652))(chr(13105 - 12988) + '\164' + '\146' + '\x2d' + chr(56)))(kVFRD544hi_1, holLFgwB7vsP), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b' Y\xbb\xbd\xec\xed8\t!\xce\xbb:\xe0\xf7\\\xf1\x1b#>_\xa2$\x15\xeaL\x9er\x1f\x06\xfcr\xf8l\xe9'), chr(0b1100100) + chr(0b1011010 + 0o13) + '\143' + '\x6f' + chr(100) + '\x65')(chr(5362 - 5245) + '\x74' + '\146' + '\x2d' + chr(0b1101 + 0o53))), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'1S\xa6\xae\xdb\xc0*\x0e?\xc4\x89\x08\xe3\xe4S\xe10>>Z\x98=\x0e'), '\144' + chr(101) + chr(0b1100011) + '\x6f' + '\x64' + chr(1857 - 1756))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(0b10100 + 0o44))), xafqLlk3kkUe(oVre8I6UXc3b.get_hparams(), xafqLlk3kkUe(SXOLrMavuUCe(b'1S\xa6\xae\xdb\xc0*\x0e?\xc4\x89\x08\xf3\xe9I\xfb\x1f&8T\x8f'), chr(0b1100100) + '\145' + '\143' + chr(3052 - 2941) + chr(307 - 207) + '\145')(chr(117) + chr(0b1011010 + 0o32) + '\x66' + '\055' + '\x38')), xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c]\xe5\xbd\xe5\xc7\x18\x03\n\xe2\x84\x1c'), '\x64' + chr(1256 - 1155) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(269 - 224) + chr(3006 - 2950)))(n4ljua2gi1Pr), holLFgwB7vsP, n4ljua2gi1Pr, data_dir=kVFRD544hi_1, params=nEbJZ4wfte2w, config=jAj7S20Ct06o, force_repeat=Q5HlHwWjWXJy, prevent_repeat=kcD5_yICCeDt)
tensorflow/tensor2tensor
tensor2tensor/data_generators/problem.py
Problem.serving_input_fn
def serving_input_fn(self, hparams, decode_hparams=None, use_tpu=False): """Input fn for serving export, starting from serialized example.""" mode = tf.estimator.ModeKeys.PREDICT serialized_example = tf.placeholder( dtype=tf.string, shape=[None], name="serialized_example") dataset = tf.data.Dataset.from_tensor_slices(serialized_example) dataset = dataset.map(self.decode_example) dataset = dataset.map(lambda ex: self.preprocess_example(ex, mode, hparams)) dataset = dataset.map(data_reader.cast_ints_to_int32) if use_tpu: padded_shapes = data_reader.pad_for_tpu(dataset.output_shapes, hparams, hparams.max_length) batch_size = 1 if not decode_hparams else getattr(decode_hparams, "batch_size", 1) dataset = dataset.padded_batch( batch_size, padded_shapes, drop_remainder=False) dataset = dataset.map( functools.partial(data_reader.pad_batch, batch_multiple=batch_size)) else: dataset = dataset.padded_batch( tf.shape(serialized_example, out_type=tf.int64)[0], dataset.output_shapes) dataset = dataset.map(data_reader.standardize_shapes) features = tf.data.experimental.get_single_element(dataset) if self.has_inputs: features.pop("targets", None) return tf.estimator.export.ServingInputReceiver( features=features, receiver_tensors=serialized_example)
python
def serving_input_fn(self, hparams, decode_hparams=None, use_tpu=False): """Input fn for serving export, starting from serialized example.""" mode = tf.estimator.ModeKeys.PREDICT serialized_example = tf.placeholder( dtype=tf.string, shape=[None], name="serialized_example") dataset = tf.data.Dataset.from_tensor_slices(serialized_example) dataset = dataset.map(self.decode_example) dataset = dataset.map(lambda ex: self.preprocess_example(ex, mode, hparams)) dataset = dataset.map(data_reader.cast_ints_to_int32) if use_tpu: padded_shapes = data_reader.pad_for_tpu(dataset.output_shapes, hparams, hparams.max_length) batch_size = 1 if not decode_hparams else getattr(decode_hparams, "batch_size", 1) dataset = dataset.padded_batch( batch_size, padded_shapes, drop_remainder=False) dataset = dataset.map( functools.partial(data_reader.pad_batch, batch_multiple=batch_size)) else: dataset = dataset.padded_batch( tf.shape(serialized_example, out_type=tf.int64)[0], dataset.output_shapes) dataset = dataset.map(data_reader.standardize_shapes) features = tf.data.experimental.get_single_element(dataset) if self.has_inputs: features.pop("targets", None) return tf.estimator.export.ServingInputReceiver( features=features, receiver_tensors=serialized_example)
[ "def", "serving_input_fn", "(", "self", ",", "hparams", ",", "decode_hparams", "=", "None", ",", "use_tpu", "=", "False", ")", ":", "mode", "=", "tf", ".", "estimator", ".", "ModeKeys", ".", "PREDICT", "serialized_example", "=", "tf", ".", "placeholder", "(", "dtype", "=", "tf", ".", "string", ",", "shape", "=", "[", "None", "]", ",", "name", "=", "\"serialized_example\"", ")", "dataset", "=", "tf", ".", "data", ".", "Dataset", ".", "from_tensor_slices", "(", "serialized_example", ")", "dataset", "=", "dataset", ".", "map", "(", "self", ".", "decode_example", ")", "dataset", "=", "dataset", ".", "map", "(", "lambda", "ex", ":", "self", ".", "preprocess_example", "(", "ex", ",", "mode", ",", "hparams", ")", ")", "dataset", "=", "dataset", ".", "map", "(", "data_reader", ".", "cast_ints_to_int32", ")", "if", "use_tpu", ":", "padded_shapes", "=", "data_reader", ".", "pad_for_tpu", "(", "dataset", ".", "output_shapes", ",", "hparams", ",", "hparams", ".", "max_length", ")", "batch_size", "=", "1", "if", "not", "decode_hparams", "else", "getattr", "(", "decode_hparams", ",", "\"batch_size\"", ",", "1", ")", "dataset", "=", "dataset", ".", "padded_batch", "(", "batch_size", ",", "padded_shapes", ",", "drop_remainder", "=", "False", ")", "dataset", "=", "dataset", ".", "map", "(", "functools", ".", "partial", "(", "data_reader", ".", "pad_batch", ",", "batch_multiple", "=", "batch_size", ")", ")", "else", ":", "dataset", "=", "dataset", ".", "padded_batch", "(", "tf", ".", "shape", "(", "serialized_example", ",", "out_type", "=", "tf", ".", "int64", ")", "[", "0", "]", ",", "dataset", ".", "output_shapes", ")", "dataset", "=", "dataset", ".", "map", "(", "data_reader", ".", "standardize_shapes", ")", "features", "=", "tf", ".", "data", ".", "experimental", ".", "get_single_element", "(", "dataset", ")", "if", "self", ".", "has_inputs", ":", "features", ".", "pop", "(", "\"targets\"", ",", "None", ")", "return", "tf", ".", "estimator", ".", "export", ".", "ServingInputReceiver", "(", "features", "=", "features", ",", "receiver_tensors", "=", "serialized_example", ")" ]
Input fn for serving export, starting from serialized example.
[ "Input", "fn", "for", "serving", "export", "starting", "from", "serialized", "example", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/problem.py#L899-L930
train
Input fn for serving export starting from serialized example.
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,hr2Qa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OClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x33' + '\x36', 65309 - 65301), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101 + 0o56) + chr(0b110011 + 0o0) + chr(0b101001 + 0o12), 31713 - 31705), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b101010 + 0o105) + chr(0b100 + 0o57) + chr(0b110101) + '\x34', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(0b101100 + 0o12) + chr(0b110111), 51074 - 51066), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(2070 - 2020) + chr(0b110 + 0o57) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b10101 + 0o36) + chr(2450 - 2400) + chr(2149 - 2099), ord("\x08")), ehT0Px3KOsy9(chr(130 - 82) + chr(0b11010 + 0o125) + chr(233 - 180) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\157' + chr(595 - 546) + chr(2349 - 2299) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(7552 - 7441) + chr(1225 - 1176) + chr(0b110100) + chr(49), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101111 + 0o2) + '\065' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + '\x31' + '\060' + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11110 + 0o121) + chr(1785 - 1735) + '\x37' + chr(0b110000 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + chr(0b110001) + chr(0b101110 + 0o5) + '\067', 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(9931 - 9820) + '\066' + chr(551 - 498), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + '\x36' + chr(0b1 + 0o65), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(52) + chr(54), 21321 - 21313), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b11110 + 0o23) + chr(1062 - 1008) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(1031 - 980) + '\x33' + chr(400 - 352), 0o10), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + '\x32' + '\x37' + chr(664 - 610), 0b1000), ehT0Px3KOsy9(chr(1409 - 1361) + chr(111) + '\062' + '\063' + chr(0b10111 + 0o34), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + '\062' + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + '\x33' + '\067' + chr(1813 - 1765), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100010 + 0o21) + chr(0b110100) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(3965 - 3854) + chr(0b100 + 0o56) + '\065' + chr(48), 7678 - 7670), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(0b110000) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b110010) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b10111 + 0o31) + '\x6f' + chr(0b110011) + chr(0b110000), 25307 - 25299), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(426 - 377) + chr(52) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + '\157' + '\063' + chr(0b110000) + '\061', 59257 - 59249), ehT0Px3KOsy9(chr(495 - 447) + chr(0b1001100 + 0o43) + '\062' + '\066' + chr(2421 - 2370), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x36' + chr(2251 - 2202), 40842 - 40834), ehT0Px3KOsy9('\060' + chr(0b100101 + 0o112) + '\x31' + chr(1142 - 1089) + chr(877 - 826), 26106 - 26098), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x31' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(111) + chr(51) + chr(50) + '\x33', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x31' + chr(0b1 + 0o64) + '\066', 0b1000), ehT0Px3KOsy9(chr(989 - 941) + '\157' + chr(2036 - 1987) + chr(1903 - 1855) + chr(0b111 + 0o53), 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x36' + '\066', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b1101111) + '\065' + chr(48), 52704 - 52696)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'p'), chr(100) + chr(0b1010101 + 0o20) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1 + 0o144))(chr(0b1010 + 0o153) + '\x74' + chr(4290 - 4188) + chr(45) + chr(1801 - 1745)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ghrSKrw_4z3G(oVre8I6UXc3b, n4ljua2gi1Pr, LrQSWg3uwmK8=None, L4eE7kczIJwa=ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(1861 - 1813), 45133 - 45125)): holLFgwB7vsP = IDJ2eXGCBCDu.estimator.ModeKeys.PREDICT dP29lsCkOGW4 = IDJ2eXGCBCDu.placeholder(dtype=IDJ2eXGCBCDu.string, shape=[None], name=xafqLlk3kkUe(SXOLrMavuUCe(b'-\xbe\x9e^\xce\xbe@*\x04\rT"k\xd92Eh\x13'), '\x64' + chr(0b10011 + 0o122) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b101011 + 0o111) + chr(0b1100110) + chr(0b101101) + '\x38')) xQt6gV9VfTO3 = IDJ2eXGCBCDu.data.Dataset.from_tensor_slices(dP29lsCkOGW4) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(oVre8I6UXc3b.decode_example) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(lambda DfdhY28yEwAF: oVre8I6UXc3b.preprocess_example(DfdhY28yEwAF, holLFgwB7vsP, n4ljua2gi1Pr)) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(oPPijFrlo4k2.cast_ints_to_int32) if L4eE7kczIJwa: HI4hZPL6gW9O = oPPijFrlo4k2.pad_for_tpu(xQt6gV9VfTO3.output_shapes, n4ljua2gi1Pr, n4ljua2gi1Pr._o7pVXAdOCRy) ix9dZyeAmUxY = ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(0b110001), 29472 - 29464) if not LrQSWg3uwmK8 else xafqLlk3kkUe(LrQSWg3uwmK8, xafqLlk3kkUe(SXOLrMavuUCe(b'<\xba\x98T\xc7\x8dZ9\x1b\x0c'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(6317 - 6217) + chr(101))(chr(0b1101011 + 0o12) + chr(0b1110100) + chr(0b11101 + 0o111) + '\x2d' + chr(2426 - 2370)), ehT0Px3KOsy9('\060' + chr(111) + chr(49), 8)) xQt6gV9VfTO3 = xQt6gV9VfTO3.padded_batch(ix9dZyeAmUxY, HI4hZPL6gW9O, drop_remainder=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b100011 + 0o15), 8)) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(E6ula8_Zv1yl.partial(oPPijFrlo4k2.pad_batch, batch_multiple=ix9dZyeAmUxY)) else: xQt6gV9VfTO3 = xQt6gV9VfTO3.padded_batch(IDJ2eXGCBCDu.nauYfLglTpcb(dP29lsCkOGW4, out_type=IDJ2eXGCBCDu.int64)[ehT0Px3KOsy9('\x30' + chr(111) + '\x30', 8)], xQt6gV9VfTO3.output_shapes) xQt6gV9VfTO3 = xQt6gV9VfTO3.map(oPPijFrlo4k2.standardize_shapes) EEf4r9nUvta_ = IDJ2eXGCBCDu.data.experimental.get_single_element(xQt6gV9VfTO3) if xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'6\xba\x9fh\xc6\xbcY%\x15\x1a'), chr(0b1100100) + chr(101) + chr(2650 - 2551) + chr(0b1101111) + chr(5872 - 5772) + '\x65')('\165' + chr(3162 - 3046) + '\x66' + '\x2d' + '\x38')): xafqLlk3kkUe(EEf4r9nUvta_, xafqLlk3kkUe(SXOLrMavuUCe(b'.\xb4\x9c'), chr(0b1111 + 0o125) + chr(6303 - 6202) + chr(0b1100011) + chr(0b11001 + 0o126) + chr(0b1100100) + chr(636 - 535))(chr(13279 - 13162) + '\x74' + chr(0b111101 + 0o51) + chr(77 - 32) + chr(1583 - 1527)))(xafqLlk3kkUe(SXOLrMavuUCe(b'*\xba\x9eP\xca\xa6Z'), chr(0b1100100) + '\145' + chr(99) + chr(0b101100 + 0o103) + chr(100) + chr(4651 - 4550))(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(0b11101 + 0o33)), None) return xafqLlk3kkUe(IDJ2eXGCBCDu.estimator.export, xafqLlk3kkUe(SXOLrMavuUCe(b'\r\xbe\x9eA\xc6\xbcN\x19\x0f\x19~3A\xdd<Pm\x00\x03\x07'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1001010 + 0o32) + chr(0b1011 + 0o132))(chr(0b1011 + 0o152) + chr(0b1011101 + 0o27) + chr(0b1101 + 0o131) + chr(0b100101 + 0o10) + '\x38'))(features=EEf4r9nUvta_, receiver_tensors=dP29lsCkOGW4)
tensorflow/tensor2tensor
tensor2tensor/serving/export.py
_get_hparams_path
def _get_hparams_path(): """Get hyper-parameters file path.""" hparams_path = None if FLAGS.output_dir: hparams_path = os.path.join(FLAGS.output_dir, "hparams.json") else: tf.logging.warning( "--output_dir not specified. Hyper-parameters will be infered from" "--hparams_set and --hparams only. These may not match training time" "hyper-parameters.") return hparams_path
python
def _get_hparams_path(): """Get hyper-parameters file path.""" hparams_path = None if FLAGS.output_dir: hparams_path = os.path.join(FLAGS.output_dir, "hparams.json") else: tf.logging.warning( "--output_dir not specified. Hyper-parameters will be infered from" "--hparams_set and --hparams only. These may not match training time" "hyper-parameters.") return hparams_path
[ "def", "_get_hparams_path", "(", ")", ":", "hparams_path", "=", "None", "if", "FLAGS", ".", "output_dir", ":", "hparams_path", "=", "os", ".", "path", ".", "join", "(", "FLAGS", ".", "output_dir", ",", "\"hparams.json\"", ")", "else", ":", "tf", ".", "logging", ".", "warning", "(", "\"--output_dir not specified. Hyper-parameters will be infered from\"", "\"--hparams_set and --hparams only. These may not match training time\"", "\"hyper-parameters.\"", ")", "return", "hparams_path" ]
Get hyper-parameters file path.
[ "Get", "hyper", "-", "parameters", "file", "path", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/serving/export.py#L47-L57
train
Get hyper - parameters file path.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6r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,QC9iu2kLpS8s,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(48) + chr(0b1101111) + chr(0b11 + 0o56) + chr(1173 - 1118) + '\065', 0b1000), ehT0Px3KOsy9(chr(97 - 49) + '\157' + '\063' + chr(1695 - 1645), 0b1000), ehT0Px3KOsy9('\x30' + chr(7853 - 7742) + '\x32' + '\x32' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(10616 - 10505) + chr(0b110001) + chr(0b110001) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100011 + 0o14) + chr(707 - 657) + chr(0b100110 + 0o13) + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + '\067' + chr(0b100101 + 0o13), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000110 + 0o51) + chr(51) + chr(0b110000) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(111) + chr(0b11000 + 0o32) + '\062' + chr(163 - 115), ord("\x08")), ehT0Px3KOsy9(chr(981 - 933) + chr(0b1101010 + 0o5) + chr(0b110011) + '\065' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\061' + chr(1967 - 1914), 8), ehT0Px3KOsy9(chr(2038 - 1990) + '\x6f' + '\x33' + chr(2575 - 2523) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(54) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110101) + chr(0b110011), 17609 - 17601), ehT0Px3KOsy9(chr(2219 - 2171) + chr(0b1010101 + 0o32) + chr(49) + chr(1599 - 1549) + chr(423 - 369), 0o10), ehT0Px3KOsy9(chr(1566 - 1518) + '\157' + chr(0b110011) + chr(0b11100 + 0o31) + chr(0b1100 + 0o53), ord("\x08")), ehT0Px3KOsy9(chr(638 - 590) + chr(0b1101111) + chr(0b110000 + 0o1) + chr(0b110001) + chr(0b10011 + 0o44), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x32' + '\x34' + '\x33', 0o10), ehT0Px3KOsy9(chr(2019 - 1971) + chr(0b110001 + 0o76) + chr(0b110010) + '\067' + '\063', 29849 - 29841), ehT0Px3KOsy9('\x30' + chr(0b1010000 + 0o37) + chr(0b10000 + 0o43) + chr(1859 - 1810) + chr(0b101111 + 0o3), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b100010 + 0o115) + '\062' + '\060' + '\062', 23951 - 23943), ehT0Px3KOsy9('\x30' + chr(2374 - 2263) + '\x31' + chr(1690 - 1640) + '\x30', 0b1000), ehT0Px3KOsy9('\060' + chr(0b11001 + 0o126) + chr(49) + chr(0b100 + 0o55) + chr(48), 10213 - 10205), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1101111) + chr(778 - 724) + '\x30', 64420 - 64412), ehT0Px3KOsy9(chr(0b110000) + chr(4655 - 4544) + chr(853 - 799) + chr(54), 0b1000), ehT0Px3KOsy9(chr(902 - 854) + chr(0b1000001 + 0o56) + chr(0b1 + 0o63), 41744 - 41736), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b1100 + 0o46) + chr(0b101010 + 0o13) + chr(50), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(0b110010) + chr(0b101011 + 0o13) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(2060 - 2012) + '\x6f' + chr(0b1100 + 0o45) + '\x30' + chr(0b10100 + 0o34), 16308 - 16300), ehT0Px3KOsy9(chr(48) + chr(3393 - 3282) + chr(0b110010) + '\x37' + chr(0b110011 + 0o4), 0o10), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(641 - 588) + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + '\x31' + chr(1362 - 1310) + chr(0b100101 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b110110), 3541 - 3533), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000100 + 0o53) + chr(0b110010) + chr(0b111 + 0o54) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(209 - 161) + chr(0b1101111) + chr(2399 - 2345) + '\062', 44631 - 44623), ehT0Px3KOsy9('\x30' + chr(0b10100 + 0o133) + chr(0b110 + 0o53) + chr(50) + chr(1701 - 1646), 0b1000), ehT0Px3KOsy9('\x30' + chr(7150 - 7039) + '\x32' + chr(0b110101) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9290 - 9179) + chr(214 - 164) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\x30' + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b10111 + 0o37) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\064' + chr(0b110100), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + 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'S'), chr(5575 - 5475) + chr(0b111011 + 0o52) + '\x63' + '\x6f' + chr(0b1010110 + 0o16) + chr(0b11111 + 0o106))(chr(0b1100100 + 0o21) + chr(4219 - 4103) + chr(0b1010110 + 0o20) + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def k3tV7rubkE1d(): TNoWNk9tqizq = None if xafqLlk3kkUe(vUTZFbqN0o8F, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12o\xe6>\xf8\x8c\x9c\xf4\x81\xff'), chr(100) + chr(1288 - 1187) + '\143' + '\157' + chr(0b10 + 0o142) + chr(0b1000000 + 0o45))('\165' + chr(0b1110010 + 0o2) + chr(102) + '\055' + chr(587 - 531))): TNoWNk9tqizq = oqhJDdMJfuwx.path.join(vUTZFbqN0o8F.output_dir, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15j\xf3<\xec\x95\xb0\xbe\x82\xfe\x8f\x1e'), chr(5841 - 5741) + chr(8656 - 8555) + chr(0b1100011) + '\157' + chr(5425 - 5325) + chr(0b1000010 + 0o43))(chr(0b1110101) + chr(10641 - 10525) + '\146' + chr(0b101101) + chr(2484 - 2428))) else: xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\n{\xe0 \xe4\x96\xa4'), chr(0b1011000 + 0o14) + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(1780 - 1678) + chr(1628 - 1583) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'P7\xfd;\xf9\x88\xb6\xe4\xb7\xe9\x89\x02K8\x80;\x83\xc8\xba\xe73!V_a\xce\x98`\xf7T\x11k\xed\x1f\'\xccb\xa6\x1a\x01\t\x7f\xe0=\xad\x8f\xaa\xfc\x84\xad\x82\x15K?\x81)\xc6\xc9\xaf\xe6p.BYi\x87\x9b(\xcfL\x13o\xf2A\x08\xdeu\xb3W\x05\x13~\xb2c\xa0\x90\xb3\xf1\x9a\xec\x8d\x03K9\x81#\xda\x95\xea\xd68-CS$\xc7\xd79\x9fC\x0ez\xbf_6\xd9s\xafW\x10\x0f{\xfb \xe4\x96\xa4\xb0\x9c\xe4\x8d\x15\x03/\x9f*\xd1\x96\xba\xe3")]Sp\xcf\xc43\x91'), chr(0b1100100) + '\x65' + chr(1677 - 1578) + '\157' + chr(0b1001110 + 0o26) + chr(101))(chr(0b1000000 + 0o65) + chr(10786 - 10670) + '\x66' + chr(0b100110 + 0o7) + chr(0b11111 + 0o31))) return TNoWNk9tqizq
tensorflow/tensor2tensor
tensor2tensor/serving/export.py
export_module_spec_with_checkpoint
def export_module_spec_with_checkpoint(module_spec, checkpoint_path, export_path, scope_prefix=""): """Exports given checkpoint as tfhub module with given spec.""" # The main requirement is that it is possible to know how to map from # module variable name to checkpoint variable name. # This is trivial if the original code used variable scopes, # but can be messy if the variables to export are interwined # with variables not export. with tf.Graph().as_default(): m = hub.Module(module_spec) assign_map = { scope_prefix + name: value for name, value in m.variable_map.items() } tf.train.init_from_checkpoint(checkpoint_path, assign_map) init_op = tf.initializers.global_variables() with tf.Session() as session: session.run(init_op) m.export(export_path, session)
python
def export_module_spec_with_checkpoint(module_spec, checkpoint_path, export_path, scope_prefix=""): """Exports given checkpoint as tfhub module with given spec.""" # The main requirement is that it is possible to know how to map from # module variable name to checkpoint variable name. # This is trivial if the original code used variable scopes, # but can be messy if the variables to export are interwined # with variables not export. with tf.Graph().as_default(): m = hub.Module(module_spec) assign_map = { scope_prefix + name: value for name, value in m.variable_map.items() } tf.train.init_from_checkpoint(checkpoint_path, assign_map) init_op = tf.initializers.global_variables() with tf.Session() as session: session.run(init_op) m.export(export_path, session)
[ "def", "export_module_spec_with_checkpoint", "(", "module_spec", ",", "checkpoint_path", ",", "export_path", ",", "scope_prefix", "=", "\"\"", ")", ":", "# The main requirement is that it is possible to know how to map from", "# module variable name to checkpoint variable name.", "# This is trivial if the original code used variable scopes,", "# but can be messy if the variables to export are interwined", "# with variables not export.", "with", "tf", ".", "Graph", "(", ")", ".", "as_default", "(", ")", ":", "m", "=", "hub", ".", "Module", "(", "module_spec", ")", "assign_map", "=", "{", "scope_prefix", "+", "name", ":", "value", "for", "name", ",", "value", "in", "m", ".", "variable_map", ".", "items", "(", ")", "}", "tf", ".", "train", ".", "init_from_checkpoint", "(", "checkpoint_path", ",", "assign_map", ")", "init_op", "=", "tf", ".", "initializers", ".", "global_variables", "(", ")", "with", "tf", ".", "Session", "(", ")", "as", "session", ":", "session", ".", "run", "(", "init_op", ")", "m", ".", "export", "(", "export_path", ",", "session", ")" ]
Exports given checkpoint as tfhub module with given spec.
[ "Exports", "given", "checkpoint", "as", "tfhub", "module", "with", "given", "spec", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/serving/export.py#L80-L100
train
Exports given checkpoint as tfhub module with given spec.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3t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BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(423 - 312) + '\x33' + chr(52) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(296 - 248) + chr(111) + chr(0b110001) + chr(0b10000 + 0o43) + chr(0b1 + 0o61), 0o10), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(49) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(2025 - 1976) + '\x34' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110100) + chr(0b110011), 53591 - 53583), ehT0Px3KOsy9(chr(993 - 945) + chr(111) + chr(50) + chr(0b101100 + 0o11) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110111) + chr(0b101001 + 0o15), 7319 - 7311), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + '\x31' + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(50) + chr(49) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(0b10010 + 0o42) + chr(1382 - 1334), 57354 - 57346), ehT0Px3KOsy9('\060' + chr(0b1000 + 0o147) + '\x32' + '\x30' + chr(1112 - 1061), 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + '\x31' + chr(54) + '\065', 0b1000), ehT0Px3KOsy9('\060' + chr(0b101001 + 0o106) + chr(385 - 334) + chr(2716 - 2662) + '\x33', 29368 - 29360), ehT0Px3KOsy9(chr(48) + chr(0b1100001 + 0o16) + chr(49) + chr(0b110100) + chr(0b111 + 0o53), 8), ehT0Px3KOsy9('\060' + chr(111) + '\066' + chr(1379 - 1326), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(386 - 335) + chr(53) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110101 + 0o72) + chr(0b110011) + '\x32' + chr(0b1 + 0o62), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(51) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + chr(930 - 879) + chr(0b1011 + 0o50), 11359 - 11351), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\157' + '\x33' + '\x37' + chr(48), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(55) + chr(138 - 90), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(225 - 174) + chr(0b10011 + 0o36) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11011 + 0o27) + '\067' + chr(0b110 + 0o61), 53600 - 53592), ehT0Px3KOsy9('\x30' + chr(4208 - 4097) + chr(51) + chr(2007 - 1955), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\064' + chr(0b110010), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(1210 - 1160) + chr(0b10011 + 0o36) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(2039 - 1991) + '\x6f' + '\061' + chr(0b100000 + 0o20) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(0b100011 + 0o15) + chr(0b1110 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(141 - 93) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1475 - 1427) + chr(6848 - 6737) + chr(0b110011) + '\063' + chr(0b10110 + 0o33), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110101) + chr(48), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(0b110001) + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(50), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1011000 + 0o27) + '\063' + chr(0b1 + 0o62) + '\063', 0b1000), ehT0Px3KOsy9('\060' + chr(0b10100 + 0o133) + '\061' + '\063' + '\x30', 10831 - 10823), ehT0Px3KOsy9(chr(846 - 798) + chr(5371 - 5260) + chr(0b110010) + chr(1039 - 985) + chr(1730 - 1675), 0o10), ehT0Px3KOsy9(chr(48) + chr(1259 - 1148) + chr(0b110001) + chr(0b11010 + 0o31), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b110110) + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b101000 + 0o12) + chr(0b110110), 30796 - 30788)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + '\157' + '\065' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xce'), chr(0b1010101 + 0o17) + chr(0b1011011 + 0o12) + chr(0b101010 + 0o71) + chr(0b10011 + 0o134) + '\x64' + '\145')('\x75' + chr(11256 - 11140) + chr(0b1010110 + 0o20) + chr(896 - 851) + chr(0b101111 + 0o11)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def iQSuX63BBUeJ(fbKK9ZfOGYAI, lbKq88EBpYWb, YPHrLWG7fTuj, qIzCQVoWrDTz=xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b110011 + 0o61) + chr(101) + chr(5214 - 5115) + chr(268 - 157) + chr(100) + '\x65')(chr(0b1110101) + chr(0b10 + 0o162) + chr(8937 - 8835) + chr(45) + chr(56))): with xafqLlk3kkUe(IDJ2eXGCBCDu.Graph(), xafqLlk3kkUe(SXOLrMavuUCe(b'\x81)T\x06\x06\xc8_\xfa\xe6T'), chr(5377 - 5277) + chr(8135 - 8034) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1101 + 0o130))(chr(0b1000100 + 0o61) + chr(7744 - 7628) + '\x66' + chr(45) + chr(1037 - 981)))(): r8ufID9JCHnI = hW5pZqnvrwUb.Module(fbKK9ZfOGYAI) SsGJJTP9SrBo = {qIzCQVoWrDTz + AIvJRzLdDfgF: QmmgWUB13VCJ for (AIvJRzLdDfgF, QmmgWUB13VCJ) in r8ufID9JCHnI.variable_map.NzveIZ3IlSH9()} xafqLlk3kkUe(IDJ2eXGCBCDu.train, xafqLlk3kkUe(SXOLrMavuUCe(b'\x894b\x16<\xc8L\xe0\xe7\x7f\xe0\x1d\x96\x01^\x98\xbc\xf4\xf5\x8c'), '\144' + chr(0b1100101) + chr(99) + chr(0b101 + 0o152) + '\x64' + '\145')(chr(117) + chr(0b1110100 + 0o0) + '\x66' + '\055' + chr(116 - 60)))(lbKq88EBpYWb, SsGJJTP9SrBo) ywTyoxUDdzWN = IDJ2eXGCBCDu.initializers.global_variables() with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3?x\x11\n\xc1P'), chr(0b1100100) + chr(1772 - 1671) + '\x63' + chr(4450 - 4339) + chr(100) + chr(0b1100101))('\x75' + chr(0b1101011 + 0o11) + '\x66' + '\x2d' + chr(0b100111 + 0o21)))() as Q4vuWJRZ65bC: xafqLlk3kkUe(Q4vuWJRZ65bC, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93=\x7fW!\xfb\x08\xbe\xe8W\xd9G'), chr(9997 - 9897) + '\145' + '\x63' + chr(0b1 + 0o156) + chr(0b1000100 + 0o40) + chr(101))(chr(10950 - 10833) + chr(0b1110001 + 0o3) + '\146' + '\x2d' + chr(56)))(ywTyoxUDdzWN) xafqLlk3kkUe(r8ufID9JCHnI, xafqLlk3kkUe(SXOLrMavuUCe(b'\x85"{\r\x11\xda'), chr(9140 - 9040) + chr(101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(0b110000 + 0o105) + chr(0b1000000 + 0o64) + chr(102) + '\x2d' + chr(0b111000)))(YPHrLWG7fTuj, Q4vuWJRZ65bC)
tensorflow/tensor2tensor
tensor2tensor/serving/export.py
export_as_tfhub_module
def export_as_tfhub_module(model_name, hparams, decode_hparams, problem, checkpoint_path, export_dir): """Exports the last checkpoint from the directory as tfhub module. It creates the Module spec and signature (based on T2T problem information), which is later used to create and export the hub module. Module will be saved inside the ckpt_dir. Args: model_name: name of the model to be exported. hparams: T2T parameters, model graph will be based on them. decode_hparams: T2T parameters for decoding. problem: the name of the problem checkpoint_path: path to the checkpoint to be exported. export_dir: Directory to write the exported model to. """ def hub_module_fn(): """Creates the TF graph for the hub module.""" model_fn = t2t_model.T2TModel.make_estimator_model_fn( model_name, hparams, decode_hparams=decode_hparams, use_tpu=FLAGS.use_tpu) features = problem.serving_input_fn( hparams, decode_hparams, use_tpu=FLAGS.use_tpu).features # we must do a copy of the features, as the model_fn can add additional # entries there (like hyperparameter settings etc). original_features = features.copy() spec = model_fn(features, labels=None, mode=tf.estimator.ModeKeys.PREDICT) hub.add_signature( inputs=original_features, outputs=spec.export_outputs["serving_default"].outputs) # TFHub doesn't support the following collections. drop_collections = [tf.GraphKeys.LOSSES, tf.GraphKeys.SUMMARIES, tf.GraphKeys.LOCAL_VARIABLES] module_spec = hub.create_module_spec( hub_module_fn, drop_collections=drop_collections) # Loads the weights from the checkpoint using the model above # and saves it in the export_path. export_module_spec_with_checkpoint( module_spec, checkpoint_path=checkpoint_path, export_path=export_dir, scope_prefix="")
python
def export_as_tfhub_module(model_name, hparams, decode_hparams, problem, checkpoint_path, export_dir): """Exports the last checkpoint from the directory as tfhub module. It creates the Module spec and signature (based on T2T problem information), which is later used to create and export the hub module. Module will be saved inside the ckpt_dir. Args: model_name: name of the model to be exported. hparams: T2T parameters, model graph will be based on them. decode_hparams: T2T parameters for decoding. problem: the name of the problem checkpoint_path: path to the checkpoint to be exported. export_dir: Directory to write the exported model to. """ def hub_module_fn(): """Creates the TF graph for the hub module.""" model_fn = t2t_model.T2TModel.make_estimator_model_fn( model_name, hparams, decode_hparams=decode_hparams, use_tpu=FLAGS.use_tpu) features = problem.serving_input_fn( hparams, decode_hparams, use_tpu=FLAGS.use_tpu).features # we must do a copy of the features, as the model_fn can add additional # entries there (like hyperparameter settings etc). original_features = features.copy() spec = model_fn(features, labels=None, mode=tf.estimator.ModeKeys.PREDICT) hub.add_signature( inputs=original_features, outputs=spec.export_outputs["serving_default"].outputs) # TFHub doesn't support the following collections. drop_collections = [tf.GraphKeys.LOSSES, tf.GraphKeys.SUMMARIES, tf.GraphKeys.LOCAL_VARIABLES] module_spec = hub.create_module_spec( hub_module_fn, drop_collections=drop_collections) # Loads the weights from the checkpoint using the model above # and saves it in the export_path. export_module_spec_with_checkpoint( module_spec, checkpoint_path=checkpoint_path, export_path=export_dir, scope_prefix="")
[ "def", "export_as_tfhub_module", "(", "model_name", ",", "hparams", ",", "decode_hparams", ",", "problem", ",", "checkpoint_path", ",", "export_dir", ")", ":", "def", "hub_module_fn", "(", ")", ":", "\"\"\"Creates the TF graph for the hub module.\"\"\"", "model_fn", "=", "t2t_model", ".", "T2TModel", ".", "make_estimator_model_fn", "(", "model_name", ",", "hparams", ",", "decode_hparams", "=", "decode_hparams", ",", "use_tpu", "=", "FLAGS", ".", "use_tpu", ")", "features", "=", "problem", ".", "serving_input_fn", "(", "hparams", ",", "decode_hparams", ",", "use_tpu", "=", "FLAGS", ".", "use_tpu", ")", ".", "features", "# we must do a copy of the features, as the model_fn can add additional", "# entries there (like hyperparameter settings etc).", "original_features", "=", "features", ".", "copy", "(", ")", "spec", "=", "model_fn", "(", "features", ",", "labels", "=", "None", ",", "mode", "=", "tf", ".", "estimator", ".", "ModeKeys", ".", "PREDICT", ")", "hub", ".", "add_signature", "(", "inputs", "=", "original_features", ",", "outputs", "=", "spec", ".", "export_outputs", "[", "\"serving_default\"", "]", ".", "outputs", ")", "# TFHub doesn't support the following collections.", "drop_collections", "=", "[", "tf", ".", "GraphKeys", ".", "LOSSES", ",", "tf", ".", "GraphKeys", ".", "SUMMARIES", ",", "tf", ".", "GraphKeys", ".", "LOCAL_VARIABLES", "]", "module_spec", "=", "hub", ".", "create_module_spec", "(", "hub_module_fn", ",", "drop_collections", "=", "drop_collections", ")", "# Loads the weights from the checkpoint using the model above", "# and saves it in the export_path.", "export_module_spec_with_checkpoint", "(", "module_spec", ",", "checkpoint_path", "=", "checkpoint_path", ",", "export_path", "=", "export_dir", ",", "scope_prefix", "=", "\"\"", ")" ]
Exports the last checkpoint from the directory as tfhub module. It creates the Module spec and signature (based on T2T problem information), which is later used to create and export the hub module. Module will be saved inside the ckpt_dir. Args: model_name: name of the model to be exported. hparams: T2T parameters, model graph will be based on them. decode_hparams: T2T parameters for decoding. problem: the name of the problem checkpoint_path: path to the checkpoint to be exported. export_dir: Directory to write the exported model to.
[ "Exports", "the", "last", "checkpoint", "from", "the", "directory", "as", "tfhub", "module", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/serving/export.py#L103-L154
train
Exports the last checkpoint from the directory as tfhub module.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,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GD68sBIs,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(1185 - 1135) + '\x34' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1100101 + 0o12) + chr(0b110001) + chr(954 - 904) + '\064', 62763 - 62755), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + chr(52) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(486 - 436) + '\x35' + chr(0b110000), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b110101) + chr(869 - 817), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b100100 + 0o16) + chr(985 - 935) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1100 + 0o47) + '\061', 0o10), ehT0Px3KOsy9(chr(1836 - 1788) + chr(0b100011 + 0o114) + '\063' + chr(1584 - 1535), 8), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1000 + 0o147) + chr(52) + chr(1517 - 1469), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(53) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b1111 + 0o42) + chr(0b110000) + '\x32', 56696 - 56688), ehT0Px3KOsy9('\060' + chr(0b10110 + 0o131) + '\061' + '\x37' + '\x34', 10684 - 10676), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11010 + 0o31) + chr(0b110001) + chr(51), 23823 - 23815), ehT0Px3KOsy9(chr(1338 - 1290) + chr(0b101001 + 0o106) + chr(0b10001 + 0o42) + '\x37' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + '\060' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + '\061' + chr(0b110000) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\066', 55628 - 55620), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\065' + chr(1413 - 1358), 0b1000), ehT0Px3KOsy9(chr(1936 - 1888) + chr(0b1101001 + 0o6) + chr(487 - 438) + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\067' + chr(0b10001 + 0o45), 52030 - 52022), ehT0Px3KOsy9(chr(48) + chr(7493 - 7382) + chr(50) + chr(1517 - 1467) + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1653 - 1604) + chr(0b110111) + '\060', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\064' + chr(0b110111), 53270 - 53262), ehT0Px3KOsy9(chr(0b110000) + chr(8752 - 8641) + chr(1116 - 1067) + '\062' + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(1431 - 1320) + chr(0b110001) + chr(0b110011) + chr(0b10001 + 0o37), 16969 - 16961), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b100101 + 0o112) + chr(51) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1650 - 1539) + chr(0b101100 + 0o7) + chr(51) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b100010 + 0o115) + '\x31' + chr(0b110100) + chr(1802 - 1753), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110010) + '\063', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b111101 + 0o62) + '\x33' + chr(0b10110 + 0o36) + chr(1271 - 1221), 40847 - 40839), ehT0Px3KOsy9(chr(1235 - 1187) + '\157' + '\x33' + chr(48) + chr(2416 - 2364), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\x6f' + chr(52) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(4317 - 4206) + chr(309 - 260) + chr(0b110000 + 0o0) + chr(0b101101 + 0o10), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x37' + chr(0b101101 + 0o11), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b100100 + 0o17) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + chr(4435 - 4324) + chr(0b110010) + chr(0b1100 + 0o51) + chr(0b101 + 0o62), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\060' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(455 - 407) + chr(111) + chr(53) + chr(0b10010 + 0o44), 5340 - 5332), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b101 + 0o54) + chr(0b110101) + chr(270 - 220), 48217 - 48209), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(2493 - 2382) + '\x31' + chr(0b110001) + chr(1804 - 1751), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(53) + '\060', 43028 - 43020)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x8a'), chr(0b1100100) + chr(558 - 457) + '\143' + chr(0b100010 + 0o115) + chr(0b110001 + 0o63) + '\x65')(chr(0b1110101) + '\x74' + chr(0b1100110) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ZupTHNV5xq7a(yJFe33rl9i_r, n4ljua2gi1Pr, LrQSWg3uwmK8, sO7e1A_Mor6Q, lbKq88EBpYWb, Y_BbzujYEx9L): def QE4XYXaEg9Yj(): zXZmJGZDQ0u3 = BeAyCOlpGTfm.T2TModel.make_estimator_model_fn(yJFe33rl9i_r, n4ljua2gi1Pr, decode_hparams=LrQSWg3uwmK8, use_tpu=vUTZFbqN0o8F.use_tpu) EEf4r9nUvta_ = sO7e1A_Mor6Q.serving_input_fn(n4ljua2gi1Pr, LrQSWg3uwmK8, use_tpu=vUTZFbqN0o8F.use_tpu).features Ptf0JPhZX9xV = EEf4r9nUvta_.igThHS4jwVsa() IH4wfF5htxM9 = zXZmJGZDQ0u3(EEf4r9nUvta_, labels=None, mode=IDJ2eXGCBCDu.estimator.ModeKeys.PREDICT) xafqLlk3kkUe(hW5pZqnvrwUb, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc50A\xf7\x1f\xfb~wA[7\x0e\xae'), '\144' + chr(101) + '\143' + '\x6f' + chr(0b100110 + 0o76) + '\x65')(chr(0b1110101) + chr(9336 - 9220) + '\x66' + chr(0b101101) + chr(2689 - 2633)))(inputs=Ptf0JPhZX9xV, outputs=xafqLlk3kkUe(IH4wfF5htxM9.export_outputs[xafqLlk3kkUe(SXOLrMavuUCe(b'\xd71W\xde\x05\xfc~FDJ$\x1d\xbe\x97\xf3'), chr(0b1001011 + 0o31) + '\145' + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b1100111 + 0o16) + '\x74' + chr(6686 - 6584) + chr(45) + '\070')], xafqLlk3kkUe(SXOLrMavuUCe(b'\xe0,z\xec\x00\xfeC!Ul)\x13'), chr(0b1100100) + chr(7096 - 6995) + '\x63' + chr(5602 - 5491) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)))) PQV7MixlWmnZ = [IDJ2eXGCBCDu.GraphKeys.LOSSES, IDJ2eXGCBCDu.GraphKeys.SUMMARIES, IDJ2eXGCBCDu.GraphKeys.LOCAL_VARIABLES] fbKK9ZfOGYAI = hW5pZqnvrwUb.create_module_spec(QE4XYXaEg9Yj, drop_collections=PQV7MixlWmnZ) iQSuX63BBUeJ(fbKK9ZfOGYAI, checkpoint_path=lbKq88EBpYWb, export_path=Y_BbzujYEx9L, scope_prefix=xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(0b111000 + 0o54) + chr(0b1100101) + chr(99) + '\157' + '\144' + chr(0b11000 + 0o115))(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(102) + chr(45) + '\070'))
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
build_model
def build_model(hparams_set, model_name, data_dir, problem_name, beam_size=1): """Build the graph required to fetch the attention weights. Args: hparams_set: HParams set to build the model with. model_name: Name of model. data_dir: Path to directory containing training data. problem_name: Name of problem. beam_size: (Optional) Number of beams to use when decoding a translation. If set to 1 (default) then greedy decoding is used. Returns: Tuple of ( inputs: Input placeholder to feed in ids to be translated. targets: Targets placeholder to feed to translation when fetching attention weights. samples: Tensor representing the ids of the translation. att_mats: Tensors representing the attention weights. ) """ hparams = trainer_lib.create_hparams( hparams_set, data_dir=data_dir, problem_name=problem_name) translate_model = registry.model(model_name)( hparams, tf.estimator.ModeKeys.EVAL) inputs = tf.placeholder(tf.int32, shape=(1, None, 1, 1), name="inputs") targets = tf.placeholder(tf.int32, shape=(1, None, 1, 1), name="targets") translate_model({ "inputs": inputs, "targets": targets, }) # Must be called after building the training graph, so that the dict will # have been filled with the attention tensors. BUT before creating the # inference graph otherwise the dict will be filled with tensors from # inside a tf.while_loop from decoding and are marked unfetchable. att_mats = get_att_mats(translate_model) with tf.variable_scope(tf.get_variable_scope(), reuse=True): samples = translate_model.infer({ "inputs": inputs, }, beam_size=beam_size)["outputs"] return inputs, targets, samples, att_mats
python
def build_model(hparams_set, model_name, data_dir, problem_name, beam_size=1): """Build the graph required to fetch the attention weights. Args: hparams_set: HParams set to build the model with. model_name: Name of model. data_dir: Path to directory containing training data. problem_name: Name of problem. beam_size: (Optional) Number of beams to use when decoding a translation. If set to 1 (default) then greedy decoding is used. Returns: Tuple of ( inputs: Input placeholder to feed in ids to be translated. targets: Targets placeholder to feed to translation when fetching attention weights. samples: Tensor representing the ids of the translation. att_mats: Tensors representing the attention weights. ) """ hparams = trainer_lib.create_hparams( hparams_set, data_dir=data_dir, problem_name=problem_name) translate_model = registry.model(model_name)( hparams, tf.estimator.ModeKeys.EVAL) inputs = tf.placeholder(tf.int32, shape=(1, None, 1, 1), name="inputs") targets = tf.placeholder(tf.int32, shape=(1, None, 1, 1), name="targets") translate_model({ "inputs": inputs, "targets": targets, }) # Must be called after building the training graph, so that the dict will # have been filled with the attention tensors. BUT before creating the # inference graph otherwise the dict will be filled with tensors from # inside a tf.while_loop from decoding and are marked unfetchable. att_mats = get_att_mats(translate_model) with tf.variable_scope(tf.get_variable_scope(), reuse=True): samples = translate_model.infer({ "inputs": inputs, }, beam_size=beam_size)["outputs"] return inputs, targets, samples, att_mats
[ "def", "build_model", "(", "hparams_set", ",", "model_name", ",", "data_dir", ",", "problem_name", ",", "beam_size", "=", "1", ")", ":", "hparams", "=", "trainer_lib", ".", "create_hparams", "(", "hparams_set", ",", "data_dir", "=", "data_dir", ",", "problem_name", "=", "problem_name", ")", "translate_model", "=", "registry", ".", "model", "(", "model_name", ")", "(", "hparams", ",", "tf", ".", "estimator", ".", "ModeKeys", ".", "EVAL", ")", "inputs", "=", "tf", ".", "placeholder", "(", "tf", ".", "int32", ",", "shape", "=", "(", "1", ",", "None", ",", "1", ",", "1", ")", ",", "name", "=", "\"inputs\"", ")", "targets", "=", "tf", ".", "placeholder", "(", "tf", ".", "int32", ",", "shape", "=", "(", "1", ",", "None", ",", "1", ",", "1", ")", ",", "name", "=", "\"targets\"", ")", "translate_model", "(", "{", "\"inputs\"", ":", "inputs", ",", "\"targets\"", ":", "targets", ",", "}", ")", "# Must be called after building the training graph, so that the dict will", "# have been filled with the attention tensors. BUT before creating the", "# inference graph otherwise the dict will be filled with tensors from", "# inside a tf.while_loop from decoding and are marked unfetchable.", "att_mats", "=", "get_att_mats", "(", "translate_model", ")", "with", "tf", ".", "variable_scope", "(", "tf", ".", "get_variable_scope", "(", ")", ",", "reuse", "=", "True", ")", ":", "samples", "=", "translate_model", ".", "infer", "(", "{", "\"inputs\"", ":", "inputs", ",", "}", ",", "beam_size", "=", "beam_size", ")", "[", "\"outputs\"", "]", "return", "inputs", ",", "targets", ",", "samples", ",", "att_mats" ]
Build the graph required to fetch the attention weights. Args: hparams_set: HParams set to build the model with. model_name: Name of model. data_dir: Path to directory containing training data. problem_name: Name of problem. beam_size: (Optional) Number of beams to use when decoding a translation. If set to 1 (default) then greedy decoding is used. Returns: Tuple of ( inputs: Input placeholder to feed in ids to be translated. targets: Targets placeholder to feed to translation when fetching attention weights. samples: Tensor representing the ids of the translation. att_mats: Tensors representing the attention weights. )
[ "Build", "the", "graph", "required", "to", "fetch", "the", "attention", "weights", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L113-L156
train
Builds the training graph required to fetch the attention weights.
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,hIlP7994q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4,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(0b1101111 + 0o0) + '\x31' + chr(49) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1001101 + 0o42) + chr(0b10110 + 0o33) + '\063' + chr(187 - 132), 8776 - 8768), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(2155 - 2107) + chr(49), 54640 - 54632), ehT0Px3KOsy9('\x30' + chr(8954 - 8843) + '\x33' + '\x31', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + chr(52) + chr(0b11001 + 0o31), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(54) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(2827 - 2772) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(0b110011) + '\064', 37804 - 37796), ehT0Px3KOsy9('\060' + chr(0b1101001 + 0o6) + chr(0b100110 + 0o14) + chr(0b100100 + 0o20) + chr(685 - 632), ord("\x08")), ehT0Px3KOsy9(chr(151 - 103) + '\157' + '\063' + '\060' + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + chr(0b110011) + '\x34' + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11011 + 0o124) + chr(49) + '\x36' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1100001 + 0o16) + chr(55) + chr(95 - 41), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\060' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b111101 + 0o62) + chr(55) + chr(0b11111 + 0o22), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b1001 + 0o50) + '\x35' + '\x30', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(1317 - 1268) + chr(105 - 54), 54955 - 54947), ehT0Px3KOsy9('\060' + chr(0b1101 + 0o142) + chr(2376 - 2323) + chr(634 - 582), 0o10), ehT0Px3KOsy9(chr(359 - 311) + chr(111) + chr(0b11111 + 0o24) + chr(0b101010 + 0o11) + chr(0b11011 + 0o30), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3098 - 2987) + '\x32' + chr(52) + '\x32', 45744 - 45736), ehT0Px3KOsy9('\x30' + chr(0b100011 + 0o114) + '\x31' + chr(0b101100 + 0o13) + '\x30', 53262 - 53254), ehT0Px3KOsy9(chr(813 - 765) + chr(0b1100000 + 0o17) + chr(49) + chr(0b101100 + 0o11) + '\x30', 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + '\x34' + chr(2250 - 2195), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + chr(2665 - 2611) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + '\062', 3164 - 3156), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b10010 + 0o135) + chr(1084 - 1034) + chr(1721 - 1670) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + chr(50) + chr(0b110000), 57955 - 57947), ehT0Px3KOsy9('\x30' + chr(0b1101100 + 0o3) + '\061' + '\x34' + chr(0b1111 + 0o45), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b10000 + 0o137) + '\062' + chr(1518 - 1470) + chr(0b101111 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(1711 - 1663) + chr(972 - 861) + '\062' + '\x31' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1626 - 1575) + '\062' + chr(2135 - 2083), 59206 - 59198), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(0b110111) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061' + chr(0b101101 + 0o4) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1391 - 1343) + chr(0b1010101 + 0o32) + '\x33' + '\x31' + chr(2223 - 2174), ord("\x08")), ehT0Px3KOsy9(chr(1170 - 1122) + '\x6f' + chr(53) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + chr(0b110000) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(49) + '\064' + chr(1047 - 999), 0b1000), ehT0Px3KOsy9(chr(1280 - 1232) + chr(111) + chr(0b101001 + 0o11) + chr(220 - 165) + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + '\x32' + chr(477 - 426), ord("\x08")), ehT0Px3KOsy9(chr(2105 - 2057) + '\x6f' + chr(51) + '\065', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(111) + chr(1782 - 1729) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'a'), '\x64' + '\145' + '\143' + '\157' + chr(3976 - 3876) + chr(101))('\165' + chr(7133 - 7017) + '\x66' + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def HVXVtcU8izfP(EoFZz4ccL1aJ, yJFe33rl9i_r, kVFRD544hi_1, wezGpYDorAsK, PQZjDxhiHJGf=ehT0Px3KOsy9(chr(48) + chr(111) + chr(49), 36225 - 36217)): n4ljua2gi1Pr = KvtIAVGi33Ty.create_hparams(EoFZz4ccL1aJ, data_dir=kVFRD544hi_1, problem_name=wezGpYDorAsK) J4XODYeL7J6A = U24OBsRcVqkJ.FK0vqzZ5gPN6(yJFe33rl9i_r)(n4ljua2gi1Pr, IDJ2eXGCBCDu.estimator.ModeKeys.EVAL) vXoupepMtCXU = IDJ2eXGCBCDu.placeholder(IDJ2eXGCBCDu.int32, shape=(ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100110 + 0o13), 8), None, ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b100100 + 0o113) + chr(1448 - 1399), 8), ehT0Px3KOsy9('\060' + chr(1001 - 890) + chr(0b110001), 8)), name=xafqLlk3kkUe(SXOLrMavuUCe(b'&1\xf1l\x96\x80'), chr(0b1100100) + '\x65' + '\x63' + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(0b11001 + 0o133) + chr(0b10110 + 0o120) + '\055' + chr(0b10010 + 0o46))) xIEmRseySp3z = IDJ2eXGCBCDu.placeholder(IDJ2eXGCBCDu.int32, shape=(ehT0Px3KOsy9('\x30' + chr(111) + chr(1373 - 1324), 8), None, ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(5016 - 4905) + '\x31', 8)), name=xafqLlk3kkUe(SXOLrMavuUCe(b';>\xf3~\x87\x87\x8b'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(10139 - 10023) + chr(102) + '\x2d' + chr(0b111000))) J4XODYeL7J6A({xafqLlk3kkUe(SXOLrMavuUCe(b'&1\xf1l\x96\x80'), '\x64' + chr(0b111010 + 0o53) + '\x63' + '\157' + chr(100) + chr(0b110000 + 0o65))(chr(4467 - 4350) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b110011 + 0o5)): vXoupepMtCXU, xafqLlk3kkUe(SXOLrMavuUCe(b';>\xf3~\x87\x87\x8b'), '\x64' + chr(101) + chr(99) + '\x6f' + chr(6690 - 6590) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1011000 + 0o16) + '\x2d' + chr(56)): xIEmRseySp3z}) mFC4wfloFTId = wbfMz3jNJDH7(J4XODYeL7J6A) with xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'9>\xf3p\x83\x91\x94\xf9\xfa\xb6\x86\x1cN%'), '\144' + chr(0b1100101) + chr(0b10001 + 0o122) + chr(0b1101111) + chr(293 - 193) + chr(0b100111 + 0o76))(chr(0b1000010 + 0o63) + chr(0b1101111 + 0o5) + '\146' + '\x2d' + chr(0b11010 + 0o36)))(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'(:\xf5F\x94\x92\x8a\xf5\xc4\xa7\x89\x16a3Z\x07;I'), chr(0b101000 + 0o74) + chr(0b1100101) + chr(6676 - 6577) + '\x6f' + chr(100) + '\145')(chr(0b1010001 + 0o44) + '\x74' + chr(8062 - 7960) + '\x2d' + '\x38'))(), reuse=ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31', 8)): db1_IZvznkcy = J4XODYeL7J6A.IhRMh3nN8G5I({xafqLlk3kkUe(SXOLrMavuUCe(b'&1\xf1l\x96\x80'), '\144' + '\145' + '\143' + chr(111) + chr(0b1001 + 0o133) + chr(0b1100101))(chr(12753 - 12636) + '\x74' + chr(0b1100010 + 0o4) + '\055' + chr(56)): vXoupepMtCXU}, beam_size=PQZjDxhiHJGf)[xafqLlk3kkUe(SXOLrMavuUCe(b' *\xf5i\x97\x87\x8b'), chr(0b1010110 + 0o16) + '\x65' + '\x63' + chr(2788 - 2677) + chr(100) + chr(101))('\165' + chr(3702 - 3586) + '\x66' + chr(0b11000 + 0o25) + chr(0b11100 + 0o34))] return (vXoupepMtCXU, xIEmRseySp3z, db1_IZvznkcy, mFC4wfloFTId)
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
get_att_mats
def get_att_mats(translate_model): """Get's the tensors representing the attentions from a build model. The attentions are stored in a dict on the Transformer object while building the graph. Args: translate_model: Transformer object to fetch the attention weights from. Returns: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attetnion weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) ) """ enc_atts = [] dec_atts = [] encdec_atts = [] prefix = "transformer/body/" postfix_self_attention = "/multihead_attention/dot_product_attention" if translate_model.hparams.self_attention_type == "dot_product_relative": postfix_self_attention = ("/multihead_attention/" "dot_product_attention_relative") postfix_encdec = "/multihead_attention/dot_product_attention" for i in range(translate_model.hparams.num_hidden_layers): enc_att = translate_model.attention_weights[ "%sencoder/layer_%i/self_attention%s" % (prefix, i, postfix_self_attention)] dec_att = translate_model.attention_weights[ "%sdecoder/layer_%i/self_attention%s" % (prefix, i, postfix_self_attention)] encdec_att = translate_model.attention_weights[ "%sdecoder/layer_%i/encdec_attention%s" % (prefix, i, postfix_encdec)] enc_atts.append(enc_att) dec_atts.append(dec_att) encdec_atts.append(encdec_att) return enc_atts, dec_atts, encdec_atts
python
def get_att_mats(translate_model): """Get's the tensors representing the attentions from a build model. The attentions are stored in a dict on the Transformer object while building the graph. Args: translate_model: Transformer object to fetch the attention weights from. Returns: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attetnion weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) ) """ enc_atts = [] dec_atts = [] encdec_atts = [] prefix = "transformer/body/" postfix_self_attention = "/multihead_attention/dot_product_attention" if translate_model.hparams.self_attention_type == "dot_product_relative": postfix_self_attention = ("/multihead_attention/" "dot_product_attention_relative") postfix_encdec = "/multihead_attention/dot_product_attention" for i in range(translate_model.hparams.num_hidden_layers): enc_att = translate_model.attention_weights[ "%sencoder/layer_%i/self_attention%s" % (prefix, i, postfix_self_attention)] dec_att = translate_model.attention_weights[ "%sdecoder/layer_%i/self_attention%s" % (prefix, i, postfix_self_attention)] encdec_att = translate_model.attention_weights[ "%sdecoder/layer_%i/encdec_attention%s" % (prefix, i, postfix_encdec)] enc_atts.append(enc_att) dec_atts.append(dec_att) encdec_atts.append(encdec_att) return enc_atts, dec_atts, encdec_atts
[ "def", "get_att_mats", "(", "translate_model", ")", ":", "enc_atts", "=", "[", "]", "dec_atts", "=", "[", "]", "encdec_atts", "=", "[", "]", "prefix", "=", "\"transformer/body/\"", "postfix_self_attention", "=", "\"/multihead_attention/dot_product_attention\"", "if", "translate_model", ".", "hparams", ".", "self_attention_type", "==", "\"dot_product_relative\"", ":", "postfix_self_attention", "=", "(", "\"/multihead_attention/\"", "\"dot_product_attention_relative\"", ")", "postfix_encdec", "=", "\"/multihead_attention/dot_product_attention\"", "for", "i", "in", "range", "(", "translate_model", ".", "hparams", ".", "num_hidden_layers", ")", ":", "enc_att", "=", "translate_model", ".", "attention_weights", "[", "\"%sencoder/layer_%i/self_attention%s\"", "%", "(", "prefix", ",", "i", ",", "postfix_self_attention", ")", "]", "dec_att", "=", "translate_model", ".", "attention_weights", "[", "\"%sdecoder/layer_%i/self_attention%s\"", "%", "(", "prefix", ",", "i", ",", "postfix_self_attention", ")", "]", "encdec_att", "=", "translate_model", ".", "attention_weights", "[", "\"%sdecoder/layer_%i/encdec_attention%s\"", "%", "(", "prefix", ",", "i", ",", "postfix_encdec", ")", "]", "enc_atts", ".", "append", "(", "enc_att", ")", "dec_atts", ".", "append", "(", "dec_att", ")", "encdec_atts", ".", "append", "(", "encdec_att", ")", "return", "enc_atts", ",", "dec_atts", ",", "encdec_atts" ]
Get's the tensors representing the attentions from a build model. The attentions are stored in a dict on the Transformer object while building the graph. Args: translate_model: Transformer object to fetch the attention weights from. Returns: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attetnion weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) )
[ "Get", "s", "the", "tensors", "representing", "the", "attentions", "from", "a", "build", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L159-L205
train
Get s the tensors representing the attentions from a build model.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,G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lZjMfR0,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(4168 - 4057) + '\x31' + chr(0b101001 + 0o16) + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2236 - 2186) + chr(48) + '\066', 0b1000), ehT0Px3KOsy9(chr(928 - 880) + chr(0b1101111) + '\x32' + chr(2084 - 2035) + chr(617 - 562), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000110 + 0o51) + '\x31' + '\x33' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b100011 + 0o21) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(4972 - 4861) + chr(0b1110 + 0o44) + chr(0b110011) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + '\063' + chr(0b1010 + 0o53) + chr(0b100110 + 0o17), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b101110 + 0o101) + chr(0b1101 + 0o44) + chr(1235 - 1184), 29673 - 29665), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(2869 - 2758) + chr(75 - 26) + '\x30' + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1000 + 0o52) + '\x35' + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(0b100010 + 0o20) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1819 - 1771) + chr(111) + chr(51) + chr(0b110011) + chr(1758 - 1703), 20129 - 20121), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2269 - 2220) + chr(0b110111) + chr(0b110111), 8), ehT0Px3KOsy9(chr(48) + chr(0b1000010 + 0o55) + chr(0b11010 + 0o30) + chr(0b110011) + chr(2417 - 2364), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b100101 + 0o15), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + chr(1117 - 1065), 30598 - 30590), ehT0Px3KOsy9(chr(0b100001 + 0o17) + chr(0b101110 + 0o101) + '\061' + '\065' + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010 + 0o1) + '\x32' + '\x30', 34195 - 34187), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(0b110101) + chr(52), 13900 - 13892), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(2345 - 2296) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + chr(0b100010 + 0o17) + '\x32', 19165 - 19157), ehT0Px3KOsy9(chr(48) + chr(0b110010 + 0o75) + chr(53) + '\063', 14966 - 14958), ehT0Px3KOsy9(chr(48) + chr(10232 - 10121) + chr(0b1010 + 0o47) + chr(50) + chr(48), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8705 - 8594) + chr(0b110100 + 0o1) + chr(2078 - 2029), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b11001 + 0o35) + chr(49), 55764 - 55756), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + '\065' + '\x35', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b11011 + 0o31) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(2070 - 2022) + chr(111) + chr(1224 - 1173) + chr(0b110101) + chr(0b11000 + 0o31), 0b1000), ehT0Px3KOsy9(chr(1154 - 1106) + chr(0b1100100 + 0o13) + chr(53) + '\067', 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(55) + chr(2615 - 2561), 5855 - 5847), ehT0Px3KOsy9(chr(2158 - 2110) + chr(4455 - 4344) + chr(0b110010) + chr(2556 - 2504) + '\060', 26189 - 26181), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(0b110111), 8249 - 8241), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110000 + 0o1) + chr(0b11001 + 0o30) + chr(0b100000 + 0o25), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(48) + chr(721 - 672), 12994 - 12986), ehT0Px3KOsy9(chr(48) + chr(0b100101 + 0o112) + chr(51) + chr(0b101 + 0o56) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(0b1001100 + 0o43) + chr(0b110001) + '\x36' + chr(0b110110), 24021 - 24013), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b110010) + '\063' + chr(0b110101), 8), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110011) + chr(0b110100), 50418 - 50410), ehT0Px3KOsy9('\x30' + chr(11127 - 11016) + chr(0b11111 + 0o22) + chr(53) + chr(0b1010 + 0o50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2507 - 2456) + chr(338 - 290) + chr(0b1111 + 0o41), 53045 - 53037)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(111) + chr(53) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'Q'), chr(0b1100100) + chr(0b1011110 + 0o7) + chr(0b110010 + 0o61) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + chr(11833 - 11717) + chr(102) + chr(341 - 296) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def wbfMz3jNJDH7(J4XODYeL7J6A): YwTxVlXs3fGQ = [] xRXyHs5wBiFb = [] QGiQ5qJL9aHZ = [] K1Ha0XjJTAE7 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x0b\xf4\xee7U\xfb\x82y.\xcb\xe3\xf0\x1d\xf2fmC'), '\x64' + '\145' + chr(0b111101 + 0o46) + chr(111) + chr(5238 - 5138) + '\145')(chr(0b1000001 + 0o64) + chr(0b1110100 + 0o0) + chr(0b1100001 + 0o5) + chr(0b101001 + 0o4) + chr(2689 - 2633)) SPDuZIhu5Bx1 = xafqLlk3kkUe(SXOLrMavuUCe(b'P\xeb\xfa5R\xf4\x85n"\xca\xce\xbe\x0b\xe9gz\x18\xb9\xc3%\xe5O?]n\xddP\x86K\x8b\xc3{\x12\xa0\xa9\x02\xf8r\x1e\xa9\x10\xe8'), chr(0b100101 + 0o77) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')('\165' + chr(4636 - 4520) + chr(4773 - 4671) + chr(1417 - 1372) + chr(0b111000)) if xafqLlk3kkUe(J4XODYeL7J6A.hparams, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c\xe3\xe3?y\xfc\x99\x7f&\xc0\xe5\xb6\x10\xf3]`\x15\xa0\xc9'), '\x64' + '\145' + chr(0b1000101 + 0o36) + chr(0b100111 + 0o110) + chr(0b11001 + 0o113) + '\x65')(chr(117) + chr(0b1110100) + '\146' + chr(1625 - 1580) + '\070')) == xafqLlk3kkUe(SXOLrMavuUCe(b'\x1b\xe9\xfb\x06V\xef\x82o6\xcd\xe5\x80\r\xf8nu\x18\xb9\xda.'), chr(4223 - 4123) + chr(8189 - 8088) + '\x63' + '\x6f' + '\x64' + chr(4153 - 4052))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b111 + 0o46) + chr(56)): SPDuZIhu5Bx1 = xafqLlk3kkUe(SXOLrMavuUCe(b'P\xeb\xfa5R\xf4\x85n"\xca\xce\xbe\x0b\xe9gz\x18\xb9\xc3%\xe5O?]n\xddP\x86K\x8b\xc3{\x12\xa0\xa9\x02\xf8r\x1e\xa9\x10\xe8\xd0+C\xf1\x8c\x7f*\xd8\xf4'), '\x64' + '\x65' + chr(9664 - 9565) + chr(12260 - 12149) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b101010 + 0o112) + '\x66' + chr(45) + chr(2323 - 2267)) ScIDDdvuJiyl = xafqLlk3kkUe(SXOLrMavuUCe(b'P\xeb\xfa5R\xf4\x85n"\xca\xce\xbe\x0b\xe9gz\x18\xb9\xc3%\xe5O?]n\xddP\x86K\x8b\xc3{\x12\xa0\xa9\x02\xf8r\x1e\xa9\x10\xe8'), '\x64' + chr(0b1100101) + chr(0b10110 + 0o115) + chr(0b1101111) + chr(100) + '\145')(chr(4044 - 3927) + '\164' + chr(4925 - 4823) + '\x2d' + '\070') for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(J4XODYeL7J6A.hparams, xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\xdc\xe7ly\xed\xa1^,\xe1\xfe\x85'), chr(100) + '\x65' + chr(0b1100011) + '\157' + chr(0b100011 + 0o101) + chr(101))(chr(0b1110101) + chr(116) + '\x66' + chr(1401 - 1356) + '\x38'))): xeGPQvD4b2OS = J4XODYeL7J6A.attention_weights[xafqLlk3kkUe(SXOLrMavuUCe(b'Z\xf5\xea7E\xf2\x89n1\x81\xfd\xbe\x06\xf8pKI\xb9\x838\xafG6vP\xd9V\x8cA\x8a\xc9`#\xe4\xae'), '\144' + chr(101) + '\x63' + '\x6f' + chr(0b1001111 + 0o25) + chr(6512 - 6411))(chr(117) + '\164' + chr(102) + chr(0b101101) + '\x38') % (K1Ha0XjJTAE7, WVxHKyX45z_L, SPDuZIhu5Bx1)] ETaRpCvQ5ehg = J4XODYeL7J6A.attention_weights[xafqLlk3kkUe(SXOLrMavuUCe(b'Z\xf5\xeb<E\xf2\x89n1\x81\xfd\xbe\x06\xf8pKI\xb9\x838\xafG6vP\xd9V\x8cA\x8a\xc9`#\xe4\xae'), '\144' + '\x65' + chr(99) + '\x6f' + '\144' + '\x65')(chr(3513 - 3396) + chr(0b1110100) + '\146' + '\055' + '\070') % (K1Ha0XjJTAE7, WVxHKyX45z_L, SPDuZIhu5Bx1)] T7PXcIi5InTJ = J4XODYeL7J6A.attention_weights[xafqLlk3kkUe(SXOLrMavuUCe(b'Z\xf5\xeb<E\xf2\x89n1\x81\xfd\xbe\x06\xf8pKI\xb9\x83.\xa4H4LR\xf2C\x9d[\x9b\xce{$\xae\xb3S\xee'), '\x64' + '\x65' + '\143' + chr(0b10011 + 0o134) + '\x64' + chr(0b11111 + 0o106))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + chr(56)) % (K1Ha0XjJTAE7, WVxHKyX45z_L, ScIDDdvuJiyl)] xafqLlk3kkUe(YwTxVlXs3fGQ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\xf6\xff<H\xf9'), chr(100) + '\x65' + chr(0b1100011) + '\157' + chr(4328 - 4228) + chr(101))(chr(117) + chr(116) + chr(0b1011000 + 0o16) + '\x2d' + chr(0b100 + 0o64)))(xeGPQvD4b2OS) xafqLlk3kkUe(xRXyHs5wBiFb, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\xf6\xff<H\xf9'), chr(565 - 465) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b100110 + 0o77))(chr(10667 - 10550) + chr(0b1000110 + 0o56) + '\x66' + '\x2d' + '\x38'))(ETaRpCvQ5ehg) xafqLlk3kkUe(QGiQ5qJL9aHZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\xf6\xff<H\xf9'), chr(0b1100100) + chr(3366 - 3265) + '\x63' + '\x6f' + chr(0b1011000 + 0o14) + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(0b11100 + 0o21) + '\070'))(T7PXcIi5InTJ) return (YwTxVlXs3fGQ, xRXyHs5wBiFb, QGiQ5qJL9aHZ)
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
AttentionVisualizer.encode
def encode(self, input_str): """Input str to features dict, ready for inference.""" inputs = self.encoders["inputs"].encode(input_str) + [EOS_ID] batch_inputs = np.reshape(inputs, [1, -1, 1, 1]) # Make it 3D. return batch_inputs
python
def encode(self, input_str): """Input str to features dict, ready for inference.""" inputs = self.encoders["inputs"].encode(input_str) + [EOS_ID] batch_inputs = np.reshape(inputs, [1, -1, 1, 1]) # Make it 3D. return batch_inputs
[ "def", "encode", "(", "self", ",", "input_str", ")", ":", "inputs", "=", "self", ".", "encoders", "[", "\"inputs\"", "]", ".", "encode", "(", "input_str", ")", "+", "[", "EOS_ID", "]", "batch_inputs", "=", "np", ".", "reshape", "(", "inputs", ",", "[", "1", ",", "-", "1", ",", "1", ",", "1", "]", ")", "# Make it 3D.", "return", "batch_inputs" ]
Input str to features dict, ready for inference.
[ "Input", "str", "to", "features", "dict", "ready", "for", "inference", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L52-L56
train
Input str to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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(0b11 + 0o55) + chr(0b1001111 + 0o40) + chr(262 - 211) + chr(1483 - 1432) + '\065', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000001 + 0o56) + chr(0b110010 + 0o0) + chr(2204 - 2156) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + '\x33' + chr(199 - 149), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110110) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10001 + 0o136) + '\x36' + chr(0b110011), 23637 - 23629), ehT0Px3KOsy9(chr(48) + chr(10873 - 10762) + chr(0b110011) + chr(72 - 21) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + '\x34' + chr(2344 - 2293), 58257 - 58249), ehT0Px3KOsy9(chr(0b110000) + chr(8972 - 8861) + '\063' + chr(50) + '\x32', 57323 - 57315), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(177 - 123) + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x35' + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\x31' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1053 - 1005) + chr(10922 - 10811) + chr(0b110001) + chr(0b11001 + 0o32) + '\067', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(681 - 630) + '\x34' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(111) + '\x33' + '\x34' + chr(0b110111), 10 - 2), ehT0Px3KOsy9('\060' + '\157' + chr(0b110101) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + chr(6948 - 6837) + chr(0b110001) + chr(2382 - 2332) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001 + 0o1) + chr(0b110011) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\157' + chr(1658 - 1607), 23257 - 23249), ehT0Px3KOsy9(chr(904 - 856) + chr(0b1101111) + chr(801 - 749) + chr(721 - 666), 32873 - 32865), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(550 - 501) + chr(2272 - 2222) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\063' + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(1402 - 1353) + '\x30' + chr(0b110111), 24548 - 24540), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + '\061' + chr(1214 - 1162) + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + '\x6f' + chr(0b110010) + chr(2417 - 2363) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b11110 + 0o22) + '\157' + chr(1534 - 1484) + chr(53) + chr(50), 50720 - 50712), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(0b11100 + 0o25) + chr(55), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(2570 - 2519) + chr(0b110111) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b10000 + 0o40) + '\x6f' + chr(0b110010) + chr(0b11000 + 0o36) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2322 - 2271) + chr(1731 - 1678) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b10010 + 0o41) + chr(0b110011), 33855 - 33847), ehT0Px3KOsy9(chr(48) + chr(0b1011101 + 0o22) + chr(49) + chr(600 - 552) + chr(0b110111), 8), ehT0Px3KOsy9('\060' + chr(10323 - 10212) + '\061' + chr(53) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + '\x37' + chr(0b11111 + 0o23), 0o10), ehT0Px3KOsy9(chr(1189 - 1141) + chr(4905 - 4794) + chr(0b110010) + chr(0b101100 + 0o11) + chr(1693 - 1641), 27639 - 27631), ehT0Px3KOsy9(chr(439 - 391) + chr(0b1101111) + chr(0b101011 + 0o7) + chr(0b100111 + 0o12) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\x35' + chr(0b11111 + 0o24), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\061' + chr(53) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + chr(0b110010) + '\060' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + chr(50) + chr(48) + chr(54), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1620 - 1572) + chr(111) + chr(0b10000 + 0o45) + chr(769 - 721), 22972 - 22964)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf3'), chr(0b1100100) + chr(1220 - 1119) + chr(727 - 628) + '\x6f' + chr(100) + chr(0b111011 + 0o52))(chr(10793 - 10676) + chr(116) + chr(6672 - 6570) + '\055' + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def WZINe7poqZfF(oVre8I6UXc3b, L3e68qnO6DC9): vXoupepMtCXU = oVre8I6UXc3b.encoders[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb4\xec\xea}C@'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000 + 0o0))].encode(L3e68qnO6DC9) + [AcdgioUvW3hs] eODVD1XFDCfc = WqUC3KWvYVup.reshape(vXoupepMtCXU, [ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(6308 - 6197) + chr(0b10111 + 0o32), 48464 - 48456), -ehT0Px3KOsy9(chr(48) + '\x6f' + '\061', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(49), 8), ehT0Px3KOsy9(chr(223 - 175) + chr(0b11101 + 0o122) + chr(0b110001), 8)]) return eODVD1XFDCfc
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
AttentionVisualizer.decode
def decode(self, integers): """List of ints to str.""" integers = list(np.squeeze(integers)) return self.encoders["inputs"].decode(integers)
python
def decode(self, integers): """List of ints to str.""" integers = list(np.squeeze(integers)) return self.encoders["inputs"].decode(integers)
[ "def", "decode", "(", "self", ",", "integers", ")", ":", "integers", "=", "list", "(", "np", ".", "squeeze", "(", "integers", ")", ")", "return", "self", ".", "encoders", "[", "\"inputs\"", "]", ".", "decode", "(", "integers", ")" ]
List of ints to str.
[ "List", "of", "ints", "to", "str", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L58-L61
train
Decode a list of ints to str.
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,yDc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Ma9cXBb,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(0b101000 + 0o11) + chr(0b11110 + 0o27) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110000) + chr(0b1111 + 0o42), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(1969 - 1914) + chr(52), 53932 - 53924), ehT0Px3KOsy9(chr(1592 - 1544) + '\x6f' + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(2821 - 2766) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\x31' + '\062', 9923 - 9915), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1746 - 1691) + '\061', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1110 + 0o43) + chr(53) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + '\x6f' + chr(0b110010) + chr(0b110011), 13652 - 13644), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + chr(0b101010 + 0o14) + '\x32', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\063', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b100000 + 0o23) + chr(0b11010 + 0o34), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b10 + 0o60) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + '\063' + '\x31' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(52) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + chr(626 - 515) + chr(0b11110 + 0o23) + chr(51) + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + '\x6f' + '\x36' + chr(0b100010 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + chr(0b101 + 0o55) + chr(146 - 92), 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x35' + chr(53), 55414 - 55406), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(51) + '\x36', 8), ehT0Px3KOsy9('\x30' + chr(0b1100100 + 0o13) + chr(0b110111) + chr(2335 - 2280), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1010001 + 0o36) + chr(0b100000 + 0o22) + chr(0b110001), 58470 - 58462), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + '\067' + chr(0b110000), 38024 - 38016), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1100 + 0o47) + chr(0b110101) + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(3237 - 3126) + '\x32' + '\063' + '\060', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(0b11101 + 0o32) + chr(1567 - 1512), 28311 - 28303), ehT0Px3KOsy9('\x30' + chr(0b11011 + 0o124) + chr(0b110001) + '\064', 0o10), ehT0Px3KOsy9(chr(687 - 639) + '\x6f' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(54) + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(11011 - 10900) + chr(51), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110000 + 0o5), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1401 - 1352) + chr(0b110110) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(326 - 278) + '\157' + chr(2183 - 2134) + chr(2394 - 2343) + chr(0b1010 + 0o50), 0b1000), ehT0Px3KOsy9('\x30' + chr(4202 - 4091) + chr(0b11001 + 0o31) + chr(0b110101) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\x6f' + '\x31' + '\061' + '\x35', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\062' + chr(0b110000 + 0o1) + '\x32', 10177 - 10169), ehT0Px3KOsy9('\060' + '\x6f' + chr(1838 - 1784) + chr(0b11100 + 0o25), 0o10), ehT0Px3KOsy9(chr(1109 - 1061) + '\157' + chr(51) + '\066' + '\x31', 63474 - 63466), ehT0Px3KOsy9(chr(1470 - 1422) + '\x6f' + chr(0b110011) + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1100100 + 0o13) + '\x33' + '\061' + '\x31', ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(429 - 376) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'B'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + '\x64' + '\145')('\x75' + chr(0b10000 + 0o144) + chr(9553 - 9451) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RSziqSuj39r9(oVre8I6UXc3b, WQGIgTBP0loJ): WQGIgTBP0loJ = YyaZ4tpXu4lf(WqUC3KWvYVup.squeeze(WQGIgTBP0loJ)) return xafqLlk3kkUe(oVre8I6UXc3b.encoders[xafqLlk3kkUe(SXOLrMavuUCe(b'\x05\xef\x8ct\x0f9'), '\x64' + chr(0b101101 + 0o70) + chr(99) + '\157' + chr(0b110 + 0o136) + '\x65')(chr(6713 - 6596) + '\164' + chr(0b1100110) + chr(0b1001 + 0o44) + chr(2390 - 2334))], '\x64' + chr(101) + '\x63' + chr(0b1011010 + 0o25) + '\x64' + chr(0b1100101))(WQGIgTBP0loJ)
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
AttentionVisualizer.decode_list
def decode_list(self, integers): """List of ints to list of str.""" integers = list(np.squeeze(integers)) return self.encoders["inputs"].decode_list(integers)
python
def decode_list(self, integers): """List of ints to list of str.""" integers = list(np.squeeze(integers)) return self.encoders["inputs"].decode_list(integers)
[ "def", "decode_list", "(", "self", ",", "integers", ")", ":", "integers", "=", "list", "(", "np", ".", "squeeze", "(", "integers", ")", ")", "return", "self", ".", "encoders", "[", "\"inputs\"", "]", ".", "decode_list", "(", "integers", ")" ]
List of ints to list of str.
[ "List", "of", "ints", "to", "list", "of", "str", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L63-L66
train
List of ints to list of str.
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,sR2sPcm7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JWkL,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(1594 - 1546) + chr(0b1111 + 0o140) + chr(961 - 912) + chr(51) + chr(0b110101 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110001) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(1394 - 1346) + '\157' + '\x33' + chr(0b110001) + chr(0b110111), 8), ehT0Px3KOsy9('\x30' + chr(4111 - 4000) + '\063' + '\066' + chr(1128 - 1080), ord("\x08")), ehT0Px3KOsy9(chr(1635 - 1587) + '\157' + chr(0b100101 + 0o14) + chr(54) + chr(1338 - 1290), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(51) + '\x36' + chr(0b100100 + 0o20), 0o10), ehT0Px3KOsy9(chr(854 - 806) + chr(11508 - 11397) + chr(0b110011) + '\x34' + chr(0b110111), 53386 - 53378), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b110010) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11 + 0o56) + chr(1676 - 1627) + '\x36', 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x32' + chr(2107 - 2057) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\065' + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(68 - 13) + '\x34', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1001 + 0o146) + chr(2270 - 2221) + '\062' + '\x36', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + chr(694 - 645) + '\061', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001101 + 0o42) + chr(612 - 562) + chr(0b110010) + '\x34', 8), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b11101 + 0o31) + '\x35', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\x6f' + chr(0b110011) + '\060' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011111 + 0o20) + chr(50) + chr(52) + chr(2053 - 1999), 58052 - 58044), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(791 - 740) + chr(0b110110) + chr(0b11001 + 0o31), 63563 - 63555), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(2798 - 2743) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100110 + 0o13) + chr(0b11 + 0o63) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1010100 + 0o33) + chr(0b11110 + 0o25) + chr(0b110001) + chr(592 - 541), ord("\x08")), ehT0Px3KOsy9('\060' + chr(9298 - 9187) + chr(1867 - 1812) + chr(0b10000 + 0o40), 47249 - 47241), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(0b110011) + chr(1069 - 1021) + chr(52), 0b1000), ehT0Px3KOsy9(chr(771 - 723) + chr(0b1101111) + chr(599 - 549) + chr(48) + '\x32', 0b1000), ehT0Px3KOsy9(chr(1971 - 1923) + chr(2314 - 2203) + chr(0b101000 + 0o13) + chr(2509 - 2456) + chr(0b110011), 38379 - 38371), ehT0Px3KOsy9('\x30' + chr(0b1101011 + 0o4) + '\x33' + chr(0b101 + 0o62) + '\062', 15242 - 15234), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + '\060' + chr(0b11100 + 0o31), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(0b110010) + chr(0b1110 + 0o50) + chr(2346 - 2293), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(11576 - 11465) + chr(49) + chr(0b110110) + chr(54), 8), ehT0Px3KOsy9('\060' + chr(4900 - 4789) + chr(0b10011 + 0o36) + chr(0b11000 + 0o37) + '\063', 61508 - 61500), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(1994 - 1939) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(369 - 316) + '\061', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1040 - 990) + chr(0b1101 + 0o47) + chr(0b110100 + 0o1), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b101110 + 0o101) + chr(1552 - 1502) + chr(51) + chr(0b110100 + 0o0), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(7582 - 7471) + '\x33' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(1401 - 1352) + chr(0b110011) + chr(52), 24660 - 24652), ehT0Px3KOsy9(chr(0b110000) + chr(5504 - 5393) + chr(0b110010) + '\x30' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6067 - 5956) + chr(0b1 + 0o61) + '\x31' + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(6856 - 6745) + chr(0b1 + 0o64) + '\x30', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'p'), chr(0b111101 + 0o47) + chr(8507 - 8406) + chr(99) + chr(0b1101111) + chr(9006 - 8906) + '\x65')('\165' + '\164' + chr(0b111111 + 0o47) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def be8xO0UJPt4e(oVre8I6UXc3b, WQGIgTBP0loJ): WQGIgTBP0loJ = YyaZ4tpXu4lf(WqUC3KWvYVup.squeeze(WQGIgTBP0loJ)) return xafqLlk3kkUe(oVre8I6UXc3b.encoders[xafqLlk3kkUe(SXOLrMavuUCe(b'7\xa1\xbf\x85\x04\x87'), chr(5655 - 5555) + chr(5046 - 4945) + chr(0b1100011) + '\157' + chr(0b1100100) + chr(1514 - 1413))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\x2d' + chr(56))], xafqLlk3kkUe(SXOLrMavuUCe(b":\xaa\xac\x9f\x14\x91\xb8\xf8'\xe7\xd9"), chr(5662 - 5562) + '\145' + '\143' + chr(12238 - 12127) + '\144' + '\145')(chr(0b1110 + 0o147) + chr(9186 - 9070) + chr(0b10010 + 0o124) + chr(0b11001 + 0o24) + '\x38'))(WQGIgTBP0loJ)
tensorflow/tensor2tensor
tensor2tensor/visualization/visualization.py
AttentionVisualizer.get_vis_data_from_string
def get_vis_data_from_string(self, sess, input_string): """Constructs the data needed for visualizing attentions. Args: sess: A tf.Session object. input_string: The input sentence to be translated and visualized. Returns: Tuple of ( output_string: The translated sentence. input_list: Tokenized input sentence. output_list: Tokenized translation. att_mats: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) ) """ encoded_inputs = self.encode(input_string) # Run inference graph to get the translation. out = sess.run(self.samples, { self.inputs: encoded_inputs, }) # Run the decoded translation through the training graph to get the # attention tensors. att_mats = sess.run(self.att_mats, { self.inputs: encoded_inputs, self.targets: np.reshape(out, [1, -1, 1, 1]), }) output_string = self.decode(out) input_list = self.decode_list(encoded_inputs) output_list = self.decode_list(out) return output_string, input_list, output_list, att_mats
python
def get_vis_data_from_string(self, sess, input_string): """Constructs the data needed for visualizing attentions. Args: sess: A tf.Session object. input_string: The input sentence to be translated and visualized. Returns: Tuple of ( output_string: The translated sentence. input_list: Tokenized input sentence. output_list: Tokenized translation. att_mats: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) ) """ encoded_inputs = self.encode(input_string) # Run inference graph to get the translation. out = sess.run(self.samples, { self.inputs: encoded_inputs, }) # Run the decoded translation through the training graph to get the # attention tensors. att_mats = sess.run(self.att_mats, { self.inputs: encoded_inputs, self.targets: np.reshape(out, [1, -1, 1, 1]), }) output_string = self.decode(out) input_list = self.decode_list(encoded_inputs) output_list = self.decode_list(out) return output_string, input_list, output_list, att_mats
[ "def", "get_vis_data_from_string", "(", "self", ",", "sess", ",", "input_string", ")", ":", "encoded_inputs", "=", "self", ".", "encode", "(", "input_string", ")", "# Run inference graph to get the translation.", "out", "=", "sess", ".", "run", "(", "self", ".", "samples", ",", "{", "self", ".", "inputs", ":", "encoded_inputs", ",", "}", ")", "# Run the decoded translation through the training graph to get the", "# attention tensors.", "att_mats", "=", "sess", ".", "run", "(", "self", ".", "att_mats", ",", "{", "self", ".", "inputs", ":", "encoded_inputs", ",", "self", ".", "targets", ":", "np", ".", "reshape", "(", "out", ",", "[", "1", ",", "-", "1", ",", "1", ",", "1", "]", ")", ",", "}", ")", "output_string", "=", "self", ".", "decode", "(", "out", ")", "input_list", "=", "self", ".", "decode_list", "(", "encoded_inputs", ")", "output_list", "=", "self", ".", "decode_list", "(", "out", ")", "return", "output_string", ",", "input_list", ",", "output_list", ",", "att_mats" ]
Constructs the data needed for visualizing attentions. Args: sess: A tf.Session object. input_string: The input sentence to be translated and visualized. Returns: Tuple of ( output_string: The translated sentence. input_list: Tokenized input sentence. output_list: Tokenized translation. att_mats: Tuple of attention matrices; ( enc_atts: Encoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, inp_len, inp_len) dec_atts: Decoder self attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, out_len) encdec_atts: Encoder-Decoder attention weights. A list of `num_layers` numpy arrays of size (batch_size, num_heads, out_len, inp_len) )
[ "Constructs", "the", "data", "needed", "for", "visualizing", "attentions", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/visualization/visualization.py#L68-L110
train
Constructs the data needed for visualizing attentions.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,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9CsFWzvg0Vq,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(0b101010 + 0o6) + chr(0b1101111) + '\063' + chr(0b110110) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(11431 - 11320) + '\062' + chr(0b11011 + 0o31) + '\x33', 28588 - 28580), ehT0Px3KOsy9(chr(48) + chr(111) + '\067' + chr(51), 32376 - 32368), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(12158 - 12047) + chr(0b110010) + chr(0b110001) + chr(0b10000 + 0o44), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(11092 - 10981) + chr(50) + chr(0b101010 + 0o11) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(53) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + '\066' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + '\067' + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b1100 + 0o44) + chr(111) + chr(49) + '\064' + chr(0b11 + 0o64), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(2410 - 2299) + chr(0b110010) + chr(53) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(4248 - 4137) + chr(0b110000 + 0o2) + '\x31' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(1724 - 1676) + chr(0b1101111) + chr(50) + '\061' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(982 - 934) + '\157' + chr(0b11011 + 0o30) + '\062' + chr(2567 - 2515), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10100 + 0o133) + '\061' + chr(2035 - 1984) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + '\062' + chr(1878 - 1830), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110 + 0o53) + chr(0b110011) + chr(320 - 269), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(55) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(436 - 388) + chr(111) + chr(51) + chr(54) + chr(796 - 742), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(2698 - 2587) + '\x32' + chr(54) + '\x37', 57222 - 57214), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + '\060' + chr(2262 - 2209), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000101 + 0o52) + chr(0b110011) + '\x32' + chr(0b10001 + 0o37), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b11101 + 0o122) + '\061' + chr(0b110100) + chr(0b1101 + 0o52), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1912 - 1862) + '\x31' + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b110 + 0o54) + chr(52) + chr(0b111 + 0o57), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(903 - 854) + chr(58 - 9) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b110011 + 0o74) + chr(0b11101 + 0o25) + chr(1736 - 1686) + '\061', 27414 - 27406), ehT0Px3KOsy9('\x30' + chr(8702 - 8591) + chr(0b110010) + chr(0b110111) + '\x30', 8), ehT0Px3KOsy9(chr(1391 - 1343) + '\157' + chr(0b110011) + chr(54), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b11 + 0o61) + chr(0b110011), 0b1000), ehT0Px3KOsy9('\x30' + chr(5795 - 5684) + '\063' + chr(0b1000 + 0o56) + chr(0b110110), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(50) + chr(919 - 868) + '\x35', 39411 - 39403), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110010) + '\062' + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(0b1001 + 0o53) + '\x30', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(2317 - 2267) + '\061' + '\062', 8), ehT0Px3KOsy9(chr(1860 - 1812) + '\x6f' + chr(53) + chr(2624 - 2569), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8770 - 8659) + chr(899 - 849) + chr(0b110010) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11 + 0o56) + chr(52) + chr(0b110000), 43925 - 43917), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b110110) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(2374 - 2321) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(50) + '\062', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(53) + chr(1395 - 1347), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xde'), '\144' + '\x65' + '\143' + chr(10073 - 9962) + '\x64' + '\145')(chr(0b1001110 + 0o47) + chr(196 - 80) + chr(0b1100110 + 0o0) + chr(0b11001 + 0o24) + chr(76 - 20)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def cNCg83gK1_s7(oVre8I6UXc3b, HVWCHjSQ2I35, DH7io1rudAkV): PEp6lmQpvsxP = oVre8I6UXc3b.encode(DH7io1rudAkV) UkrMp_I0RDmo = HVWCHjSQ2I35.sgt5BU61bwZ2(oVre8I6UXc3b.samples, {oVre8I6UXc3b.vXoupepMtCXU: PEp6lmQpvsxP}) mFC4wfloFTId = HVWCHjSQ2I35.sgt5BU61bwZ2(oVre8I6UXc3b.att_mats, {oVre8I6UXc3b.vXoupepMtCXU: PEp6lmQpvsxP, oVre8I6UXc3b.targets: WqUC3KWvYVup.reshape(UkrMp_I0RDmo, [ehT0Px3KOsy9(chr(1065 - 1017) + chr(111) + '\x31', ord("\x08")), -ehT0Px3KOsy9(chr(48) + chr(1710 - 1599) + chr(0b1000 + 0o51), 8), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + chr(0b11101 + 0o24), 8), ehT0Px3KOsy9(chr(0b11110 + 0o22) + chr(0b1001000 + 0o47) + chr(0b110001), 8)])}) jN60tjtvzrYM = oVre8I6UXc3b.decode(UkrMp_I0RDmo) zNDuWsUOZeSr = oVre8I6UXc3b.decode_list(PEp6lmQpvsxP) NgKT75vyg5ws = oVre8I6UXc3b.decode_list(UkrMp_I0RDmo) return (jN60tjtvzrYM, zNDuWsUOZeSr, NgKT75vyg5ws, mFC4wfloFTId)
tensorflow/tensor2tensor
tensor2tensor/models/research/glow.py
glow_hparams
def glow_hparams(): """Glow Hparams.""" hparams = common_hparams.basic_params1() hparams.clip_grad_norm = None hparams.weight_decay = 0.0 hparams.learning_rate_constant = 3e-4 hparams.batch_size = 32 # can be prev_level, prev_step or normal. # see: glow_ops.merge_level_and_latent_dist hparams.add_hparam("level_scale", "prev_level") hparams.add_hparam("n_levels", 3) hparams.add_hparam("n_bits_x", 8) hparams.add_hparam("depth", 32) # Activation - Relu or Gatu hparams.add_hparam("activation", "relu") # Coupling layer, additive or affine. hparams.add_hparam("coupling", "affine") hparams.add_hparam("coupling_width", 512) hparams.add_hparam("coupling_dropout", 0.0) hparams.add_hparam("top_prior", "single_conv") # init_batch_size denotes the number of examples used for data-dependent # initialization. A higher init_batch_size is required for training # stability especially when hparams.batch_size is low. hparams.add_hparam("init_batch_size", 256) hparams.add_hparam("temperature", 1.0) return hparams
python
def glow_hparams(): """Glow Hparams.""" hparams = common_hparams.basic_params1() hparams.clip_grad_norm = None hparams.weight_decay = 0.0 hparams.learning_rate_constant = 3e-4 hparams.batch_size = 32 # can be prev_level, prev_step or normal. # see: glow_ops.merge_level_and_latent_dist hparams.add_hparam("level_scale", "prev_level") hparams.add_hparam("n_levels", 3) hparams.add_hparam("n_bits_x", 8) hparams.add_hparam("depth", 32) # Activation - Relu or Gatu hparams.add_hparam("activation", "relu") # Coupling layer, additive or affine. hparams.add_hparam("coupling", "affine") hparams.add_hparam("coupling_width", 512) hparams.add_hparam("coupling_dropout", 0.0) hparams.add_hparam("top_prior", "single_conv") # init_batch_size denotes the number of examples used for data-dependent # initialization. A higher init_batch_size is required for training # stability especially when hparams.batch_size is low. hparams.add_hparam("init_batch_size", 256) hparams.add_hparam("temperature", 1.0) return hparams
[ "def", "glow_hparams", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "hparams", ".", "clip_grad_norm", "=", "None", "hparams", ".", "weight_decay", "=", "0.0", "hparams", ".", "learning_rate_constant", "=", "3e-4", "hparams", ".", "batch_size", "=", "32", "# can be prev_level, prev_step or normal.", "# see: glow_ops.merge_level_and_latent_dist", "hparams", ".", "add_hparam", "(", "\"level_scale\"", ",", "\"prev_level\"", ")", "hparams", ".", "add_hparam", "(", "\"n_levels\"", ",", "3", ")", "hparams", ".", "add_hparam", "(", "\"n_bits_x\"", ",", "8", ")", "hparams", ".", "add_hparam", "(", "\"depth\"", ",", "32", ")", "# Activation - Relu or Gatu", "hparams", ".", "add_hparam", "(", "\"activation\"", ",", "\"relu\"", ")", "# Coupling layer, additive or affine.", "hparams", ".", "add_hparam", "(", "\"coupling\"", ",", "\"affine\"", ")", "hparams", ".", "add_hparam", "(", "\"coupling_width\"", ",", "512", ")", "hparams", ".", "add_hparam", "(", "\"coupling_dropout\"", ",", "0.0", ")", "hparams", ".", "add_hparam", "(", "\"top_prior\"", ",", "\"single_conv\"", ")", "# init_batch_size denotes the number of examples used for data-dependent", "# initialization. A higher init_batch_size is required for training", "# stability especially when hparams.batch_size is low.", "hparams", ".", "add_hparam", "(", "\"init_batch_size\"", ",", "256", ")", "hparams", ".", "add_hparam", "(", "\"temperature\"", ",", "1.0", ")", "return", "hparams" ]
Glow Hparams.
[ "Glow", "Hparams", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/glow.py#L39-L65
train
Glow Hparams.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7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AZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110011) + '\063' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(1427 - 1377) + chr(54), 39573 - 39565), ehT0Px3KOsy9(chr(0b110000) + chr(3131 - 3020) + chr(1579 - 1530) + chr(0b1011 + 0o47) + chr(0b101101 + 0o7), ord("\x08")), ehT0Px3KOsy9('\060' + chr(4964 - 4853) + '\062' + chr(52) + chr(51), 40511 - 40503), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(8221 - 8110) + chr(0b110001) + chr(1645 - 1592) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011 + 0o0) + chr(797 - 745) + chr(943 - 891), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(48) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\157' + '\062' + chr(0b10101 + 0o34) + chr(54), 0b1000), ehT0Px3KOsy9(chr(2146 - 2098) + '\x6f' + chr(0b11101 + 0o26) + '\067' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(367 - 319) + '\x6f' + chr(51) + chr(0b110000) + chr(0b100111 + 0o16), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(2298 - 2247) + '\x31' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b101100 + 0o4) + '\x6f' + chr(0b110001), 15093 - 15085), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b100100 + 0o17) + chr(0b101 + 0o53) + chr(725 - 675), 18857 - 18849), ehT0Px3KOsy9('\060' + chr(111) + chr(1772 - 1723) + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\x32' + chr(0b110110), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\063' + chr(0b110101), 41504 - 41496), ehT0Px3KOsy9('\x30' + chr(111) + chr(2494 - 2439) + chr(53), 48240 - 48232), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(50) + chr(50), 55221 - 55213), ehT0Px3KOsy9(chr(526 - 478) + chr(0b1101111) + chr(0b110011) + '\x36' + chr(1707 - 1652), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1264 - 1153) + '\x31' + '\066' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b1001 + 0o52) + chr(0b1100 + 0o44) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(51) + chr(0b110101 + 0o2), 0o10), ehT0Px3KOsy9('\x30' + chr(4360 - 4249) + chr(0b101000 + 0o17) + chr(0b10 + 0o64), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110011) + '\066' + chr(1363 - 1313), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(53) + chr(53), 0o10), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(793 - 682) + chr(0b1001 + 0o51) + chr(0b110001) + chr(0b1011 + 0o47), 0o10), ehT0Px3KOsy9(chr(1739 - 1691) + '\x6f' + '\062' + chr(0b10010 + 0o44) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(837 - 789) + '\157' + chr(51) + chr(48) + chr(0b1000 + 0o55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110101) + chr(0b100011 + 0o23), 0b1000), ehT0Px3KOsy9(chr(1726 - 1678) + chr(2086 - 1975) + chr(0b110010) + '\x36' + chr(55), 60625 - 60617), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b1101111) + chr(0b100000 + 0o21) + '\064', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\157' + chr(0b110001) + chr(49) + chr(49), 34177 - 34169), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b11 + 0o57) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(111) + chr(294 - 242) + chr(0b10010 + 0o37), ord("\x08")), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\157' + '\061', 8), ehT0Px3KOsy9(chr(2074 - 2026) + chr(2150 - 2039) + chr(954 - 905) + chr(0b10111 + 0o34) + chr(0b1100 + 0o45), ord("\x08")), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + '\061' + chr(51) + '\x31', 8), ehT0Px3KOsy9('\x30' + chr(1336 - 1225) + chr(50) + '\063' + '\x36', 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(49) + chr(50), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(103 - 55) + chr(0b1101111) + chr(53) + '\x30', ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf7'), chr(5725 - 5625) + chr(0b1100101) + '\x63' + chr(0b1000111 + 0o50) + chr(0b1100100) + chr(0b1100101))(chr(10319 - 10202) + '\164' + chr(0b1100110) + chr(45) + chr(0b10001 + 0o47)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def mRjdlcO3eZvh(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() n4ljua2gi1Pr.SdNSZNVkVjLh = None n4ljua2gi1Pr.eB4rJl6fUxw9 = 0.0 n4ljua2gi1Pr.Ot9HUjnkxXA_ = 0.0003 n4ljua2gi1Pr.ix9dZyeAmUxY = ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(52) + '\060', 37778 - 37770) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(100) + chr(0b1001111 + 0o26) + chr(0b1000 + 0o133) + chr(7017 - 6906) + chr(0b1000101 + 0o37) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + '\055' + chr(708 - 652)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb53"\xc6\x00\xbb4\xed\x99\xa9\xac'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(2024 - 1979) + '\x38'), xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9$1\xd53\x88"\xf8\x9d\xa9'), chr(4420 - 4320) + chr(3384 - 3283) + '\x63' + chr(111) + '\144' + chr(4536 - 4435))(chr(0b1110101) + chr(116) + '\146' + '\055' + '\x38')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), '\x64' + '\145' + chr(0b1000100 + 0o37) + chr(0b1101110 + 0o1) + chr(0b1100100) + '\145')('\165' + chr(116) + chr(102) + '\x2d' + chr(0b10 + 0o66)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\t8\xc6\x1a\x81+\xfd'), chr(974 - 874) + chr(7853 - 7752) + chr(6345 - 6246) + '\157' + '\144' + chr(9676 - 9575))(chr(117) + chr(0b1101 + 0o147) + chr(0b1100110) + chr(0b101101 + 0o0) + chr(1720 - 1664)), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1466 - 1415), 0b1000)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1000100 + 0o40) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(0b100001 + 0o104))(chr(4228 - 4111) + chr(0b1110100) + chr(6353 - 6251) + chr(1150 - 1105) + chr(1021 - 965)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\t6\xca\x18\x97\x18\xf6'), chr(0b1001010 + 0o32) + chr(101) + chr(7237 - 7138) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b1000000 + 0o65) + '\164' + chr(0b101010 + 0o74) + '\x2d' + chr(1778 - 1722)), ehT0Px3KOsy9(chr(1812 - 1764) + chr(0b1110 + 0o141) + '\061' + chr(48), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1 + 0o143) + chr(101) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(2929 - 2873)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbd3$\xd7\x04'), chr(100) + '\x65' + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110001 + 0o4) + chr(116) + chr(0b11110 + 0o110) + chr(1020 - 975) + '\x38'), ehT0Px3KOsy9(chr(0b110000) + chr(4666 - 4555) + chr(52) + chr(48), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(3268 - 3167))(chr(11285 - 11168) + '\164' + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb85 \xca\x1a\x853\xe7\x97\xab'), chr(0b111100 + 0o50) + chr(0b1100101) + chr(99) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1100100 + 0o20) + '\x66' + chr(1159 - 1114) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xab38\xd6'), '\144' + chr(0b100001 + 0o104) + chr(0b11000 + 0o113) + chr(111) + chr(0b1100100) + chr(0b1010001 + 0o24))(chr(117) + '\164' + '\146' + '\055' + chr(56))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1011 + 0o131) + '\x65' + chr(4296 - 4197) + chr(0b1101100 + 0o3) + '\144' + chr(5877 - 5776))(chr(117) + chr(1207 - 1091) + chr(102) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba9!\xd3\x00\x8d)\xe9'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b101101 + 0o110) + chr(8241 - 8125) + chr(6647 - 6545) + chr(0b101101) + chr(0b101111 + 0o11)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb802\xca\x02\x81'), chr(100) + chr(2416 - 2315) + chr(8856 - 8757) + chr(111) + chr(100) + '\145')(chr(117) + chr(0b110010 + 0o102) + chr(102) + chr(0b10111 + 0o26) + chr(56))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(100) + '\x65' + '\x63' + chr(111) + chr(9740 - 9640) + chr(0b1100101))('\165' + chr(2179 - 2063) + '\146' + '\x2d' + chr(0b110011 + 0o5)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba9!\xd3\x00\x8d)\xe9\xa7\xb2\xa0e\xb69'), chr(100) + '\145' + '\x63' + '\157' + chr(0b100000 + 0o104) + '\145')('\165' + '\x74' + chr(0b110100 + 0o62) + '\x2d' + chr(56)), ehT0Px3KOsy9('\060' + chr(8662 - 8551) + chr(49) + chr(0b11011 + 0o25) + chr(48) + chr(0b110000), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1100100) + '\x65' + chr(0b110 + 0o135) + chr(5257 - 5146) + chr(9882 - 9782) + '\x65')(chr(117) + chr(116) + chr(102) + '\055' + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xba9!\xd3\x00\x8d)\xe9\xa7\xa1\xbbn\xb2>c\xa9'), chr(100) + chr(0b1100011 + 0o2) + chr(0b1100011) + chr(0b101010 + 0o105) + '\144' + chr(0b1001100 + 0o31))(chr(0b1110101) + '\164' + chr(102) + '\x2d' + '\070'), 0.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1100100) + chr(0b11101 + 0o110) + chr(99) + chr(5214 - 5103) + chr(0b1100100) + chr(101))('\165' + '\164' + chr(102) + chr(0b100011 + 0o12) + chr(1263 - 1207)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xad9$\xfc\x1c\x96.\xe1\x8a'), '\144' + chr(101) + '\143' + '\x6f' + '\x64' + '\x65')('\165' + '\164' + chr(8633 - 8531) + chr(0b11001 + 0o24) + chr(2513 - 2457)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xaa?:\xc4\x00\x81\x18\xed\x97\xab\xbf'), chr(4343 - 4243) + chr(0b1100101) + chr(0b101110 + 0o65) + chr(2403 - 2292) + chr(7094 - 6994) + '\145')('\x75' + chr(0b1110100) + chr(102) + chr(45) + chr(323 - 267))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(100) + '\145' + chr(4512 - 4413) + '\x6f' + chr(8922 - 8822) + chr(0b1100101))('\x75' + chr(0b1011111 + 0o25) + chr(0b1100110) + chr(1737 - 1692) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb08=\xd73\x86&\xfa\x9b\xad\x96r\xab+s'), '\x64' + '\145' + '\143' + chr(0b1011000 + 0o27) + chr(0b1100100) + chr(101))(chr(0b1010 + 0o153) + '\164' + '\146' + '\x2d' + chr(649 - 593)), ehT0Px3KOsy9('\x30' + chr(111) + '\064' + chr(0b110000) + chr(0b110000), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb820\xfc\x04\x94&\xfc\x99\xa8'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + '\144' + chr(101))(chr(117) + '\x74' + chr(0b1010 + 0o134) + chr(45) + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xad39\xd3\t\x96&\xfa\x8d\xb7\xac'), chr(0b1011110 + 0o6) + '\x65' + chr(0b1100011) + chr(2634 - 2523) + '\x64' + chr(0b1100101))(chr(2101 - 1984) + chr(116) + chr(0b100001 + 0o105) + '\x2d' + '\070'), 1.0) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_aux.py
shift_and_pad
def shift_and_pad(tensor, shift, axis=0): """Shifts and pads with zero along an axis. Example: shift_and_pad([1, 2, 3, 4], 2) --> [0, 0, 1, 2] shift_and_pad([1, 2, 3, 4], -2) --> [3, 4, 0, 0] Args: tensor: Tensor; to be shifted and padded. shift: int; number of positions to shift by. axis: int; along which axis to shift and pad. Returns: A Tensor with the same shape as the input tensor. """ shape = tensor.shape rank = len(shape) assert 0 <= abs(axis) < rank length = int(shape[axis]) assert 0 <= abs(shift) < length paddings = [(0, 0)] * rank begin = [0] * rank size = [-1] * rank if shift > 0: paddings[axis] = (shift, 0) size[axis] = length - shift elif shift < 0: paddings[axis] = (0, -shift) begin[axis] = -shift ret = tf.pad(tf.slice(tensor, begin, size), paddings) return ret
python
def shift_and_pad(tensor, shift, axis=0): """Shifts and pads with zero along an axis. Example: shift_and_pad([1, 2, 3, 4], 2) --> [0, 0, 1, 2] shift_and_pad([1, 2, 3, 4], -2) --> [3, 4, 0, 0] Args: tensor: Tensor; to be shifted and padded. shift: int; number of positions to shift by. axis: int; along which axis to shift and pad. Returns: A Tensor with the same shape as the input tensor. """ shape = tensor.shape rank = len(shape) assert 0 <= abs(axis) < rank length = int(shape[axis]) assert 0 <= abs(shift) < length paddings = [(0, 0)] * rank begin = [0] * rank size = [-1] * rank if shift > 0: paddings[axis] = (shift, 0) size[axis] = length - shift elif shift < 0: paddings[axis] = (0, -shift) begin[axis] = -shift ret = tf.pad(tf.slice(tensor, begin, size), paddings) return ret
[ "def", "shift_and_pad", "(", "tensor", ",", "shift", ",", "axis", "=", "0", ")", ":", "shape", "=", "tensor", ".", "shape", "rank", "=", "len", "(", "shape", ")", "assert", "0", "<=", "abs", "(", "axis", ")", "<", "rank", "length", "=", "int", "(", "shape", "[", "axis", "]", ")", "assert", "0", "<=", "abs", "(", "shift", ")", "<", "length", "paddings", "=", "[", "(", "0", ",", "0", ")", "]", "*", "rank", "begin", "=", "[", "0", "]", "*", "rank", "size", "=", "[", "-", "1", "]", "*", "rank", "if", "shift", ">", "0", ":", "paddings", "[", "axis", "]", "=", "(", "shift", ",", "0", ")", "size", "[", "axis", "]", "=", "length", "-", "shift", "elif", "shift", "<", "0", ":", "paddings", "[", "axis", "]", "=", "(", "0", ",", "-", "shift", ")", "begin", "[", "axis", "]", "=", "-", "shift", "ret", "=", "tf", ".", "pad", "(", "tf", ".", "slice", "(", "tensor", ",", "begin", ",", "size", ")", ",", "paddings", ")", "return", "ret" ]
Shifts and pads with zero along an axis. Example: shift_and_pad([1, 2, 3, 4], 2) --> [0, 0, 1, 2] shift_and_pad([1, 2, 3, 4], -2) --> [3, 4, 0, 0] Args: tensor: Tensor; to be shifted and padded. shift: int; number of positions to shift by. axis: int; along which axis to shift and pad. Returns: A Tensor with the same shape as the input tensor.
[ "Shifts", "and", "pads", "with", "zero", "along", "an", "axis", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_aux.py#L29-L64
train
Shifts and pads with zero along an axis.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB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ot1PSoAwYhj,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(5530 - 5419) + chr(2184 - 2133) + '\x34' + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(939 - 891) + chr(111) + chr(49) + chr(797 - 745) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\157' + chr(49) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10100 + 0o133) + chr(0b10010 + 0o41) + '\067' + '\063', 23210 - 23202), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + '\062' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1011111 + 0o20) + chr(0b110011) + chr(0b111 + 0o56) + chr(0b110110), 8329 - 8321), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\066' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(1672 - 1624) + chr(111) + '\063' + chr(0b100100 + 0o21) + chr(55), 0b1000), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(111) + chr(50) + '\066' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(5820 - 5709) + '\061' + chr(0b110 + 0o60) + chr(0b100110 + 0o14), 0o10), ehT0Px3KOsy9(chr(1113 - 1065) + chr(111) + '\x33' + '\x31' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111011 + 0o64) + '\062' + chr(0b11111 + 0o24) + '\060', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(0b11101 + 0o24) + '\067' + chr(0b10101 + 0o40), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b0 + 0o63) + chr(0b1000 + 0o51) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + chr(0b110111) + chr(0b101100 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1100010 + 0o15) + chr(0b1110 + 0o44) + chr(66 - 18) + '\067', 10994 - 10986), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + '\x30' + chr(0b101101 + 0o12), 0o10), ehT0Px3KOsy9(chr(1824 - 1776) + '\x6f' + '\061' + chr(780 - 731) + chr(2075 - 2021), 0o10), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(9534 - 9423) + chr(1083 - 1033) + chr(0b11010 + 0o35) + chr(0b110010 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(1594 - 1545) + chr(0b10001 + 0o45) + chr(50), 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(500 - 450) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\067' + '\064', 45984 - 45976), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b1 + 0o61) + chr(1671 - 1620) + chr(0b11111 + 0o24), 47031 - 47023), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(50) + '\067' + chr(1652 - 1602), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(1965 - 1914) + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(0b101101 + 0o102) + '\x31' + chr(798 - 746) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b110011) + chr(0b110101 + 0o1) + chr(0b11001 + 0o31), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + chr(0b11111 + 0o30), 0b1000), ehT0Px3KOsy9(chr(87 - 39) + '\157' + chr(49) + chr(1259 - 1210) + chr(51), 0b1000), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1100100 + 0o13) + '\x33' + chr(0b110111) + chr(48), 38720 - 38712), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + '\x33' + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(0b110011) + chr(1068 - 1018), 0b1000), ehT0Px3KOsy9(chr(1263 - 1215) + chr(0b1101111) + chr(0b110011) + chr(0b10110 + 0o34) + chr(0b110010 + 0o0), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(281 - 230) + chr(0b100010 + 0o17) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(732 - 681) + '\064' + chr(0b101110 + 0o6), ord("\x08")), ehT0Px3KOsy9('\060' + chr(10119 - 10008) + '\063' + chr(2189 - 2137) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(54) + '\x32', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1088 - 1037) + chr(0b10 + 0o56), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b111010 + 0o65) + '\x33' + chr(2446 - 2394) + '\x33', 0o10), ehT0Px3KOsy9(chr(202 - 154) + '\x6f' + '\x32' + chr(48) + chr(405 - 357), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(53) + chr(1637 - 1589), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf'), chr(100) + chr(101) + chr(0b0 + 0o143) + '\x6f' + chr(9587 - 9487) + chr(101))(chr(8184 - 8067) + chr(116) + chr(102) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _anWAY38LWz_(LK3cpXJU3UM0, LnbELFj1hfyx, cRTh61qyvi24=ehT0Px3KOsy9('\x30' + chr(9122 - 9011) + chr(0b100001 + 0o17), ord("\x08"))): nauYfLglTpcb = LK3cpXJU3UM0.nauYfLglTpcb SIkZeGCA53HL = c2A0yzQpDQB3(nauYfLglTpcb) assert ehT0Px3KOsy9('\x30' + '\157' + chr(1011 - 963), 8) <= Lt3jp3Wjtj_1(cRTh61qyvi24) < SIkZeGCA53HL CHAOgk5VCHH_ = ehT0Px3KOsy9(nauYfLglTpcb[cRTh61qyvi24]) assert ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1338 - 1290), 8) <= Lt3jp3Wjtj_1(LnbELFj1hfyx) < CHAOgk5VCHH_ rWQRL0c0130o = [(ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(48), 8), ehT0Px3KOsy9(chr(189 - 141) + chr(0b1101111) + chr(0b10010 + 0o36), 8))] * SIkZeGCA53HL _UO0diKSmKME = [ehT0Px3KOsy9('\x30' + '\157' + chr(0b110000), 8)] * SIkZeGCA53HL NLcc3BCJnQka = [-ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(111) + '\x31', ord("\x08"))] * SIkZeGCA53HL if LnbELFj1hfyx > ehT0Px3KOsy9(chr(0b110000) + chr(2787 - 2676) + chr(48), 8): rWQRL0c0130o[cRTh61qyvi24] = (LnbELFj1hfyx, ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x30', 8)) NLcc3BCJnQka[cRTh61qyvi24] = CHAOgk5VCHH_ - LnbELFj1hfyx elif LnbELFj1hfyx < ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\060', 8): rWQRL0c0130o[cRTh61qyvi24] = (ehT0Px3KOsy9(chr(0b100100 + 0o14) + chr(0b100101 + 0o112) + chr(0b110000), 8), -LnbELFj1hfyx) _UO0diKSmKME[cRTh61qyvi24] = -LnbELFj1hfyx VHn4CV4Ymrei = IDJ2eXGCBCDu.pad(IDJ2eXGCBCDu.slice(LK3cpXJU3UM0, _UO0diKSmKME, NLcc3BCJnQka), rWQRL0c0130o) return VHn4CV4Ymrei
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_aux.py
transformer_aux_base
def transformer_aux_base(): """Set of hyperparameters.""" hparams = transformer.transformer_base() hparams.shared_embedding_and_softmax_weights = False hparams.add_hparam("shift_values", "1,2,3,4") return hparams
python
def transformer_aux_base(): """Set of hyperparameters.""" hparams = transformer.transformer_base() hparams.shared_embedding_and_softmax_weights = False hparams.add_hparam("shift_values", "1,2,3,4") return hparams
[ "def", "transformer_aux_base", "(", ")", ":", "hparams", "=", "transformer", ".", "transformer_base", "(", ")", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "False", "hparams", ".", "add_hparam", "(", "\"shift_values\"", ",", "\"1,2,3,4\"", ")", "return", "hparams" ]
Set of hyperparameters.
[ "Set", "of", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_aux.py#L161-L166
train
Set of hyperparameters for transformer.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAf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_gSK8V7h0,Rurm1zTRfSmY,reqGiMiVQ77y,bsS9P6_LpdIe,sbGAZlkZOtyh,Cf_Qef15s3_F,eX02hlZjMfR0,wLqBDw8l0eIm,g1Uy6IV0tyJQ,f9CsFWzvg0Vq,YlkZvXL8qwsX,MCqssyYhLtLC,bpgWCAbiJWkL,CMUdZtaORwo4,hi1V0ySZcNds,kkSX4ccExqw4,V4roHaS3Ppej,o8rvoPw8ep3k,xafqLlk3kkUe,h0qciNl3EEEj,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\064' + chr(52), 41848 - 41840), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(871 - 816) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + chr(162 - 107) + '\060', 8), ehT0Px3KOsy9('\060' + '\157' + '\x33' + '\x33' + chr(1229 - 1178), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(425 - 374) + chr(691 - 641) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(0b101100 + 0o5) + chr(1499 - 1445), ord("\x08")), ehT0Px3KOsy9(chr(2203 - 2155) + chr(0b100 + 0o153) + chr(0b1 + 0o60) + chr(331 - 277) + chr(1854 - 1801), 0o10), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(6197 - 6086) + '\062' + chr(0b110101) + chr(50), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1000011 + 0o54) + chr(0b110111) + chr(0b11000 + 0o36), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(55) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(1719 - 1671) + chr(0b1101111) + '\x36' + chr(53), 19237 - 19229), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\063' + chr(228 - 180) + '\065', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(1450 - 1402) + '\157' + '\x31' + chr(55), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(667 - 613) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\x6f' + '\063' + chr(0b100010 + 0o16) + chr(1801 - 1753), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1437 - 1386) + '\x37' + chr(51), 0o10), ehT0Px3KOsy9(chr(504 - 456) + chr(0b1101111) + chr(1912 - 1863) + chr(2321 - 2268) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(8992 - 8881) + '\063' + chr(727 - 678) + chr(0b11 + 0o64), 27516 - 27508), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2052 - 2001) + chr(642 - 587) + '\x33', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(1776 - 1723) + chr(0b101011 + 0o7), 0b1000), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1101111) + '\x31' + '\067' + chr(0b10000 + 0o47), 27651 - 27643), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b11000 + 0o36) + chr(0b1111 + 0o43), 44113 - 44105), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(2030 - 1977) + chr(587 - 538), 65134 - 65126), ehT0Px3KOsy9('\x30' + '\157' + chr(0b101100 + 0o11) + chr(1127 - 1072), 0b1000), ehT0Px3KOsy9(chr(2266 - 2218) + chr(0b111101 + 0o62) + '\x33' + chr(51) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(50) + chr(463 - 413) + chr(0b110011), 15780 - 15772), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101101 + 0o6) + chr(0b110110) + chr(1674 - 1623), 32532 - 32524), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1989 - 1939) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101001 + 0o16) + '\x31', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(1280 - 1169) + chr(49) + chr(2225 - 2174), 53826 - 53818), ehT0Px3KOsy9(chr(150 - 102) + chr(0b1101111) + chr(0b10000 + 0o41) + chr(0b10 + 0o61) + chr(55), 10773 - 10765), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + '\x32' + chr(50) + chr(438 - 387), 8), ehT0Px3KOsy9(chr(48) + chr(848 - 737) + chr(49) + '\067' + chr(0b11110 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10890 - 10779) + chr(0b10011 + 0o37) + chr(0b100111 + 0o20) + '\064', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110100) + chr(48), 2774 - 2766), ehT0Px3KOsy9(chr(1096 - 1048) + chr(0b1101111) + chr(0b10111 + 0o32) + chr(1086 - 1032), 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b11000 + 0o32) + chr(0b111 + 0o51) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(489 - 441) + chr(111) + '\067' + chr(0b10100 + 0o34), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + '\065' + chr(2363 - 2308), 43251 - 43243)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\x6f' + chr(0b110101) + chr(0b110000), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\n'), chr(9498 - 9398) + chr(101) + chr(0b1100011) + chr(9601 - 9490) + chr(0b1000001 + 0o43) + chr(0b1100101))(chr(0b1110 + 0o147) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def NhTAGmQCpp4D(): n4ljua2gi1Pr = Nk9m9eKr4iuF.transformer_base() n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(111) + chr(48), 0o10) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'E\x9c\x9c\x84\xbb~\x14\xd8_\x11'), chr(0b1011111 + 0o5) + chr(2375 - 2274) + '\x63' + chr(0b1101111) + chr(100) + chr(0b111011 + 0o52))(chr(8244 - 8127) + chr(0b100 + 0o160) + '\146' + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'W\x90\x91\xbd\xa7Q\x03\xcbR\tP\xb6'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(100) + chr(8810 - 8709))(chr(12169 - 12052) + chr(0b1110100) + chr(0b1000010 + 0o44) + chr(45) + chr(56)), xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\xd4\xca\xf7\xe0"A'), chr(100) + chr(0b100111 + 0o76) + '\x63' + chr(11456 - 11345) + chr(0b1100100) + chr(10107 - 10006))('\x75' + '\164' + chr(0b10 + 0o144) + '\055' + '\x38')) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/research/transformer_aux.py
transformer_aux_tiny
def transformer_aux_tiny(): """Set of hyperparameters.""" hparams = transformer.transformer_tiny() hparams.shared_embedding_and_softmax_weights = False hparams.add_hparam("shift_values", "1,2") return hparams
python
def transformer_aux_tiny(): """Set of hyperparameters.""" hparams = transformer.transformer_tiny() hparams.shared_embedding_and_softmax_weights = False hparams.add_hparam("shift_values", "1,2") return hparams
[ "def", "transformer_aux_tiny", "(", ")", ":", "hparams", "=", "transformer", ".", "transformer_tiny", "(", ")", "hparams", ".", "shared_embedding_and_softmax_weights", "=", "False", "hparams", ".", "add_hparam", "(", "\"shift_values\"", ",", "\"1,2\"", ")", "return", "hparams" ]
Set of hyperparameters.
[ "Set", "of", "hyperparameters", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/research/transformer_aux.py#L170-L175
train
Set of hyperparameters for transformer on tiny 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,jIl9qoAL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72k,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) + '\x33' + '\064' + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1127 - 1078) + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + chr(51) + chr(0b110110) + chr(0b1100 + 0o52), 0o10), ehT0Px3KOsy9('\060' + chr(0b1000110 + 0o51) + chr(483 - 432) + '\062' + chr(0b101111 + 0o4), 0o10), ehT0Px3KOsy9('\x30' + chr(828 - 717) + chr(0b10110 + 0o33) + '\065' + '\060', 0b1000), ehT0Px3KOsy9(chr(314 - 266) + chr(8563 - 8452) + chr(0b111 + 0o52) + '\063' + chr(1148 - 1099), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100101 + 0o15) + chr(0b10000 + 0o41) + chr(0b101111 + 0o3), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\062' + chr(2189 - 2136) + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110010) + chr(2725 - 2670) + '\x31', 53722 - 53714), ehT0Px3KOsy9(chr(48) + chr(0b110110 + 0o71) + chr(0b110011) + '\x31' + chr(52), 0o10), ehT0Px3KOsy9(chr(48) + chr(6161 - 6050) + '\062' + '\063' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\x6f' + chr(49) + chr(0b110011) + chr(0b110001), 8), ehT0Px3KOsy9(chr(91 - 43) + '\x6f' + chr(1422 - 1371) + chr(0b1110 + 0o46) + chr(66 - 14), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + chr(8843 - 8732) + '\x32' + '\067' + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b110100) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111 + 0o0) + chr(1753 - 1703) + chr(0b110010 + 0o0) + chr(106 - 56), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + '\061' + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10193 - 10082) + '\062' + '\x33' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(10461 - 10350) + chr(1010 - 959) + '\x31' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b111101 + 0o62) + chr(0b1110 + 0o43) + chr(0b110100) + '\061', 0b1000), ehT0Px3KOsy9('\060' + chr(0b110110 + 0o71) + '\x35' + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + '\063' + chr(50) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\x6f' + '\x32' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110100) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b11000 + 0o127) + '\x33' + chr(1872 - 1824) + chr(0b110 + 0o57), 21240 - 21232), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(7759 - 7648) + chr(1281 - 1231) + chr(2221 - 2171) + '\x33', 58128 - 58120), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(51) + '\x32', 0b1000), ehT0Px3KOsy9(chr(48) + chr(10681 - 10570) + '\x33' + chr(1185 - 1133) + chr(0b110001), 8), ehT0Px3KOsy9('\060' + '\x6f' + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\157' + chr(0b11001 + 0o31) + '\x36' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b101111 + 0o4) + '\060' + '\062', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100011 + 0o16) + chr(0b110001) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(701 - 653) + chr(0b1000101 + 0o52) + '\x31' + chr(53), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x37' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(0b100000 + 0o117) + '\x31' + '\x32' + chr(78 - 24), 30845 - 30837), ehT0Px3KOsy9(chr(2281 - 2233) + chr(0b10100 + 0o133) + chr(2446 - 2395) + chr(0b110001) + '\x33', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(0b110011) + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + '\x31' + '\066', 37329 - 37321), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(721 - 672) + chr(0b110100) + '\061', 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(53) + '\060', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf'), '\x64' + chr(7080 - 6979) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(1563 - 1518) + chr(2201 - 2145)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def RC77lVoSn1T_(): n4ljua2gi1Pr = Nk9m9eKr4iuF.transformer_tiny() n4ljua2gi1Pr.qVamxim0L2I1 = ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100011 + 0o15), 0b1000) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\x80,\x92\x8c\x00)\xeb\xde\xd8\xa1'), '\x64' + '\x65' + chr(99) + chr(111) + '\x64' + chr(6961 - 6860))('\165' + chr(0b1100 + 0o150) + chr(0b1010111 + 0o17) + chr(0b101 + 0o50) + chr(1317 - 1261)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x92 \x9f\xb5\x1c\x06\xfc\xcd\xd5\xb9\xfb*'), '\x64' + chr(0b111101 + 0o50) + '\x63' + chr(0b1101111) + chr(0b1010011 + 0o21) + chr(0b100101 + 0o100))('\x75' + '\164' + '\x66' + '\055' + chr(1871 - 1815)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xd0d\xc4'), chr(100) + '\145' + '\x63' + chr(111) + '\x64' + '\x65')('\165' + '\x74' + chr(0b111010 + 0o54) + chr(45) + chr(1668 - 1612))) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/models/video/base.py
pixels_from_softmax
def pixels_from_softmax(frame_logits, pure_sampling=False, temperature=1.0, gumbel_noise_factor=0.2): """Given frame_logits from a per-pixel softmax, generate colors.""" # If we're purely sampling, just sample each pixel. if pure_sampling or temperature == 0.0: return common_layers.sample_with_temperature(frame_logits, temperature) # Gumbel-sample from the pixel sofmax and average by pixel values. pixel_range = tf.to_float(tf.range(256)) for _ in range(len(frame_logits.get_shape().as_list()) - 1): pixel_range = tf.expand_dims(pixel_range, axis=0) frame_logits = tf.nn.log_softmax(frame_logits) gumbel_samples = discretization.gumbel_sample( common_layers.shape_list(frame_logits)) * gumbel_noise_factor frame = tf.nn.softmax((frame_logits + gumbel_samples) / temperature, axis=-1) result = tf.reduce_sum(frame * pixel_range, axis=-1) # Round on the forward pass, not on the backward one. return result + tf.stop_gradient(tf.round(result) - result)
python
def pixels_from_softmax(frame_logits, pure_sampling=False, temperature=1.0, gumbel_noise_factor=0.2): """Given frame_logits from a per-pixel softmax, generate colors.""" # If we're purely sampling, just sample each pixel. if pure_sampling or temperature == 0.0: return common_layers.sample_with_temperature(frame_logits, temperature) # Gumbel-sample from the pixel sofmax and average by pixel values. pixel_range = tf.to_float(tf.range(256)) for _ in range(len(frame_logits.get_shape().as_list()) - 1): pixel_range = tf.expand_dims(pixel_range, axis=0) frame_logits = tf.nn.log_softmax(frame_logits) gumbel_samples = discretization.gumbel_sample( common_layers.shape_list(frame_logits)) * gumbel_noise_factor frame = tf.nn.softmax((frame_logits + gumbel_samples) / temperature, axis=-1) result = tf.reduce_sum(frame * pixel_range, axis=-1) # Round on the forward pass, not on the backward one. return result + tf.stop_gradient(tf.round(result) - result)
[ "def", "pixels_from_softmax", "(", "frame_logits", ",", "pure_sampling", "=", "False", ",", "temperature", "=", "1.0", ",", "gumbel_noise_factor", "=", "0.2", ")", ":", "# If we're purely sampling, just sample each pixel.", "if", "pure_sampling", "or", "temperature", "==", "0.0", ":", "return", "common_layers", ".", "sample_with_temperature", "(", "frame_logits", ",", "temperature", ")", "# Gumbel-sample from the pixel sofmax and average by pixel values.", "pixel_range", "=", "tf", ".", "to_float", "(", "tf", ".", "range", "(", "256", ")", ")", "for", "_", "in", "range", "(", "len", "(", "frame_logits", ".", "get_shape", "(", ")", ".", "as_list", "(", ")", ")", "-", "1", ")", ":", "pixel_range", "=", "tf", ".", "expand_dims", "(", "pixel_range", ",", "axis", "=", "0", ")", "frame_logits", "=", "tf", ".", "nn", ".", "log_softmax", "(", "frame_logits", ")", "gumbel_samples", "=", "discretization", ".", "gumbel_sample", "(", "common_layers", ".", "shape_list", "(", "frame_logits", ")", ")", "*", "gumbel_noise_factor", "frame", "=", "tf", ".", "nn", ".", "softmax", "(", "(", "frame_logits", "+", "gumbel_samples", ")", "/", "temperature", ",", "axis", "=", "-", "1", ")", "result", "=", "tf", ".", "reduce_sum", "(", "frame", "*", "pixel_range", ",", "axis", "=", "-", "1", ")", "# Round on the forward pass, not on the backward one.", "return", "result", "+", "tf", ".", "stop_gradient", "(", "tf", ".", "round", "(", "result", ")", "-", "result", ")" ]
Given frame_logits from a per-pixel softmax, generate colors.
[ "Given", "frame_logits", "from", "a", "per", "-", "pixel", "softmax", "generate", "colors", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/base.py#L40-L59
train
Given frame_logits from a per - pixel softmax generate colors.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp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lSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b110000) + chr(0b1010110 + 0o31) + chr(49) + chr(1974 - 1926) + chr(49), 0b1000), ehT0Px3KOsy9(chr(404 - 356) + '\x6f' + '\063' + chr(51) + chr(55), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(73 - 22) + chr(1849 - 1795) + chr(0b0 + 0o60), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6030 - 5919) + chr(49) + chr(0b11000 + 0o33) + chr(0b101110 + 0o7), 0b1000), ehT0Px3KOsy9('\060' + chr(0b10101 + 0o132) + chr(0b101000 + 0o12) + '\x30' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x37' + '\x36', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(414 - 362) + chr(1467 - 1418), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111011 + 0o64) + chr(0b10101 + 0o34) + chr(0b101010 + 0o15) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b101111 + 0o100) + '\062' + chr(0b110011) + '\x31', 0b1000), ehT0Px3KOsy9(chr(124 - 76) + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b110011), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(662 - 607) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(224 - 176) + '\157' + chr(0b1011 + 0o50) + chr(1420 - 1367) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\062' + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\x33' + chr(48) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2820 - 2709) + chr(0b110001) + '\x33' + '\066', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(78 - 29) + chr(55) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + '\064' + chr(657 - 603), ord("\x08")), ehT0Px3KOsy9(chr(0b10110 + 0o32) + chr(257 - 146) + '\x32' + '\060' + chr(0b11001 + 0o35), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010011 + 0o34) + chr(0b10011 + 0o40) + '\063' + '\060', 0b1000), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\063' + chr(48) + chr(1870 - 1815), 28549 - 28541), ehT0Px3KOsy9(chr(1170 - 1122) + chr(0b111101 + 0o62) + chr(0b11111 + 0o22) + chr(2257 - 2202) + chr(49), 0b1000), ehT0Px3KOsy9(chr(821 - 773) + chr(0b1101111) + '\x35' + chr(0b110011), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5861 - 5750) + '\063' + chr(0b11010 + 0o26) + chr(0b100000 + 0o22), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + '\x34' + '\x35', 50096 - 50088), ehT0Px3KOsy9('\x30' + chr(0b101101 + 0o102) + '\065' + '\x30', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b11 + 0o57) + chr(2118 - 2067), 14939 - 14931), ehT0Px3KOsy9('\x30' + chr(111) + chr(1184 - 1134) + chr(50) + chr(55), 28515 - 28507), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x32' + '\x32', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b110000 + 0o77) + '\x31' + chr(49) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + '\064', 24837 - 24829), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(50) + chr(0b10110 + 0o36) + chr(53), 12055 - 12047), ehT0Px3KOsy9(chr(82 - 34) + chr(0b1010110 + 0o31) + chr(0b101 + 0o55) + chr(55) + chr(52), 30143 - 30135), ehT0Px3KOsy9('\x30' + chr(4436 - 4325) + '\062' + chr(847 - 793) + chr(175 - 120), 14579 - 14571), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\066' + chr(1896 - 1843), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(53) + chr(0b100111 + 0o14), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10010 + 0o37) + chr(0b1000 + 0o54) + '\066', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(785 - 736) + chr(1537 - 1487) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(57 - 9) + chr(0b11001 + 0o126) + chr(0b10110 + 0o33) + '\x37', 0b1000), ehT0Px3KOsy9('\x30' + chr(800 - 689) + chr(49) + chr(0b1011 + 0o47) + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110011) + '\x32' + '\060', 45372 - 45364)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1686 - 1638) + chr(6459 - 6348) + '\x35' + chr(48), 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'o'), chr(100) + chr(101) + chr(2814 - 2715) + '\x6f' + chr(0b110001 + 0o63) + '\x65')(chr(9129 - 9012) + chr(3697 - 3581) + chr(102) + chr(1480 - 1435) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def L1v47ZcB6HdO(Wfriqf6lN3Hc, BE85Zjl0quem=ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x30', 0b1000), uICaXvjWrxGa=1.0, iu0Dsc3R9Kkk=0.2): if BE85Zjl0quem or uICaXvjWrxGa == 0.0: return xafqLlk3kkUe(jSKPaHwSAfVv, xafqLlk3kkUe(SXOLrMavuUCe(b'2\xbe\x9d-\xee[~\x0b\xf0\x97R\xb2\xe6\xa13\nC\xf4\xb9\xb3\x0cY\xa7'), chr(100) + chr(660 - 559) + '\143' + chr(0b1101111) + '\144' + '\x65')(chr(0b110000 + 0o105) + chr(10652 - 10536) + '\x66' + chr(45) + '\070'))(Wfriqf6lN3Hc, uICaXvjWrxGa) gBF8SloDSd3d = IDJ2eXGCBCDu.to_float(IDJ2eXGCBCDu.range(ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(276 - 224) + '\x30' + chr(0b110000), 0o10))) for VNGQdHSFPrso in vQr8gNKaIaWE(c2A0yzQpDQB3(xafqLlk3kkUe(Wfriqf6lN3Hc.get_shape(), xafqLlk3kkUe(SXOLrMavuUCe(b' \xac\xaf1\xebMU'), chr(100) + '\145' + '\x63' + chr(7466 - 7355) + chr(0b1100100) + chr(9185 - 9084))('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)))()) - ehT0Px3KOsy9(chr(652 - 604) + '\x6f' + chr(0b110001), ord("\x08"))): gBF8SloDSd3d = IDJ2eXGCBCDu.expand_dims(gBF8SloDSd3d, axis=ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(0b1101010 + 0o5) + chr(48), 8)) Wfriqf6lN3Hc = IDJ2eXGCBCDu.nn.log_softmax(Wfriqf6lN3Hc) BX2pABD_1Jen = mllfN6mU2TGo.gumbel_sample(jSKPaHwSAfVv.shape_list(Wfriqf6lN3Hc)) * iu0Dsc3R9Kkk C4IqNNmLfHXB = IDJ2eXGCBCDu.nn.softmax((Wfriqf6lN3Hc + BX2pABD_1Jen) / uICaXvjWrxGa, axis=-ehT0Px3KOsy9('\060' + chr(111) + chr(49), 8)) ShZmEKfTkAOZ = IDJ2eXGCBCDu.reduce_sum(C4IqNNmLfHXB * gBF8SloDSd3d, axis=-ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(0b1101111) + chr(49), 8)) return ShZmEKfTkAOZ + xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'2\xab\x9f-\xddYS\x1d\xfd\x8a_\x83\xe6'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100 + 0o0) + chr(2007 - 1906))('\x75' + chr(0b1110100) + chr(0b10010 + 0o124) + chr(207 - 162) + chr(613 - 557)))(xafqLlk3kkUe(IDJ2eXGCBCDu, xafqLlk3kkUe(SXOLrMavuUCe(b'3\xb0\x853\xe6'), chr(6464 - 6364) + chr(0b1100101) + chr(0b1011011 + 0o10) + chr(0b1001101 + 0o42) + '\144' + '\x65')(chr(0b1010010 + 0o43) + chr(116) + '\146' + chr(0b11010 + 0o23) + chr(0b110100 + 0o4)))(ShZmEKfTkAOZ) - ShZmEKfTkAOZ)
tensorflow/tensor2tensor
tensor2tensor/models/video/base.py
next_frame_base
def next_frame_base(): """Common HParams for next_frame models.""" hparams = common_hparams.basic_params1() # Loss cutoff. hparams.add_hparam("video_modality_loss_cutoff", 0.01) # Additional resizing the frames before feeding them to model. hparams.add_hparam("preprocess_resize_frames", None) # How many data points to suffle. Ideally should be part of problem not model! hparams.add_hparam("shuffle_buffer_size", 128) # Tiny mode. For faster tests. hparams.add_hparam("tiny_mode", False) # In case a model supports smaller/faster version. hparams.add_hparam("small_mode", False) # In case a model has stochastic version. hparams.add_hparam("stochastic_model", False) # Internal loss for recurrent models. hparams.add_hparam("internal_loss", True) # choose from: concat, multiplicative, multi_additive hparams.add_hparam("action_injection", "multi_additive") # Scheduled sampling method. Choose between # ground_truth_only, prediction_only, prob, count, prob_inverse_exp. hparams.add_hparam("scheduled_sampling_mode", "prediction_only") hparams.add_hparam("scheduled_sampling_decay_steps", 10000) hparams.add_hparam("scheduled_sampling_max_prob", 1.0) hparams.add_hparam("scheduled_sampling_k", 900.0) return hparams
python
def next_frame_base(): """Common HParams for next_frame models.""" hparams = common_hparams.basic_params1() # Loss cutoff. hparams.add_hparam("video_modality_loss_cutoff", 0.01) # Additional resizing the frames before feeding them to model. hparams.add_hparam("preprocess_resize_frames", None) # How many data points to suffle. Ideally should be part of problem not model! hparams.add_hparam("shuffle_buffer_size", 128) # Tiny mode. For faster tests. hparams.add_hparam("tiny_mode", False) # In case a model supports smaller/faster version. hparams.add_hparam("small_mode", False) # In case a model has stochastic version. hparams.add_hparam("stochastic_model", False) # Internal loss for recurrent models. hparams.add_hparam("internal_loss", True) # choose from: concat, multiplicative, multi_additive hparams.add_hparam("action_injection", "multi_additive") # Scheduled sampling method. Choose between # ground_truth_only, prediction_only, prob, count, prob_inverse_exp. hparams.add_hparam("scheduled_sampling_mode", "prediction_only") hparams.add_hparam("scheduled_sampling_decay_steps", 10000) hparams.add_hparam("scheduled_sampling_max_prob", 1.0) hparams.add_hparam("scheduled_sampling_k", 900.0) return hparams
[ "def", "next_frame_base", "(", ")", ":", "hparams", "=", "common_hparams", ".", "basic_params1", "(", ")", "# Loss cutoff.", "hparams", ".", "add_hparam", "(", "\"video_modality_loss_cutoff\"", ",", "0.01", ")", "# Additional resizing the frames before feeding them to model.", "hparams", ".", "add_hparam", "(", "\"preprocess_resize_frames\"", ",", "None", ")", "# How many data points to suffle. Ideally should be part of problem not model!", "hparams", ".", "add_hparam", "(", "\"shuffle_buffer_size\"", ",", "128", ")", "# Tiny mode. For faster tests.", "hparams", ".", "add_hparam", "(", "\"tiny_mode\"", ",", "False", ")", "# In case a model supports smaller/faster version.", "hparams", ".", "add_hparam", "(", "\"small_mode\"", ",", "False", ")", "# In case a model has stochastic version.", "hparams", ".", "add_hparam", "(", "\"stochastic_model\"", ",", "False", ")", "# Internal loss for recurrent models.", "hparams", ".", "add_hparam", "(", "\"internal_loss\"", ",", "True", ")", "# choose from: concat, multiplicative, multi_additive", "hparams", ".", "add_hparam", "(", "\"action_injection\"", ",", "\"multi_additive\"", ")", "# Scheduled sampling method. Choose between", "# ground_truth_only, prediction_only, prob, count, prob_inverse_exp.", "hparams", ".", "add_hparam", "(", "\"scheduled_sampling_mode\"", ",", "\"prediction_only\"", ")", "hparams", ".", "add_hparam", "(", "\"scheduled_sampling_decay_steps\"", ",", "10000", ")", "hparams", ".", "add_hparam", "(", "\"scheduled_sampling_max_prob\"", ",", "1.0", ")", "hparams", ".", "add_hparam", "(", "\"scheduled_sampling_k\"", ",", "900.0", ")", "return", "hparams" ]
Common HParams for next_frame models.
[ "Common", "HParams", "for", "next_frame", "models", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/models/video/base.py#L679-L704
train
Common HParams for next_frame models.
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,RQ6CSRrF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j,lot1PSoAwYhj,xfhwxiBOH72k,HcyiPkCViZiX,fOIXYo9a1WNS,z8EhBlYI2Bx4,Y3jVKaC8LEDU,ehT0Px3KOsy9,PlSM16l2KDPD,J6u1YyThfhgG,ZdP978XkGspL,c2A0yzQpDQB3,I7ZO3Ma9cXBb,YyaZ4tpXu4lf,eHmS9durw_Vs,abA97kOQKaLo,tsdjvlgh9gDP,VTYZGD68sBIs,Dx22bkKPdt5d,nSwwHEeM4cxI,sR_24x3xd4bh,xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + '\x35' + chr(52), 62139 - 62131), ehT0Px3KOsy9(chr(948 - 900) + chr(0b101111 + 0o100) + chr(52), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(423 - 372) + '\x36' + chr(52), 54020 - 54012), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(0b1101111) + '\063' + '\x37' + chr(0b110101), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b10 + 0o57) + chr(54) + chr(887 - 837), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\x32' + chr(0b10101 + 0o35), 38094 - 38086), ehT0Px3KOsy9(chr(928 - 880) + '\157' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110011) + '\064', 41420 - 41412), ehT0Px3KOsy9(chr(1905 - 1857) + '\x6f' + '\x31' + chr(0b11111 + 0o30) + chr(0b100000 + 0o26), 48307 - 48299), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + '\x31' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b101000 + 0o107) + chr(794 - 744) + '\065' + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + '\157' + '\x31' + '\x35' + chr(2449 - 2397), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110000 + 0o1) + '\x37' + chr(49), 13120 - 13112), ehT0Px3KOsy9('\060' + chr(111) + '\x33' + '\x33' + chr(0b100000 + 0o21), 31868 - 31860), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(54), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\061' + chr(0b110011) + chr(0b110001), 9895 - 9887), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x33' + chr(49) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + '\063' + '\063' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + '\067' + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(180 - 132) + chr(0b1101111) + chr(0b110001) + '\x36' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(52) + chr(0b110011), 47329 - 47321), ehT0Px3KOsy9(chr(0b110000) + chr(0b1011011 + 0o24) + chr(51) + chr(2390 - 2339) + '\061', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110111) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(1642 - 1587) + chr(793 - 745), 37102 - 37094), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(54) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b110111) + '\060', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(54) + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1101001 + 0o6) + chr(50) + chr(0b10001 + 0o43) + chr(0b100101 + 0o22), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(6083 - 5972) + chr(50) + '\067' + chr(1541 - 1492), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(745 - 695) + '\x33' + chr(0b110101), 8362 - 8354), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\062' + '\x35', 0b1000), ehT0Px3KOsy9(chr(178 - 130) + '\157' + chr(0b100100 + 0o23) + '\x34', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + chr(0b100 + 0o57) + chr(2143 - 2095) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b101110 + 0o2) + chr(0b1000011 + 0o54) + '\x31' + chr(1274 - 1226) + '\066', 26048 - 26040), ehT0Px3KOsy9(chr(1329 - 1281) + chr(138 - 27) + chr(49) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + '\x31' + chr(54) + chr(0b11010 + 0o31), ord("\x08")), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\x6f' + chr(0b110001) + chr(0b110100) + chr(52), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b1011 + 0o51) + chr(1467 - 1412), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\067' + '\x32', 0o10), ehT0Px3KOsy9(chr(1824 - 1776) + '\157' + chr(1090 - 1040) + '\060' + chr(812 - 761), 48998 - 48990)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b100111 + 0o110) + chr(0b110101) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x82'), '\144' + chr(4646 - 4545) + '\143' + '\x6f' + chr(0b1100100) + chr(4380 - 4279))(chr(0b1110000 + 0o5) + '\x74' + chr(9920 - 9818) + '\055' + chr(0b101 + 0o63)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FCfpu8yIKvdj(): n4ljua2gi1Pr = vLnG3ZpOXWXZ.basic_params1() xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(0b1111 + 0o125) + chr(101) + chr(99) + chr(10364 - 10253) + '\x64' + '\145')('\x75' + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdam\x90\x98\x1d\xcdl\xb3\x1a\xa9\xc5\x05\r\xa0Q5\xa4\xae\xc8/@\xacM\x97\x12\x9e'), chr(7634 - 7534) + '\145' + '\x63' + chr(111) + chr(0b1100100) + chr(4609 - 4508))('\x75' + chr(5566 - 5450) + chr(0b1100110) + '\x2d' + '\070'), 0.01) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(4613 - 4513) + chr(101) + '\143' + chr(111) + chr(0b1100100) + chr(8530 - 8429))(chr(10574 - 10457) + chr(0b10 + 0o162) + chr(102) + chr(1003 - 958) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcv\x91\x8d\x00\xfdb\xb9\r\xbb\xf6\x1e\x1c\xaag#\xae\x82\xdd\x02B\xb4\\\x8b'), chr(0b1110 + 0o126) + '\x65' + chr(0b1100011) + '\157' + '\x64' + '\145')(chr(0b1000111 + 0o56) + chr(0b1110100) + chr(0b111000 + 0o56) + chr(45) + chr(2017 - 1961)), None) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), '\144' + '\x65' + chr(2007 - 1908) + '\x6f' + '\x64' + chr(9917 - 9816))(chr(117) + '\x74' + '\146' + chr(128 - 83) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfl\x81\x9b\x14\xfed\x83\x1c\xbd\xcf\n\x1c\xabQ*\xa2\xa7\xde'), chr(0b100000 + 0o104) + chr(3854 - 3753) + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(102) + chr(1941 - 1896) + chr(0b111000)), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\062' + '\x30' + chr(0b110000), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), '\144' + chr(6078 - 5977) + chr(0b1000 + 0o133) + chr(0b1101111) + chr(1534 - 1434) + chr(0b1100101))(chr(0b1110011 + 0o2) + chr(116) + chr(102) + chr(0b1111 + 0o36) + chr(720 - 664)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xd8m\x9a\x84-\xffn\xb8\x1b'), '\x64' + chr(6076 - 5975) + '\143' + '\x6f' + chr(7299 - 7199) + chr(0b1100101))(chr(5793 - 5676) + chr(116) + chr(102) + chr(0b101101) + chr(56)), ehT0Px3KOsy9('\x30' + chr(2862 - 2751) + chr(472 - 424), 0o10)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), '\144' + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(9185 - 9084))(chr(117) + chr(0b11110 + 0o126) + '\146' + '\055' + chr(0b1010 + 0o56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfi\x95\x91\x1e\xcdl\xb3\x1a\xad'), chr(3343 - 3243) + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(0b10001 + 0o124))(chr(0b110001 + 0o104) + '\x74' + '\x66' + chr(0b101101) + chr(1145 - 1089)), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\060', 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(0b111110 + 0o46) + chr(0b1100101) + '\143' + chr(111) + chr(0b1011 + 0o131) + '\145')(chr(117) + chr(0b100110 + 0o116) + '\x66' + chr(0b101101) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfp\x9b\x9e\x1a\xf3r\xa8\x17\xab\xf6\x01\x16\xbdk5'), chr(4148 - 4048) + '\x65' + chr(0b11101 + 0o106) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + '\x74' + chr(5314 - 5212) + chr(1198 - 1153) + '\x38'), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110000), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(100) + '\145' + '\x63' + chr(0b111101 + 0o62) + '\x64' + chr(1445 - 1344))('\165' + chr(116) + '\x66' + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5j\x80\x98\x00\xfc`\xb0!\xa4\xc6\x1f\n'), '\x64' + '\x65' + '\x63' + chr(0b1101111) + chr(0b110111 + 0o55) + chr(0b1100101))('\165' + '\x74' + chr(1417 - 1315) + chr(1625 - 1580) + chr(0b11 + 0o65)), ehT0Px3KOsy9(chr(1162 - 1114) + chr(0b1101111) + chr(0b110001), 8)) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(0b1100100) + '\145' + '\x63' + chr(0b1101111) + chr(100) + '\145')(chr(0b1110101) + chr(1646 - 1530) + chr(102) + chr(45) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xcdg\x80\x94\x1d\xfc^\xb5\x10\xa2\xcc\x0f\r\xb0a7'), '\x64' + '\145' + chr(99) + chr(3964 - 3853) + chr(3255 - 3155) + '\145')(chr(0b110110 + 0o77) + '\x74' + chr(0b1100110) + '\055' + chr(1321 - 1265)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xc1q\x98\x89\x1b\xcd`\xb8\x1a\xa1\xdd\x05\x0f\xbc'), chr(1305 - 1205) + chr(0b1100101) + '\143' + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + '\x66' + chr(453 - 408) + chr(0b0 + 0o70))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(914 - 814) + chr(0b1100101) + chr(0b110011 + 0o60) + '\157' + chr(100) + chr(0b11010 + 0o113))(chr(0b1000000 + 0o65) + '\x74' + chr(0b1100110) + chr(0b100101 + 0o10) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfg\x9c\x98\x16\xe7m\xb9\x1a\x97\xda\r\x14\xa9b0\xa5\xba\xe4\x1dL\xbd\\'), chr(0b11101 + 0o107) + chr(0b111010 + 0o53) + '\143' + '\157' + chr(0b1100100) + chr(0b11111 + 0o106))('\165' + chr(116) + chr(102) + '\055' + chr(0b111000)), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdcv\x91\x99\x1b\xf1u\xb5\x11\xa6\xf6\x03\x17\xb5w'), '\x64' + chr(0b1100101) + '\143' + chr(111) + '\144' + '\145')('\x75' + chr(4456 - 4340) + '\146' + chr(730 - 685) + '\070')) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(6387 - 6287) + chr(101) + '\143' + chr(0b1010000 + 0o37) + '\x64' + chr(1064 - 963))(chr(0b1 + 0o164) + '\164' + chr(0b1100101 + 0o1) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfg\x9c\x98\x16\xe7m\xb9\x1a\x97\xda\r\x14\xa9b0\xa5\xba\xe4\x14F\xbaX\x81+\x8b\x80\xc2\xc9\xee'), chr(3945 - 3845) + '\x65' + '\x63' + chr(0b1101010 + 0o5) + '\x64' + chr(101))(chr(0b1110101) + chr(116) + chr(674 - 572) + chr(45) + chr(0b101101 + 0o13)), ehT0Px3KOsy9(chr(2128 - 2080) + chr(111) + '\062' + '\063' + '\064' + '\062' + chr(0b11110 + 0o22), ord("\x08"))) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(100) + chr(6739 - 6638) + chr(99) + chr(111) + chr(9759 - 9659) + chr(0b1100101))(chr(0b10101 + 0o140) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfg\x9c\x98\x16\xe7m\xb9\x1a\x97\xda\r\x14\xa9b0\xa5\xba\xe4\x1dB\xa1f\x88\x06\x97\x96'), '\x64' + '\x65' + '\143' + '\157' + chr(100) + '\x65')(chr(0b1110101) + chr(0b101001 + 0o113) + chr(0b1000100 + 0o42) + chr(0b101101 + 0o0) + chr(56)), 1.0) xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd`\x90\xa2\x1a\xe2`\xae\x1f\xa5'), chr(0b1100100) + chr(0b1010100 + 0o21) + chr(8570 - 8471) + chr(0b10100 + 0o133) + chr(1945 - 1845) + chr(578 - 477))('\x75' + chr(4082 - 3966) + chr(0b1000001 + 0o45) + chr(0b10111 + 0o26) + chr(0b10001 + 0o47)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xdfg\x9c\x98\x16\xe7m\xb9\x1a\x97\xda\r\x14\xa9b0\xa5\xba\xe4\x1b'), chr(100) + chr(2763 - 2662) + chr(2494 - 2395) + chr(0b1101111) + '\x64' + '\x65')(chr(7909 - 7792) + chr(0b11000 + 0o134) + chr(102) + '\x2d' + '\070'), 900.0) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/gym_utils.py
remove_time_limit_wrapper
def remove_time_limit_wrapper(env): """Removes top level TimeLimit Wrapper. Removes TimeLimit Wrapper from top level if exists, throws error if any other TimeLimit Wrapper is present in stack. Args: env: environment Returns: the env with removed time limit wrapper. """ if isinstance(env, gym.wrappers.TimeLimit): env = env.env env_ = env while isinstance(env_, gym.Wrapper): if isinstance(env_, gym.wrappers.TimeLimit): raise ValueError("Can remove only top-level TimeLimit gym.Wrapper.") env_ = env_.env return env
python
def remove_time_limit_wrapper(env): """Removes top level TimeLimit Wrapper. Removes TimeLimit Wrapper from top level if exists, throws error if any other TimeLimit Wrapper is present in stack. Args: env: environment Returns: the env with removed time limit wrapper. """ if isinstance(env, gym.wrappers.TimeLimit): env = env.env env_ = env while isinstance(env_, gym.Wrapper): if isinstance(env_, gym.wrappers.TimeLimit): raise ValueError("Can remove only top-level TimeLimit gym.Wrapper.") env_ = env_.env return env
[ "def", "remove_time_limit_wrapper", "(", "env", ")", ":", "if", "isinstance", "(", "env", ",", "gym", ".", "wrappers", ".", "TimeLimit", ")", ":", "env", "=", "env", ".", "env", "env_", "=", "env", "while", "isinstance", "(", "env_", ",", "gym", ".", "Wrapper", ")", ":", "if", "isinstance", "(", "env_", ",", "gym", ".", "wrappers", ".", "TimeLimit", ")", ":", "raise", "ValueError", "(", "\"Can remove only top-level TimeLimit gym.Wrapper.\"", ")", "env_", "=", "env_", ".", "env", "return", "env" ]
Removes top level TimeLimit Wrapper. Removes TimeLimit Wrapper from top level if exists, throws error if any other TimeLimit Wrapper is present in stack. Args: env: environment Returns: the env with removed time limit wrapper.
[ "Removes", "top", "level", "TimeLimit", "Wrapper", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/gym_utils.py#L129-L148
train
Removes TimeLimit Wrapper from top level if exists raises error if any other TimeLimit Wrapper is present in 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,pz9FlfzsWoy1,BXIwDASQ0Qkq,NL8dtWOpbcjF,_bikzMuRfbJG,sznFqDbNBHlx,ZsDPvpP4xdo3,cW7yQuyEnJ6E,KOHQGQ8qLDWm,NE1Yam2HHroQ,ygAzbDzrvRMh,SBRjvOU1ufVC,hOkXjmluKZfJ,q1QCh3W88sgk,TLbJ60djyws0,rIcPej9ZqMqV,WTxpD_zsEO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mQmyeWBmUpv,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) + '\x32' + '\063' + '\x35', 0o10), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\063' + chr(0b110 + 0o54) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\062' + '\x37' + chr(49), 31789 - 31781), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + chr(0b101000 + 0o12), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\061', 0o10), ehT0Px3KOsy9(chr(901 - 853) + chr(0b1010111 + 0o30) + chr(0b110100) + chr(51), 0b1000), ehT0Px3KOsy9(chr(1849 - 1801) + chr(0b1101111) + '\x31' + chr(2779 - 2726), 6795 - 6787), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b101001 + 0o106) + '\x32' + '\065', 20230 - 20222), ehT0Px3KOsy9(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(0b100001 + 0o22), 22124 - 22116), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(51) + '\x34' + chr(1828 - 1777), 36945 - 36937), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1100011 + 0o14) + '\x31' + chr(1490 - 1435) + chr(0b11110 + 0o27), 0b1000), ehT0Px3KOsy9(chr(168 - 120) + '\x6f' + chr(0b110010) + '\x34' + '\063', 0b1000), ehT0Px3KOsy9(chr(890 - 842) + '\157' + chr(1595 - 1546) + chr(48) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(1232 - 1184) + chr(0b11110 + 0o121) + chr(0b110110) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b111 + 0o52) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + '\061' + chr(0b110011 + 0o0) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1010011 + 0o34) + chr(334 - 284) + chr(0b11000 + 0o35) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(478 - 428) + chr(50) + chr(1303 - 1252), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(12116 - 12005) + '\061' + chr(643 - 593), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2691 - 2580) + chr(0b110011) + chr(0b11100 + 0o27) + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110011) + chr(0b10101 + 0o33) + chr(2630 - 2577), 58318 - 58310), ehT0Px3KOsy9('\x30' + '\x6f' + chr(49) + chr(0b100011 + 0o20) + chr(162 - 111), 0o10), ehT0Px3KOsy9(chr(380 - 332) + chr(0b1101111) + chr(2295 - 2246) + '\064', 58158 - 58150), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(593 - 545) + chr(1537 - 1486), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110010 + 0o0) + '\x31', 0o10), ehT0Px3KOsy9(chr(183 - 135) + chr(111) + chr(0b110011) + chr(248 - 200) + chr(0b11011 + 0o30), 0o10), ehT0Px3KOsy9(chr(413 - 365) + '\x6f' + '\061' + chr(1273 - 1218) + chr(0b110101), 8), ehT0Px3KOsy9('\x30' + chr(9105 - 8994) + chr(0b101 + 0o55) + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110010) + chr(0b10001 + 0o43) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b110010) + chr(0b100001 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\062' + '\x35' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1 + 0o156) + chr(51) + chr(0b110110) + '\x33', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1640 - 1589) + '\067' + chr(315 - 267), 54747 - 54739), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1101111) + chr(2027 - 1972) + chr(0b110111), 27575 - 27567), ehT0Px3KOsy9('\x30' + '\157' + chr(0b1110 + 0o44) + chr(0b110111) + chr(0b110010 + 0o0), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1919 - 1869) + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\x32' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(48) + chr(7783 - 7672) + chr(49) + chr(0b110111), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(51) + '\x31' + '\061', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1276 - 1165) + chr(2240 - 2191) + chr(55) + chr(1290 - 1235), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + '\157' + '\065' + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb3'), '\144' + '\145' + chr(99) + '\157' + '\144' + '\145')('\165' + '\x74' + chr(0b1100001 + 0o5) + chr(84 - 39) + chr(194 - 138)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def cOB1UnUG1G1_(xzsHIGfR8Ip5): if PlSM16l2KDPD(xzsHIGfR8Ip5, xafqLlk3kkUe(mZyhk1NGHEBF.wrappers, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9\xbc\xd4\x7f]J`|\xf7'), chr(5278 - 5178) + '\x65' + chr(9623 - 9524) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + chr(45) + chr(2834 - 2778)))): xzsHIGfR8Ip5 = xzsHIGfR8Ip5.env Ys2d1TDXTdYu = xzsHIGfR8Ip5 while PlSM16l2KDPD(Ys2d1TDXTdYu, xafqLlk3kkUe(mZyhk1NGHEBF, xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\xa7\xd8jaF\x7f'), '\144' + '\145' + chr(0b1100 + 0o127) + chr(0b1101111) + chr(4279 - 4179) + '\145')(chr(0b1011011 + 0o32) + chr(116) + chr(3759 - 3657) + chr(45) + chr(1756 - 1700)))): if PlSM16l2KDPD(Ys2d1TDXTdYu, xafqLlk3kkUe(mZyhk1NGHEBF.wrappers, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc9\xbc\xd4\x7f]J`|\xf7'), '\144' + chr(5295 - 5194) + chr(3897 - 3798) + chr(0b1101111) + '\144' + '\145')(chr(2951 - 2834) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38'))): raise q1QCh3W88sgk(xafqLlk3kkUe(SXOLrMavuUCe(b'\xde\xb4\xd7:cF`z\xf5\x86]\xcc/^v}\xd9\xfcz\xf4\xa9>z&\xfd\xe3)}\xcd2\xe3\x9a\x95V\xce5\xb1v\xa4Q\xca\xa7\xd8jaF\x7f;'), chr(0b1100100) + chr(0b11 + 0o142) + chr(0b1000100 + 0o37) + '\157' + chr(0b11110 + 0o106) + chr(0b1001 + 0o134))(chr(0b1110101) + '\x74' + '\x66' + '\055' + chr(56))) Ys2d1TDXTdYu = Ys2d1TDXTdYu.env return xzsHIGfR8Ip5
tensorflow/tensor2tensor
tensor2tensor/rl/gym_utils.py
gym_env_wrapper
def gym_env_wrapper(env, rl_env_max_episode_steps, maxskip_env, rendered_env, rendered_env_resize_to, sticky_actions): """Wraps a gym environment. see make_gym_env for details.""" # rl_env_max_episode_steps is None or int. assert ((not rl_env_max_episode_steps) or isinstance(rl_env_max_episode_steps, int)) wrap_with_time_limit = ((not rl_env_max_episode_steps) or rl_env_max_episode_steps >= 0) if wrap_with_time_limit: env = remove_time_limit_wrapper(env) if sticky_actions: env = StickyActionEnv(env) if maxskip_env: env = MaxAndSkipEnv(env) # pylint: disable=redefined-variable-type if rendered_env: env = RenderedEnv(env, resize_to=rendered_env_resize_to) if wrap_with_time_limit: env = gym.wrappers.TimeLimit( env, max_episode_steps=rl_env_max_episode_steps) return env
python
def gym_env_wrapper(env, rl_env_max_episode_steps, maxskip_env, rendered_env, rendered_env_resize_to, sticky_actions): """Wraps a gym environment. see make_gym_env for details.""" # rl_env_max_episode_steps is None or int. assert ((not rl_env_max_episode_steps) or isinstance(rl_env_max_episode_steps, int)) wrap_with_time_limit = ((not rl_env_max_episode_steps) or rl_env_max_episode_steps >= 0) if wrap_with_time_limit: env = remove_time_limit_wrapper(env) if sticky_actions: env = StickyActionEnv(env) if maxskip_env: env = MaxAndSkipEnv(env) # pylint: disable=redefined-variable-type if rendered_env: env = RenderedEnv(env, resize_to=rendered_env_resize_to) if wrap_with_time_limit: env = gym.wrappers.TimeLimit( env, max_episode_steps=rl_env_max_episode_steps) return env
[ "def", "gym_env_wrapper", "(", "env", ",", "rl_env_max_episode_steps", ",", "maxskip_env", ",", "rendered_env", ",", "rendered_env_resize_to", ",", "sticky_actions", ")", ":", "# rl_env_max_episode_steps is None or int.", "assert", "(", "(", "not", "rl_env_max_episode_steps", ")", "or", "isinstance", "(", "rl_env_max_episode_steps", ",", "int", ")", ")", "wrap_with_time_limit", "=", "(", "(", "not", "rl_env_max_episode_steps", ")", "or", "rl_env_max_episode_steps", ">=", "0", ")", "if", "wrap_with_time_limit", ":", "env", "=", "remove_time_limit_wrapper", "(", "env", ")", "if", "sticky_actions", ":", "env", "=", "StickyActionEnv", "(", "env", ")", "if", "maxskip_env", ":", "env", "=", "MaxAndSkipEnv", "(", "env", ")", "# pylint: disable=redefined-variable-type", "if", "rendered_env", ":", "env", "=", "RenderedEnv", "(", "env", ",", "resize_to", "=", "rendered_env_resize_to", ")", "if", "wrap_with_time_limit", ":", "env", "=", "gym", ".", "wrappers", ".", "TimeLimit", "(", "env", ",", "max_episode_steps", "=", "rl_env_max_episode_steps", ")", "return", "env" ]
Wraps a gym environment. see make_gym_env for details.
[ "Wraps", "a", "gym", "environment", ".", "see", "make_gym_env", "for", "details", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/gym_utils.py#L151-L176
train
A wrapper for a gym environment.
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_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wji,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(2378 - 2267) + '\x34' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x32' + chr(1923 - 1872) + '\x36', 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + '\157' + '\x31' + chr(569 - 515) + chr(0b1000 + 0o51), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1000010 + 0o55) + '\065' + '\064', ord("\x08")), ehT0Px3KOsy9(chr(810 - 762) + chr(0b111011 + 0o64) + chr(49) + chr(2036 - 1983) + chr(53), 0b1000), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(12157 - 12046) + chr(0b110110) + chr(0b1000 + 0o54), 53661 - 53653), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x32' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(51) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(9163 - 9052) + '\063' + chr(1990 - 1941), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x31' + chr(52) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + chr(0b110001) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110010) + '\061' + '\067', ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x33' + '\065' + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b1010 + 0o46) + chr(111) + chr(0b11010 + 0o30) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b110011) + chr(0b11110 + 0o24) + chr(0b110100 + 0o3), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(4623 - 4512) + chr(0b101011 + 0o6) + chr(0b110100) + chr(0b1011 + 0o53), 0b1000), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(5619 - 5508) + chr(0b110110) + '\x35', 0o10), ehT0Px3KOsy9(chr(2244 - 2196) + chr(0b1101111) + '\063', 0o10), ehT0Px3KOsy9(chr(1406 - 1358) + chr(111) + '\x32' + chr(51) + chr(0b110000), 34641 - 34633), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b11010 + 0o26) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b1010 + 0o54) + chr(1848 - 1797), 0b1000), ehT0Px3KOsy9(chr(1262 - 1214) + chr(9921 - 9810) + '\x33' + chr(124 - 73) + chr(0b11101 + 0o30), 38380 - 38372), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001 + 0o146) + chr(167 - 117) + chr(0b10001 + 0o44) + chr(0b101001 + 0o10), 8215 - 8207), ehT0Px3KOsy9(chr(0b110000) + chr(9627 - 9516) + chr(0b110010) + chr(0b100001 + 0o26) + '\x31', 47081 - 47073), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(50) + '\065' + chr(0b110001), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b110011 + 0o74) + '\x33' + chr(0b110111) + chr(0b110101), 43039 - 43031), ehT0Px3KOsy9('\x30' + chr(6920 - 6809) + chr(0b11011 + 0o27) + chr(0b100000 + 0o21) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2253 - 2142) + chr(0b110000 + 0o3) + chr(0b100001 + 0o25), 0b1000), ehT0Px3KOsy9(chr(572 - 524) + chr(0b1100011 + 0o14) + chr(0b110011) + chr(0b11011 + 0o33) + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(8344 - 8233) + '\063' + chr(73 - 24) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b11010 + 0o125) + '\x33' + chr(53) + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(160 - 112) + '\x6f' + '\062' + chr(51) + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + chr(0b101101 + 0o10) + chr(52), 0b1000), ehT0Px3KOsy9(chr(1870 - 1822) + '\157' + '\063' + chr(0b110010) + chr(0b11001 + 0o31), 33470 - 33462), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(5257 - 5146) + chr(50) + chr(0b10 + 0o62) + '\062', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6397 - 6286) + chr(0b10110 + 0o35) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b110001) + chr(0b1 + 0o57) + chr(52), 4785 - 4777), ehT0Px3KOsy9('\060' + chr(0b1001010 + 0o45) + chr(0b11 + 0o57) + chr(0b0 + 0o67) + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110001) + chr(527 - 479) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + '\x31' + chr(49) + chr(0b100101 + 0o17), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(2037 - 1926) + chr(0b101001 + 0o14) + chr(48), 51478 - 51470)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x0c'), '\144' + '\145' + chr(1242 - 1143) + '\157' + chr(0b1100100) + '\145')(chr(117) + '\x74' + '\146' + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def gEStt1wEzRBF(xzsHIGfR8Ip5, ET_18a6M9KrY, YwbdA6SxcqJt, pjdm_C0BZfPJ, HAN1UuKP8VUL, QuSYdcxcqzEo): assert not ET_18a6M9KrY or PlSM16l2KDPD(ET_18a6M9KrY, ehT0Px3KOsy9) vG10UFcrmFZ4 = not ET_18a6M9KrY or ET_18a6M9KrY >= ehT0Px3KOsy9('\060' + '\157' + '\x30', 0b1000) if vG10UFcrmFZ4: xzsHIGfR8Ip5 = cOB1UnUG1G1_(xzsHIGfR8Ip5) if QuSYdcxcqzEo: xzsHIGfR8Ip5 = cBCygWYsAGQ7(xzsHIGfR8Ip5) if YwbdA6SxcqJt: xzsHIGfR8Ip5 = F6pA01gS8EPd(xzsHIGfR8Ip5) if pjdm_C0BZfPJ: xzsHIGfR8Ip5 = PE3aZJhKgyYJ(xzsHIGfR8Ip5, resize_to=HAN1UuKP8VUL) if vG10UFcrmFZ4: xzsHIGfR8Ip5 = mZyhk1NGHEBF.wrappers.TimeLimit(xzsHIGfR8Ip5, max_episode_steps=ET_18a6M9KrY) return xzsHIGfR8Ip5
tensorflow/tensor2tensor
tensor2tensor/rl/gym_utils.py
make_gym_env
def make_gym_env(name, rl_env_max_episode_steps=-1, maxskip_env=False, rendered_env=False, rendered_env_resize_to=None, sticky_actions=False): """Create a gym env optionally with a time limit and maxskip wrapper. NOTE: The returned env may already be wrapped with TimeLimit! Args: name: `str` - base name of the gym env to make. rl_env_max_episode_steps: `int` or None - Using any value < 0 returns the env as-in, otherwise we impose the requested timelimit. Setting this to None returns a wrapped env that doesn't have a step limit. maxskip_env: whether to also use MaxAndSkip wrapper before time limit. rendered_env: whether to force render for observations. Use this for environments that are not natively rendering the scene for observations. rendered_env_resize_to: a list of [height, width] to change the original resolution of the native environment render. sticky_actions: whether to use sticky_actions before MaxAndSkip wrapper. Returns: An instance of `gym.Env` or `gym.Wrapper`. """ env = gym.make(name) return gym_env_wrapper(env, rl_env_max_episode_steps, maxskip_env, rendered_env, rendered_env_resize_to, sticky_actions)
python
def make_gym_env(name, rl_env_max_episode_steps=-1, maxskip_env=False, rendered_env=False, rendered_env_resize_to=None, sticky_actions=False): """Create a gym env optionally with a time limit and maxskip wrapper. NOTE: The returned env may already be wrapped with TimeLimit! Args: name: `str` - base name of the gym env to make. rl_env_max_episode_steps: `int` or None - Using any value < 0 returns the env as-in, otherwise we impose the requested timelimit. Setting this to None returns a wrapped env that doesn't have a step limit. maxskip_env: whether to also use MaxAndSkip wrapper before time limit. rendered_env: whether to force render for observations. Use this for environments that are not natively rendering the scene for observations. rendered_env_resize_to: a list of [height, width] to change the original resolution of the native environment render. sticky_actions: whether to use sticky_actions before MaxAndSkip wrapper. Returns: An instance of `gym.Env` or `gym.Wrapper`. """ env = gym.make(name) return gym_env_wrapper(env, rl_env_max_episode_steps, maxskip_env, rendered_env, rendered_env_resize_to, sticky_actions)
[ "def", "make_gym_env", "(", "name", ",", "rl_env_max_episode_steps", "=", "-", "1", ",", "maxskip_env", "=", "False", ",", "rendered_env", "=", "False", ",", "rendered_env_resize_to", "=", "None", ",", "sticky_actions", "=", "False", ")", ":", "env", "=", "gym", ".", "make", "(", "name", ")", "return", "gym_env_wrapper", "(", "env", ",", "rl_env_max_episode_steps", ",", "maxskip_env", ",", "rendered_env", ",", "rendered_env_resize_to", ",", "sticky_actions", ")" ]
Create a gym env optionally with a time limit and maxskip wrapper. NOTE: The returned env may already be wrapped with TimeLimit! Args: name: `str` - base name of the gym env to make. rl_env_max_episode_steps: `int` or None - Using any value < 0 returns the env as-in, otherwise we impose the requested timelimit. Setting this to None returns a wrapped env that doesn't have a step limit. maxskip_env: whether to also use MaxAndSkip wrapper before time limit. rendered_env: whether to force render for observations. Use this for environments that are not natively rendering the scene for observations. rendered_env_resize_to: a list of [height, width] to change the original resolution of the native environment render. sticky_actions: whether to use sticky_actions before MaxAndSkip wrapper. Returns: An instance of `gym.Env` or `gym.Wrapper`.
[ "Create", "a", "gym", "env", "optionally", "with", "a", "time", "limit", "and", "maxskip", "wrapper", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/gym_utils.py#L179-L206
train
Create a gym env optionally with a timelimit and maxskip wrapper.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF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rokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(563 - 452) + chr(0b1001 + 0o51) + chr(0b11010 + 0o26) + chr(2324 - 2269), ord("\x08")), ehT0Px3KOsy9(chr(1613 - 1565) + chr(111) + chr(51) + '\063' + '\x31', 0o10), ehT0Px3KOsy9('\x30' + chr(4989 - 4878) + chr(0b110011) + chr(52) + chr(0b11000 + 0o34), 19301 - 19293), ehT0Px3KOsy9(chr(1474 - 1426) + chr(8345 - 8234) + '\x31' + chr(0b11001 + 0o33) + '\x33', 12940 - 12932), ehT0Px3KOsy9(chr(0b110000) + chr(9582 - 9471) + '\x31' + chr(49) + '\x33', 0o10), ehT0Px3KOsy9('\060' + '\157' + '\062' + '\x36' + chr(0b110000), 24853 - 24845), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x32' + chr(48) + '\x32', 61218 - 61210), ehT0Px3KOsy9(chr(48) + '\157' + chr(567 - 517) + '\064' + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\064', 13834 - 13826), ehT0Px3KOsy9('\060' + chr(1729 - 1618) + chr(192 - 142) + chr(0b101000 + 0o14) + chr(2003 - 1949), 8), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(111) + chr(0b111 + 0o53) + '\x35' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(1154 - 1106) + '\157' + chr(956 - 906) + '\061' + chr(0b1010 + 0o50), 54408 - 54400), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + chr(1616 - 1566) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(254 - 206) + chr(2716 - 2605) + '\061' + chr(0b110100) + '\x32', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(2097 - 2046) + chr(0b110110 + 0o1) + chr(0b110000 + 0o4), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(0b11010 + 0o32) + chr(0b110011 + 0o0), 8), ehT0Px3KOsy9(chr(1850 - 1802) + '\x6f' + chr(51) + chr(0b110010 + 0o0) + chr(0b110001), 47734 - 47726), ehT0Px3KOsy9('\x30' + chr(111) + chr(2546 - 2495) + '\x33' + '\066', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110010) + chr(0b10 + 0o56), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(11398 - 11287) + chr(0b110001) + chr(55) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1101111) + '\063' + chr(475 - 425) + chr(0b1110 + 0o44), 0o10), ehT0Px3KOsy9(chr(0b11111 + 0o21) + '\157' + chr(0b110011) + chr(0b1 + 0o57) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(55), 0o10), ehT0Px3KOsy9('\060' + chr(8700 - 8589) + chr(0b110001) + '\062' + chr(1049 - 1000), 65084 - 65076), ehT0Px3KOsy9(chr(48) + chr(4722 - 4611) + chr(0b110011) + chr(49) + '\067', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000111 + 0o50) + '\x32' + chr(0b110001) + '\062', 8), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b110010), 22481 - 22473), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(2462 - 2411) + chr(0b101000 + 0o17) + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(537 - 486) + chr(0b100010 + 0o17) + '\x36', 0b1000), ehT0Px3KOsy9('\060' + '\157' + '\x32' + '\x35' + '\x36', 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110010) + '\x31' + chr(0b110010), 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + chr(49) + chr(626 - 574), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(52) + chr(1831 - 1777), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + chr(0b110101) + chr(516 - 461), 0b1000), ehT0Px3KOsy9(chr(1990 - 1942) + chr(807 - 696) + chr(0b100001 + 0o21) + chr(53) + chr(55), 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010) + chr(1363 - 1311) + chr(53), 7104 - 7096), ehT0Px3KOsy9('\x30' + chr(0b111100 + 0o63) + chr(1586 - 1534) + chr(0b101000 + 0o12), 39410 - 39402), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + '\061' + chr(50) + chr(0b101001 + 0o15), ord("\x08")), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\157' + '\063' + chr(50) + chr(2290 - 2236), 39775 - 39767), ehT0Px3KOsy9('\060' + chr(111) + chr(1352 - 1303) + chr(0b100100 + 0o15) + chr(1594 - 1543), 8)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(53) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa9'), chr(0b1100100) + chr(0b1100001 + 0o4) + chr(2387 - 2288) + '\x6f' + '\x64' + chr(7050 - 6949))('\x75' + chr(0b100101 + 0o117) + chr(102) + chr(86 - 41) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VP7rQHpJY6fA(AIvJRzLdDfgF, ET_18a6M9KrY=-ehT0Px3KOsy9('\x30' + chr(10369 - 10258) + chr(0b100110 + 0o13), 21599 - 21591), YwbdA6SxcqJt=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(67 - 19), ord("\x08")), pjdm_C0BZfPJ=ehT0Px3KOsy9(chr(48) + '\x6f' + '\x30', 8), HAN1UuKP8VUL=None, QuSYdcxcqzEo=ehT0Px3KOsy9(chr(274 - 226) + '\157' + chr(1532 - 1484), 8)): xzsHIGfR8Ip5 = mZyhk1NGHEBF.make(AIvJRzLdDfgF) return gEStt1wEzRBF(xzsHIGfR8Ip5, ET_18a6M9KrY, YwbdA6SxcqJt, pjdm_C0BZfPJ, HAN1UuKP8VUL, QuSYdcxcqzEo)
tensorflow/tensor2tensor
tensor2tensor/rl/gym_utils.py
register_gym_env
def register_gym_env(class_entry_point, version="v0", kwargs=None): """Registers the class in Gym and returns the registered name and the env.""" split_on_colon = class_entry_point.split(":") assert len(split_on_colon) == 2 class_name = split_on_colon[1] # We have to add the version to conform to gym's API. env_name = "T2TEnv-{}-{}".format(class_name, version) gym.envs.register(id=env_name, entry_point=class_entry_point, kwargs=kwargs) tf.logging.info("Entry Point [%s] registered with id [%s]", class_entry_point, env_name) return env_name, gym.make(env_name)
python
def register_gym_env(class_entry_point, version="v0", kwargs=None): """Registers the class in Gym and returns the registered name and the env.""" split_on_colon = class_entry_point.split(":") assert len(split_on_colon) == 2 class_name = split_on_colon[1] # We have to add the version to conform to gym's API. env_name = "T2TEnv-{}-{}".format(class_name, version) gym.envs.register(id=env_name, entry_point=class_entry_point, kwargs=kwargs) tf.logging.info("Entry Point [%s] registered with id [%s]", class_entry_point, env_name) return env_name, gym.make(env_name)
[ "def", "register_gym_env", "(", "class_entry_point", ",", "version", "=", "\"v0\"", ",", "kwargs", "=", "None", ")", ":", "split_on_colon", "=", "class_entry_point", ".", "split", "(", "\":\"", ")", "assert", "len", "(", "split_on_colon", ")", "==", "2", "class_name", "=", "split_on_colon", "[", "1", "]", "# We have to add the version to conform to gym's API.", "env_name", "=", "\"T2TEnv-{}-{}\"", ".", "format", "(", "class_name", ",", "version", ")", "gym", ".", "envs", ".", "register", "(", "id", "=", "env_name", ",", "entry_point", "=", "class_entry_point", ",", "kwargs", "=", "kwargs", ")", "tf", ".", "logging", ".", "info", "(", "\"Entry Point [%s] registered with id [%s]\"", ",", "class_entry_point", ",", "env_name", ")", "return", "env_name", ",", "gym", ".", "make", "(", "env_name", ")" ]
Registers the class in Gym and returns the registered name and the env.
[ "Registers", "the", "class", "in", "Gym", "and", "returns", "the", "registered", "name", "and", "the", "env", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/gym_utils.py#L209-L223
train
Registers the class in Gym and returns the registered name and the env.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,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g,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(111) + chr(0b110001) + chr(0b101010 + 0o6) + chr(0b10001 + 0o40), ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(1795 - 1746) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1111 + 0o140) + chr(49) + chr(55) + chr(55), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b10101 + 0o40), 0o10), ehT0Px3KOsy9(chr(995 - 947) + '\157' + chr(50) + chr(52) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9105 - 8994) + chr(51) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + '\066' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(0b101101 + 0o102) + '\067' + '\066', ord("\x08")), ehT0Px3KOsy9(chr(1535 - 1487) + '\157' + chr(49) + chr(1864 - 1811) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b1111 + 0o43) + '\063' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(1444 - 1396) + '\x6f' + chr(0b110001) + chr(0b110011) + chr(48), 57499 - 57491), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b101111 + 0o6), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(50) + '\x35', 9366 - 9358), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(0b10001 + 0o136) + chr(52) + chr(990 - 941), 23893 - 23885), ehT0Px3KOsy9(chr(897 - 849) + chr(0b1101111) + chr(51) + '\062' + chr(0b101101 + 0o3), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b1010 + 0o50) + chr(0b10110 + 0o37) + chr(0b11010 + 0o26), 11059 - 11051), ehT0Px3KOsy9(chr(1286 - 1238) + chr(11062 - 10951) + chr(366 - 315) + '\x32' + chr(0b110 + 0o52), 8), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(111) + chr(52), 0o10), ehT0Px3KOsy9(chr(2233 - 2185) + '\157' + chr(95 - 44) + chr(1934 - 1884), 0b1000), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(0b100100 + 0o113) + chr(0b110011) + chr(1269 - 1217) + chr(2363 - 2309), 0b1000), ehT0Px3KOsy9(chr(1626 - 1578) + chr(0b100010 + 0o115) + chr(51) + '\065' + '\061', 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\x6f' + '\063' + chr(50) + chr(0b110000), 8), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(111) + '\061' + chr(700 - 647) + '\x34', 28721 - 28713), ehT0Px3KOsy9(chr(0b101010 + 0o6) + '\x6f' + chr(0b110001) + '\062' + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + '\x31' + chr(0b110000) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(564 - 516) + '\157' + '\x33' + '\x31', 8), ehT0Px3KOsy9(chr(1373 - 1325) + chr(0b1010100 + 0o33) + chr(596 - 545) + chr(0b110001) + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b10111 + 0o32) + chr(50) + chr(0b110101), 8), ehT0Px3KOsy9('\060' + '\157' + '\066' + chr(53), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(2313 - 2263) + '\061', 8), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(273 - 225) + chr(55), 0b1000), ehT0Px3KOsy9(chr(1995 - 1947) + '\x6f' + chr(684 - 633) + '\062' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b10 + 0o155) + chr(0b110001) + chr(0b110000) + chr(0b10111 + 0o37), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\067' + chr(53), 7941 - 7933), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + chr(135 - 81) + '\062', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(49) + '\x33' + '\x35', 35500 - 35492), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + '\x30' + '\060', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + '\x31' + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(55), 62220 - 62212)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101101 + 0o10) + chr(709 - 661), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'o'), '\x64' + chr(9120 - 9019) + '\x63' + '\x6f' + chr(9832 - 9732) + '\x65')(chr(0b1110010 + 0o3) + chr(8813 - 8697) + chr(102) + '\055' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def _aPr43D5UAKn(fc6wib3MguG9, cpMfQ_4_Vb7C=xafqLlk3kkUe(SXOLrMavuUCe(b'7\xfe'), chr(0b1000010 + 0o42) + chr(5581 - 5480) + chr(99) + '\x6f' + chr(100) + chr(101))(chr(117) + '\164' + chr(102) + '\055' + '\x38'), M8EIoTs2GJXE=None): Mfq_WVXG2etx = fc6wib3MguG9.split(xafqLlk3kkUe(SXOLrMavuUCe(b'{'), chr(5232 - 5132) + '\145' + chr(9290 - 9191) + '\x6f' + chr(0b1010111 + 0o15) + chr(101))('\x75' + chr(10347 - 10231) + '\146' + '\x2d' + chr(0b111000))) assert c2A0yzQpDQB3(Mfq_WVXG2etx) == ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(0b101100 + 0o103) + '\062', 0b1000) _oBLt_tbuDVq = Mfq_WVXG2etx[ehT0Px3KOsy9('\060' + '\x6f' + '\061', 47306 - 47298)] IPxLziQW1Fo8 = xafqLlk3kkUe(SXOLrMavuUCe(b'\x15\xfc+@\xc9o\xddE\x14\xb2#p'), chr(0b1100100) + chr(101) + chr(0b1000001 + 0o42) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b101000 + 0o114) + chr(0b1100110) + '\055' + chr(2303 - 2247)).V4roHaS3Ppej(_oBLt_tbuDVq, cpMfQ_4_Vb7C) xafqLlk3kkUe(mZyhk1NGHEBF.envs, xafqLlk3kkUe(SXOLrMavuUCe(b'3\xab\x18l\xd4m\x95L'), '\144' + chr(2208 - 2107) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1011011 + 0o13) + chr(1831 - 1786) + chr(0b111000)))(id=IPxLziQW1Fo8, entry_point=fc6wib3MguG9, kwargs=M8EIoTs2GJXE) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x12\xf97}\xd2z\x97\t\x03\xf3\x02f'), '\x64' + '\x65' + '\x63' + chr(0b11110 + 0o121) + '\144' + chr(101))(chr(0b1110101) + chr(0b1101 + 0o147) + chr(0b1100110) + chr(333 - 288) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x04\xa0\x0bw\xde9\xa0Q\x00\xf1,-\x0e\x04\xa3\xf5\xf0v\x7f\x81\x80\xa3\x1840|\xaauB83\xbffmY\x92\x06\xa5\xbb\n'), chr(0b1010001 + 0o23) + chr(5184 - 5083) + chr(0b1001101 + 0o26) + chr(111) + '\x64' + chr(0b111000 + 0o55))(chr(4229 - 4112) + chr(0b1110100) + '\146' + chr(0b100011 + 0o12) + chr(0b11001 + 0o37)), fc6wib3MguG9, IPxLziQW1Fo8) return (IPxLziQW1Fo8, xafqLlk3kkUe(mZyhk1NGHEBF, xafqLlk3kkUe(SXOLrMavuUCe(b',\xaf\x14`'), chr(0b1100100) + chr(571 - 470) + chr(99) + chr(1501 - 1390) + chr(0b1100100) + chr(0b1100011 + 0o2))(chr(7843 - 7726) + chr(116) + '\x66' + chr(491 - 446) + chr(0b111000)))(IPxLziQW1Fo8))
tensorflow/tensor2tensor
tensor2tensor/rl/gym_utils.py
MaxAndSkipEnv.step
def step(self, action): """Repeat action, sum reward, and max over last observations.""" total_reward = 0.0 done = None for i in range(self._skip): obs, reward, done, info = self.env.step(action) if i == self._skip - 2: self._obs_buffer[0] = obs if i == self._skip - 1: self._obs_buffer[1] = obs total_reward += reward if done: break # Note that the observation on the done=True frame doesn't matter. max_frame = self._obs_buffer.max(axis=0) return max_frame, total_reward, done, info
python
def step(self, action): """Repeat action, sum reward, and max over last observations.""" total_reward = 0.0 done = None for i in range(self._skip): obs, reward, done, info = self.env.step(action) if i == self._skip - 2: self._obs_buffer[0] = obs if i == self._skip - 1: self._obs_buffer[1] = obs total_reward += reward if done: break # Note that the observation on the done=True frame doesn't matter. max_frame = self._obs_buffer.max(axis=0) return max_frame, total_reward, done, info
[ "def", "step", "(", "self", ",", "action", ")", ":", "total_reward", "=", "0.0", "done", "=", "None", "for", "i", "in", "range", "(", "self", ".", "_skip", ")", ":", "obs", ",", "reward", ",", "done", ",", "info", "=", "self", ".", "env", ".", "step", "(", "action", ")", "if", "i", "==", "self", ".", "_skip", "-", "2", ":", "self", ".", "_obs_buffer", "[", "0", "]", "=", "obs", "if", "i", "==", "self", ".", "_skip", "-", "1", ":", "self", ".", "_obs_buffer", "[", "1", "]", "=", "obs", "total_reward", "+=", "reward", "if", "done", ":", "break", "# Note that the observation on the done=True frame doesn't matter.", "max_frame", "=", "self", ".", "_obs_buffer", ".", "max", "(", "axis", "=", "0", ")", "return", "max_frame", ",", "total_reward", ",", "done", ",", "info" ]
Repeat action, sum reward, and max over last observations.
[ "Repeat", "action", "sum", "reward", "and", "max", "over", "last", "observations", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/gym_utils.py#L62-L77
train
Repeat action sum reward and max over last observations.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58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ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(1323 - 1275) + chr(111) + '\063' + '\066' + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(51) + chr(0b110110) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + chr(3150 - 3039) + chr(2009 - 1960) + chr(51) + chr(0b100111 + 0o16), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111 + 0o0) + chr(2314 - 2265) + chr(0b110010) + chr(49), 6947 - 6939), ehT0Px3KOsy9(chr(48) + '\x6f' + '\062' + chr(423 - 370) + chr(1098 - 1045), 0b1000), ehT0Px3KOsy9(chr(0b10101 + 0o33) + chr(0b1101111) + chr(49) + chr(0b101111 + 0o7) + '\062', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1100110 + 0o11) + chr(51) + chr(0b100 + 0o57) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\063' + chr(53) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\063' + chr(2345 - 2292) + '\066', 0o10), ehT0Px3KOsy9(chr(1350 - 1302) + chr(111) + '\062' + chr(54) + '\062', 57158 - 57150), ehT0Px3KOsy9(chr(0b11 + 0o55) + chr(0b111010 + 0o65) + chr(543 - 494) + chr(0b110100) + '\063', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(51) + chr(0b110010), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110111) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110001) + chr(0b110011) + chr(49), 0b1000), ehT0Px3KOsy9('\060' + chr(0b101010 + 0o105) + chr(0b110111) + chr(0b110100), 34081 - 34073), ehT0Px3KOsy9('\060' + '\157' + chr(0b110100) + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1001011 + 0o44) + '\x33' + chr(331 - 282) + '\x35', 0b1000), ehT0Px3KOsy9(chr(708 - 660) + chr(111) + chr(49) + chr(717 - 663), ord("\x08")), ehT0Px3KOsy9(chr(1049 - 1001) + chr(10627 - 10516) + chr(0b110100) + chr(50), 0o10), ehT0Px3KOsy9('\060' + chr(0b1010 + 0o145) + chr(51) + chr(50) + chr(0b100 + 0o54), 4401 - 4393), ehT0Px3KOsy9('\x30' + chr(0b100100 + 0o113) + chr(49) + chr(0b110010) + chr(49), 8), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\067' + chr(1772 - 1719), 34347 - 34339), ehT0Px3KOsy9(chr(0b101101 + 0o3) + chr(111) + chr(50) + chr(2309 - 2258) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(142 - 94) + chr(0b1110 + 0o141) + chr(0b100 + 0o56) + '\066', 53790 - 53782), ehT0Px3KOsy9('\x30' + chr(5131 - 5020) + chr(566 - 515) + chr(0b1110 + 0o45) + chr(0b110100 + 0o1), 45287 - 45279), ehT0Px3KOsy9(chr(261 - 213) + chr(0b111101 + 0o62) + chr(0b110111) + '\062', 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(50) + chr(0b101100 + 0o5) + '\x32', ord("\x08")), ehT0Px3KOsy9(chr(1149 - 1101) + chr(0b1101111) + '\062' + chr(0b100111 + 0o14) + chr(48), 0b1000), ehT0Px3KOsy9(chr(597 - 549) + '\157' + '\x32' + chr(0b110011) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b101010 + 0o6) + chr(0b1100101 + 0o12) + chr(2205 - 2156) + chr(0b100010 + 0o23) + chr(1488 - 1439), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10 + 0o57) + chr(0b10010 + 0o40), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b110001) + chr(54), 32634 - 32626), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + chr(54) + chr(48), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x30' + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(49) + chr(0b110000 + 0o5), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b11111 + 0o120) + '\061' + chr(48), 45982 - 45974), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(55) + chr(0b110011), 0b1000), ehT0Px3KOsy9(chr(0b1000 + 0o50) + '\157' + chr(2457 - 2407) + '\062' + chr(0b110101), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1010000 + 0o37) + chr(0b101101 + 0o10) + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9'), chr(0b1100100) + chr(0b1100101) + chr(0b11101 + 0o106) + chr(0b1101111) + '\144' + chr(0b1000001 + 0o44))(chr(0b100 + 0o161) + '\164' + '\146' + '\x2d' + chr(0b11001 + 0o37)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def kDuFsAhEatcU(oVre8I6UXc3b, vyskHDXig6uT): Xzu5euxuJY7G = 0.0 Ki86oC9WfglU = None for WVxHKyX45z_L in vQr8gNKaIaWE(xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x8268\xdd'), chr(0b1100100) + chr(0b1100101) + chr(0b111000 + 0o53) + chr(6539 - 6428) + chr(100) + chr(7527 - 7426))(chr(0b1101010 + 0o13) + chr(0b11010 + 0o132) + chr(102) + '\x2d' + chr(56)))): (HUAx0lWcwxPP, jEXsEsgeguP4, Ki86oC9WfglU, S7Hxucg7jlZk) = oVre8I6UXc3b.env.kDuFsAhEatcU(vyskHDXig6uT) if WVxHKyX45z_L == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x8268\xdd'), chr(0b1001 + 0o133) + chr(0b1010000 + 0o25) + '\x63' + chr(0b1101111) + chr(0b10110 + 0o116) + chr(101))('\165' + '\x74' + chr(7125 - 7023) + chr(0b101 + 0o50) + chr(0b1010 + 0o56))) - ehT0Px3KOsy9('\x30' + chr(0b101101 + 0o102) + chr(0b1001 + 0o51), 0b1000): oVre8I6UXc3b.hLAvzECMzTU6[ehT0Px3KOsy9(chr(1436 - 1388) + chr(0b1101111) + '\060', 0o10)] = HUAx0lWcwxPP if WVxHKyX45z_L == xafqLlk3kkUe(oVre8I6UXc3b, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\x8268\xdd'), chr(0b1010 + 0o132) + chr(0b111 + 0o136) + chr(99) + chr(0b1100111 + 0o10) + chr(100) + chr(0b1100101))(chr(5486 - 5369) + chr(0b10100 + 0o140) + chr(6802 - 6700) + '\x2d' + '\070')) - ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061', 0o10): oVre8I6UXc3b.hLAvzECMzTU6[ehT0Px3KOsy9(chr(0b110000) + chr(0b111001 + 0o66) + chr(0b110001), 8)] = HUAx0lWcwxPP Xzu5euxuJY7G += jEXsEsgeguP4 if Ki86oC9WfglU: break iV_sDFkvMllo = oVre8I6UXc3b._obs_buffer.tsdjvlgh9gDP(axis=ehT0Px3KOsy9('\x30' + chr(111) + chr(0b101010 + 0o6), 8)) return (iV_sDFkvMllo, Xzu5euxuJY7G, Ki86oC9WfglU, S7Hxucg7jlZk)
tensorflow/tensor2tensor
tensor2tensor/data_generators/all_problems.py
_handle_errors
def _handle_errors(errors): """Log out and possibly reraise errors during import.""" if not errors: return log_all = True # pylint: disable=unused-variable err_msg = "T2T: skipped importing {num_missing} data_generators modules." print(err_msg.format(num_missing=len(errors))) for module, err in errors: err_str = str(err) if not _is_import_err_msg(err_str, module): print("From module %s" % module) raise err if log_all: print("Did not import module: %s; Cause: %s" % (module, err_str))
python
def _handle_errors(errors): """Log out and possibly reraise errors during import.""" if not errors: return log_all = True # pylint: disable=unused-variable err_msg = "T2T: skipped importing {num_missing} data_generators modules." print(err_msg.format(num_missing=len(errors))) for module, err in errors: err_str = str(err) if not _is_import_err_msg(err_str, module): print("From module %s" % module) raise err if log_all: print("Did not import module: %s; Cause: %s" % (module, err_str))
[ "def", "_handle_errors", "(", "errors", ")", ":", "if", "not", "errors", ":", "return", "log_all", "=", "True", "# pylint: disable=unused-variable", "err_msg", "=", "\"T2T: skipped importing {num_missing} data_generators modules.\"", "print", "(", "err_msg", ".", "format", "(", "num_missing", "=", "len", "(", "errors", ")", ")", ")", "for", "module", ",", "err", "in", "errors", ":", "err_str", "=", "str", "(", "err", ")", "if", "not", "_is_import_err_msg", "(", "err_str", ",", "module", ")", ":", "print", "(", "\"From module %s\"", "%", "module", ")", "raise", "err", "if", "log_all", ":", "print", "(", "\"Did not import module: %s; Cause: %s\"", "%", "(", "module", ",", "err_str", ")", ")" ]
Log out and possibly reraise errors during import.
[ "Log", "out", "and", "possibly", "reraise", "errors", "during", "import", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/all_problems.py#L113-L126
train
Log out and possibly reraise errors during import.
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,RouZ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oAwYhj,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(1756 - 1645) + chr(955 - 906) + '\x33' + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\065' + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2230 - 2119) + chr(51) + '\065' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + '\x30' + chr(51), 528 - 520), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\063' + '\x37' + '\060', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(898 - 846) + '\x37', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1100 + 0o47) + '\x33' + chr(51), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b101 + 0o60) + chr(0b110101), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b1011 + 0o47) + chr(0b101111 + 0o6), 46068 - 46060), ehT0Px3KOsy9('\x30' + chr(0b101000 + 0o107) + '\x36' + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(5959 - 5848) + chr(0b1101 + 0o45) + chr(1973 - 1920) + '\x36', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110011) + '\x35' + chr(50), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + '\x37' + '\x30', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010 + 0o0) + '\064' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(451 - 402) + chr(0b1111 + 0o42) + chr(0b10101 + 0o34), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b110111 + 0o70) + chr(0b100011 + 0o20) + chr(0b110010) + '\065', 8), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1101111) + chr(2251 - 2202) + chr(48) + chr(0b10010 + 0o44), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1000 + 0o147) + chr(51) + chr(0b11101 + 0o25) + chr(0b110101), 8), ehT0Px3KOsy9(chr(0b101 + 0o53) + chr(0b100001 + 0o116) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b100000 + 0o20) + '\060', 0o10), ehT0Px3KOsy9(chr(911 - 863) + chr(111) + chr(0b110010) + chr(48), 52592 - 52584), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1935 - 1884) + '\x35', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(51) + chr(0b110110) + chr(0b100010 + 0o17), 0b1000), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + '\x35' + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b110110 + 0o71) + chr(0b10100 + 0o37) + '\x31' + chr(140 - 85), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + '\x6f' + chr(50) + chr(2156 - 2108) + chr(0b1000 + 0o52), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110011) + chr(0b110000) + chr(349 - 296), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b110010) + chr(1602 - 1553) + '\x35', 134 - 126), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\063' + chr(0b1001 + 0o50), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + '\066' + chr(0b10 + 0o60), 51150 - 51142), ehT0Px3KOsy9('\060' + chr(7576 - 7465) + chr(51) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(8953 - 8842) + '\061' + chr(51) + chr(651 - 598), 4462 - 4454), ehT0Px3KOsy9(chr(67 - 19) + chr(111) + chr(740 - 689) + chr(55) + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1000100 + 0o53) + '\x37' + chr(51), ord("\x08")), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + '\x30', 44640 - 44632), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + chr(0b10101 + 0o36) + '\063', 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\062' + '\x35' + '\x36', 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\061' + '\065', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(805 - 755), 3527 - 3519)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\065' + chr(1388 - 1340), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b't'), '\x64' + chr(101) + chr(99) + chr(7691 - 7580) + chr(4972 - 4872) + '\145')(chr(4449 - 4332) + '\164' + chr(102) + '\055' + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def ynnVLfZa0GeN(vrC59GzZXTIL): if not vrC59GzZXTIL: return rFZyrFRuB55X = ehT0Px3KOsy9(chr(1607 - 1559) + chr(0b1101111) + chr(0b1001 + 0o50), 0o10) olh8dSf6yQho = xafqLlk3kkUe(SXOLrMavuUCe(b'\x0e^\xbdy\xd8T}\xb2]\xa5S\xca\xca\x11\xcc9\xba4\xa1n.w=\x8aA\xba\xef\x9a\xe00Ak4\x95\\M\xfb\xcalv;3\x8e&\x96Bd\xbaY\xbaD\xdd\xca\x15\xce-\xa0*\xb0tn'), chr(6088 - 5988) + chr(0b1100101) + chr(0b10 + 0o141) + chr(0b11101 + 0o122) + chr(0b1100100) + chr(0b1000110 + 0o37))('\x75' + chr(0b1100011 + 0o21) + '\146' + chr(45) + chr(150 - 94)) zLUzGokYBM2Z(xafqLlk3kkUe(olh8dSf6yQho, xafqLlk3kkUe(SXOLrMavuUCe(b'\x0cX\x9b,\xb0FE\xe8}\xa5S\xc4'), '\x64' + chr(0b1100101) + chr(6383 - 6284) + chr(0b1101111) + chr(0b111000 + 0o54) + chr(0b1100101))(chr(4589 - 4472) + chr(116) + '\x66' + chr(1746 - 1701) + chr(56)))(num_missing=c2A0yzQpDQB3(vrC59GzZXTIL))) for (RqocVGOryNPv, n8HlHl2rqNTp) in vrC59GzZXTIL: OyFE_HVWONDE = M8_cKLkHVB2V(n8HlHl2rqNTp) if not udanbnyrA_A_(OyFE_HVWONDE, RqocVGOryNPv): zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1c\x1e\x86.\xd8Jy\xbfX\xb9S\x8e\xcf\x0b'), '\x64' + chr(7515 - 7414) + chr(395 - 296) + chr(10065 - 9954) + '\144' + chr(0b1100101))(chr(11905 - 11788) + chr(0b1011011 + 0o31) + '\x66' + '\055' + '\070') % RqocVGOryNPv) raise n8HlHl2rqNTp if rFZyrFRuB55X: zLUzGokYBM2Z(xafqLlk3kkUe(SXOLrMavuUCe(b'\x1e\x05\x8dc\x96Hb\xfbD\xb8F\xc1\x98\x0c\x81$\xba"\xa0k%*=\xd4\\\xf4\xa2\x86\xec,A}g\xdb\x1eC'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(7712 - 7612) + '\x65')(chr(4462 - 4345) + chr(0b101000 + 0o114) + chr(0b1100110) + chr(1274 - 1229) + chr(0b101111 + 0o11)) % (RqocVGOryNPv, OyFE_HVWONDE))
tensorflow/tensor2tensor
tensor2tensor/utils/hparams_lib.py
create_hparams
def create_hparams(hparams_set, hparams_overrides_str="", data_dir=None, problem_name=None, hparams_path=None): """Create HParams with data_dir and problem hparams, if kwargs provided.""" hparams = registry.hparams(hparams_set) if hparams_path and tf.gfile.Exists(hparams_path): hparams = create_hparams_from_json(hparams_path, hparams) if data_dir: hparams.add_hparam("data_dir", data_dir) if hparams_overrides_str: tf.logging.info("Overriding hparams in %s with %s", hparams_set, hparams_overrides_str) hparams = hparams.parse(hparams_overrides_str) if problem_name: add_problem_hparams(hparams, problem_name) return hparams
python
def create_hparams(hparams_set, hparams_overrides_str="", data_dir=None, problem_name=None, hparams_path=None): """Create HParams with data_dir and problem hparams, if kwargs provided.""" hparams = registry.hparams(hparams_set) if hparams_path and tf.gfile.Exists(hparams_path): hparams = create_hparams_from_json(hparams_path, hparams) if data_dir: hparams.add_hparam("data_dir", data_dir) if hparams_overrides_str: tf.logging.info("Overriding hparams in %s with %s", hparams_set, hparams_overrides_str) hparams = hparams.parse(hparams_overrides_str) if problem_name: add_problem_hparams(hparams, problem_name) return hparams
[ "def", "create_hparams", "(", "hparams_set", ",", "hparams_overrides_str", "=", "\"\"", ",", "data_dir", "=", "None", ",", "problem_name", "=", "None", ",", "hparams_path", "=", "None", ")", ":", "hparams", "=", "registry", ".", "hparams", "(", "hparams_set", ")", "if", "hparams_path", "and", "tf", ".", "gfile", ".", "Exists", "(", "hparams_path", ")", ":", "hparams", "=", "create_hparams_from_json", "(", "hparams_path", ",", "hparams", ")", "if", "data_dir", ":", "hparams", ".", "add_hparam", "(", "\"data_dir\"", ",", "data_dir", ")", "if", "hparams_overrides_str", ":", "tf", ".", "logging", ".", "info", "(", "\"Overriding hparams in %s with %s\"", ",", "hparams_set", ",", "hparams_overrides_str", ")", "hparams", "=", "hparams", ".", "parse", "(", "hparams_overrides_str", ")", "if", "problem_name", ":", "add_problem_hparams", "(", "hparams", ",", "problem_name", ")", "return", "hparams" ]
Create HParams with data_dir and problem hparams, if kwargs provided.
[ "Create", "HParams", "with", "data_dir", "and", "problem", "hparams", "if", "kwargs", "provided", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/hparams_lib.py#L42-L59
train
Create HParams with data_dir and problem 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,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('\060' + chr(111) + '\x31' + chr(48) + chr(362 - 314), 0b1000), ehT0Px3KOsy9('\060' + chr(4661 - 4550) + '\x32' + chr(0b110111) + '\x36', 0o10), ehT0Px3KOsy9(chr(2285 - 2237) + '\x6f' + chr(0b100000 + 0o23) + '\060' + '\x35', 54263 - 54255), ehT0Px3KOsy9(chr(48) + chr(0b1101000 + 0o7) + '\x31' + chr(0b110011) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(774 - 726) + chr(9677 - 9566) + '\062' + '\x32' + chr(2432 - 2378), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(239 - 191) + chr(0b1101111) + '\x33' + chr(124 - 70) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b101011 + 0o11) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(1108 - 1060) + chr(3603 - 3492) + chr(0b110001 + 0o2) + chr(2952 - 2897) + chr(2326 - 2277), 0b1000), ehT0Px3KOsy9(chr(896 - 848) + '\x6f' + chr(0b11011 + 0o26) + chr(0b110010) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\157' + '\x33' + chr(0b110010) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\066' + '\x37', 27057 - 27049), ehT0Px3KOsy9('\x30' + chr(0b110001 + 0o76) + chr(54) + chr(649 - 598), 15414 - 15406), ehT0Px3KOsy9(chr(594 - 546) + chr(645 - 534) + chr(0b10100 + 0o35) + chr(324 - 271) + chr(54), 35919 - 35911), ehT0Px3KOsy9(chr(1360 - 1312) + chr(10394 - 10283) + chr(2228 - 2177) + '\063' + chr(55), 6519 - 6511), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10101 + 0o36) + '\063', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110001) + chr(0b110110) + chr(54), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + '\x32' + chr(49) + chr(0b110000), 6962 - 6954), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + '\x37' + chr(870 - 819), 0o10), ehT0Px3KOsy9(chr(953 - 905) + '\x6f' + chr(0b110001) + chr(0b110011) + chr(0b101000 + 0o12), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(50) + chr(0b110001) + chr(0b1010 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + '\x32' + chr(53) + chr(0b110110), 55208 - 55200), ehT0Px3KOsy9('\x30' + chr(11434 - 11323) + chr(50) + '\063' + chr(0b100100 + 0o14), 63260 - 63252), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(50) + chr(2409 - 2355) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(49) + chr(479 - 425), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + '\x6f' + '\062' + chr(1899 - 1848) + '\x32', 0o10), ehT0Px3KOsy9('\060' + '\157' + chr(54) + chr(0b111 + 0o52), 0b1000), ehT0Px3KOsy9(chr(1991 - 1943) + chr(0b1100001 + 0o16) + chr(2296 - 2247) + '\x33' + chr(0b11100 + 0o30), 8), ehT0Px3KOsy9(chr(1194 - 1146) + '\x6f' + chr(49) + chr(50) + chr(421 - 371), 0b1000), ehT0Px3KOsy9('\060' + chr(6719 - 6608) + '\064' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(0b110101) + chr(2227 - 2178), 0b1000), ehT0Px3KOsy9(chr(0b1101 + 0o43) + chr(111) + chr(50) + chr(2566 - 2515) + chr(2323 - 2269), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(50) + chr(2153 - 2104) + chr(53), 38029 - 38021), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100001 + 0o26) + '\x37', 0o10), ehT0Px3KOsy9(chr(547 - 499) + '\x6f' + chr(0b10111 + 0o33) + '\061' + chr(53), 8), ehT0Px3KOsy9('\x30' + '\157' + '\x36' + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + chr(10839 - 10728) + '\067' + chr(1172 - 1124), 27009 - 27001), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(746 - 695) + chr(0b1000 + 0o50) + '\x33', 34813 - 34805), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + chr(113 - 62) + chr(470 - 416), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1452 - 1404) + chr(0b1101111) + chr(53) + '\060', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'n'), chr(0b1100100) + chr(0b1100101) + chr(0b110001 + 0o62) + chr(111) + chr(0b11000 + 0o114) + chr(101))(chr(1089 - 972) + '\164' + '\146' + '\055' + chr(0b100010 + 0o26)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def FPakHinFMgZb(EoFZz4ccL1aJ, WDgBnaLoaFAl=xafqLlk3kkUe(SXOLrMavuUCe(b''), chr(100) + chr(0b1100101) + '\143' + chr(111) + chr(0b1000111 + 0o35) + '\x65')(chr(117) + chr(116) + chr(0b100 + 0o142) + chr(45) + chr(892 - 836)), kVFRD544hi_1=None, wezGpYDorAsK=None, TNoWNk9tqizq=None): n4ljua2gi1Pr = U24OBsRcVqkJ.hparams(EoFZz4ccL1aJ) if TNoWNk9tqizq and xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\x05\xc6\xac/\xe2q'), chr(3457 - 3357) + chr(0b1100010 + 0o3) + chr(99) + '\157' + '\x64' + chr(0b1100101))(chr(0b101110 + 0o107) + chr(9016 - 8900) + chr(4155 - 4053) + '\055' + chr(0b101 + 0o63)))(TNoWNk9tqizq): n4ljua2gi1Pr = mZV901WVGadF(TNoWNk9tqizq, n4ljua2gi1Pr) if kVFRD544hi_1: xafqLlk3kkUe(n4ljua2gi1Pr, xafqLlk3kkUe(SXOLrMavuUCe(b'!\xda\xa1\x03\xfer\x90\xd0\x98>'), chr(159 - 59) + '\145' + chr(99) + '\x6f' + '\144' + '\x65')(chr(12576 - 12459) + chr(116) + chr(102) + chr(0b101101) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'$\xdf\xb1=\xc9f\x98\xd0'), chr(0b1010 + 0o132) + '\145' + '\x63' + chr(0b0 + 0o157) + chr(0b1100100) + chr(3117 - 3016))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + chr(56)), kVFRD544hi_1) if WDgBnaLoaFAl: xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x13\x89\x8d$\xe3a\x96\x95\x93?\x8b\xdc'), '\x64' + chr(0b10100 + 0o121) + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(0b1101000 + 0o14) + chr(0b1100110) + chr(45) + chr(0b101001 + 0o17)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x0f\xc8\xa0.\xe4k\x95\xcb\x974\xf1\xdfC\x0f\xadz\x1b\xfb\xdb3\xe2\x8e\xbd\xc1.j\xf3E4r\x05Z'), chr(0b1010111 + 0o15) + chr(0b110110 + 0o57) + chr(0b110 + 0o135) + '\157' + chr(0b1100100) + chr(101))('\165' + chr(0b110101 + 0o77) + chr(102) + chr(1137 - 1092) + chr(0b111000)), EoFZz4ccL1aJ, WDgBnaLoaFAl) n4ljua2gi1Pr = n4ljua2gi1Pr.parse(WDgBnaLoaFAl) if wezGpYDorAsK: VNgGitn5Onxw(n4ljua2gi1Pr, wezGpYDorAsK) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/utils/hparams_lib.py
create_hparams_from_json
def create_hparams_from_json(json_path, hparams=None): """Loading hparams from json; can also start from hparams if specified.""" tf.logging.info("Loading hparams from existing json %s" % json_path) with tf.gfile.Open(json_path, "r") as f: hparams_values = json.load(f) # Prevent certain keys from overwriting the passed-in hparams. # TODO(trandustin): Remove this hack after registries are available to avoid # saving them as functions. hparams_values.pop("bottom", None) hparams_values.pop("loss", None) hparams_values.pop("name", None) hparams_values.pop("top", None) hparams_values.pop("weights_fn", None) new_hparams = hparam.HParams(**hparams_values) # Some keys are in new_hparams but not hparams, so we need to be more # careful than simply using parse_json() from HParams if hparams: # hparams specified, so update values from json for key in sorted(new_hparams.values().keys()): if hasattr(hparams, key): # Overlapped keys value = getattr(hparams, key) new_value = getattr(new_hparams, key) if value != new_value: # Different values tf.logging.info("Overwrite key %s: %s -> %s" % ( key, value, new_value)) setattr(hparams, key, new_value) else: hparams = new_hparams return hparams
python
def create_hparams_from_json(json_path, hparams=None): """Loading hparams from json; can also start from hparams if specified.""" tf.logging.info("Loading hparams from existing json %s" % json_path) with tf.gfile.Open(json_path, "r") as f: hparams_values = json.load(f) # Prevent certain keys from overwriting the passed-in hparams. # TODO(trandustin): Remove this hack after registries are available to avoid # saving them as functions. hparams_values.pop("bottom", None) hparams_values.pop("loss", None) hparams_values.pop("name", None) hparams_values.pop("top", None) hparams_values.pop("weights_fn", None) new_hparams = hparam.HParams(**hparams_values) # Some keys are in new_hparams but not hparams, so we need to be more # careful than simply using parse_json() from HParams if hparams: # hparams specified, so update values from json for key in sorted(new_hparams.values().keys()): if hasattr(hparams, key): # Overlapped keys value = getattr(hparams, key) new_value = getattr(new_hparams, key) if value != new_value: # Different values tf.logging.info("Overwrite key %s: %s -> %s" % ( key, value, new_value)) setattr(hparams, key, new_value) else: hparams = new_hparams return hparams
[ "def", "create_hparams_from_json", "(", "json_path", ",", "hparams", "=", "None", ")", ":", "tf", ".", "logging", ".", "info", "(", "\"Loading hparams from existing json %s\"", "%", "json_path", ")", "with", "tf", ".", "gfile", ".", "Open", "(", "json_path", ",", "\"r\"", ")", "as", "f", ":", "hparams_values", "=", "json", ".", "load", "(", "f", ")", "# Prevent certain keys from overwriting the passed-in hparams.", "# TODO(trandustin): Remove this hack after registries are available to avoid", "# saving them as functions.", "hparams_values", ".", "pop", "(", "\"bottom\"", ",", "None", ")", "hparams_values", ".", "pop", "(", "\"loss\"", ",", "None", ")", "hparams_values", ".", "pop", "(", "\"name\"", ",", "None", ")", "hparams_values", ".", "pop", "(", "\"top\"", ",", "None", ")", "hparams_values", ".", "pop", "(", "\"weights_fn\"", ",", "None", ")", "new_hparams", "=", "hparam", ".", "HParams", "(", "*", "*", "hparams_values", ")", "# Some keys are in new_hparams but not hparams, so we need to be more", "# careful than simply using parse_json() from HParams", "if", "hparams", ":", "# hparams specified, so update values from json", "for", "key", "in", "sorted", "(", "new_hparams", ".", "values", "(", ")", ".", "keys", "(", ")", ")", ":", "if", "hasattr", "(", "hparams", ",", "key", ")", ":", "# Overlapped keys", "value", "=", "getattr", "(", "hparams", ",", "key", ")", "new_value", "=", "getattr", "(", "new_hparams", ",", "key", ")", "if", "value", "!=", "new_value", ":", "# Different values", "tf", ".", "logging", ".", "info", "(", "\"Overwrite key %s: %s -> %s\"", "%", "(", "key", ",", "value", ",", "new_value", ")", ")", "setattr", "(", "hparams", ",", "key", ",", "new_value", ")", "else", ":", "hparams", "=", "new_hparams", "return", "hparams" ]
Loading hparams from json; can also start from hparams if specified.
[ "Loading", "hparams", "from", "json", ";", "can", "also", "start", "from", "hparams", "if", "specified", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/hparams_lib.py#L62-L90
train
Load hparams from json file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,N5Ee6d9YGQ_x,yDcnbVVBZ5VZ,OTstrxJfIC1n,GXwwnDRMCHJX,a9IKoVgO_m3w,GNd6AVvhYicE,ixtrydDuthdu,n0ZkatoveZpF,eh4BeXwijHpf,ZMHESMWYyt8h,hr2QaoivbFQ2,Iiw8L0MH5qfg,koCeDPYTrOFe,qqrhSmCSbbqk,pz9FlfzsWoy1,BXIwDASQ0Qkq,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(2163 - 2115) + '\x6f' + chr(2486 - 2435) + chr(0b110011) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + chr(0b110001 + 0o76) + chr(0b101100 + 0o7) + chr(51) + chr(0b110100), 8), ehT0Px3KOsy9('\x30' + chr(11789 - 11678) + chr(953 - 899) + chr(0b1011 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + '\x35' + chr(0b110010), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1561 - 1512) + '\x31' + chr(0b101000 + 0o15), 15064 - 15056), ehT0Px3KOsy9(chr(0b1110 + 0o42) + '\x6f' + chr(0b110010) + '\x37' + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(111) + chr(0b10010 + 0o43) + '\063', 0b1000), ehT0Px3KOsy9(chr(48) + chr(8905 - 8794) + chr(0b110010) + chr(145 - 96) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11000 + 0o32) + '\x36' + '\x30', 0b1000), ehT0Px3KOsy9(chr(48) + chr(3945 - 3834) + chr(0b110011) + chr(0b10111 + 0o40), 50703 - 50695), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x31' + chr(54) + chr(0b101000 + 0o10), ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\x33' + chr(0b110010 + 0o0) + '\x31', 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(1659 - 1609) + '\x36' + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(111) + chr(0b101100 + 0o5) + chr(50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b100000 + 0o22) + chr(104 - 56), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + '\063' + chr(55) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(0b10 + 0o64) + '\065', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(2074 - 2025) + '\064' + chr(0b110000), 11203 - 11195), ehT0Px3KOsy9(chr(0b110000) + chr(8995 - 8884) + '\x31' + chr(0b110100) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(442 - 394) + chr(9153 - 9042) + chr(49) + '\067' + chr(0b100101 + 0o13), 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + '\x6f' + '\061' + '\x32' + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1233 - 1184) + '\x37' + chr(49), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11100 + 0o123) + '\061' + chr(0b1110 + 0o51) + chr(51), 0o10), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(0b1101111) + chr(51) + chr(0b110010) + chr(2893 - 2839), 0b1000), ehT0Px3KOsy9('\060' + chr(4443 - 4332) + chr(0b110100) + chr(0b110100), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\063' + chr(0b110011) + '\062', 0b1000), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101011 + 0o4) + chr(1770 - 1721) + '\060' + chr(51), 42044 - 42036), ehT0Px3KOsy9(chr(613 - 565) + '\157' + chr(50) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(0b1000 + 0o52) + '\x34' + '\x30', 13701 - 13693), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10101 + 0o36) + chr(0b110000) + '\064', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\061' + chr(0b101111 + 0o3) + chr(484 - 434), 8), ehT0Px3KOsy9(chr(1692 - 1644) + chr(5304 - 5193) + chr(1021 - 970) + chr(0b11011 + 0o25) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(49) + chr(438 - 385) + chr(0b110100), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(469 - 418) + chr(0b101001 + 0o11) + chr(0b100011 + 0o21), 0b1000), ehT0Px3KOsy9(chr(1407 - 1359) + '\157' + chr(49) + chr(477 - 423) + chr(0b100110 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b10010 + 0o40) + chr(411 - 358), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(1674 - 1625) + '\060' + '\067', 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(50) + '\060' + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b101110 + 0o3) + chr(0b110011) + '\063', 10727 - 10719), ehT0Px3KOsy9('\x30' + chr(10923 - 10812) + chr(0b100111 + 0o14) + chr(53) + '\067', 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(391 - 338) + '\x30', 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf2'), chr(8414 - 8314) + chr(101) + '\143' + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(9507 - 9405) + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def mZV901WVGadF(Ie9ycawdW6iV, n4ljua2gi1Pr=None): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xeb|\x928\xdfL\xbf\xdas*\xba'), chr(0b10111 + 0o115) + chr(101) + chr(7001 - 6902) + chr(0b1100110 + 0o11) + '\x64' + '\x65')(chr(117) + chr(2478 - 2362) + chr(0b11100 + 0o112) + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x90\xb3U\x8e$\xd2L\xa8\xd8o\x11\xa3\xd5gc\xdb\xd3\x12\x0e\x15r\x1c\x03\xbfW\xae*z\xc7\xe48\xb4\x03\xbaR\xb04'), chr(9326 - 9226) + '\x65' + chr(4130 - 4031) + '\157' + chr(100) + chr(9339 - 9238))(chr(0b1110101) + chr(5813 - 5697) + chr(0b100111 + 0o77) + chr(0b101101) + chr(0b1101 + 0o53)) % Ie9ycawdW6iV) with xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\xacQ\x84'), chr(100) + chr(0b1100101) + chr(0b11111 + 0o104) + chr(9762 - 9651) + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1000011 + 0o43) + chr(198 - 153) + chr(1071 - 1015)))(Ie9ycawdW6iV, xafqLlk3kkUe(SXOLrMavuUCe(b'\xae'), chr(100) + chr(1121 - 1020) + chr(3325 - 3226) + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + '\x38')) as EGyt1xfPT1P6: Rb2NqCXlkhWZ = fXk443epxtd5.mxtdQMeiwJZJ(EGyt1xfPT1P6) xafqLlk3kkUe(Rb2NqCXlkhWZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3D'), chr(0b1100100) + chr(101) + '\143' + '\x6f' + '\x64' + '\x65')(chr(117) + '\x74' + '\x66' + chr(224 - 179) + chr(56)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xbe\xb3@\x9e"\xd1'), chr(2585 - 2485) + '\145' + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(117) + '\x74' + chr(0b1100110) + chr(1004 - 959) + '\x38'), None) xafqLlk3kkUe(Rb2NqCXlkhWZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3D'), chr(1024 - 924) + chr(0b100110 + 0o77) + chr(6494 - 6395) + chr(0b110011 + 0o74) + '\x64' + '\x65')('\x75' + chr(0b111000 + 0o74) + '\146' + chr(45) + '\070'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb0\xb3G\x99'), chr(0b1100100) + chr(0b111000 + 0o55) + '\x63' + chr(5697 - 5586) + chr(0b1100100) + chr(101))('\x75' + '\x74' + chr(132 - 30) + chr(0b101101) + '\070'), None) xafqLlk3kkUe(Rb2NqCXlkhWZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3D'), chr(9053 - 8953) + chr(101) + '\x63' + chr(6036 - 5925) + '\x64' + chr(101))(chr(0b1100100 + 0o21) + chr(10378 - 10262) + '\x66' + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xb2\xbdY\x8f'), chr(0b1001001 + 0o33) + chr(101) + chr(0b1110 + 0o125) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1001011 + 0o52) + chr(0b11110 + 0o126) + '\x66' + chr(45) + '\x38'), None) xafqLlk3kkUe(Rb2NqCXlkhWZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3D'), chr(2651 - 2551) + '\145' + chr(0b101001 + 0o72) + '\157' + chr(0b1000011 + 0o41) + '\x65')('\x75' + chr(0b110101 + 0o77) + chr(9100 - 8998) + chr(0b101101) + chr(0b110100 + 0o4)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xa8\xb3D'), chr(0b111001 + 0o53) + chr(0b100010 + 0o103) + chr(99) + '\157' + chr(0b1011100 + 0o10) + chr(0b10001 + 0o124))('\165' + chr(116) + chr(6978 - 6876) + chr(1375 - 1330) + '\070'), None) xafqLlk3kkUe(Rb2NqCXlkhWZ, xafqLlk3kkUe(SXOLrMavuUCe(b'\xac\xb3D'), '\144' + '\x65' + '\143' + '\x6f' + chr(4721 - 4621) + '\145')(chr(117) + chr(0b1000101 + 0o57) + chr(0b1100110) + chr(45) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\xb9]\x8d%\xc8X\xd7\xd6q'), '\x64' + chr(101) + chr(99) + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b111010 + 0o54) + '\x2d' + chr(575 - 519)), None) f5ElP0H04QK4 = guRGmljwUVnc.HParams(**Rb2NqCXlkhWZ) if n4ljua2gi1Pr: for K3J4ZwSlE0sT in vUlqIvNSaRMa(xafqLlk3kkUe(f5ElP0H04QK4.values(), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xb9M\x99'), chr(0b111110 + 0o46) + chr(101) + '\x63' + '\157' + '\144' + chr(0b11101 + 0o110))(chr(2600 - 2483) + '\x74' + chr(1058 - 956) + chr(45) + '\070'))()): if lot1PSoAwYhj(n4ljua2gi1Pr, K3J4ZwSlE0sT): QmmgWUB13VCJ = xafqLlk3kkUe(n4ljua2gi1Pr, K3J4ZwSlE0sT) Mi65arwcIK66 = xafqLlk3kkUe(f5ElP0H04QK4, K3J4ZwSlE0sT) if QmmgWUB13VCJ != Mi65arwcIK66: xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8f\xeb|\x928\xdfL\xbf\xdas*\xba'), chr(0b100 + 0o140) + chr(0b1100101) + chr(6056 - 5957) + chr(7926 - 7815) + chr(0b1001001 + 0o33) + chr(101))(chr(1076 - 959) + chr(116) + chr(0b11000 + 0o116) + '\055' + chr(0b111000)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x93\xaaQ\x98:\xceB\xfc\xd5?\x1b\xb4\xcd*5\x88\x8f@D\x0brTE\xf6\x01\xa9'), chr(4618 - 4518) + chr(101) + '\x63' + chr(0b111101 + 0o62) + chr(100) + '\145')(chr(117) + '\164' + chr(7282 - 7180) + chr(45) + '\070') % (K3J4ZwSlE0sT, QmmgWUB13VCJ, Mi65arwcIK66)) t0rOMsrOC7R_(n4ljua2gi1Pr, K3J4ZwSlE0sT, Mi65arwcIK66) else: n4ljua2gi1Pr = f5ElP0H04QK4 return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/utils/hparams_lib.py
add_problem_hparams
def add_problem_hparams(hparams, problem_name_or_instance): """Add problem hparams for the problems.""" if isinstance(problem_name_or_instance, problem_lib.Problem): problem = problem_name_or_instance else: problem = registry.problem(problem_name_or_instance) p_hparams = problem.get_hparams(hparams) hparams.problem = problem hparams.problem_hparams = p_hparams
python
def add_problem_hparams(hparams, problem_name_or_instance): """Add problem hparams for the problems.""" if isinstance(problem_name_or_instance, problem_lib.Problem): problem = problem_name_or_instance else: problem = registry.problem(problem_name_or_instance) p_hparams = problem.get_hparams(hparams) hparams.problem = problem hparams.problem_hparams = p_hparams
[ "def", "add_problem_hparams", "(", "hparams", ",", "problem_name_or_instance", ")", ":", "if", "isinstance", "(", "problem_name_or_instance", ",", "problem_lib", ".", "Problem", ")", ":", "problem", "=", "problem_name_or_instance", "else", ":", "problem", "=", "registry", ".", "problem", "(", "problem_name_or_instance", ")", "p_hparams", "=", "problem", ".", "get_hparams", "(", "hparams", ")", "hparams", ".", "problem", "=", "problem", "hparams", ".", "problem_hparams", "=", "p_hparams" ]
Add problem hparams for the problems.
[ "Add", "problem", "hparams", "for", "the", "problems", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/utils/hparams_lib.py#L93-L101
train
Add problem hparams for the problems.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQ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Y,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 + 0o0) + chr(4634 - 4523) + '\063' + chr(0b110110) + chr(0b10001 + 0o40), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1110 + 0o141) + '\x31' + '\x35' + chr(1609 - 1559), 28128 - 28120), ehT0Px3KOsy9('\060' + '\157' + chr(65 - 14) + '\x32' + '\x30', 4623 - 4615), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b1010 + 0o55) + chr(50), 0b1000), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b1001101 + 0o42) + '\x33' + '\x33' + '\x37', 0b1000), ehT0Px3KOsy9(chr(271 - 223) + chr(0b1101111) + '\062' + chr(0b101010 + 0o14) + chr(294 - 239), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(1616 - 1564) + chr(0b100100 + 0o15), 26550 - 26542), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1101101 + 0o2) + chr(0b110101) + chr(512 - 458), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + '\063' + chr(0b10111 + 0o36), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1388 - 1338) + '\060', 8), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(564 - 514) + chr(49) + '\060', 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110111), 54406 - 54398), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x31' + chr(52) + chr(0b11011 + 0o25), 0b1000), ehT0Px3KOsy9(chr(1791 - 1743) + chr(0b1101111) + '\x31' + '\066' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(1833 - 1783) + chr(0b110000) + chr(0b100011 + 0o21), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\061' + '\065' + '\x30', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b110101) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b11001 + 0o32) + chr(371 - 319), 0b1000), ehT0Px3KOsy9('\x30' + chr(11793 - 11682) + chr(0b110001), 33733 - 33725), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + '\x37' + chr(49), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x31' + chr(50) + chr(52), 3048 - 3040), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110001) + '\x36' + '\x30', 10357 - 10349), ehT0Px3KOsy9('\x30' + '\x6f' + '\x32' + chr(55) + chr(0b1100 + 0o46), 0o10), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b1001010 + 0o45) + chr(0b110011) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(0b10111 + 0o33) + '\x31', 0b1000), ehT0Px3KOsy9(chr(365 - 317) + '\x6f' + '\061' + '\066' + chr(0b110000), 8), ehT0Px3KOsy9('\060' + '\157' + chr(0b110010 + 0o1) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(319 - 271) + '\x6f' + chr(0b100100 + 0o17) + chr(0b1 + 0o66) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x30', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(2023 - 1973) + chr(0b110100) + '\x32', 0o10), ehT0Px3KOsy9(chr(0b101101 + 0o3) + '\157' + chr(51) + chr(54) + chr(0b110011), 40509 - 40501), ehT0Px3KOsy9(chr(0b110 + 0o52) + chr(5713 - 5602) + '\061' + chr(719 - 667) + '\x34', 36809 - 36801), ehT0Px3KOsy9(chr(48) + chr(0b1101010 + 0o5) + chr(676 - 625) + chr(2473 - 2421) + '\x31', 8), ehT0Px3KOsy9(chr(48) + chr(111) + '\x31' + chr(3001 - 2946) + chr(1154 - 1106), 0b1000), ehT0Px3KOsy9(chr(1271 - 1223) + '\x6f' + '\x33' + chr(0b110110) + chr(1911 - 1861), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(250 - 200) + chr(55) + chr(0b101011 + 0o6), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + '\065' + chr(0b1010 + 0o52), ord("\x08")), ehT0Px3KOsy9(chr(2226 - 2178) + chr(0b1101111) + '\x31' + chr(2713 - 2660), ord("\x08")), ehT0Px3KOsy9(chr(470 - 422) + chr(0b1101111) + '\x32' + chr(0b101010 + 0o10) + chr(0b1111 + 0o45), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\060' + chr(0b1101111) + '\065' + '\060', 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xdf'), '\144' + chr(101) + '\143' + '\157' + chr(9380 - 9280) + '\145')(chr(13613 - 13496) + '\x74' + '\x66' + chr(0b101100 + 0o1) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def VNgGitn5Onxw(n4ljua2gi1Pr, fA28FgSLhP9x): if PlSM16l2KDPD(fA28FgSLhP9x, xafqLlk3kkUe(OcGfgf09xxxc, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\x18\xbfX\xb3\xd2\x8c'), '\144' + '\145' + '\x63' + chr(5093 - 4982) + chr(0b1011010 + 0o12) + chr(0b1100001 + 0o4))('\165' + '\x74' + '\x66' + '\x2d' + '\070'))): sO7e1A_Mor6Q = fA28FgSLhP9x else: sO7e1A_Mor6Q = U24OBsRcVqkJ.problem(fA28FgSLhP9x) bb9KhnGWdDAt = sO7e1A_Mor6Q.get_hparams(n4ljua2gi1Pr) n4ljua2gi1Pr.sO7e1A_Mor6Q = sO7e1A_Mor6Q n4ljua2gi1Pr.sXqesioLf7Ji = bb9KhnGWdDAt
tensorflow/tensor2tensor
tensor2tensor/data_generators/subject_verb_agreement.py
load_examples
def load_examples(tmp_dir, prop_train=0.09, prop_val=0.01): """Loads exampls from the tsv file. Args: tmp_dir: temp directory. prop_train: proportion of the train data prop_val: proportion of the validation data Returns: All examples in the dataset pluse train, test, and development splits. """ infile = generator_utils.maybe_download(tmp_dir, _TAR, _URL) tf.logging.info('Loading examples') all_examples = [] for i, d in enumerate(csv.DictReader(gzip.open(infile), delimiter='\t')): if i % 100000 == 0: tf.logging.info('%d examples have been loaded....' % i) ex = {x: int(y) if y.isdigit() else y for x, y in d.items()} all_examples.append(ex) random.seed(1) random.shuffle(all_examples) n_train = int(len(all_examples) * prop_train) n_val = n_train + int(len(all_examples) * prop_val) train = all_examples[:n_train] val = all_examples[n_train:n_val] test = [] for e in all_examples[n_val:]: if e['n_intervening'] == e['n_diff_intervening']: test.append(e) return all_examples, train, val, test
python
def load_examples(tmp_dir, prop_train=0.09, prop_val=0.01): """Loads exampls from the tsv file. Args: tmp_dir: temp directory. prop_train: proportion of the train data prop_val: proportion of the validation data Returns: All examples in the dataset pluse train, test, and development splits. """ infile = generator_utils.maybe_download(tmp_dir, _TAR, _URL) tf.logging.info('Loading examples') all_examples = [] for i, d in enumerate(csv.DictReader(gzip.open(infile), delimiter='\t')): if i % 100000 == 0: tf.logging.info('%d examples have been loaded....' % i) ex = {x: int(y) if y.isdigit() else y for x, y in d.items()} all_examples.append(ex) random.seed(1) random.shuffle(all_examples) n_train = int(len(all_examples) * prop_train) n_val = n_train + int(len(all_examples) * prop_val) train = all_examples[:n_train] val = all_examples[n_train:n_val] test = [] for e in all_examples[n_val:]: if e['n_intervening'] == e['n_diff_intervening']: test.append(e) return all_examples, train, val, test
[ "def", "load_examples", "(", "tmp_dir", ",", "prop_train", "=", "0.09", ",", "prop_val", "=", "0.01", ")", ":", "infile", "=", "generator_utils", ".", "maybe_download", "(", "tmp_dir", ",", "_TAR", ",", "_URL", ")", "tf", ".", "logging", ".", "info", "(", "'Loading examples'", ")", "all_examples", "=", "[", "]", "for", "i", ",", "d", "in", "enumerate", "(", "csv", ".", "DictReader", "(", "gzip", ".", "open", "(", "infile", ")", ",", "delimiter", "=", "'\\t'", ")", ")", ":", "if", "i", "%", "100000", "==", "0", ":", "tf", ".", "logging", ".", "info", "(", "'%d examples have been loaded....'", "%", "i", ")", "ex", "=", "{", "x", ":", "int", "(", "y", ")", "if", "y", ".", "isdigit", "(", ")", "else", "y", "for", "x", ",", "y", "in", "d", ".", "items", "(", ")", "}", "all_examples", ".", "append", "(", "ex", ")", "random", ".", "seed", "(", "1", ")", "random", ".", "shuffle", "(", "all_examples", ")", "n_train", "=", "int", "(", "len", "(", "all_examples", ")", "*", "prop_train", ")", "n_val", "=", "n_train", "+", "int", "(", "len", "(", "all_examples", ")", "*", "prop_val", ")", "train", "=", "all_examples", "[", ":", "n_train", "]", "val", "=", "all_examples", "[", "n_train", ":", "n_val", "]", "test", "=", "[", "]", "for", "e", "in", "all_examples", "[", "n_val", ":", "]", ":", "if", "e", "[", "'n_intervening'", "]", "==", "e", "[", "'n_diff_intervening'", "]", ":", "test", ".", "append", "(", "e", ")", "return", "all_examples", ",", "train", ",", "val", ",", "test" ]
Loads exampls from the tsv file. Args: tmp_dir: temp directory. prop_train: proportion of the train data prop_val: proportion of the validation data Returns: All examples in the dataset pluse train, test, and development splits.
[ "Loads", "exampls", "from", "the", "tsv", "file", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/subject_verb_agreement.py#L77-L111
train
Loads examples from the tsv file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,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('\x30' + '\x6f' + chr(0b100000 + 0o23) + '\063' + chr(0b100000 + 0o20), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1010010 + 0o35) + '\062' + chr(0b110010) + '\x35', 13944 - 13936), ehT0Px3KOsy9(chr(1449 - 1401) + '\x6f' + chr(0b1001 + 0o53) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x33' + chr(0b110 + 0o57) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(50) + chr(1350 - 1295) + chr(0b110101), 51762 - 51754), ehT0Px3KOsy9('\x30' + chr(0b1001000 + 0o47) + chr(49) + chr(1527 - 1474) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(49) + chr(0b110001) + chr(0b1001 + 0o52), 9129 - 9121), ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b110 + 0o151) + '\061' + chr(52) + chr(123 - 71), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(55) + chr(1506 - 1455), 0o10), ehT0Px3KOsy9('\x30' + '\157' + chr(0b100001 + 0o22) + chr(49) + chr(479 - 424), ord("\x08")), ehT0Px3KOsy9(chr(262 - 214) + chr(2686 - 2575) + chr(1816 - 1765) + chr(0b101101 + 0o6) + '\x30', 8), ehT0Px3KOsy9(chr(0b110000) + chr(12165 - 12054) + chr(0b110011) + chr(1641 - 1589) + '\x34', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110001 + 0o0) + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000 + 0o0) + '\157' + chr(0b1001 + 0o50) + chr(0b110110) + chr(54), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\063' + chr(54), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(49) + chr(616 - 568) + chr(0b10110 + 0o41), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + '\063' + chr(2085 - 2032) + chr(741 - 687), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b11011 + 0o30) + chr(0b1111 + 0o45) + '\066', 0o10), ehT0Px3KOsy9('\060' + chr(11534 - 11423) + '\061' + '\066', 8537 - 8529), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(55) + chr(0b101101 + 0o10), 0b1000), ehT0Px3KOsy9(chr(915 - 867) + chr(0b1101111) + chr(49) + chr(1735 - 1684), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(265 - 214) + chr(49), 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1000011 + 0o54) + chr(0b10111 + 0o33) + '\x30' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b110011 + 0o74) + chr(50) + chr(0b101100 + 0o5) + chr(0b10011 + 0o36), 8), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(111) + chr(939 - 887) + '\064', 26 - 18), ehT0Px3KOsy9(chr(0b11 + 0o55) + '\157' + chr(49) + chr(0b110011) + chr(0b101101 + 0o6), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(5979 - 5868) + chr(49) + chr(0b110000) + chr(0b11010 + 0o34), 0b1000), ehT0Px3KOsy9(chr(419 - 371) + chr(111) + chr(986 - 936) + '\061' + '\x32', 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(54) + '\x35', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(6756 - 6645) + '\062' + '\x30' + chr(0b10011 + 0o42), 5107 - 5099), ehT0Px3KOsy9(chr(651 - 603) + chr(0b1101111) + '\065' + chr(0b110001), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(2279 - 2168) + chr(0b10011 + 0o36) + chr(0b100011 + 0o16) + chr(48), 4190 - 4182), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(111) + chr(49) + chr(0b11000 + 0o31) + chr(0b110011), 8), ehT0Px3KOsy9(chr(718 - 670) + '\157' + chr(0b110011) + chr(52) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(2691 - 2580) + chr(0b110010) + chr(48) + '\065', 8), ehT0Px3KOsy9(chr(1662 - 1614) + '\x6f' + chr(1372 - 1321) + '\x33' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + chr(55) + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(0b11100 + 0o24) + chr(11989 - 11878) + chr(328 - 279) + '\x35', 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + '\157' + chr(0b11100 + 0o33) + chr(1747 - 1694), ord("\x08")), ehT0Px3KOsy9(chr(1121 - 1073) + chr(9052 - 8941) + chr(49) + '\x34' + chr(0b101101 + 0o6), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(111) + chr(53) + chr(345 - 297), 61675 - 61667)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b101 + 0o152) + '\x64' + chr(1204 - 1103))(chr(0b1110101) + chr(116) + chr(0b1100011 + 0o3) + '\x2d' + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def O9qIlz0PdYGF(JsZ36NJUqtml, Pk5sfQaLb8kj=0.09, BKJb5UkSJ4HR=0.01): _ooPzo7FtguO = g1Z_RG9zP4cD.maybe_download(JsZ36NJUqtml, DXlWGvg_vaIv, pCCmpnhZPmGO) xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\xa2h\x97\xc8\x0f,SQ\xa3\x82\x8f'), '\144' + chr(101) + '\143' + '\157' + '\x64' + chr(0b1000110 + 0o37))('\165' + '\x74' + '\x66' + chr(0b100010 + 0o13) + '\x38'))(xafqLlk3kkUe(SXOLrMavuUCe(b'\x94\xfaA\x8b\xd4\x02,D^\xb7\xb9\x89\xf9\x1a{4'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(5997 - 5886) + '\144' + chr(5209 - 5108))(chr(0b111000 + 0o75) + '\x74' + '\x66' + '\x2d' + '\070')) OPZlpLcFFvT6 = [] for (WVxHKyX45z_L, pd3lxn9vqWxp) in YlkZvXL8qwsX(xafqLlk3kkUe(CU5kosqFIwDx, xafqLlk3kkUe(SXOLrMavuUCe(b'\x9c\xfcC\x9b\xef\t*\x00^\xbd'), '\144' + chr(6932 - 6831) + chr(0b1001111 + 0o24) + '\157' + chr(4175 - 4075) + chr(0b101011 + 0o72))(chr(0b1110101) + chr(0b1100100 + 0o20) + chr(0b1100110) + chr(45) + chr(56)))(xafqLlk3kkUe(Sl9BQg7umixy, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb7\xe5E\x81'), '\144' + chr(0b1100101) + chr(7050 - 6951) + '\x6f' + chr(0b1100100) + '\145')(chr(9968 - 9851) + '\164' + chr(102) + chr(45) + chr(0b111000)))(_ooPzo7FtguO), delimiter=xafqLlk3kkUe(SXOLrMavuUCe(b'\xd1'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1010101 + 0o17) + chr(0b1100101))(chr(0b1001001 + 0o54) + chr(0b101100 + 0o110) + chr(102) + chr(194 - 149) + chr(0b111000)))): if WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b10011 + 0o35) + '\157' + chr(0b100 + 0o57) + '\x30' + chr(0b110011) + chr(308 - 258) + chr(0b1111 + 0o45) + '\x30', 0o10) == ehT0Px3KOsy9(chr(48) + '\157' + chr(48), 0o10): xafqLlk3kkUe(IDJ2eXGCBCDu.logging, xafqLlk3kkUe(SXOLrMavuUCe(b'\x8b\xa2h\x97\xc8\x0f,SQ\xa3\x82\x8f'), '\144' + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(10042 - 9925) + '\x74' + chr(1374 - 1272) + chr(0b101 + 0o50) + chr(0b10100 + 0o44)))(xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd\xf1\x00\x8a\xc5\r&\x14W\xaa\xab\xc4\xe1\x17h"\xce\x84k\x18e9\xe8\xe6E?#\xee\x1b\xab\x07f'), chr(100) + chr(0b10111 + 0o116) + '\x63' + '\157' + chr(100) + chr(6107 - 6006))(chr(0b110010 + 0o103) + chr(0b1010101 + 0o37) + chr(5795 - 5693) + chr(0b101101) + chr(468 - 412)) % WVxHKyX45z_L) DfdhY28yEwAF = {OeWW0F1dBPRQ: ehT0Px3KOsy9(SqiSOtYOqOJH) if SqiSOtYOqOJH.isdigit() else SqiSOtYOqOJH for (OeWW0F1dBPRQ, SqiSOtYOqOJH) in pd3lxn9vqWxp.NzveIZ3IlSH9()} xafqLlk3kkUe(OPZlpLcFFvT6, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\xe5P\x8a\xd3\x08'), '\x64' + '\x65' + chr(0b111 + 0o134) + chr(111) + chr(0b1000 + 0o134) + chr(0b1100101))('\x75' + chr(116) + chr(102) + '\x2d' + chr(0b1011 + 0o55)))(DfdhY28yEwAF) xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\xf0E\x8b'), chr(0b1001100 + 0o30) + chr(0b1010011 + 0o22) + chr(99) + '\x6f' + '\x64' + '\x65')('\x75' + chr(7210 - 7094) + chr(0b10010 + 0o124) + chr(0b101101) + chr(2243 - 2187)))(ehT0Px3KOsy9('\x30' + chr(0b1010110 + 0o31) + chr(0b1101 + 0o44), ord("\x08"))) xafqLlk3kkUe(drxw09AdRdci, xafqLlk3kkUe(SXOLrMavuUCe(b'\xab\xfdU\x89\xdb\x00.'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1001101 + 0o50) + '\x74' + '\x66' + chr(0b100001 + 0o14) + chr(0b111000)))(OPZlpLcFFvT6) po2sAwtXwdWz = ehT0Px3KOsy9(c2A0yzQpDQB3(OPZlpLcFFvT6) * Pk5sfQaLb8kj) t86joUZyDhJ_ = po2sAwtXwdWz + ehT0Px3KOsy9(c2A0yzQpDQB3(OPZlpLcFFvT6) * BKJb5UkSJ4HR) e80gRioCjdat = OPZlpLcFFvT6[:po2sAwtXwdWz] pQxH2D_k9sXQ = OPZlpLcFFvT6[po2sAwtXwdWz:t86joUZyDhJ_] o1nnuQUCchP4 = [] for GlnVAPeT6CUe in OPZlpLcFFvT6[t86joUZyDhJ_:]: if GlnVAPeT6CUe[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xcaI\x81\xc9\t9\x12^\xa1\xb1\x8a\xee'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(7805 - 7688) + chr(10854 - 10738) + '\146' + chr(0b101101) + '\x38')] == GlnVAPeT6CUe[xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xcaD\x86\xdb\n\x14\rU\xbb\xbd\x96\xff\x13p.\x80\x81'), '\144' + chr(0b1100101) + chr(99) + chr(5381 - 5270) + chr(0b1100100) + chr(2493 - 2392))(chr(0b1110101) + chr(0b11101 + 0o127) + '\146' + chr(45) + chr(56))]: xafqLlk3kkUe(o1nnuQUCchP4, xafqLlk3kkUe(SXOLrMavuUCe(b'\xb9\xe5P\x8a\xd3\x08'), chr(0b1000011 + 0o41) + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + '\055' + '\x38'))(GlnVAPeT6CUe) return (OPZlpLcFFvT6, e80gRioCjdat, pQxH2D_k9sXQ, o1nnuQUCchP4)
tensorflow/tensor2tensor
tensor2tensor/data_generators/cifar.py
_get_cifar
def _get_cifar(directory, url): """Download and extract CIFAR to directory unless it is there.""" filename = os.path.basename(url) path = generator_utils.maybe_download(directory, filename, url) tarfile.open(path, "r:gz").extractall(directory)
python
def _get_cifar(directory, url): """Download and extract CIFAR to directory unless it is there.""" filename = os.path.basename(url) path = generator_utils.maybe_download(directory, filename, url) tarfile.open(path, "r:gz").extractall(directory)
[ "def", "_get_cifar", "(", "directory", ",", "url", ")", ":", "filename", "=", "os", ".", "path", ".", "basename", "(", "url", ")", "path", "=", "generator_utils", ".", "maybe_download", "(", "directory", ",", "filename", ",", "url", ")", "tarfile", ".", "open", "(", "path", ",", "\"r:gz\"", ")", ".", "extractall", "(", "directory", ")" ]
Download and extract CIFAR to directory unless it is there.
[ "Download", "and", "extract", "CIFAR", "to", "directory", "unless", "it", "is", "there", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/cifar.py#L55-L59
train
Download and extract CIFAR to directory unless it is there.
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(1194 - 1146) + chr(0b1101111) + '\063' + '\062' + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(3176 - 3065) + chr(0b11001 + 0o31) + chr(0b110110) + chr(0b1111 + 0o43), 65376 - 65368), ehT0Px3KOsy9('\060' + '\157' + '\061' + chr(48) + chr(2031 - 1978), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + chr(0b1000010 + 0o55) + chr(0b10100 + 0o37) + chr(49) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + '\157' + '\065' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100100 + 0o13) + chr(0b10110 + 0o35) + chr(757 - 705) + '\x35', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1337 - 1288) + chr(49) + '\x37', 62854 - 62846), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101100 + 0o3) + chr(242 - 193) + chr(0b10 + 0o62) + chr(0b110111), 0o10), ehT0Px3KOsy9('\060' + chr(111) + '\061' + chr(122 - 71) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(1092 - 1044) + '\x6f' + chr(50) + chr(0b101011 + 0o10) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(111) + chr(0b110001) + '\066' + '\067', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x32' + chr(53) + chr(1507 - 1452), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(51) + chr(55) + chr(0b1011 + 0o47), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + '\x31' + chr(0b10 + 0o61) + chr(0b110000), 59377 - 59369), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(1554 - 1505) + chr(0b110111) + '\x37', 46921 - 46913), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(49) + chr(49) + chr(53), 42099 - 42091), ehT0Px3KOsy9('\060' + chr(5530 - 5419) + chr(0b110010) + chr(0b10 + 0o56) + chr(0b100111 + 0o14), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6974 - 6863) + chr(51) + chr(0b110111) + chr(0b110110 + 0o0), 681 - 673), ehT0Px3KOsy9(chr(48) + chr(6904 - 6793) + '\061' + chr(52) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(11282 - 11171) + '\063' + '\x35' + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(1240 - 1191) + '\x37' + '\064', 0b1000), ehT0Px3KOsy9('\060' + chr(7469 - 7358) + chr(0b110010) + chr(2330 - 2277) + '\062', 0o10), ehT0Px3KOsy9('\060' + chr(0b0 + 0o157) + chr(2342 - 2292) + chr(50) + '\x37', ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(1694 - 1645) + chr(0b110111) + chr(1085 - 1034), 39201 - 39193), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\x6f' + chr(470 - 417), 0o10), ehT0Px3KOsy9(chr(0b10001 + 0o37) + chr(0b1 + 0o156) + '\x33' + chr(1528 - 1478) + '\061', 14426 - 14418), ehT0Px3KOsy9(chr(2188 - 2140) + '\157' + '\062' + chr(0b110101) + chr(2391 - 2340), 38105 - 38097), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + chr(527 - 475) + chr(1230 - 1182), 0o10), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b11110 + 0o121) + chr(2538 - 2483) + chr(0b110010), 35269 - 35261), ehT0Px3KOsy9(chr(562 - 514) + chr(0b101110 + 0o101) + chr(49) + '\067' + chr(0b110100), 8), ehT0Px3KOsy9(chr(48) + '\157' + chr(49) + chr(0b110101) + chr(0b110110), 27107 - 27099), ehT0Px3KOsy9(chr(507 - 459) + chr(288 - 177) + chr(661 - 612) + chr(50) + chr(471 - 422), ord("\x08")), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\157' + chr(1406 - 1357) + chr(51) + chr(1785 - 1730), ord("\x08")), ehT0Px3KOsy9(chr(0b1011 + 0o45) + chr(0b1010 + 0o145) + chr(0b1010 + 0o50) + chr(53) + chr(51), 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010) + chr(0b110001) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b101110 + 0o2) + '\x6f' + chr(0b1000 + 0o53) + '\x30' + chr(49), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b111001 + 0o66) + chr(0b110001) + '\x33', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\063', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b11011 + 0o26) + chr(0b110100) + chr(0b100101 + 0o13), 26500 - 26492), ehT0Px3KOsy9(chr(1281 - 1233) + '\x6f' + '\061' + chr(2020 - 1968) + chr(0b110011), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9(chr(1566 - 1518) + chr(0b1000 + 0o147) + '\x35' + chr(0b110000), 40841 - 40833)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xfd'), chr(100) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + chr(101))('\x75' + chr(0b101100 + 0o110) + chr(102) + chr(0b101101) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def l0vf6yxFUe1b(EVVr9bEHclel, CYCr3xzMHl4K): xw4DsBfIJ22E = oqhJDdMJfuwx.path.basename(CYCr3xzMHl4K) EaCjyhZptSer = g1Z_RG9zP4cD.maybe_download(EVVr9bEHclel, xw4DsBfIJ22E, CYCr3xzMHl4K) xafqLlk3kkUe(RxqDt8LqC5Ns.open(EaCjyhZptSer, xafqLlk3kkUe(SXOLrMavuUCe(b'\xa1\x88"\xb7'), '\x64' + '\x65' + chr(4164 - 4065) + '\157' + chr(0b1100100) + chr(0b11110 + 0o107))(chr(0b101100 + 0o111) + '\x74' + chr(3752 - 3650) + chr(1540 - 1495) + chr(56))), xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6\xca1\xbfM\x86;\x067\xf4'), chr(0b100110 + 0o76) + '\145' + chr(1467 - 1368) + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(7291 - 7175) + chr(102) + chr(45) + '\070'))(EVVr9bEHclel)
tensorflow/tensor2tensor
tensor2tensor/data_generators/cifar.py
cifar_generator
def cifar_generator(cifar_version, tmp_dir, training, how_many, start_from=0): """Image generator for CIFAR-10 and 100. Args: cifar_version: string; one of "cifar10" or "cifar100" 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 CIFAR-10 images and labels. """ if cifar_version == "cifar10": url = _CIFAR10_URL train_files = _CIFAR10_TRAIN_FILES test_files = _CIFAR10_TEST_FILES prefix = _CIFAR10_PREFIX image_size = _CIFAR10_IMAGE_SIZE label_key = "labels" elif cifar_version == "cifar100" or cifar_version == "cifar20": url = _CIFAR100_URL train_files = _CIFAR100_TRAIN_FILES test_files = _CIFAR100_TEST_FILES prefix = _CIFAR100_PREFIX image_size = _CIFAR100_IMAGE_SIZE if cifar_version == "cifar100": label_key = "fine_labels" else: label_key = "coarse_labels" _get_cifar(tmp_dir, url) data_files = train_files if training else test_files all_images, all_labels = [], [] for filename in data_files: path = os.path.join(tmp_dir, prefix, filename) with tf.gfile.Open(path, "rb") as f: if six.PY2: data = cPickle.load(f) else: data = cPickle.load(f, encoding="latin1") images = data["data"] num_images = images.shape[0] images = images.reshape((num_images, 3, image_size, image_size)) all_images.extend([ np.squeeze(images[j]).transpose((1, 2, 0)) for j in range(num_images) ]) labels = data[label_key] all_labels.extend([labels[j] for j in range(num_images)]) return image_utils.image_generator( all_images[start_from:start_from + how_many], all_labels[start_from:start_from + how_many])
python
def cifar_generator(cifar_version, tmp_dir, training, how_many, start_from=0): """Image generator for CIFAR-10 and 100. Args: cifar_version: string; one of "cifar10" or "cifar100" 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 CIFAR-10 images and labels. """ if cifar_version == "cifar10": url = _CIFAR10_URL train_files = _CIFAR10_TRAIN_FILES test_files = _CIFAR10_TEST_FILES prefix = _CIFAR10_PREFIX image_size = _CIFAR10_IMAGE_SIZE label_key = "labels" elif cifar_version == "cifar100" or cifar_version == "cifar20": url = _CIFAR100_URL train_files = _CIFAR100_TRAIN_FILES test_files = _CIFAR100_TEST_FILES prefix = _CIFAR100_PREFIX image_size = _CIFAR100_IMAGE_SIZE if cifar_version == "cifar100": label_key = "fine_labels" else: label_key = "coarse_labels" _get_cifar(tmp_dir, url) data_files = train_files if training else test_files all_images, all_labels = [], [] for filename in data_files: path = os.path.join(tmp_dir, prefix, filename) with tf.gfile.Open(path, "rb") as f: if six.PY2: data = cPickle.load(f) else: data = cPickle.load(f, encoding="latin1") images = data["data"] num_images = images.shape[0] images = images.reshape((num_images, 3, image_size, image_size)) all_images.extend([ np.squeeze(images[j]).transpose((1, 2, 0)) for j in range(num_images) ]) labels = data[label_key] all_labels.extend([labels[j] for j in range(num_images)]) return image_utils.image_generator( all_images[start_from:start_from + how_many], all_labels[start_from:start_from + how_many])
[ "def", "cifar_generator", "(", "cifar_version", ",", "tmp_dir", ",", "training", ",", "how_many", ",", "start_from", "=", "0", ")", ":", "if", "cifar_version", "==", "\"cifar10\"", ":", "url", "=", "_CIFAR10_URL", "train_files", "=", "_CIFAR10_TRAIN_FILES", "test_files", "=", "_CIFAR10_TEST_FILES", "prefix", "=", "_CIFAR10_PREFIX", "image_size", "=", "_CIFAR10_IMAGE_SIZE", "label_key", "=", "\"labels\"", "elif", "cifar_version", "==", "\"cifar100\"", "or", "cifar_version", "==", "\"cifar20\"", ":", "url", "=", "_CIFAR100_URL", "train_files", "=", "_CIFAR100_TRAIN_FILES", "test_files", "=", "_CIFAR100_TEST_FILES", "prefix", "=", "_CIFAR100_PREFIX", "image_size", "=", "_CIFAR100_IMAGE_SIZE", "if", "cifar_version", "==", "\"cifar100\"", ":", "label_key", "=", "\"fine_labels\"", "else", ":", "label_key", "=", "\"coarse_labels\"", "_get_cifar", "(", "tmp_dir", ",", "url", ")", "data_files", "=", "train_files", "if", "training", "else", "test_files", "all_images", ",", "all_labels", "=", "[", "]", ",", "[", "]", "for", "filename", "in", "data_files", ":", "path", "=", "os", ".", "path", ".", "join", "(", "tmp_dir", ",", "prefix", ",", "filename", ")", "with", "tf", ".", "gfile", ".", "Open", "(", "path", ",", "\"rb\"", ")", "as", "f", ":", "if", "six", ".", "PY2", ":", "data", "=", "cPickle", ".", "load", "(", "f", ")", "else", ":", "data", "=", "cPickle", ".", "load", "(", "f", ",", "encoding", "=", "\"latin1\"", ")", "images", "=", "data", "[", "\"data\"", "]", "num_images", "=", "images", ".", "shape", "[", "0", "]", "images", "=", "images", ".", "reshape", "(", "(", "num_images", ",", "3", ",", "image_size", ",", "image_size", ")", ")", "all_images", ".", "extend", "(", "[", "np", ".", "squeeze", "(", "images", "[", "j", "]", ")", ".", "transpose", "(", "(", "1", ",", "2", ",", "0", ")", ")", "for", "j", "in", "range", "(", "num_images", ")", "]", ")", "labels", "=", "data", "[", "label_key", "]", "all_labels", ".", "extend", "(", "[", "labels", "[", "j", "]", "for", "j", "in", "range", "(", "num_images", ")", "]", ")", "return", "image_utils", ".", "image_generator", "(", "all_images", "[", "start_from", ":", "start_from", "+", "how_many", "]", ",", "all_labels", "[", "start_from", ":", "start_from", "+", "how_many", "]", ")" ]
Image generator for CIFAR-10 and 100. Args: cifar_version: string; one of "cifar10" or "cifar100" 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 CIFAR-10 images and labels.
[ "Image", "generator", "for", "CIFAR", "-", "10", "and", "100", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/data_generators/cif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zwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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(1324 - 1276) + chr(2940 - 2829) + chr(50) + chr(0b11001 + 0o34) + '\x31', 0b1000), ehT0Px3KOsy9(chr(120 - 72) + chr(0b1101111) + chr(0b110001) + '\066' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b101100 + 0o4) + chr(6415 - 6304) + chr(0b11110 + 0o24) + chr(0b1000 + 0o51) + '\063', 0o10), ehT0Px3KOsy9(chr(1111 - 1063) + '\x6f' + '\063' + chr(51) + chr(0b1001 + 0o51), ord("\x08")), ehT0Px3KOsy9(chr(490 - 442) + chr(111) + chr(0b110101) + '\x34', 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\065' + chr(0b110000), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b101101 + 0o6) + chr(2182 - 2134) + '\065', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(54) + '\067', 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + '\062' + chr(51) + chr(0b101000 + 0o17), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b1010 + 0o47) + chr(0b10101 + 0o37) + chr(49), 27505 - 27497), ehT0Px3KOsy9(chr(48) + chr(0b1000000 + 0o57) + chr(0b110 + 0o55) + '\065' + '\x34', 56100 - 56092), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\x34' + chr(1758 - 1706), 56894 - 56886), ehT0Px3KOsy9(chr(48) + chr(111) + '\063' + chr(52) + chr(2171 - 2123), 60176 - 60168), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1254 - 1205) + chr(0b110001) + chr(55), 46626 - 46618), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(11881 - 11770) + chr(0b110011) + chr(0b110101) + chr(0b110001), 58525 - 58517), ehT0Px3KOsy9(chr(1144 - 1096) + '\x6f' + chr(0b110011) + chr(0b10001 + 0o43), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1086 - 1036) + chr(0b1011 + 0o47) + chr(0b110110), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(984 - 932), 35539 - 35531), ehT0Px3KOsy9('\060' + chr(0b111110 + 0o61) + chr(0b11101 + 0o26), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6123 - 6012) + chr(0b0 + 0o62) + '\x36' + chr(0b110110), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\062' + '\060' + chr(50), ord("\x08")), ehT0Px3KOsy9(chr(295 - 247) + chr(111) + chr(1620 - 1571) + chr(1051 - 1001) + chr(52), 0o10), ehT0Px3KOsy9(chr(0b11000 + 0o30) + chr(0b10001 + 0o136) + '\x37' + chr(0b110001), 0o10), ehT0Px3KOsy9('\060' + chr(476 - 365) + chr(49) + chr(1933 - 1878) + chr(0b10001 + 0o46), 4794 - 4786), ehT0Px3KOsy9('\x30' + '\x6f' + chr(507 - 457) + '\x32' + chr(54), 8), ehT0Px3KOsy9('\x30' + chr(7363 - 7252) + '\067' + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(1029 - 918) + '\x33' + '\064' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + '\061' + chr(0b10111 + 0o31) + '\x34', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(347 - 298) + chr(1176 - 1123) + chr(48), 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110001) + chr(0b1 + 0o65), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101011 + 0o4) + chr(51) + '\064' + '\067', 8), ehT0Px3KOsy9(chr(0b110000) + chr(1900 - 1789) + chr(51) + '\x32' + chr(1620 - 1570), 0o10), ehT0Px3KOsy9('\060' + chr(0b11100 + 0o123) + chr(0b101011 + 0o14) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b101111 + 0o4) + chr(0b11 + 0o56), 0o10), ehT0Px3KOsy9(chr(0b11101 + 0o23) + '\x6f' + chr(0b110011) + chr(951 - 900) + chr(487 - 434), 15368 - 15360), ehT0Px3KOsy9(chr(48) + chr(3796 - 3685) + chr(2474 - 2419) + chr(0b110110), 8), ehT0Px3KOsy9('\x30' + chr(0b1101 + 0o142) + '\x32' + '\x34' + chr(51), 0b1000), ehT0Px3KOsy9('\060' + chr(0b100000 + 0o117) + '\x31' + chr(0b10100 + 0o41) + '\x31', 32103 - 32095), ehT0Px3KOsy9(chr(0b100000 + 0o20) + chr(111) + chr(0b10000 + 0o41) + chr(52) + chr(703 - 650), 45296 - 45288), ehT0Px3KOsy9(chr(1974 - 1926) + chr(0b1000010 + 0o55) + chr(0b101000 + 0o11) + chr(0b1 + 0o66) + chr(0b110010 + 0o1), 1448 - 1440)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b11111 + 0o21) + chr(111) + '\x35' + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x87'), chr(3428 - 3328) + '\x65' + chr(0b1010101 + 0o16) + chr(111) + chr(100) + chr(0b1001100 + 0o31))('\165' + chr(116) + '\146' + chr(45) + chr(56)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def bISyhdd_C4CU(BTY4FdWNX51p, JsZ36NJUqtml, H15mhcYcioqz, HMrjUI4R_mvf, dPV5mRckKEXT=ehT0Px3KOsy9('\060' + chr(111) + '\060', ord("\x08"))): if BTY4FdWNX51p == xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x19\xed\xbb^\x19\xf5'), chr(100) + chr(8811 - 8710) + '\x63' + chr(4479 - 4368) + chr(6528 - 6428) + '\145')(chr(0b1110101) + '\x74' + chr(4986 - 4884) + '\055' + '\x38'): CYCr3xzMHl4K = oaaMZVrOQpVj DRODQPL8lJ6N = N2_z5dNDvN2i p3bUfQMQKGYG = cVkWUWi89OCh K1Ha0XjJTAE7 = NjqMo9yKKD3_ fJKnIM3o6qJL = t0KFqgKW_aG0 AyZ0ziQigspL = xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\x11\xe9\xbf@['), chr(6423 - 6323) + chr(9115 - 9014) + chr(99) + chr(0b1101111) + chr(6021 - 5921) + chr(0b1001101 + 0o30))('\165' + chr(0b110010 + 0o102) + '\146' + chr(0b1101 + 0o40) + chr(0b1101 + 0o53)) elif BTY4FdWNX51p == xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x19\xed\xbb^\x19\xf5\x07'), '\x64' + chr(0b1001 + 0o134) + '\x63' + chr(0b1001011 + 0o44) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + '\055' + chr(56)) or BTY4FdWNX51p == xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x19\xed\xbb^\x1a\xf5'), '\144' + chr(0b110111 + 0o56) + '\143' + chr(0b1000110 + 0o51) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(3110 - 3008) + '\055' + '\070'): CYCr3xzMHl4K = fcuGqLn__pa_ DRODQPL8lJ6N = BDVoLP2iuOO4 p3bUfQMQKGYG = B5AQimsW00YO K1Ha0XjJTAE7 = eiDjiEoOpOW6 fJKnIM3o6qJL = aVQ6JGj4ygn_ if BTY4FdWNX51p == xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x19\xed\xbb^\x19\xf5\x07'), chr(5240 - 5140) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + '\x65')(chr(0b1001110 + 0o47) + '\164' + chr(0b1100110) + chr(0b11010 + 0o23) + chr(0b111000)): AyZ0ziQigspL = xafqLlk3kkUe(SXOLrMavuUCe(b'\xcf\x19\xe5\xbfsD\xa4U\xfa\r\x9f'), chr(5814 - 5714) + chr(101) + chr(0b10110 + 0o115) + chr(0b101001 + 0o106) + chr(0b1100100) + chr(1309 - 1208))(chr(1854 - 1737) + '\164' + chr(0b101100 + 0o72) + chr(0b101101) + chr(0b110010 + 0o6)) else: AyZ0ziQigspL = xafqLlk3kkUe(SXOLrMavuUCe(b'\xca\x1f\xea\xa8_M\x9a[\xfe\x03\x89H\x93'), chr(8083 - 7983) + chr(9515 - 9414) + '\x63' + chr(0b1010100 + 0o33) + chr(100) + chr(0b1100101))(chr(3494 - 3377) + '\x74' + chr(102) + chr(45) + chr(56)) l0vf6yxFUe1b(JsZ36NJUqtml, CYCr3xzMHl4K) KAyZjSEftgFC = DRODQPL8lJ6N if H15mhcYcioqz else p3bUfQMQKGYG (Uil9aTx9j0js, fNzOODspTL_K) = ([], []) for xw4DsBfIJ22E in KAyZjSEftgFC: EaCjyhZptSer = oqhJDdMJfuwx.path.join(JsZ36NJUqtml, K1Ha0XjJTAE7, xw4DsBfIJ22E) with xafqLlk3kkUe(IDJ2eXGCBCDu.gfile, xafqLlk3kkUe(SXOLrMavuUCe(b'\xe6\x00\xee\xb4'), chr(100) + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + '\x65')(chr(0b1011101 + 0o30) + chr(116) + chr(102) + chr(0b10111 + 0o26) + chr(56)))(EaCjyhZptSer, xafqLlk3kkUe(SXOLrMavuUCe(b'\xdb\x12'), chr(0b1100100) + chr(0b1100001 + 0o4) + '\x63' + chr(205 - 94) + chr(0b1001111 + 0o25) + '\x65')(chr(0b10011 + 0o142) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(56))) as EGyt1xfPT1P6: if xafqLlk3kkUe(sYby0kpfssd4, xafqLlk3kkUe(SXOLrMavuUCe(b'\xf9)\xb9'), chr(0b111001 + 0o53) + chr(101) + chr(99) + chr(111) + chr(8216 - 8116) + '\145')(chr(117) + chr(13038 - 12922) + '\x66' + chr(45) + '\070')): ULnjp6D6efFH = NaUfygCzrUNa.mxtdQMeiwJZJ(EGyt1xfPT1P6) else: ULnjp6D6efFH = NaUfygCzrUNa.mxtdQMeiwJZJ(EGyt1xfPT1P6, encoding=xafqLlk3kkUe(SXOLrMavuUCe(b'\xc5\x11\xff\xb3B\x19'), '\x64' + '\x65' + chr(99) + '\157' + chr(0b1100100) + '\145')(chr(7214 - 7097) + '\x74' + chr(0b1000000 + 0o46) + chr(45) + chr(0b100010 + 0o26))) YJOmEcibG8C0 = ULnjp6D6efFH[xafqLlk3kkUe(SXOLrMavuUCe(b'\xcd\x11\xff\xbb'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(0b111101 + 0o47) + '\145')('\165' + chr(0b100010 + 0o122) + chr(3447 - 3345) + chr(1829 - 1784) + '\070')] xf2cgVKUh6ft = YJOmEcibG8C0.nauYfLglTpcb[ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b10111 + 0o31), 8)] YJOmEcibG8C0 = YJOmEcibG8C0.reshape((xf2cgVKUh6ft, ehT0Px3KOsy9(chr(1598 - 1550) + '\157' + '\063', 8), fJKnIM3o6qJL, fJKnIM3o6qJL)) xafqLlk3kkUe(Uil9aTx9j0js, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\x08\xff\xbfBL'), chr(5165 - 5065) + chr(1933 - 1832) + '\143' + chr(111) + chr(0b11010 + 0o112) + chr(101))('\x75' + '\164' + chr(0b101101 + 0o71) + chr(0b100100 + 0o11) + chr(0b111000)))([xafqLlk3kkUe(WqUC3KWvYVup.squeeze(YJOmEcibG8C0[tlORBuYsiw3X]), xafqLlk3kkUe(SXOLrMavuUCe(b'\xdd\x02\xea\xb4_X\xaaD\xfa'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(504 - 448)))((ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001), ord("\x08")), ehT0Px3KOsy9(chr(0b11001 + 0o27) + chr(111) + '\062', ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b111010 + 0o65) + chr(1308 - 1260), 8))) for tlORBuYsiw3X in vQr8gNKaIaWE(xf2cgVKUh6ft)]) uXMK81tmdpTM = ULnjp6D6efFH[AyZ0ziQigspL] xafqLlk3kkUe(fNzOODspTL_K, xafqLlk3kkUe(SXOLrMavuUCe(b'\xcc\x08\xff\xbfBL'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b101100 + 0o110) + '\146' + chr(45) + '\070'))([uXMK81tmdpTM[tlORBuYsiw3X] for tlORBuYsiw3X in vQr8gNKaIaWE(xf2cgVKUh6ft)]) return xafqLlk3kkUe(sOwVd6RdzUcC, xafqLlk3kkUe(SXOLrMavuUCe(b'\xc0\x1d\xea\xbdIw\xa2R\xf1\x04\x9eE\x94 \x9b'), chr(0b1100100) + '\145' + chr(7355 - 7256) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + chr(0b1000100 + 0o60) + '\146' + chr(45) + '\070'))(Uil9aTx9j0js[dPV5mRckKEXT:dPV5mRckKEXT + HMrjUI4R_mvf], fNzOODspTL_K[dPV5mRckKEXT:dPV5mRckKEXT + HMrjUI4R_mvf])
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_ppo_base
def rlmb_ppo_base(): """HParams for PPO base.""" hparams = _rlmb_base() ppo_params = dict( base_algo="ppo", base_algo_params="ppo_original_params", # Number of real environments to train on simultaneously. real_batch_size=1, # Number of simulated environments to train on simultaneously. simulated_batch_size=16, eval_batch_size=32, # Unused; number of PPO epochs is calculated from the real frame limit. real_ppo_epochs_num=0, # Number of frames that can be taken from the simulated environment before # it diverges, used for training the agent. ppo_epochs_num=1000, # This should be enough to see something # Should be equal to simulated_rollout_length. # TODO(koz4k): Uncouple this by outputing done from SimulatedBatchEnv. ppo_epoch_length=hparams.simulated_rollout_length, # Do not eval since simulated batch env does not produce dones ppo_eval_every_epochs=0, ppo_learning_rate_constant=1e-4, # Will be changed, just so it exists. # This needs to be divisible by real_ppo_effective_num_agents. real_ppo_epoch_length=16 * 200, real_ppo_learning_rate_constant=1e-4, real_ppo_effective_num_agents=16, real_ppo_eval_every_epochs=0, simulation_flip_first_random_for_beginning=True, ) update_hparams(hparams, ppo_params) return hparams
python
def rlmb_ppo_base(): """HParams for PPO base.""" hparams = _rlmb_base() ppo_params = dict( base_algo="ppo", base_algo_params="ppo_original_params", # Number of real environments to train on simultaneously. real_batch_size=1, # Number of simulated environments to train on simultaneously. simulated_batch_size=16, eval_batch_size=32, # Unused; number of PPO epochs is calculated from the real frame limit. real_ppo_epochs_num=0, # Number of frames that can be taken from the simulated environment before # it diverges, used for training the agent. ppo_epochs_num=1000, # This should be enough to see something # Should be equal to simulated_rollout_length. # TODO(koz4k): Uncouple this by outputing done from SimulatedBatchEnv. ppo_epoch_length=hparams.simulated_rollout_length, # Do not eval since simulated batch env does not produce dones ppo_eval_every_epochs=0, ppo_learning_rate_constant=1e-4, # Will be changed, just so it exists. # This needs to be divisible by real_ppo_effective_num_agents. real_ppo_epoch_length=16 * 200, real_ppo_learning_rate_constant=1e-4, real_ppo_effective_num_agents=16, real_ppo_eval_every_epochs=0, simulation_flip_first_random_for_beginning=True, ) update_hparams(hparams, ppo_params) return hparams
[ "def", "rlmb_ppo_base", "(", ")", ":", "hparams", "=", "_rlmb_base", "(", ")", "ppo_params", "=", "dict", "(", "base_algo", "=", "\"ppo\"", ",", "base_algo_params", "=", "\"ppo_original_params\"", ",", "# Number of real environments to train on simultaneously.", "real_batch_size", "=", "1", ",", "# Number of simulated environments to train on simultaneously.", "simulated_batch_size", "=", "16", ",", "eval_batch_size", "=", "32", ",", "# Unused; number of PPO epochs is calculated from the real frame limit.", "real_ppo_epochs_num", "=", "0", ",", "# Number of frames that can be taken from the simulated environment before", "# it diverges, used for training the agent.", "ppo_epochs_num", "=", "1000", ",", "# This should be enough to see something", "# Should be equal to simulated_rollout_length.", "# TODO(koz4k): Uncouple this by outputing done from SimulatedBatchEnv.", "ppo_epoch_length", "=", "hparams", ".", "simulated_rollout_length", ",", "# Do not eval since simulated batch env does not produce dones", "ppo_eval_every_epochs", "=", "0", ",", "ppo_learning_rate_constant", "=", "1e-4", ",", "# Will be changed, just so it exists.", "# This needs to be divisible by real_ppo_effective_num_agents.", "real_ppo_epoch_length", "=", "16", "*", "200", ",", "real_ppo_learning_rate_constant", "=", "1e-4", ",", "real_ppo_effective_num_agents", "=", "16", ",", "real_ppo_eval_every_epochs", "=", "0", ",", "simulation_flip_first_random_for_beginning", "=", "True", ",", ")", "update_hparams", "(", "hparams", ",", "ppo_params", ")", "return", "hparams" ]
HParams for PPO base.
[ "HParams", "for", "PPO", "base", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L138-L171
train
HParams for PPO base.
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,n0Zkato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t5d,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(2145 - 2097) + '\x6f' + chr(50) + chr(0b110001) + '\x36', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(1885 - 1836) + chr(0b100110 + 0o15) + chr(2114 - 2065), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101000 + 0o7) + '\x31' + '\x31' + chr(1441 - 1387), 0o10), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(0b1101111) + '\x32' + '\x36' + '\065', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50) + chr(51) + chr(0b100001 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(2060 - 2009) + chr(53) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + '\063' + '\x31' + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + '\067' + '\x33', 54308 - 54300), ehT0Px3KOsy9(chr(2272 - 2224) + chr(10698 - 10587) + '\063' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(111) + chr(0b110001) + chr(0b10000 + 0o44) + chr(49), 0o10), ehT0Px3KOsy9(chr(0b100000 + 0o20) + '\157' + chr(51) + chr(912 - 861) + '\x31', 0b1000), ehT0Px3KOsy9(chr(1489 - 1441) + '\157' + '\x31' + chr(50) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1100100 + 0o13) + chr(0b110010) + '\x37' + chr(0b10000 + 0o42), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(49) + chr(0b101010 + 0o12) + chr(52), 0b1000), ehT0Px3KOsy9('\x30' + chr(5936 - 5825) + chr(148 - 99) + chr(897 - 842) + chr(0b110101), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\157' + chr(54) + chr(0b110111), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(1850 - 1739) + '\x32' + '\064' + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b100 + 0o54) + chr(0b1101111) + chr(51) + chr(0b110001) + chr(0b101100 + 0o7), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + chr(2023 - 1972) + chr(54) + chr(0b111 + 0o55), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(1539 - 1488) + chr(0b1101 + 0o50) + chr(0b110100), 8), ehT0Px3KOsy9(chr(0b110000) + chr(6869 - 6758) + chr(2294 - 2245) + chr(737 - 688) + chr(0b1101 + 0o44), 0o10), ehT0Px3KOsy9('\060' + '\157' + '\x32' + chr(49) + chr(49), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(0b110011) + chr(2485 - 2435) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(1496 - 1385) + chr(867 - 817) + '\061' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(738 - 690) + chr(0b110101 + 0o72) + chr(0b101010 + 0o13), 10094 - 10086), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(111) + chr(0b110010 + 0o1) + chr(48) + chr(0b110100 + 0o2), 30670 - 30662), ehT0Px3KOsy9(chr(903 - 855) + chr(0b1101111) + chr(0b110001) + '\066', 11065 - 11057), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b100101 + 0o14) + chr(1244 - 1190) + chr(556 - 506), 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110010 + 0o0) + chr(1989 - 1934), ord("\x08")), ehT0Px3KOsy9(chr(1295 - 1247) + chr(0b111010 + 0o65) + '\065' + chr(1937 - 1884), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b11110 + 0o121) + '\x32' + chr(0b110111) + '\x34', 0b1000), ehT0Px3KOsy9(chr(0b11000 + 0o30) + '\x6f' + '\062' + chr(0b110100) + chr(0b110001), 54164 - 54156), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b100 + 0o56) + chr(1297 - 1246) + chr(48), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(10014 - 9903) + '\061' + chr(782 - 729) + '\062', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b111 + 0o150) + chr(49) + chr(0b100111 + 0o12) + '\x37', 0o10), ehT0Px3KOsy9(chr(0b101000 + 0o10) + '\x6f' + chr(0b10101 + 0o34) + chr(1585 - 1532) + chr(54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b11110 + 0o121) + '\061' + '\067', 0b1000), ehT0Px3KOsy9(chr(972 - 924) + chr(111) + '\x33' + chr(0b110100) + chr(1179 - 1130), 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(0b100111 + 0o13) + chr(0b1 + 0o63) + '\x31', 8), ehT0Px3KOsy9(chr(1575 - 1527) + chr(0b1010011 + 0o34) + '\x31', 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(987 - 939) + chr(0b1101000 + 0o7) + chr(0b10100 + 0o41) + chr(48), 0o10)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xa0'), '\x64' + chr(5071 - 4970) + chr(0b1100011) + chr(0b10110 + 0o131) + '\x64' + chr(0b1100101))(chr(0b1001000 + 0o55) + chr(116) + '\x66' + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def QUDDCHx3gy1Q(): n4ljua2gi1Pr = i0nxwTHyoQhO() jYUmmzkT3GAE = wLqBDw8l0eIm(base_algo=xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe)!'), chr(8635 - 8535) + '\145' + chr(9176 - 9077) + chr(8491 - 8380) + chr(0b100000 + 0o104) + '\x65')(chr(117) + chr(0b1110100) + chr(5127 - 5025) + chr(196 - 151) + '\x38'), base_algo_params=xafqLlk3kkUe(SXOLrMavuUCe(b'\xfe)!\xea\xf2\x9e\xa7\x1cw\x0f\xb8<\xe5\x14\x1cE\xc6\xa6\x87'), chr(100) + chr(5405 - 5304) + chr(0b11101 + 0o106) + chr(111) + '\x64' + chr(0b1100101))('\x75' + chr(0b1100001 + 0o23) + '\146' + chr(1888 - 1843) + '\070'), real_batch_size=ehT0Px3KOsy9(chr(0b110 + 0o52) + '\x6f' + '\061', 8), simulated_batch_size=ehT0Px3KOsy9('\x30' + chr(0b1001101 + 0o42) + chr(0b1000 + 0o52) + chr(0b11100 + 0o24), 0o10), eval_batch_size=ehT0Px3KOsy9('\x30' + '\157' + '\x34' + '\060', 0b1000), real_ppo_epochs_num=ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000), 0b1000), ppo_epochs_num=ehT0Px3KOsy9(chr(287 - 239) + chr(111) + chr(0b110001) + chr(0b110111) + chr(0b1000 + 0o55) + '\060', 25355 - 25347), ppo_epoch_length=n4ljua2gi1Pr.simulated_rollout_length, ppo_eval_every_epochs=ehT0Px3KOsy9('\060' + '\157' + '\060', 8), ppo_learning_rate_constant=0.0001, real_ppo_epoch_length=ehT0Px3KOsy9('\060' + '\157' + chr(2375 - 2325) + chr(48), 8) * ehT0Px3KOsy9('\060' + '\x6f' + chr(0b111 + 0o54) + chr(0b1011 + 0o46) + '\x30', 0b1000), real_ppo_learning_rate_constant=0.0001, real_ppo_effective_num_agents=ehT0Px3KOsy9(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b110010) + chr(0b110000), 8), real_ppo_eval_every_epochs=ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110000), 8), simulation_flip_first_random_for_beginning=ehT0Px3KOsy9(chr(0b110000) + chr(8457 - 8346) + chr(2057 - 2008), 8)) H6TLboedUqP7(n4ljua2gi1Pr, jYUmmzkT3GAE) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_dqn_base
def rlmb_dqn_base(): """rlmb_dqn_base params.""" hparams = _rlmb_base() simulated_rollout_length = 10 dqn_params = dict( base_algo="dqn", base_algo_params="dqn_original_params", real_batch_size=1, simulated_batch_size=16, dqn_agent_generates_trainable_dones=False, eval_batch_size=1, # Must be equal to dqn_time_limit for now simulated_rollout_length=simulated_rollout_length, dqn_time_limit=simulated_rollout_length, simulation_flip_first_random_for_beginning=False, dqn_eval_episodes_num=3, # TODO(kc): only for model-free compatibility, remove this epochs_num=-1, ) update_hparams(hparams, dqn_params) return hparams
python
def rlmb_dqn_base(): """rlmb_dqn_base params.""" hparams = _rlmb_base() simulated_rollout_length = 10 dqn_params = dict( base_algo="dqn", base_algo_params="dqn_original_params", real_batch_size=1, simulated_batch_size=16, dqn_agent_generates_trainable_dones=False, eval_batch_size=1, # Must be equal to dqn_time_limit for now simulated_rollout_length=simulated_rollout_length, dqn_time_limit=simulated_rollout_length, simulation_flip_first_random_for_beginning=False, dqn_eval_episodes_num=3, # TODO(kc): only for model-free compatibility, remove this epochs_num=-1, ) update_hparams(hparams, dqn_params) return hparams
[ "def", "rlmb_dqn_base", "(", ")", ":", "hparams", "=", "_rlmb_base", "(", ")", "simulated_rollout_length", "=", "10", "dqn_params", "=", "dict", "(", "base_algo", "=", "\"dqn\"", ",", "base_algo_params", "=", "\"dqn_original_params\"", ",", "real_batch_size", "=", "1", ",", "simulated_batch_size", "=", "16", ",", "dqn_agent_generates_trainable_dones", "=", "False", ",", "eval_batch_size", "=", "1", ",", "# Must be equal to dqn_time_limit for now", "simulated_rollout_length", "=", "simulated_rollout_length", ",", "dqn_time_limit", "=", "simulated_rollout_length", ",", "simulation_flip_first_random_for_beginning", "=", "False", ",", "dqn_eval_episodes_num", "=", "3", ",", "# TODO(kc): only for model-free compatibility, remove this", "epochs_num", "=", "-", "1", ",", ")", "update_hparams", "(", "hparams", ",", "dqn_params", ")", "return", "hparams" ]
rlmb_dqn_base params.
[ "rlmb_dqn_base", "params", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L189-L210
train
DQN base 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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xmV2riMOClNT,_fwkIVCGgtAN,Jp8aZ6mjyZZT,eO8Xfv8UVFey,zLUzGokYBM2Z,FL7SmUoxlR9h,k6bl9sLammpH,vQr8gNKaIaWE,S6hV9M2g7fO0,RFiwrCZH9Ie6,jB_HdqgHmVpI,MVEN8G6CxlvR,t0rOMsrOC7R_,W3g84rNiEdDQ,vUlqIvNSaRMa,gDnh40_OUDCn,M8_cKLkHVB2V,xkxBmo49x2An,KNx0Ujaz9UM0,KNyTy8rYcwji,wmQmyeWBmUpv,p1G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(0b0 + 0o60) + '\x6f' + chr(0b1000 + 0o53) + chr(0b100111 + 0o17) + chr(55), 64849 - 64841), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(522 - 411) + '\x31' + chr(0b101001 + 0o15), 33151 - 33143), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(600 - 551) + '\x32' + chr(52), 11076 - 11068), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b100110 + 0o14) + chr(0b11100 + 0o26), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(111) + chr(376 - 326) + chr(0b1001 + 0o56) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(416 - 365) + chr(0b110010), 53775 - 53767), ehT0Px3KOsy9('\x30' + chr(9236 - 9125) + chr(0b110011) + chr(2704 - 2652) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(1321 - 1271) + chr(1109 - 1054) + chr(1385 - 1330), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b100011 + 0o17) + '\x36' + '\x37', 0b1000), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011 + 0o1) + chr(0b110011), 64557 - 64549), ehT0Px3KOsy9('\060' + chr(0b1011010 + 0o25) + chr(2650 - 2596) + chr(0b110101), 1750 - 1742), ehT0Px3KOsy9('\060' + '\x6f' + '\063' + chr(0b110001) + '\x32', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b110001 + 0o76) + '\x32' + chr(1347 - 1298) + '\x35', 49110 - 49102), ehT0Px3KOsy9(chr(48) + '\157' + '\063' + chr(0b110110 + 0o0) + chr(50), 16302 - 16294), ehT0Px3KOsy9(chr(48) + '\157' + chr(157 - 107) + '\x34' + chr(0b100101 + 0o21), 24628 - 24620), ehT0Px3KOsy9(chr(362 - 314) + chr(0b1101111) + '\x31' + chr(0b110101) + '\063', ord("\x08")), ehT0Px3KOsy9(chr(1935 - 1887) + chr(111) + chr(0b1 + 0o63) + chr(0b101 + 0o56), 8), ehT0Px3KOsy9('\060' + chr(240 - 129) + '\063' + '\x33' + '\x37', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(1164 - 1113) + '\x34' + chr(0b110000), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(967 - 919) + chr(0b1 + 0o57), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(49) + chr(0b11101 + 0o27) + '\061', 0b1000), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b101111 + 0o4) + chr(0b110111), 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(2385 - 2335) + chr(0b110001) + chr(2761 - 2708), 8), ehT0Px3KOsy9(chr(1250 - 1202) + chr(111) + chr(0b101101 + 0o5) + chr(1767 - 1718) + chr(51), 40674 - 40666), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(0b1011010 + 0o25) + chr(0b110010) + chr(2041 - 1987) + '\064', 0o10), ehT0Px3KOsy9('\x30' + chr(9717 - 9606) + '\x36' + chr(49), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110100) + '\062', 54896 - 54888), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(2434 - 2383) + '\x37' + chr(2283 - 2235), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(49) + chr(0b110000 + 0o3), 45761 - 45753), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b101000 + 0o13) + chr(54) + chr(1604 - 1551), 0b1000), ehT0Px3KOsy9('\060' + chr(0b111001 + 0o66) + chr(0b110001 + 0o2) + chr(243 - 189) + '\064', 23520 - 23512), ehT0Px3KOsy9(chr(48) + chr(0b1001110 + 0o41) + chr(0b1111 + 0o42) + chr(0b1111 + 0o46) + '\064', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b10111 + 0o130) + '\062' + '\063', 52599 - 52591), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + chr(51) + '\x30' + chr(0b110101), 19654 - 19646), ehT0Px3KOsy9(chr(48) + chr(0b10011 + 0o134) + chr(0b110011 + 0o0) + '\x31', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b10001 + 0o40) + chr(0b101111 + 0o1) + chr(0b110001), 0o10), ehT0Px3KOsy9(chr(2125 - 2077) + chr(0b1101111) + chr(50) + chr(52) + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(111) + chr(49) + chr(49) + chr(0b101001 + 0o15), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\060' + chr(0b10110 + 0o40), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(48) + chr(0b11000 + 0o127) + chr(53) + chr(0b110000), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xd9'), chr(1669 - 1569) + chr(0b111011 + 0o52) + '\x63' + '\157' + chr(100) + '\145')(chr(6497 - 6380) + chr(3698 - 3582) + '\146' + chr(45) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Sr7H_ToNzUUj(): n4ljua2gi1Pr = i0nxwTHyoQhO() Zz7z6jACoNio = ehT0Px3KOsy9('\060' + chr(0b1101111) + '\061' + '\x32', 0b1000) vK_IhoSTfc7V = wLqBDw8l0eIm(base_algo=xafqLlk3kkUe(SXOLrMavuUCe(b'\x93f`'), chr(9289 - 9189) + '\x65' + chr(99) + chr(0b101000 + 0o107) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(1811 - 1755)), base_algo_params=xafqLlk3kkUe(SXOLrMavuUCe(b'\x93f`\x0b\xbd\xccs\x80\xd6\xd9BY\x95\xfd\x93\xd4\nN\xac'), chr(4645 - 4545) + chr(7432 - 7331) + '\143' + '\157' + '\144' + '\x65')(chr(133 - 16) + chr(0b101000 + 0o114) + chr(102) + chr(0b101 + 0o50) + chr(56)), real_batch_size=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\061', 0o10), simulated_batch_size=ehT0Px3KOsy9(chr(1725 - 1677) + chr(0b1101111) + chr(50) + '\x30', 56793 - 56785), dqn_agent_generates_trainable_dones=ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\060', ord("\x08")), eval_batch_size=ehT0Px3KOsy9('\060' + chr(0b10111 + 0o130) + chr(0b10000 + 0o41), 8), simulated_rollout_length=Zz7z6jACoNio, dqn_time_limit=Zz7z6jACoNio, simulation_flip_first_random_for_beginning=ehT0Px3KOsy9(chr(0b1 + 0o57) + '\x6f' + chr(2046 - 1998), 8), dqn_eval_episodes_num=ehT0Px3KOsy9(chr(835 - 787) + chr(0b1010000 + 0o37) + chr(0b110001 + 0o2), ord("\x08")), epochs_num=-ehT0Px3KOsy9(chr(48) + chr(111) + chr(49), 8)) H6TLboedUqP7(n4ljua2gi1Pr, vK_IhoSTfc7V) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_ppo_quick
def rlmb_ppo_quick(): """Base setting but quicker with only 2 epochs.""" hparams = rlmb_ppo_base() hparams.epochs = 2 hparams.model_train_steps = 25000 hparams.ppo_epochs_num = 700 hparams.ppo_epoch_length = 50 return hparams
python
def rlmb_ppo_quick(): """Base setting but quicker with only 2 epochs.""" hparams = rlmb_ppo_base() hparams.epochs = 2 hparams.model_train_steps = 25000 hparams.ppo_epochs_num = 700 hparams.ppo_epoch_length = 50 return hparams
[ "def", "rlmb_ppo_quick", "(", ")", ":", "hparams", "=", "rlmb_ppo_base", "(", ")", "hparams", ".", "epochs", "=", "2", "hparams", ".", "model_train_steps", "=", "25000", "hparams", ".", "ppo_epochs_num", "=", "700", "hparams", ".", "ppo_epoch_length", "=", "50", "return", "hparams" ]
Base setting but quicker with only 2 epochs.
[ "Base", "setting", "but", "quicker", "with", "only", "2", "epochs", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L234-L241
train
Base setting but quicker with only 2 epochs.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGLtp_O,sR2sPcm7Zrfn,yROw0HWBk0Qc,j9rjMYnN2BMp,hIlP7994qj8O,_fsda0v2_OKU,o0CgT5HPthxA,DXjfarvgFnbl,RQ6CSRrFArYB,RouZF7bjEXAv,jIl9qoALCRyb,bdLuls3EQFSd,FXUco0R3m83n,V5s4UV3vwoyK,Q6d3QdTENfxw,sbc9gub6LIFp,QWgp4ELTmqy4,_zJ24Vce7wp0,KlPSljPzIJ_u,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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(1069 - 1021) + '\157' + chr(0b100 + 0o55) + chr(2516 - 2462), 0b1000), ehT0Px3KOsy9(chr(48) + chr(2337 - 2226) + chr(51) + '\065' + '\066', 0o10), ehT0Px3KOsy9(chr(195 - 147) + '\157' + chr(0b101011 + 0o6) + '\066', 8), ehT0Px3KOsy9(chr(303 - 255) + '\x6f' + chr(0b1110 + 0o43) + chr(0b11000 + 0o33) + chr(379 - 326), 0o10), ehT0Px3KOsy9('\060' + chr(0b111000 + 0o67) + chr(0b0 + 0o63) + chr(0b110001) + '\060', 9593 - 9585), ehT0Px3KOsy9('\x30' + chr(2179 - 2068) + chr(0b100000 + 0o22) + chr(1656 - 1608) + chr(0b100100 + 0o14), 6678 - 6670), ehT0Px3KOsy9(chr(48) + chr(8913 - 8802) + '\x33' + chr(0b110000) + chr(0b110111), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001 + 0o6) + chr(226 - 176), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b10001 + 0o41) + chr(52), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b110110), 0o10), ehT0Px3KOsy9(chr(48) + chr(3119 - 3008) + chr(0b110010) + '\067', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(0b110110) + chr(2173 - 2119), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(0b110001) + chr(1929 - 1875) + chr(0b101100 + 0o13), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + '\061' + '\x31' + chr(121 - 73), 0o10), ehT0Px3KOsy9(chr(0b11011 + 0o25) + '\157' + chr(0b1100 + 0o50), 0b1000), ehT0Px3KOsy9(chr(48) + chr(715 - 604) + '\x33' + chr(1076 - 1022) + chr(55), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + chr(53) + chr(55), 51930 - 51922), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b111 + 0o54) + chr(0b110110) + '\066', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(49) + chr(54) + '\066', 8), ehT0Px3KOsy9('\x30' + '\x6f' + chr(51) + '\x37' + chr(2451 - 2396), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(51) + '\x33' + chr(589 - 536), 0b1000), ehT0Px3KOsy9(chr(2276 - 2228) + chr(0b1011111 + 0o20) + '\x32' + chr(2566 - 2515) + '\064', 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(52), 8), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(0b11101 + 0o32) + chr(0b11010 + 0o26), 0o10), ehT0Px3KOsy9(chr(0b11001 + 0o27) + '\x6f' + chr(0b110010) + chr(0b110010) + chr(51), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(51) + '\x32' + chr(52), 1290 - 1282), ehT0Px3KOsy9(chr(0b10 + 0o56) + '\x6f' + chr(50) + chr(0b110100) + chr(0b100010 + 0o21), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\x32' + chr(2151 - 2101) + '\066', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(2075 - 2025) + '\061' + '\062', 29101 - 29093), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110011) + '\065', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1100010 + 0o15) + '\061' + chr(49) + chr(0b110111), ord("\x08")), ehT0Px3KOsy9(chr(0b100010 + 0o16) + chr(6204 - 6093) + '\063' + chr(55) + '\065', ord("\x08")), ehT0Px3KOsy9(chr(0b1001 + 0o47) + '\157' + '\063' + chr(53) + '\066', 8), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\062' + chr(48) + chr(0b1 + 0o62), 18936 - 18928), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b100000 + 0o27) + chr(0b10100 + 0o41), 0o10), ehT0Px3KOsy9('\x30' + chr(111) + '\x33' + '\067' + chr(1681 - 1628), 8), ehT0Px3KOsy9(chr(571 - 523) + '\x6f' + '\x30', 32297 - 32289), ehT0Px3KOsy9('\x30' + chr(111) + chr(49) + chr(0b110101) + chr(0b11110 + 0o27), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + chr(2520 - 2469) + '\x30' + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + chr(0b100010 + 0o25) + chr(0b110001), 0o10)][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + '\157' + chr(0b110101) + chr(0b100100 + 0o14), 8590 - 8582)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b' '), chr(1233 - 1133) + '\x65' + chr(0b100011 + 0o100) + chr(11078 - 10967) + chr(100) + chr(0b1100101 + 0o0))('\x75' + chr(0b1110100) + '\x66' + '\055' + chr(1136 - 1080)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def HmZJpmWneoXa(): n4ljua2gi1Pr = QUDDCHx3gy1Q() n4ljua2gi1Pr.xvDB7qObFSrr = ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(50), 32440 - 32432) n4ljua2gi1Pr.UFyvdGfjgFKS = ehT0Px3KOsy9(chr(1395 - 1347) + chr(0b1101111) + chr(2050 - 1996) + chr(0b110000 + 0o0) + chr(0b110011 + 0o3) + chr(53) + chr(0b101 + 0o53), 0o10) n4ljua2gi1Pr.Znsza0qvc2k0 = ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(1576 - 1526) + chr(55) + '\x34', 0o10) n4ljua2gi1Pr.BYTlP2WTHA9T = ehT0Px3KOsy9(chr(0b11010 + 0o26) + chr(0b1100101 + 0o12) + chr(0b110110) + '\x32', 0o10) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_base_stochastic
def rlmb_base_stochastic(): """Base setting with a stochastic next-frame model.""" hparams = rlmb_base() hparams.initial_epoch_train_steps_multiplier = 5 hparams.generative_model = "next_frame_basic_stochastic" hparams.generative_model_params = "next_frame_basic_stochastic" return hparams
python
def rlmb_base_stochastic(): """Base setting with a stochastic next-frame model.""" hparams = rlmb_base() hparams.initial_epoch_train_steps_multiplier = 5 hparams.generative_model = "next_frame_basic_stochastic" hparams.generative_model_params = "next_frame_basic_stochastic" return hparams
[ "def", "rlmb_base_stochastic", "(", ")", ":", "hparams", "=", "rlmb_base", "(", ")", "hparams", ".", "initial_epoch_train_steps_multiplier", "=", "5", "hparams", ".", "generative_model", "=", "\"next_frame_basic_stochastic\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_stochastic\"", "return", "hparams" ]
Base setting with a stochastic next-frame model.
[ "Base", "setting", "with", "a", "stochastic", "next", "-", "frame", "model", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31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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(630 - 582) + '\x6f' + chr(0b10101 + 0o35) + chr(48) + chr(0b110101), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x32' + '\065' + chr(1557 - 1503), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1358 - 1308) + '\067', ord("\x08")), ehT0Px3KOsy9(chr(0b1100 + 0o44) + '\157' + '\x32' + chr(1493 - 1443) + chr(1445 - 1391), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(9240 - 9129) + chr(0b110110) + '\063', 35875 - 35867), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + '\x32', 0b1000), ehT0Px3KOsy9('\060' + '\157' + chr(0b110001) + chr(50), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x32' + '\x37' + chr(50), 8434 - 8426), ehT0Px3KOsy9(chr(0b1111 + 0o41) + chr(0b11111 + 0o120) + chr(50) + '\x36' + '\x33', 0b1000), ehT0Px3KOsy9(chr(422 - 374) + '\157' + chr(0b110011) + chr(0b10111 + 0o36), 13251 - 13243), ehT0Px3KOsy9(chr(830 - 782) + chr(0b1101111) + chr(50), 0b1000), ehT0Px3KOsy9(chr(552 - 504) + '\x6f' + '\061' + '\063' + '\x33', 0o10), ehT0Px3KOsy9('\060' + chr(0b100110 + 0o111) + chr(0b110010) + chr(54) + chr(0b110001), ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(51) + chr(53) + chr(52), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101001 + 0o6) + chr(0b110001) + chr(55) + '\x37', 274 - 266), ehT0Px3KOsy9(chr(0b1001 + 0o47) + chr(0b10111 + 0o130) + chr(49) + chr(1318 - 1266) + chr(0b101000 + 0o14), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111001 + 0o66) + chr(49) + chr(55), 22346 - 22338), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + chr(1667 - 1613) + '\066', 0o10), ehT0Px3KOsy9(chr(1279 - 1231) + chr(111) + '\063' + chr(1603 - 1551) + chr(0b110010), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(1962 - 1913) + chr(51) + chr(0b100000 + 0o27), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(50) + '\x32' + chr(2587 - 2534), 0b1000), ehT0Px3KOsy9(chr(76 - 28) + chr(0b1101111) + '\064' + '\x35', 24484 - 24476), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110001) + '\x30' + chr(0b110101), 22299 - 22291), ehT0Px3KOsy9(chr(48) + chr(111) + '\x33' + chr(50), 8), ehT0Px3KOsy9(chr(2017 - 1969) + chr(0b1000001 + 0o56) + chr(51) + chr(48) + chr(0b11000 + 0o32), 0b1000), ehT0Px3KOsy9(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(0b100010 + 0o17), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\063' + chr(0b11001 + 0o36) + '\x34', 39780 - 39772), ehT0Px3KOsy9(chr(1886 - 1838) + chr(0b1101111) + chr(0b110001) + chr(0b110111) + chr(0b110110 + 0o0), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + chr(0b1101111) + chr(50) + '\x30' + '\x35', 8), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b110001) + '\060', 32585 - 32577), ehT0Px3KOsy9(chr(888 - 840) + '\x6f' + '\x37' + chr(0b110100 + 0o0), 0o10), ehT0Px3KOsy9('\x30' + chr(0b1001001 + 0o46) + '\061' + '\x33', 0o10), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110010) + chr(1177 - 1123) + chr(49), 8), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\x31' + '\x34' + '\x30', 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + '\061' + chr(0b111 + 0o52) + '\x33', ord("\x08")), ehT0Px3KOsy9('\x30' + chr(111) + '\061' + chr(54) + chr(52), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\x32' + chr(0b11 + 0o56) + '\x33', 8299 - 8291), ehT0Px3KOsy9(chr(0b100010 + 0o16) + '\x6f' + '\x31' + chr(1144 - 1089) + chr(50), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b101110 + 0o3) + '\063', 8), ehT0Px3KOsy9('\x30' + chr(10443 - 10332) + '\061' + chr(0b110110 + 0o0) + chr(0b110010), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(49 - 1) + '\157' + chr(0b110101) + chr(1042 - 994), ord("\x08"))] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xab'), chr(0b1100100) + '\145' + '\143' + chr(3059 - 2948) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + chr(102) + chr(0b10 + 0o53) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def jNUb0YiET_uZ(): n4ljua2gi1Pr = wvShKmDEuOfS() n4ljua2gi1Pr.ddg15uZMJRcR = ehT0Px3KOsy9(chr(48) + chr(0b110111 + 0o70) + chr(1413 - 1360), 2058 - 2050) n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xcbo\xe2l|x\xdb\xdex]9\xd0\x9f\x16\x07P\xc5\x960\xf6M$i\xb6(\x9f'), chr(0b1100100) + chr(101) + '\143' + chr(0b110110 + 0o71) + chr(0b1100100) + chr(0b1100101))('\165' + '\164' + chr(102) + chr(0b10111 + 0o26) + '\070') n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\xeb\xcbo\xe2l|x\xdb\xdex]9\xd0\x9f\x16\x07P\xc5\x960\xf6M$i\xb6(\x9f'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(7552 - 7452) + '\145')(chr(0b1011011 + 0o32) + chr(3711 - 3595) + '\146' + chr(45) + chr(56)) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_base_stochastic_discrete
def rlmb_base_stochastic_discrete(): """Base setting with stochastic discrete model.""" hparams = rlmb_base() hparams.learning_rate_bump = 1.0 hparams.grayscale = False hparams.generative_model = "next_frame_basic_stochastic_discrete" hparams.generative_model_params = "next_frame_basic_stochastic_discrete" # The parameters below are the same as base, but repeated for easier reading. hparams.ppo_epoch_length = 50 hparams.simulated_rollout_length = 50 hparams.simulated_batch_size = 16 return hparams
python
def rlmb_base_stochastic_discrete(): """Base setting with stochastic discrete model.""" hparams = rlmb_base() hparams.learning_rate_bump = 1.0 hparams.grayscale = False hparams.generative_model = "next_frame_basic_stochastic_discrete" hparams.generative_model_params = "next_frame_basic_stochastic_discrete" # The parameters below are the same as base, but repeated for easier reading. hparams.ppo_epoch_length = 50 hparams.simulated_rollout_length = 50 hparams.simulated_batch_size = 16 return hparams
[ "def", "rlmb_base_stochastic_discrete", "(", ")", ":", "hparams", "=", "rlmb_base", "(", ")", "hparams", ".", "learning_rate_bump", "=", "1.0", "hparams", ".", "grayscale", "=", "False", "hparams", ".", "generative_model", "=", "\"next_frame_basic_stochastic_discrete\"", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_stochastic_discrete\"", "# The parameters below are the same as base, but repeated for easier reading.", "hparams", ".", "ppo_epoch_length", "=", "50", "hparams", ".", "simulated_rollout_length", "=", "50", "hparams", ".", "simulated_batch_size", "=", "16", "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#L313-L324
train
Base setting with stochastic discrete model.
Pu7Z6IJCgH3a,vcEHXBQX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Uz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,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' + '\062' + '\067' + chr(1939 - 1889), 0b1000), ehT0Px3KOsy9(chr(48) + '\157' + chr(0b110111) + chr(53), ord("\x08")), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(0b1111 + 0o47), ord("\x08")), ehT0Px3KOsy9(chr(1835 - 1787) + chr(111) + chr(0b110010) + '\064' + chr(2141 - 2093), 0o10), ehT0Px3KOsy9(chr(0b111 + 0o51) + '\x6f' + '\x33' + chr(460 - 405) + chr(49), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110001) + chr(0b11010 + 0o26), 21683 - 21675), ehT0Px3KOsy9('\060' + '\x6f' + chr(483 - 432) + '\x35' + chr(0b101010 + 0o14), 0b1000), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110010) + chr(0b110011) + chr(1765 - 1717), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(740 - 629) + chr(55) + chr(0b110010), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110000 + 0o1) + chr(0b1000 + 0o51) + chr(0b110111), 56734 - 56726), ehT0Px3KOsy9('\060' + chr(6710 - 6599) + '\x31' + '\x35' + '\060', ord("\x08")), ehT0Px3KOsy9(chr(277 - 229) + chr(9991 - 9880) + '\062' + chr(512 - 464) + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(169 - 121) + '\x6f' + chr(49) + chr(0b110101) + chr(1329 - 1274), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(3649 - 3538) + chr(2141 - 2092) + chr(0b110000) + '\064', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(943 - 832) + chr(2195 - 2146) + '\x35' + chr(2081 - 2028), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(3068 - 2957) + chr(49) + chr(52) + '\x32', ord("\x08")), ehT0Px3KOsy9('\060' + chr(0b110011 + 0o74) + chr(0b111 + 0o56) + chr(178 - 130), 0o10), ehT0Px3KOsy9('\x30' + '\x6f' + chr(0b110001) + chr(841 - 788) + chr(0b1000 + 0o55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(0b1000101 + 0o52) + chr(51) + chr(0b110010) + chr(0b10000 + 0o46), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(462 - 412) + chr(0b110101), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(49) + chr(0b110010), 0o10), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b110011) + '\x36' + chr(1259 - 1205), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b1111 + 0o42) + chr(50) + '\x30', 0b1000), ehT0Px3KOsy9(chr(0b0 + 0o60) + chr(111) + chr(52) + '\060', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x33' + chr(0b110111) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(0b110001) + '\x31' + chr(0b110100), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(8429 - 8318) + '\063', 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(111) + '\061' + chr(0b110110) + chr(930 - 877), ord("\x08")), ehT0Px3KOsy9(chr(0b100101 + 0o13) + '\x6f' + '\062' + '\x32' + chr(0b110111), 55048 - 55040), ehT0Px3KOsy9(chr(0b1110 + 0o42) + chr(5172 - 5061) + '\063' + chr(51) + '\062', 42907 - 42899), ehT0Px3KOsy9(chr(187 - 139) + chr(10182 - 10071) + chr(113 - 62) + '\x30' + chr(0b10001 + 0o46), 26337 - 26329), ehT0Px3KOsy9(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b110111) + '\066', 0b1000), ehT0Px3KOsy9('\x30' + chr(12285 - 12174) + chr(50) + '\x30' + chr(179 - 128), ord("\x08")), ehT0Px3KOsy9(chr(0b10 + 0o56) + chr(111) + chr(52) + chr(2528 - 2475), 54103 - 54095), ehT0Px3KOsy9('\060' + '\157' + '\066' + '\066', 55306 - 55298), ehT0Px3KOsy9(chr(0b100100 + 0o14) + '\x6f' + chr(1269 - 1218) + '\x37' + chr(0b110010), 0b1000), ehT0Px3KOsy9('\x30' + chr(0b1010101 + 0o32) + chr(50) + chr(0b110010) + chr(1902 - 1850), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(111) + chr(0b1110 + 0o45) + chr(0b1011 + 0o54), ord("\x08")), ehT0Px3KOsy9('\x30' + chr(6635 - 6524) + chr(1370 - 1321) + '\x31', ord("\x08")), ehT0Px3KOsy9(chr(0b101001 + 0o7) + chr(6435 - 6324) + chr(0b11111 + 0o27), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\065' + '\x30', 8)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x94'), chr(4454 - 4354) + chr(10045 - 9944) + '\143' + chr(111) + chr(0b1100100) + chr(5041 - 4940))('\165' + chr(116) + chr(102) + chr(96 - 51) + '\x38') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def Cuu2iPul0ZpV(): n4ljua2gi1Pr = wvShKmDEuOfS() n4ljua2gi1Pr.rgYNOuacdxId = 1.0 n4ljua2gi1Pr.iVrnJKHOeGmG = ehT0Px3KOsy9(chr(48) + '\157' + chr(48), 0o10) n4ljua2gi1Pr.uVIiffPeN7yA = xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4X\xce\xd4\xa6n\x9c\xf9W*7\xe2\x0e7\x04\x01w\x1e\xa2zi\x9e1S\x8f%`*\xf3\xb3\xb4]\xf1@B\x9f'), chr(0b1100100) + chr(0b1100000 + 0o5) + '\143' + '\x6f' + chr(1585 - 1485) + chr(0b1011011 + 0o12))('\165' + '\x74' + '\x66' + chr(0b101101) + '\070') n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\xd4X\xce\xd4\xa6n\x9c\xf9W*7\xe2\x0e7\x04\x01w\x1e\xa2zi\x9e1S\x8f%`*\xf3\xb3\xb4]\xf1@B\x9f'), '\x64' + chr(2906 - 2805) + '\143' + chr(0b1101111) + chr(0b10111 + 0o115) + chr(8751 - 8650))(chr(117) + '\x74' + '\x66' + chr(45) + chr(56)) n4ljua2gi1Pr.BYTlP2WTHA9T = ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(0b111111 + 0o60) + '\x36' + chr(0b110010), 0o10) n4ljua2gi1Pr.Zz7z6jACoNio = ehT0Px3KOsy9(chr(0b1111 + 0o41) + '\x6f' + chr(0b10001 + 0o45) + chr(50), 8) n4ljua2gi1Pr.PBpnkLjxkvnI = ehT0Px3KOsy9('\x30' + chr(9602 - 9491) + '\062' + chr(48), 0b1000) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_long_stochastic_discrete_simulation_deterministic_starts
def rlmb_long_stochastic_discrete_simulation_deterministic_starts(): """Long setting with stochastic discrete model & deterministic sim starts.""" hparams = rlmb_base_stochastic_discrete() hparams.generative_model_params = "next_frame_basic_stochastic_discrete_long" hparams.ppo_epochs_num = 1000 hparams.simulation_random_starts = False return hparams
python
def rlmb_long_stochastic_discrete_simulation_deterministic_starts(): """Long setting with stochastic discrete model & deterministic sim starts.""" hparams = rlmb_base_stochastic_discrete() hparams.generative_model_params = "next_frame_basic_stochastic_discrete_long" hparams.ppo_epochs_num = 1000 hparams.simulation_random_starts = False return hparams
[ "def", "rlmb_long_stochastic_discrete_simulation_deterministic_starts", "(", ")", ":", "hparams", "=", "rlmb_base_stochastic_discrete", "(", ")", "hparams", ".", "generative_model_params", "=", "\"next_frame_basic_stochastic_discrete_long\"", "hparams", ".", "ppo_epochs_num", "=", "1000", "hparams", ".", "simulation_random_starts", "=", "False", "return", "hparams" ]
Long setting with stochastic discrete model & deterministic sim starts.
[ "Long", "setting", "with", "stochastic", "discrete", "model", "&", "deterministic", "sim", "starts", "." ]
272500b6efe353aeb638d2745ed56e519462ca31
https://github.com/tensorflow/tensor2tensor/blob/272500b6efe353aeb638d2745ed56e519462ca31/tensor2tensor/rl/trainer_model_based_params.py#L403-L409
train
Long setting with stochastic discrete model & deterministic sim starts.
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_tHXv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G5VS3dE_Ss,pZ0NK2y6HRbn,HByLaO1XdVEe,pgRJLRS7Iy8j,OZYzwAeSQh7N,tmzuw0hjv33u,RwRZiUMA3VWp,Gbej4oZqKLA6,TqkAMbUz4aLg,rw68imZ2Ikxp=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__ SXOLrMavuUCe = lambda XbwU38w7NW8n: QOfmzcVJsrp8([OeWW0F1dBPRQ ^ [ehT0Px3KOsy9(chr(1462 - 1414) + chr(7891 - 7780) + '\062' + chr(0b110011) + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(2124 - 2076) + chr(2458 - 2347) + chr(0b110001) + chr(0b110111) + '\064', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + '\x37' + chr(0b110011), 0o10), ehT0Px3KOsy9(chr(475 - 427) + chr(0b1101111) + chr(0b11001 + 0o31) + chr(2552 - 2500) + chr(49), ord("\x08")), ehT0Px3KOsy9(chr(0b110000 + 0o0) + chr(0b100101 + 0o112) + chr(501 - 450) + '\063' + chr(1642 - 1593), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + '\062' + '\065', ord("\x08")), ehT0Px3KOsy9(chr(1789 - 1741) + chr(0b1101111) + '\x32' + chr(48) + chr(52), 51741 - 51733), ehT0Px3KOsy9(chr(0b101011 + 0o5) + '\157' + '\x32' + chr(0b110001 + 0o6) + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b10110 + 0o131) + chr(49) + '\x34' + '\x31', 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(1281 - 1226) + chr(2348 - 2298), 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(50) + chr(2726 - 2673) + '\x33', 0b1000), ehT0Px3KOsy9('\060' + chr(0b1010001 + 0o36) + chr(0b11011 + 0o27) + chr(55) + chr(0b1101 + 0o47), 8), ehT0Px3KOsy9(chr(973 - 925) + '\157' + '\x33' + chr(0b110 + 0o52) + chr(1636 - 1588), 0b1000), ehT0Px3KOsy9(chr(0b11010 + 0o26) + '\157' + '\x31' + chr(1348 - 1293), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(2773 - 2662) + '\x34' + '\061', ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(6504 - 6393) + '\063' + chr(49) + chr(0b10100 + 0o35), ord("\x08")), ehT0Px3KOsy9(chr(48) + '\x6f' + '\063' + chr(749 - 701) + '\x35', 0b1000), ehT0Px3KOsy9('\060' + chr(0b11000 + 0o127) + chr(1144 - 1095) + '\064' + '\064', 57430 - 57422), ehT0Px3KOsy9('\060' + '\x6f' + '\x34' + chr(52), 33763 - 33755), ehT0Px3KOsy9(chr(48) + chr(111) + chr(1181 - 1130) + chr(0b110000) + chr(0b110001 + 0o3), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x32' + '\x34' + '\065', 0o10), ehT0Px3KOsy9('\060' + chr(0b1101111) + chr(135 - 86) + '\x36' + chr(0b110110), 3297 - 3289), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x31' + '\x34' + chr(0b110 + 0o53), 8), ehT0Px3KOsy9(chr(1719 - 1671) + chr(0b1101111) + chr(0b110010) + '\x35' + chr(54), 0b1000), ehT0Px3KOsy9(chr(48) + chr(111) + '\x35' + '\064', 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + chr(0b110010) + chr(653 - 599) + '\x31', 0o10), ehT0Px3KOsy9('\060' + chr(4453 - 4342) + chr(0b10101 + 0o35) + chr(51), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1000100 + 0o53) + chr(0b110001) + chr(814 - 766) + '\x34', 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1261 - 1206), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(0b110011) + chr(789 - 734) + '\067', 41890 - 41882), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\x33' + '\x33' + '\x31', 8), ehT0Px3KOsy9(chr(1438 - 1390) + chr(0b1100001 + 0o16) + chr(1399 - 1349) + chr(716 - 668), 0b1000), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\061' + chr(54), 0o10), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + '\067' + chr(53), 0o10), ehT0Px3KOsy9(chr(48) + chr(111) + chr(0b110010) + chr(0b101 + 0o55) + chr(54), 0b1000), ehT0Px3KOsy9(chr(1171 - 1123) + chr(371 - 260) + '\x33' + chr(48) + chr(54), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(0b10 + 0o155) + '\x31' + chr(55) + '\067', 48810 - 48802), ehT0Px3KOsy9('\x30' + '\x6f' + chr(1220 - 1171) + '\x31' + chr(0b110110), 0b1000), ehT0Px3KOsy9(chr(2274 - 2226) + chr(0b1000000 + 0o57) + '\061' + chr(54) + chr(0b10101 + 0o41), 8), ehT0Px3KOsy9('\060' + chr(111) + chr(275 - 225) + '\060' + chr(54), 0b1000)][WVxHKyX45z_L % ehT0Px3KOsy9(chr(830 - 782) + chr(0b1011111 + 0o20) + chr(0b110101) + chr(0b110000), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\xb6'), '\x64' + '\145' + chr(0b110010 + 0o61) + chr(111) + '\144' + '\145')('\x75' + chr(0b1110100) + chr(2997 - 2895) + chr(909 - 864) + chr(0b111000)) + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def jVEbbGlDfE_G(): n4ljua2gi1Pr = Cuu2iPul0ZpV() n4ljua2gi1Pr.YBEkVLgqMiCU = xafqLlk3kkUe(SXOLrMavuUCe(b'\xf6\x19C\xd5\x86s\xf6\xdd\x0c_\xf4\xde\xa1|H\xaa\x9a\x17P\xab\xc6\x1e\x00\xddX\xd8p\x1bk\x96\xaas|X\xe2\xa3 "\x19\xe8\xff'), chr(100) + '\145' + chr(3471 - 3372) + chr(8629 - 8518) + '\x64' + '\x65')(chr(117) + chr(8594 - 8478) + chr(6548 - 6446) + chr(0b1001 + 0o44) + '\x38') n4ljua2gi1Pr.Znsza0qvc2k0 = ehT0Px3KOsy9(chr(0b110000) + chr(4803 - 4692) + chr(49) + chr(55) + '\x35' + chr(0b110000), 0o10) n4ljua2gi1Pr.fJlr2HKekDZ6 = ehT0Px3KOsy9(chr(689 - 641) + chr(0b100001 + 0o116) + '\060', 0b1000) return n4ljua2gi1Pr
tensorflow/tensor2tensor
tensor2tensor/rl/trainer_model_based_params.py
rlmb_long_stochastic_discrete_100steps
def rlmb_long_stochastic_discrete_100steps(): """Long setting with stochastic discrete model, changed ppo steps.""" hparams = rlmb_long_stochastic_discrete() hparams.ppo_epoch_length = 100 hparams.simulated_rollout_length = 100 hparams.simulated_batch_size = 8 return hparams
python
def rlmb_long_stochastic_discrete_100steps(): """Long setting with stochastic discrete model, changed ppo steps.""" hparams = rlmb_long_stochastic_discrete() hparams.ppo_epoch_length = 100 hparams.simulated_rollout_length = 100 hparams.simulated_batch_size = 8 return hparams
[ "def", "rlmb_long_stochastic_discrete_100steps", "(", ")", ":", "hparams", "=", "rlmb_long_stochastic_discrete", "(", ")", "hparams", ".", "ppo_epoch_length", "=", "100", "hparams", ".", "simulated_rollout_length", "=", "100", "hparams", ".", "simulated_batch_size", "=", "8", "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#L413-L419
train
Long setting with stochastic discrete model changed ppo steps.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7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vXL8qwsX,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(0b100100 + 0o14) + chr(111) + chr(2197 - 2144) + chr(0b10010 + 0o37), 22518 - 22510), ehT0Px3KOsy9(chr(0b10011 + 0o35) + chr(0b1101111) + chr(0b110 + 0o54) + '\063' + '\063', 26196 - 26188), ehT0Px3KOsy9('\060' + chr(0b101100 + 0o103) + chr(0b10000 + 0o41) + '\060' + chr(0b110000), 0o10), ehT0Px3KOsy9(chr(0b110000) + chr(4451 - 4340) + '\x31' + chr(0b110000) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + chr(111) + '\062' + chr(1090 - 1036) + chr(1481 - 1432), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(2448 - 2397) + chr(55) + '\x33', 0b1000), ehT0Px3KOsy9(chr(669 - 621) + '\x6f' + chr(53) + '\063', ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(1206 - 1156) + chr(0b110110) + '\067', 46694 - 46686), ehT0Px3KOsy9('\060' + '\157' + chr(0b110011) + '\x31' + chr(0b10110 + 0o32), ord("\x08")), ehT0Px3KOsy9(chr(48) + chr(0b111111 + 0o60) + '\063' + chr(2405 - 2354) + chr(0b110000), 0b1000), ehT0Px3KOsy9(chr(48) + '\x6f' + '\061' + chr(48) + chr(55), 8), ehT0Px3KOsy9(chr(0b110000) + chr(2515 - 2404) + '\x32' + chr(0b10001 + 0o46) + '\063', 0o10), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(111) + chr(1554 - 1505) + '\060' + '\x34', ord("\x08")), ehT0Px3KOsy9(chr(0b101011 + 0o5) + chr(11476 - 11365) + chr(885 - 834) + chr(0b1111 + 0o50) + '\x31', 0o10), ehT0Px3KOsy9(chr(0b1 + 0o57) + chr(0b1101111) + chr(159 - 111), 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110 + 0o53), 18200 - 18192), ehT0Px3KOsy9('\x30' + chr(111) + chr(0b110110) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(3082 - 2971) + chr(0b110000 + 0o2) + chr(365 - 317) + '\063', 35000 - 34992), ehT0Px3KOsy9(chr(1742 - 1694) + chr(0b1101111) + chr(0b101010 + 0o14) + chr(1702 - 1650), ord("\x08")), ehT0Px3KOsy9('\060' + chr(6686 - 6575) + chr(49) + chr(0b110000), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + chr(7186 - 7075) + chr(0b10010 + 0o41) + chr(0b10001 + 0o46) + chr(55), ord("\x08")), ehT0Px3KOsy9('\060' + '\x6f' + chr(0b10111 + 0o32) + '\061' + chr(48), ord("\x08")), ehT0Px3KOsy9(chr(0b101000 + 0o10) + chr(2609 - 2498) + chr(0b101100 + 0o6) + chr(0b110010) + chr(55), 0b1000), ehT0Px3KOsy9('\060' + chr(111) + chr(1563 - 1511) + '\x35', 0b1000), ehT0Px3KOsy9(chr(48) + chr(0b1101111) + '\x31' + '\x32', 0o10), ehT0Px3KOsy9(chr(48) + chr(0b1001011 + 0o44) + chr(0b110010) + chr(876 - 823) + chr(53), 0b1000), ehT0Px3KOsy9('\x30' + '\157' + chr(634 - 585) + chr(1429 - 1378) + chr(0b110100), 0o10), ehT0Px3KOsy9(chr(0b100011 + 0o15) + chr(0b1101111) + chr(53), 0b1000), ehT0Px3KOsy9('\060' + chr(0b1100110 + 0o11) + chr(0b110010) + chr(0b110100 + 0o0) + chr(0b100010 + 0o20), 54781 - 54773), ehT0Px3KOsy9(chr(0b110000) + '\157' + chr(49) + chr(0b110000 + 0o6), 0o10), ehT0Px3KOsy9(chr(1322 - 1274) + chr(0b1101000 + 0o7) + chr(53) + '\x33', 8), ehT0Px3KOsy9(chr(0b10100 + 0o34) + chr(0b1011001 + 0o26) + chr(0b110001) + chr(54) + '\x37', ord("\x08")), ehT0Px3KOsy9('\x30' + '\x6f' + '\x33' + chr(0b1111 + 0o46) + chr(0b100001 + 0o25), 0b1000), ehT0Px3KOsy9(chr(0b10100 + 0o34) + '\x6f' + chr(0b110001 + 0o0) + chr(50) + chr(1801 - 1749), ord("\x08")), ehT0Px3KOsy9(chr(0b110000) + '\x6f' + chr(0b101101 + 0o6) + '\062' + chr(0b110100), 11183 - 11175), ehT0Px3KOsy9(chr(0b110000) + chr(0b1101111) + '\x33' + '\060' + chr(0b11100 + 0o24), ord("\x08")), ehT0Px3KOsy9(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b110010) + chr(50) + '\x33', ord("\x08")), ehT0Px3KOsy9('\060' + '\157' + chr(51) + '\x32', 63068 - 63060), ehT0Px3KOsy9('\x30' + chr(2767 - 2656) + '\x31' + chr(93 - 43) + chr(0b1000 + 0o54), 8), ehT0Px3KOsy9(chr(0b110000) + '\157' + '\x33' + chr(0b110001) + chr(49), ord("\x08"))][WVxHKyX45z_L % ehT0Px3KOsy9('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), 0b1000)] for (WVxHKyX45z_L, OeWW0F1dBPRQ) in YlkZvXL8qwsX(XbwU38w7NW8n)]) def NPPHb59961Bv(RqocVGOryNPv, _CF03Rifpmdh): try: return jFWsnpHpAUWz(RqocVGOryNPv + xafqLlk3kkUe(SXOLrMavuUCe(b'\x07'), '\x64' + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(7220 - 7103) + '\x74' + '\x66' + chr(45) + '\070') + _CF03Rifpmdh) except yROw0HWBk0Qc: return jFWsnpHpAUWz(RqocVGOryNPv) def eknjGJXF2hlG(): n4ljua2gi1Pr = cPklOFeEAYc1() n4ljua2gi1Pr.BYTlP2WTHA9T = ehT0Px3KOsy9(chr(0b10001 + 0o37) + '\x6f' + chr(289 - 240) + chr(0b110100) + '\064', ord("\x08")) n4ljua2gi1Pr.Zz7z6jACoNio = ehT0Px3KOsy9('\x30' + chr(0b1101111) + '\061' + '\x34' + chr(52), 8) n4ljua2gi1Pr.PBpnkLjxkvnI = ehT0Px3KOsy9('\x30' + chr(7888 - 7777) + chr(0b110001) + chr(48), 8) return n4ljua2gi1Pr