Learn while making! Development deep learning by PyTorch https://book.mynavi.jp/ec/products/detail/id=104855
In "Chapter 1 Image Classification and Transfer Learning".
It was troublesome to create a separate environment in my terminal, so I implemented it with Google Colaboratory. Keep a memorandum of what you checked at that time
Upload the folder downloaded from git (it is easier to do it locally until Make) to Google Drive, and start the Notebook file from the drive. In this state, the drive is not recognized, so you need to mount it.
#Check the current path
import os
print(os.getcwd())
!ls
#mount
from google import colab
colab.drive.mount('/content/gdrive')
You will be asked to authenticate, so authenticate and enter the authorization code
#Move folder
os.chdir('gdrive/My Drive/Colab Notebooks/20200126_pytorch/pytorch_advanced/1_image_classification')
!ls
Now that you can process with the same path structure as a book, let's try it. If you want to use GPU, change "Runtime" to GPU torch.cuda.is_available() OK if you can confirm that is True. It can be processed by GPU.
Recommended Posts