【发布时间】:2020-12-27 12:42:26
【问题描述】:
我正在尝试用 VS 代码训练模型并编写了这段代码(其中的一部分):
import tensorflow as tf
import tflearn'
....
tf.reset_default_graph()
net = tflearn.input_data(shape=[None, len(trening[0])])
net = tflearn.fully_connected(net, 8)
net = tflearn.fully_connected(net, 8)
net = tflearn.fully_connected(net, len(output[0]), activation="softmax")
net = tflearn.regression(net)
modell = tflearn.DNN(net)
try:
modell.load("modell.tflearn")
except:
modell.fit(trening, output, n_epoch=1000, batch_size=8, show_metric=True)
modell.save("modell.tflearn")
...
输出:raise RuntimeError('尝试使用已关闭的会话。') RuntimeError: 尝试使用已关闭的会话。
我不明白我做错了什么,有人可以帮忙吗?
【问题讨论】:
标签: python python-3.x tensorflow artificial-intelligence tflearn