美文网首页
fask调用keras模型的一个问题

fask调用keras模型的一个问题

作者: 你说你要一场 | 来源:发表于2019-06-11 15:53 被阅读0次

    会报一个

    Tensor Tensor("Placeholder:0", shape=(3, 3, 3, 16), dtype=float32) is not an element of this graph.\n\n-->\n'
    
    

    的错误。
    这是因为tensorflow的图不能重复加载。
    需要在flask程序里把debug、多线程关了。

    app.run(host='0.0.0.0',port="5003",threaded=False)
    

    删除debug,添加threaded=False

    相关文章

      网友评论

          本文标题:fask调用keras模型的一个问题

          本文链接:https://www.haomeiwen.com/subject/empqfctx.html