为了账号安全,请及时绑定邮箱和手机立即绑定

训练报错 train_accuracy = accuracy.eval(feed_dict={x: batch[0], y: batch[1], keep_prob: 1.0}) 不知道哪里出错了

Traceback (most recent call last):

  File "D:/user/pycharm/mnist_test/mnist/convolutional.py", line 27, in <module>

    train_accuracy = accuracy.eval(feed_dict={x: batch[0], y: batch[1], keep_prob: 1.0})

  File "D:\program files\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 680, in eval

    return _eval_using_default_session(self, feed_dict, self.graph, session)

  File "D:\program files\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\framework\ops.py", line 4937, in _eval_using_default_session

    raise ValueError("Cannot evaluate tensor using `eval()`: No default "

ValueError: Cannot evaluate tensor using `eval()`: No default session is registered. Use `with sess.as_default()` or pass an explicit session to `eval(session=sess)`


Process finished with exit code 1


正在回答

1 回答

train_accuracy = accuracy.eval(feed_dict={x: batch[0], y_: batch[1], keep_prob: 1.0})


1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

训练报错 train_accuracy = accuracy.eval(feed_dict={x: batch[0], y: batch[1], keep_prob: 1.0}) 不知道哪里出错了

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信