У меня ошибка с Tensorflow v2.1.0:
AttributeError: module 'tensorflow_core.summary' has no attribute 'FileWriter
Мой код:
import tensorflow as tf
a = tf.constant(5.0)
b = tf.constant(6.0)
c = a*b
sess = tf.compat.v1.Session()
File_Writer = tf.summary.FileWriter(r"C:\Users\Name\Desktop\TensorFlow\graph", sess.graph)
print(sess.run(c))
Ошибка вывода:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-19-898c56a41b1a> in <module>
6 sess = tf.compat.v1.Session()
7
----> 8 File_Writer = tf.summary.FileWriter(r"C:\Users\Name\Desktop\TensorFlow\graph", sess.graph)
9
10 print(sess.run(c))
AttributeError: module 'tensorflow_core.summary' has no attribute 'FileWriter'
Что мне сделать, чтобы это исправить?