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

Input 0 of layer "dense_3" is incompatible with the layer #448

Open
sparta-2024 opened this issue Aug 16, 2024 · 1 comment
Open

Input 0 of layer "dense_3" is incompatible with the layer #448

sparta-2024 opened this issue Aug 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@sparta-2024
Copy link

Describe the bug
A clear and concise description of what the bug is.
tf_results = model.predict(
^^^^^^^^^^^^^^
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\utils\traceback_utils.py", line 70, in error_handler
raise e.with_traceback(filtered_tb) from None
File "C:\Users\dd\AppData\Local\Temp_autograph_generated_filezo42g_5q.py", line 15, in tf__predict_function
retval
= ag__.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
^^^^^
ValueError: in user code:

File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\engine\training.py", line 2436, in predict_function  *
    return step_function(self, iterator)
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\engine\training.py", line 2421, in step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\engine\training.py", line 2409, in run_step  **
    outputs = model.predict_step(data)
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\engine\training.py", line 2377, in predict_step
    return self(x, training=False)
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\utils\traceback_utils.py", line 70, in error_handler
    raise e.with_traceback(filtered_tb) from None
File "d:\Users\anaconda3\Lib\site-packages\tf_keras\src\engine\input_spec.py", line 280, in assert_input_compatibility
    raise ValueError(

ValueError: Exception encountered when calling layer 'pilot_net' (type Functional).

Input 0 of layer "dense_3" is incompatible with the layer: expected axis -1 of input shape to have value 101, but received input with shape (None, 100)

Call arguments received by layer 'pilot_net' (type Functional):
  • inputs=('tf.Tensor(shape=(None, 96, 256, 3), dtype=float32)', 'tf.Tensor(shape=<unknown>, dtype=float32)')
  • training=False
  • mask=None

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows, Linux, iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. Samsung S20]
  • OS: [e.g. Android 11]
  • Browser [e.g. stock browser, chrome]
  • Version [e.g. 0.1.1, master]

Additional context
Add any other context about the problem here.

@sparta-2024 sparta-2024 added the bug Something isn't working label Aug 16, 2024
@isha382
Copy link

isha382 commented Aug 21, 2024

hi @sparta-2024, the issue is of the incompatibility with the version you can try with 2.9.0 version of tensorflow which is preferred version and can refer following documentation policy for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: To do
Development

No branches or pull requests

2 participants