关于tensorflow 使用tf summary保存logs报错的一些问题
由于tensordflow版本不一致可能会遇到下面的问题https://github.com/yunjey/stargan/issues/109遇到的一个问题https://github.com/taomanwai/tensorboardcolab/issues/9https://blog.csdn.net/qq_38410428/article/details/82973711关于logger
·
由于tensordflow版本不一致可能会遇到下面的问题
https://github.com/yunjey/stargan/issues/109
遇到的一个问题
AttributeError: module ‘tensorflow’ has no attribute ‘Summary’ #9
链接给出的解决方案
In the recent version of TensorFlow, you should replace these lines:
summary = tf.Summary()
summary_value = summary.value.add()
summary_value.simple_value = value
summary_value.tag = graph_name
with:
with self.writer.as_default():
tf.summary.scalar(graph_name, value)
self.writer.flush()
Also, replace this line:
self.writer = tf.summary.FileWriter(log_dir)
with:
self.writer = tf.summary.create_file_writer(log_dir)
主要根据介绍修改上述即可。
- 同时还遇到 TypeError: can’t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory fi 这个问题
使用这个链接可以去解决问题
添加链接描述
更多推荐
已为社区贡献1条内容
所有评论(0)