添加

FLAGS = tf.app.flags.FLAGS
lst = list(FLAGS._flags().keys())
for key in lst:
    FLAGS.__delattr__(key)

FLAGS = tf.app.flags.FLAGS
lst = list(FLAGS._flags().keys())
for key in lst:
    FLAGS.delattr(key)

 

 

参考文献:

https://blog.csdn.net/qq_40488484/article/details/89113678