mrdbourke / tensorflow-deep-learning

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
https://dbourke.link/ZTMTFcourse
MIT License
5.14k stars 2.53k forks source link

Issue while predicting model_2 experiments on 01_neural_network_regression_in_tensorflow.ipynb #495

Closed sskstar7 closed 1 year ago

sskstar7 commented 1 year ago

Hi,

While trying to follow and execute the below code

Make an plot predictions

y_preds_2 = model_2.predict(X_test) plot_predic(predictions=y_preds_2)

Getting errors like the below. Any help to continue, please. Many thanks. """ ValueError: Exception encountered when calling layer "sequential_29" (type Sequential).

Input 0 of layer "dense_54" is incompatible with the layer: expected min_ndim=2, found ndim=1. Full shape received: (None,)

Call arguments received by layer "sequential_29" (type Sequential):
  • inputs=tf.Tensor(shape=(None,), dtype=int32)
  • training=False
  • mask=None

"""