In O'Reilly "Deep Learning from scratch ~ The theory and implementation of deep learning learned with Python ~", the sample code is on GitHub, but I left it because I had a little trouble when implementing it with Google Colab. I think there is a better way, but now that it's ready to use, please take a look. Also, please understand that there may be mistakes in the usage of terms. By the way, it is the method in windows10.
I am also a super beginner writing this article, so I will write it carefully. Also, I was not good at the word "clone" locally, so I would like to explain it by chewing as much as possible. (Please note that the meaning is slightly different.) Let's go.
First of all, cloning locally means copying the sample code to a folder on your PC and bringing it to you. You can check the sample code you want to copy this time from the following URL. https://github.com/oreilly-japan/deep-learning-from-scratch
To clone the GitHub code, you need a software called Git. Please see other very easy-to-understand sites for how to install. I referred to this site. https://eng-entrance.com/git-install#i-3
After that, clone GitHub after installation and initial setup. This time I want to clone on the page I posted earlier, so I will go to the URL above. Something like this. Then, when you press the green tab on the right side of the center of the screen, a pop-up like the one above will appear, so copy it. After copying, open Git Bash. I think Git Bash is inside Git by opening the windows mark at the bottom left of the screen.
After opening Git Bash, type in the following code.
GitBash
cd projects
git clone https://github.com/oreilly-japan/deep-learning-from-scratch.git
You should now be able to clone locally. Try catching your own folder.
First, put the entire folder that you cloned into the folder on your PC into My Drive of Google Drive. Then open Google Colab. I think there are about 3 tabs on the left side of Google Colab, but press the folder mark at the bottom. When you open it, there is a button that says "Mount Drive", so press it. Do you want to allow it? A pop-up like this will appear, so allow it. However, there is a hierarchical structure of drives. Something like this. (Sorry for the cluttered screen ...) In this My Drive, there is a folder called "deep-learning-from-scratch" that I put in earlier. If you haven't changed the name, it should be this name.
When you open My Drive, the file should be there, so when you hit the pointer, three black dots will line up on the left end, so press it. Then, the path will be copied, so press it. Then type the following code in the cell on the right.
cell
cd(What I just copied)
When actually writing, omit (). This code will work where I have this file from now on! about it. If you don't do this, you'll get an error saying that some modules you don't know when you copy and run your code. You should now be able to copy and paste the code.
I think this article is full of highlights, but thank you for reading to the end.
Recommended Posts