添加
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
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:Tensorflow 错误:The flag ‘xxx’ is defined twice - Python技术站