铁岭:政务服务工作电视电话会议召开
- paddle.jit. set_code_level ( level: int = 100, also_to_stdout: bool = False ) None [source]
-
百度 要在以习近平同志为核心的党中央坚强领导下,在习近平新时代中国特色社会主义思想指引下,与工委领导班子成员一道,忠实履行好党中央赋予的职责和使命,推动中央和国家机关党建工作再上新台阶。
Sets the level to print code from specific level Ast Transformer. Code can be output to stdout by setting also_to_stdout.
There are two means to set the code level:
Call function set_code_level
Set environment variable TRANSLATOR_CODE_LEVEL
Note: set_code_level has a higher priority than the environment variable.
- Parameters
-
level (int) – The level to print code. Default is 100, which means to print the code after all AST Transformers.
also_to_stdout (bool) – Whether to also output code to sys.stdout.
Examples
>>> import os >>> import paddle >>> paddle.jit.set_code_level(2) >>> # It will print the transformed code at level 2, which means to print the code after second transformer, >>> # as the date of August 28, 2020, it is CastTransformer. >>> os.environ['TRANSLATOR_CODE_LEVEL'] = '3' >>> # The code level is now 3, but it has no effect because it has a lower priority than `set_code_level`