Hello,
I have finished the 2nd week assignment and download all files to my computer. I am new to python and jupyter notebooks, how do I use external files in the main program. For instance the dataset file (h5) and training sets etc. How and where to do I upload the datasets and training sets etc in my own jupyter notebook. Sorry, I am new.
You can easily download whole files, (not just a Jupyter notebook) as follows. You just need to click “Lab Files”, then, click “Download all files”.
The potential problem is, the Coursera platform uses slightly old Tensorflow (2.3) and some others.
So, you may need to re-install some components to make notebook run successfully in your local environment.
Please can you guide me through this, I am new . I want to download the exercises and run them locally. How do I link files like the h5 dataset in my local jupyter notebook. I have downloaded all the required files, but how do i call the individual files in my local jupyter notebook. I am afraid that I will forget everything after a few months of the course, thats why I am downloading all the assignments , so i can redo them.
Have you download files ?
It is quite easy. Just click “Download all files”. Then, you can get a zip file which includes all files with the same directory structure as the Coursera platform.
But, making them run in your local environment is a different story. At first, you will need to set up a conda environment, since you do not want to break your local environment.
And, important thing is, basically, you need to install same version of Python, Tensorflow, Keras, etc,. as the Coursera platform. The version of Tensorflow is 2.3, which is old version. But, I think a few exercises need 2.4.
Of course some exercises may run on the latest Tensorflow, but all are at your risk. And, dependencies are not only on Tensorflow, but on other components which are imported at the beginning of your notebook. I’m using 3-5 conda environments for Coursera to get the best results.)
Once a conda environment was set up, and Jupyter notebook is launched, then, what you need is just invoke a notebook. All necessary files are placed with that notebook. Don’t worry about that point.
So, at first, you should download a zip file assuming that you already have a conda environment.
If not, then, you are better to set up a conda environment at first.
Hope this helps.
Thanks for the quick reply. I am new to all this. I will install a conda environment first. How do I invoke jupyter notebooks ? In jupyter lab , do I add all the files to the same folder when I upload ? Or do I upload the zip directly ? Once that’s done how do I invoke the file ? Do I just open the file like normal ?
Sorry for bothering you.
You should have a friend, “Google”.
If you install JupyterLab, then, you can select a file to invoke from the left pane, a file browser, which is similar to an explorer/finder. What you need is to unzip file to your favorite location. Then, you can easily select any jupyter notebook. You do not need to care anything, since zip file has the right directory structure.
Once conda environment is set up, you can try as you like. It should be OK for you to fail for any, since a virtual environment created by conda can be easily destroyed without any impact on your local system. That’s the advantage of conda.
By the way, what do you mean with “upload” ? Do you want to upload your file to the Coursera platform ? In that case, just uploading a Jupyter notebook should be OK.
But, there will be lots of challenges, since basically you need to install several libraries to be equivalent to the Coursera platform to make a local copy of Jupyter notebook run correctly. Of course, some of assignments work on your default local environment, but, some of them do not. All are at your risk.
Thanks for the quick reply. By upload , I meant other files like h5 dataset. Once I open the ipynb file from y local jupyter, how does one link files to the program. For instance in the program , the dataset is called using some code. Since I am not using coursera jupyter, wont this be different for me. Don’t I need to upload all the files to the local jupyter.
This is all very confusing me for me since I am a novice. Also how do you need which libraries are missing/required for each assignment. Why is this process so hard. Isn’t this necessary to learn deep learning properly ? What happens after the course, do you remember all the coding stuff ? Assuming I take 5 months to finish the specialization, how much will I remember of the coding part without saving the notebooks for future reference. Is this process necessary , how many students do it. Can you succeed in future deep learning endeavours without saving the coding assignments for reference and refreshing your memories.
Thanks.
You mixed up upload and download. In general, “upload” is to transfer file from your file system to a server system. “download” is to transfer a file in a server (coursera) to your local system.
Again, all required file are in zip file. Why don’t you try that ?
Also how do you need which libraries are missing/required for each assignment. Why is this process so hard.
If you kick “!pip list” from a cell in a notebook on Coursera Platform you will see the list of packages.
Your local environment will be different. Of course, you can go ahead, but if it does not run, then, you need to check these packages one-by-one. Those are packages that you need to install/update by yourself.
Package Version
---------------------- -------------------
alembic 1.4.2
async-generator 1.10
attrs 19.3.0
backcall 0.1.0
beautifulsoup4 4.9.0
bleach 3.1.4
blinker 1.4
bokeh 2.0.1
Bottleneck 1.3.2
brotlipy 0.7.0
certifi 2020.4.5.1
certipy 0.1.3
cffi 1.14.0
chardet 3.0.4
click 7.1.2
cloudpickle 1.4.1
conda 4.8.2
conda-package-handling 1.6.0
cryptography 2.9.2
cycler 0.10.0
Cython 0.29.17
cytoolz 0.10.1
dask 2.15.0
decorator 4.4.2
defusedxml 0.6.0
dill 0.3.1.1
distributed 2.15.2
entrypoints 0.3
fastcache 1.1.0
fsspec 0.7.3
fuzzywuzzy 0.18.0
gmpy2 2.1.0b1
h5py 2.10.0
HeapDict 1.0.1
idna 2.9
imageio 2.8.0
importlib-metadata 1.6.0
ipykernel 5.2.1
ipympl 0.5.6
ipython 7.14.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.17.0
Jinja2 2.11.2
joblib 0.14.1
json5 0.9.0
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.3
jupyter-console 6.1.0
jupyter-core 4.6.3
jupyter-telemetry 0.0.5
jupyterhub 1.1.0
jupyterlab 2.1.1
jupyterlab-server 1.1.1
kiwisolver 1.2.0
llvmlite 0.31.0
locket 0.2.0
Mako 1.1.0
MarkupSafe 1.1.1
matplotlib 3.2.1
mistune 0.8.4
mock 4.0.2
mpmath 1.1.0
msgpack 1.0.0
nbconvert 5.6.1
nbformat 5.0.6
nbgrader 0.6.1
networkx 2.4
notebook 6.0.3
numba 0.48.0
numexpr 2.7.1
numpy 1.18.4
oauthlib 3.0.1
olefile 0.46
packaging 20.1
pamela 1.0.0
pandas 1.0.3
pandocfilters 1.4.2
parso 0.7.0
partd 1.1.0
patsy 0.5.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 7.1.2
pip 20.1.1
prometheus-client 0.7.1
prompt-toolkit 3.0.5
protobuf 3.11.4
psutil 5.7.0
ptyprocess 0.6.0
pycosat 0.6.3
pycparser 2.20
pycurl 7.43.0.5
Pygments 2.6.1
PyJWT 1.7.1
pyOpenSSL 19.1.0
pyparsing 2.4.7
pyrsistent 0.16.0
PySocks 1.7.1
python-dateutil 2.8.1
python-editor 1.0.4
python-json-logger 0.1.11
pytz 2020.1
PyWavelets 1.1.1
PyYAML 5.3.1
pyzmq 19.0.0
qtconsole 4.7.4
QtPy 1.9.0
requests 2.23.0
ruamel-yaml 0.15.80
ruamel.yaml 0.16.6
ruamel.yaml.clib 0.2.0
scikit-image 0.16.2
scikit-learn 0.22.2.post1
scipy 1.4.1
seaborn 0.10.1
Send2Trash 1.5.0
setuptools 46.1.3.post20200325
six 1.14.0
sortedcontainers 2.1.0
soupsieve 1.9.4
SQLAlchemy 1.3.16
statsmodels 0.11.1
sympy 1.5.1
tables 3.6.1
tblib 1.6.0
terminado 0.8.3
testpath 0.4.4
toolz 0.10.0
tornado 6.0.4
tqdm 4.45.0
traitlets 4.3.3
typing-extensions 3.7.4.2
urllib3 1.25.9
vincent 0.4.4
wcwidth 0.1.9
webencodings 0.5.1
wheel 0.34.2
widgetsnbextension 3.5.1
xlrd 1.2.0
zict 2.0.0
zipp 3.1.0
Again, and again, you can download all files for your reference.
But, making all run in your environment requires 3-5 conda environment to install different packages in different conda environment. That’s my local environment.
So, my recommendation is,
- set up conda environment (anaconda may be easier for you since it has a user interface. Also anaconda has Jupyter notebook, Jupyter lab, R and others as install options.
- download zip file from Coursera platform, and unzip to your favorite location.
- Kick Jupyter Lab on one of your conda environment, and select notebook file.
I believe important thing is that you have an environment that you can see notebooks. So, you can recall whatever you did, even that notebook does not run on your local environment.
Sorry for the late reply, I was on a vacation. I will try the stuff you have suggested. Thanks a lot for your help.