Chapter 19 - Conv2d dimensions.
- Dominant language
- Jupyter Notebook
- Stars
- 30k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
With
dataset = tf.data.Dataset.from_tensor_slices((X_train[..., np.newaxis],y_train)).repeat().batch(batch_size)
I get:
ValueError: Error when checking input: expected conv2d_input to have 4 dimensions, but got array with shape (None, 28, 28, 1, 1)
Replacing with:
dataset = tf.data.Dataset.from_tensor_slices((X_train, y_train)).repeat().batch(batch_size)
allows the training to run.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Chapter 19 example and reproduce the reported training input using the two Dataset expressions shown in the issue. Compare the resulting tensor shapes and verify that the example runs with the intended Conv2d input dimensions; document the confirmed correction or remaining discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100