get_flags

paddle.fluid.get_flags(flags)[source]

This function gets the GFlags value in Paddle.

Parameters

flags (list|tuple|str) – A list/tuple of string or a string which is the flag’s name.

Returns

flag’s value in Paddle.

Examples

import paddle.fluid as fluid

flags = ['FLAGS_eager_delete_tensor_gb', 'FLAGS_check_nan_inf']
res = fluid.get_flags(flags)
print(res)
# {'FLAGS_eager_delete_tensor_gb': 0.0, 'FLAGS_check_nan_inf': False}