C3W3 - Model Summary is empty

  • Week # C3W3-Lab2

  • Link to the classroom item you are referring to:
    This is the Lab2 in C3W3

  • Description (include relevant info but please do not post solution code or your entire notebook):

I am using a local setup (HP Laptop, XEON CPU, windows 10, Anaconda, Jupyterlab) to run C3W3 examples. When I run model.summary the output is completely empty. I found similar issues with C3W2 examples also

When I am training the model it is quite slow. I am only using my CPU and I understand it will be slower when compared with GPU but course examples from C1/C2 were trained way faster than the examples in C3.

As you can see in below picture, each epoch takes 40+ minutes to complete.

1 Like

Hi @Ajith1

Did you download all the metadata required for you to run the codes in your local environment??

Also another reason I can guess seeing your codes is, although you did mention the embedding_dim and other layers dim, I don’t see any code recalled related to dataset(text/image) you require for the model to be built

Regards
DP

Thanks for the reply @Deepti_Prasad

I am running the ungraded labs and I dont see any metadata downloaded for the same in the code ? Can you point to the respective metadata needed for the Ungraded Lab: Multiple LSTMs.

I am just running the default code provided by the deeplearning.ai without any changes

https://github.com/https-deeplearning-ai/tensorflow-1-public/blob/main/C3/W3/ungraded_labs/C3_W3_Lab_2_multiple_layer_LSTM.ipynb

1 Like

Hi @Ajith1

Did you run the below part of codes?? which downloads the dataset

Regards
DP

Yes I did @Deepti_Prasad

1 Like

Hi @Ajith1

The issues lies here in the last screenshot shared.

it seems ipywidget is not present.

It mention IProgress not found. Click on the see https, what information does it give??

Hi @Deepti_Prasad

It provides steps to install ipywidget using pip.

https://ipywidgets.readthedocs.io/en/stable/user_install.html

I did the same and restarted the kernel. Now I started running from the top cell and as shown below I don’t see any issue with ipywidget now

But the model.summary output is still empty

1 Like

hey ajit I just noticed

in the image I shared include the buffer size batch size and train and test split (the second cell)

image

have you run down that cell too?

Yes @Deepti_Prasad

I am re-running through all cells in the .ipynb file

CELL2: no output
CELL3: shown below
CELL5: model.summary is empty

2 Likes

Hi @Ajith1

I just ran the same codes in my local Jupiter, and this is the output :point_down:

One major difference I notice when I ran by dataset from the first cell, I was successfully able to download the dataset

Check if you had the same output!!

Also I was able to run the download dataset cell after running a notebook from tensorflow locally in my Jupiter, I am sharing the link :point_down:

Regards
DP

Hi @Deepti_Prasad

Well I do not have the download progress as shown in your case (might be because it is already downloaded) but when I print the info of the dataset, it seems to point to the right one

1 Like

can you try the step I mentioned once. first run tensorflow dataset notebook locally in separate notebook, then run the code cells from the ungraded lab, tell me if the issue still persist!!!

one more thing I forgot to ask you did you click the not trusted in the local jupyter??

@Deepti_Prasad

What is that not trusted in the local jupyter is ? Where can I do it?

Also can you tell me if I am tfds in jupterlab in windows, what will be the download location where it is downloaded by default? I dont see the respective dataset in the folder where model files are present.

1 Like

it will be just above where you connect the kernel on the right side.

it would be in main local drive folder

What you could, run the tensorflow_dataset notebook again and then run the notebook you want to run, as told you try before too.

If that doesn’t work let me know!!

Regards
DP

1 Like

@Deepti_Prasad

Well i deleted the previous datasets downloaded by the tensorflow datasets and re-ran the model from the first cell and it still fails by showing model summary as empty

1 Like

Ajit after you did this you are suppose to first download the notebook from the below link, (in the below link you will find a symbol :arrow_down: download which once you download, make sure you locate the download file in your main local c drive.

then open that notebook, run each cell one by one. once that is done,

then run the codes from the assignment. make sure you’re running single cell and not run all option

regards
DP

@Deepti_Prasad

I did download the whole github repo as a zip file and unzipped the same in my windows 10.

Now within jupyter lab window, opened the C3W3_Lab2 ungraded labs notebook as shown in below snapshot

As you can see in above snapshot, I havent run any of the cells in the notebook till now.

Now I started running each cell one by one as shown in below pictures

Cell1

Cell2

Cell 3

Cell 4

1 Like

can I know if jupyter is placed in your main local drive??

when I run down the assignment, I made a totally new jupyter notebook, wrote the codes with the previously mentioned comments.

i didn’t download any tensorflow repo directly and tried running them down.

@Deepti_Prasad

I am using Anaconda to launch Jupterlab which is part of OS drive.

Well this is not my first time running the notebooks in this windows laptop as I was doing the same for C1 and C2. Only with C3 I am observing this issue.

1 Like

please check your DM.

also it is not necessary every course or all courses have same issues.

so to find a work around which worked previously and is currently not working means there is a issue and that is what I am trying to find without knowing your system settings. so trying to guide you as per how it worked for me.

also can I know your python version? and tensorflow version in your system, even this mismatch can cause issue

regards
DP