aamini / introtodeeplearning

Lab Materials for MIT 6.S191: Introduction to Deep Learning
MIT License
7.26k stars 3.66k forks source link

Lab1 module 'mitdeeplearning' has no attribute 'lab1' #135

Closed hrishim closed 1 year ago

hrishim commented 1 year ago

Hello

I cloned the repository and I am running it in a jupyter notebook on my local machine. I am working on lab1/Part1_TenforFlow.ipynb

I get this error


AttributeError Traceback (most recent call last) Cell In[28], line 40 38 # test the output! 39 print(y.numpy()) ---> 40 mdl.lab1.test_custom_dense_layer_output(y)

AttributeError: module 'mitdeeplearning' has no attribute 'lab1'


I have confirmed that /home/hrishi/.venv/tfenv2/lib/python3.10/site-packages/mitdeeplearning/lab1.py exists

import mitdeeplearning as mdl print(mdl)

gives <module 'mitdeeplearning' from '/home/hrishi/.venv/tfenv2/lib/python3.10/site-packages/mitdeeplearning/init.py'>

hrishim commented 1 year ago

I closed and re-opened the jupyter notebook and it worked. Dont know why

Edit: I added

from mitdeeplearning import lab1

In Cell 24. That is why it worked, I think