C3W3 - Model Summary is empty

@Deepti_Prasad

1 Like

@Ajith1

kindly add the below in the notebook in the beginning of the cell where you built your model

from keras.models import Sequential

Possible issue could be if you do not have keras downloaded

Kindly check if you have keras before you try the above import statement by using

pip show keras

let me know what happens

@Deepti_Prasad

I did not understand why I need to import Sequential explicitly as I am accessing the same using tf.keras.sequential.

Well i still went ahead and added the following line in the cell1 and ran cell after cell with no Change in final output

I do have keras as mentioned below

pip show keras
Name: keras
Version: 3.3.3
Summary: Multi-backend Keras.
Home-page: https://github.com/keras-team/keras
Author: Keras team
Author-email: keras-users@googlegroups.com
License: Apache License 2.0
Location: C:\Users\aa\AppData\Local\anaconda3\envs\oreilly-langchain\Lib\
site-packages
Requires: absl-py, h5py, ml-dtypes, namex, numpy, optree, rich
Required-by: tensorflow-intel
1 Like

i was doing some digging, and what I found, the reason it is probably not taking because model need to be built if the output has come as unbuilt.

another post mentioned to mention the input shape.

i tried multiple times with a new jupyter notebook, and I am getting the desired output.

the last thing which I could suspect in your case is the anaconda issue as I don’t use it.

did you try using this codes on your Google colab once??

@Deepti_Prasad - It seems to work fine in colab but not in anaconda3 environment.

Is there any alternate option for offline-onprem setup other than anaconda which I can try ?

1 Like

so it is anaconda issue as suspected, let me dig in about this issue

because anaconda environment doesn’t require dependencies to run some of packages it is used but the downside of this is probably for the code to run in the local jupyter environment you need to install the dependencies locally.

is your jupyter also located in anaconda environment, I don’t think so!! from what I remember.

probably environment incompatibility is causing the issue of model inbuilt.

regards
DP

@Deepti_Prasad

Yes Jupyterlab is part of anaconda environment.