Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 01_neural_network_regression_in_tensorflow.ipynb #675

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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