Skip to content

Update 01_neural_network_regression_in_tensorflow.ipynb#675

Open
zeofr wants to merge 1 commit intomrdbourke:mainfrom
zeofr:patch-1
Open

Update 01_neural_network_regression_in_tensorflow.ipynb#675
zeofr wants to merge 1 commit intomrdbourke:mainfrom
zeofr:patch-1

Conversation

@zeofr
Copy link

@zeofr zeofr commented Sep 23, 2024

Made changes to function model.predict(). In version 2.17, the execution of model.predict([17.0]) gives error "Unrecognized data type: x=[17.0] (of type <class 'list'>)". This can be fixed by converting [17.0] into a Numpy array, therefore replacing model.predict([17.0]) with model.predict(np.array([17.0])) .In TensorFlow 2.12, lists were accepted as input to model.predict, but in TensorFlow 2.17, the function expects input data to be explicitly converted into NumPy arrays or tensors

Made changes to function model.predict(). In version 2.17, the execution of model.predict([17.0]) gives error "Unrecognized data type: x=[17.0] (of type <class 'list'>)". This can be fixed by converting [17.0] into a Numpy array, therefore replacing model.predict([17.0])  with model.predict(np.array([17.0])) .In TensorFlow 2.12, lists were accepted as input to model.predict, but in TensorFlow 2.17, the function expects input data to be explicitly converted into NumPy arrays or tensors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant