如何屏蔽WARN: After a series of passes, the current graph can be quite different from OriginProgram
Created by: webary
- 版本、环境信息: 1)PaddlePaddle版本:v1.4.1
- 训练信息 1)多机
- 问题描述:没有使用OriginProgram,但是每轮训练都会输出如下报错,请问如何屏蔽该输出,使其更简洁
W1204 14:37:13.829596 40218 graph.h:204] WARN: After a series of passes, the current graph can be quite different from OriginProgram. So, please avoid using the OriginProgram()
method!
Wed Dec 4 14:37:13 2019[1,12]:2019-12-04 14:37:13,830-WARNING:
Wed Dec 4 14:37:13 2019[1,12]: You can try our memory optimize feature to save your memory usage:
Wed Dec 4 14:37:13 2019[1,12]: # create a build_strategy variable to set memory optimize option
Wed Dec 4 14:37:13 2019[1,12]: build_strategy = compiler.BuildStrategy()
Wed Dec 4 14:37:13 2019[1,12]: build_strategy.enable_inplace = True
Wed Dec 4 14:37:13 2019[1,12]: build_strategy.memory_optimize = True
Wed Dec 4 14:37:13 2019[1,12]:
Wed Dec 4 14:37:13 2019[1,12]: # pass the build_strategy to with_data_parallel API
Wed Dec 4 14:37:13 2019[1,12]: compiled_prog = compiler.CompiledProgram(main).with_data_parallel(
Wed Dec 4 14:37:13 2019[1,12]: loss_name=loss.name, build_strategy=build_strategy)
Wed Dec 4 14:37:13 2019[1,12]:
Wed Dec 4 14:37:13 2019[1,12]: !!! Memory optimize is our experimental feature !!!
Wed Dec 4 14:37:13 2019[1,12]: some variables may be removed/reused internal to save memory usage,
Wed Dec 4 14:37:13 2019[1,12]: in order to fetch the right value of the fetch_list, please set the
Wed Dec 4 14:37:13 2019[1,12]: persistable property to true for each variable in fetch_list
Wed Dec 4 14:37:13 2019[1,12]:
Wed Dec 4 14:37:13 2019[1,12]: # Sample
Wed Dec 4 14:37:13 2019[1,12]: conv1 = fluid.layers.conv2d(data, 4, 5, 1, act=None)
Wed Dec 4 14:37:13 2019[1,12]: # if you need to fetch conv1, then:
Wed Dec 4 14:37:13 2019[1,12]: conv1.persistable = True