【问题标题】:module 'tensorflow' has no attribute 'merge_summary' error模块“tensorflow”没有属性“merge_summary”错误
【发布时间】:2019-10-02 18:59:25
【问题描述】:

长话短说,我遇到了这个问题,当我运行代码时,它说我使用 Tensorflow 的模块没有属性 'merge_summary' 问题是我什至不使用 merge_summary。

我已尝试卸载tenserflow,但没有成功。

import nltk
from nltk.stem.lancaster import LancasterStemmer
stemmer = LancasterStemmer()

import numpy
import tflearn
import tensorflow
import json
import random

with open("intents.json") as file:
    data = json.load(file)

print(data)

这应该会在控制台中放置很多文本。

【问题讨论】:

    标签: python-3.x tensorflow tflearn


    【解决方案1】:

    您也可以尝试 tf.compat.v1.summary.merge_all,因为 merge_summary 已弃用。

    【讨论】:

      【解决方案2】:

      merge_summary 已弃用。

      改用:

      tf.summary.merge

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-04-29
        • 1970-01-01
        • 2020-07-20
        • 1970-01-01
        • 2020-10-17
        • 1970-01-01
        相关资源
        最近更新 更多