-
Notifications
You must be signed in to change notification settings - Fork 74.4k
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
RuntimeError: The layer has never been called and thus has no defined output shape. #44857
Comments
Can you unlock the Colab? |
Yes, I just unlocked it for everyone - https://colab.research.google.com/drive/1TPYkETG8szsCvut6SdzY345jEnqOrgsg?usp=sharing |
You need to call the model with an input:
|
But, if you have observed, when I am initializing the densenet model, I am providing the input shape. Then why do I need to provide it two times? |
The layer need to be called. See the difference between |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:
python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"
Describe the current behavior
I used to run below mentioned code in the tensorflow version 1.15 but since the time I have upgraded it fails to run.
I have already gone through similar bugs, but they all mention that I should have provided the input shape, I have done that, so I am not sure where the problem lies.
Describe the expected behavior
Expected behaviour should be that I should be able to get the output shape of the last layer.
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Everyone can recreate the issue using the below colab link.
https://colab.research.google.com/drive/1TPYkETG8szsCvut6SdzY345jEnqOrgsg?usp=sharing
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: