tf.summary.FileWrite was present in Tensorflow 1.x is removed in Tensorflow 2.0, and instead
tf.summary.create_file_writer.The questioner's program seems to have written in Tensorflow 1st style, so you can avoid it by using
tf.compat.v1.summary as a temporary solution.
If you want to write more in Tensorflow 2nd style, you need to be aware of eager execution and rewrite it as a whole.For more information, see the document "Effective TensorFlow2" or "Migrating tf.summary usage to TF 2.0".
© 2022 OneMinuteCode. All rights reserved.