The course is part of this learning path
Introduction to Deep Learning
In this Zero to Deep Learning course has been expertly created to provide you with a strong foundation in machine learning and deep learning. So whether you're just starting out with your practice of machine learning or you're a more experienced data scientist that is adding deep learning to the mix, this course will provide the necessary skills to serve as a solid foundation for you to continue learning after the course has been completed.
The course will start out covering simple data and structured data, then moving onto images, with sound, with text, and more complex data where deep learning comes to life. By the end of the course, you'll be able to recognize which problems can be solved with deep learning and organize data in a way that can be used by a neural network. Understanding and learning how to build a neural network model, including fully connected, convolutional, and recurrent neural network and train a model using cloud computing, all within this course.
This course is made up of 5 cohesive lectures that start off the journey into Data and Machine Learning with Cloud Academy.
- Learn the key principles of data and machine learning
- Come away with a strong foundation of the subject in order to develop new skills further
- Understanding and learning how to build neural network models
- No prior knowledge of data and machine learning required
Hey guys, welcome to this video. In this video we're going to see how to get all the materials necessary for this course and set up your environment in order to be able to run all the notebooks. Instructions are explained in the course repository on GitHub. So the first thing you should do is go to github.com /Dataweekends /zero_to_deep_learning_video with underscore, so zero underscore, to underscore, deep underscore, learning underscore, video. The link is also provided in the notes of this lecture so just go to that link and if you've never used GitHub or Git before, you should go ahead and install Git first or you can also retrieve the material there in a zip format. We don't recommend doing that because in that way you will not have the updates available. You're essentially downloading a snapshot of the course, so it's much better to get familiar with Git and use that. So I'm going to demonstrate how to set up your computer. I'll do that both for Mac and for Windows. So sometimes I will switch environment going from Mac to Windows so that you can see how to do it in both environments. So the first thing, here's all the material. The first thing we have to do is clone the repository on our computer. So how do we do that? Here there is a link and we copy the link. Then you open a Terminal if you are on Mac, so just type Terminal and that should open a Terminal. So in the Terminal you type git clone and the url. And this will clone the repository. Should be pretty fast. You do exactly the same thing on Windows. The only difference is you type C-M-D instead of Terminal. You open a command prompt and in the command prompt you type the very same thing: git clone and the link will repo. Downloads as well. Perfect. So let's see what the next step is. Next step is to download and install Anaconda. This we've already gone through in a previous lecture so I will not do. So next step is cd to the course folder. So I go back to my terminal and cd to zero to deep learning. Windows, same thing. I cd to zero to deep learning. Perfect. So I'm inside the zero to deep learning folder. Next step is to create the course environment. Now what does this mean?
There is a file and I'm going to show you here, there is an environment file in the repository. So let's have a look at this file. This file, and I'm going to make it a little bigger so we can all see, this file contains the specification of all the python packages that we're going to need, as well as the python executable that we're going to use. So as you can see it contains the name of the environment, Z-D-T-L, stands for Zero To Deep Learning. This is not really important, it's just the name. The channels that we're going to use to download our packages and then the dependencies. So we have Python 3.5, we rolled back the version from 3.6 to 3.5 to make sure that Windows users can also install TensorFlow in the easiest possible way. And then we have the necessary packages: We have Pip; we have NumPy, it's the package for linear algebra; we have Jupyter, which is the notebook environment we will use for our notebooks; matplotlib, the plotting library; scikit-learn, the machine learning library; SciPy, it contains a lot of optimization algorithims; we have pandas that you can think of as Excel for Python, essentially, so it's a tabular beta frame. Very versatile library, we'll use it a lot. Pillow is a Python image library in the version for Python 3. So PIL, the standard Python image library is only available for Python 2 and there is a fork called Pillow that provides the Python image library for Python 3. And finally, h5py is a compression library to manage certain types of binary files that we will use to save weights on our disk.
Then we have a few dependencies from Pip because these are not available in the latest version of Anaconda: We have TensorFlow the bleeding edge 1.1 and Keras 2.0 bleeding edge as well. So these are the dependencies of the course, so you could obviously go ahead and install them manually, but we've created this nice environment file that makes it much easier to install. So how does it work? You go back to your terminal and just type conda env create. So if I go back to my terminal here and do conda env create and this will download all the necessary packages and install them in a compartmentalized environment. So while it's downloading on Mac, I'll go to Windows and do exactly the same. So I switched to Windows here and I do conda env create and then type enter. This is Windows 10 on Paperspace which is a super cool company that provides virtual computers. I strongly recommend you guys check it out. And as you can see I'm downloading the dependencies on Windows as well. So this may take some time depending on how fast your connection is, so I'll come back once this is finished. Okay so it's completed creating the environment. Here I'm on the Mac computer and as you can see, it concluded saying successfully installed Keras-2.0 and a bunch of other packages including TensorFlow 1.1. And in here it says, and this is an important part, "To activate this environment, use: source activate ztdl", which is the same command that we have to do next as explained in the repository. So I'm going to go ahead here on Mac and say source activate ztdl and what you will notice is that now my prompt has changed and it says ztdl in parentheses at the beginning.
This tells me that I am in the correct environment, that I've correctly activated the environment. If I want to deactivate it just type source deactivate ztdl and the prompt will change back to the original. So let's activate the environment, so activate ztdl. And I'm going to do the same on Windows. The difference here, you see it successfully installed Keras 2.0, etc. This is Windows 10. And I don't have to source here, just type activate ztdl. So activate ztdl and here too, the prompt will change and say ztdl at the beginning. Again, if I want to deactivate it just say deactivate ztdl and the prompt changes back to normal. Okay so let's activate the environment here and see what the next step is. So I go back to my browser here it's Windows. The prompt has changed, fantastic. So my next step is to launch Jupyter Notebook. So from the Terminal I'll say Jupyter Notebook and it's important here that we've installed Jupyter inside our environment because this way we're sure that the environment is using Jupyter from within the environment. So I go to Windows, do the same thing. I type jupyter notebook and it will launch a browser as you will see the Terminal that has the server of Jupyter and the browser has my Jupyter Notebook. So this is my browser on Windows, this is my browser on Mac. They both show exactly the same thing so from here on the content is the same. Now I'm going to show you how to make sure that you have installed and are running the environment correctly. So we've added this little notebook in the course directory that says 0 check environment and I'm going to run it to show you how to make sure that you are correctly running the environment. So the first cell of this notebook checks that... So the first cell of this notebook checks that you are effectively from running within the environment. So it imports the executable, which is the Python executable you're running and we print the location of the executable.
So you should see something like envs ztdl that tells you you're within the environment. This will change, your username will be different, this may be Anaconda 3 or Anaconda, but the important part is that you see that Python is inside the ztdl folder as a subfolder of envs. If you're on a Mac it will also show that Python is in envs ztdl bin. Again, your home folder will be different depending on what's your username, but the important part is that Python should be inside the ztdl environment. Okay, if this is not true you should close this and make sure you actually have activated your environment. So in your prompt you should make sure that there is the little ztdl within parentheses. So if it's not there, stop Jupyter and make sure to activate or source activate ztdl. Okay the next cell is checking that we are actually running Python 3.5. So we check the system version and this is 3.5. The minor version doesn't matter, this will change in the future, but we need to be on 3.5. The other thing we need to make sure is that we are running Python from Continuum Analytics, so not the system Python but the Python from Continuum Analytics. All the other information may change in the future, you know the type of compiler and the date. The important pieces of information are that it's 3.5 and that it's on Continuum Analytics.
The next thing we are going to do is check that we are running Jupyter from within the environment itself. We import Jupyter and we make sure that it's also from within the environment. So the important thing is that here we see again the envs ztdl folder to appear in the path that leads to Jupyter. So if you're on Mac this will show envs ztld and the rest of the url will be different, but it's important that we see these two folders. Okay the next thing we are going to do is to check that we've correctly installed all the other packages. So we import all these packages that we've installed in the environment, including PIL and sklearn which we installed as Pillow and SciKit-Learn but the import is slightly different, and we check that the versions match the required ones. So if everything goes right, what you should see is Using TensorFlow backend Houston we are go. So if you've completed that and it shows this, congratulations. You are done.
This is what it should be. If it doesn't show this, then you will have to troubleshoot the error. So let's go back to the repo to see what could be the best way to troubleshoot an error. So in the final part of the README there is troubleshooting installation, and it says, if you don't see Houston we are go, try to delete the environment and restart again. So you're going to close the browser, terminate Jupyter Notebook by typing control-c. So this will close the notebook. Deactivate the environment by saying deactivate ztdl, if you are on Mac you will type source deactivate ztdl. And then you are going to remove the environment. So you are going to type conda remove
- y for yes - n for name ztdl - - all. So we are removing the environment ztdl and we are also going to clean Anaconda. So once this is finished you're going to type conda clean - - all. And this will remove all the cached packages, you just answer yes. Don't worry it will not delete things that you still need but it will delete all the cached, old packages. So once this is done you will recreate the environment from scratch. So conda env create and it will re-download all the necessary packages and once it's done it will prompt you to activate the environment and you can restart. If this does not work still, the last trick you can try is update conda itself by typing conda update conda. And if it still doesn't work then definitely write us on the Q and A forum, ask us for guidance. We're very happy to help you guys troubleshoot whatever problems you may have. We want to make sure that everybody's able to follow the course. And so yes, send us questions we will be very happy to help you guys get started. So thank you for watching, I hope this was useful. See you in the next video.
About the Author
I am a Data Science consultant and trainer. With Catalit I help companies acquire skills and knowledge in data science and harness machine learning and deep learning to reach their goals. With Data Weekends I train people in machine learning, deep learning and big data analytics. I served as lead instructor in Data Science at General Assembly and The Data Incubator and I was Chief Data Officer and co-founder at Spire, a Y-Combinator-backed startup that invented the first consumer wearable device capable of continuously tracking respiration and activity. I earned a joint PhD in biophysics at University of Padua and Université de Paris VI and graduated from Singularity University summer program of 2011.