caicloud / tensorflow-tutorial

Example TensorFlow codes and Caicloud TensorFlow as a Service dev environment.
2.93k stars 2.08k forks source link

第六章6.4.1 inference代码有误 #113

Closed ShusenTang closed 6 years ago

ShusenTang commented 6 years ago

BUG REPORT:

Deep_Learning_with_TensorFlow/1.4.0/Chapter06/LeNet-5/LeNet5_infernece.py中第42行 应该改成reshaped = tf.reshape(pool2, [-1, nodes]),否则进行运行eval.py进行测试时会报错Failed to convert object of type <class 'list'> to Tensor.

tankle commented 6 years ago

我也遇到了这个问题,请问有解决嘛?

ShusenTang commented 6 years ago

我写了解决方案啊,把LeNet5_infernece.py中第42行改成reshaped = tf.reshape(pool2, [-1, nodes])

caicloud-bot commented 6 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

/lifecycle stale

haithink commented 5 years ago

主要是 输入 x 的 batch_size 这个维度填 None 的话就会有 这个问题