Skip to content

Conversation

yarinkos
Copy link

@yarinkos yarinkos commented Dec 8, 2024

In order to fix the following error :

Traceback (most recent call last): File "/dev/examples/courses/hands-on/l02c01_celsius_to_fahrenheit.py", line 31, in <module> print(model.predict([100.0])) File "/dev/examples/.venv/lib/python3.9/site-packages/keras/src/utils/traceback_utils.py", line 122, in error_handler raise e.with_traceback(filtered_tb) from None File "/dev//examples/.venv/lib/python3.9/site-packages/keras/src/trainers/data_adapters/__init__.py", line 125, in get_data_adapter raise ValueError(f"Unrecognized data type: x={x} (of type {type(x)})") ValueError: Unrecognized data type: x=[100.0] (of type <class 'list'>)

model.predict() function in TensorFlow expects its input to be a NumPy array or a Tensor, not a Python list

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review size:XS CL Change Size: Extra Small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants