ageron / ageron/handson-ml

Chapter 13 Question 7 Code

Đang mở
#566 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
25.6k
Fork
12.7k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

The code provided to produce a CNN seems to error out. I am able to run all of the code up to the very last block.

```
with tf.Session() as sess:
init.run()
for epoch in range(n_epochs):
for X_batch, y_batch in shuffle_batch(X_train, y_train, batch_size):
sess.run(training_op, feed_dict={X: X_batch, y: y_batch})
acc_batch = accuracy.eval(feed_dict={X: X_batch, y: y_batch})
acc_test = accuracy.eval(feed_dict={X: X_test, y: y_test})
print(epoch, "Last batch accuracy:", acc_batch, "Test accuracy:", acc_test)

save_path = saver.save(sess, "./my_mnist_model")
```
Which produces the following error.

`ValueError: Cannot feed value of shape (100, 784) for Tensor 'inputs/X:0', which has shape '(?, 1960)'`

Has anyone else encountered this or knowledgeable about what could be going on?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.