Need a NaN/Inf check operator.
Created by: qingqing01
Now, we can set export FLAGS_check_nan_inf=True
to check all outputs of all operators in ProgramDecs
, but the GPU training is very very slow.
Sometimes, we only want to trace one operator. So it is convenient if we add one NaN/Inf checking operator.