markdown fastai 2018课程笔记
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown fastai 2018课程笔记相关的知识,希望对你有一定的参考价值。
Notes for fast.ai's [deep learning course, part 1, 2018 edition](http://course.fast.ai/).
- [Notes for the 2018 course](https://github.com/reshamas/fastai_deeplearn_part1) & [timeline](http://forums.fast.ai/t/part-1-v2-complete-collection-of-video-timelines/11183)
- [fast.ai forums](http://forums.fast.ai/), [Part 1, 2018 forums](http://forums.fast.ai/c/part1-v2)
# Lesson 1: Cats & Dogs
[Lesson 1](http://course.fast.ai/lessons/lesson1.html), [wiki](http://forums.fast.ai/t/wiki-lesson-1/9398)
- why fast.ai?
- fastai is top down, starts with code which does stuff, then slowly peels it back.
- recommends getting to the end of all lessons then going through again as many times as needed to spend more time on things missed, rather than going slow.
- so first up, setup a gpu machine to run code on
- [Paperspace](https://github.com/reshamas/fastai_deeplearn_part1/blob/master/tools/paperspace.md)
- Amazon EC2 - use [AWS Deep Learning AMI (Ubuntu)](https://aws.amazon.com/marketplace/pp/B077GCH38C)
- [Google Cloud](https://medium.com/@howkhang/ultimate-guide-to-setting-up-a-google-cloud-machine-for-fast-ai-version-2-f374208be43)
Once setup, update the OS and fastai repo:
```
# update the machine OS
sudo apt update
sudo apt upgrade
conda install -c conda-forge jupyterlab # install jupyterlab
# make sure the fastai git repo is up to date
git pull # run this inside the fastai folder
conda env update # updates the fastai env
conda activate fastai # activates fastai env
```
- [Lesson 1: Image classification with Convolutional Neural Networks](https://github.com/fastai/fastai/blob/master/courses/dl1/lesson1.ipynb)
- first up, we learn how to classify images, with both single and multi-label ones.
- stochastic gradient descent with restarts (SGDR) lowers the learning rate as the model learns, with periodic ‘jumps’ to ensure it doesn’t get stuck in a local minima
- the fast.ai library has a `lr.find()` method to help find an optimal learning rate. This starts at a very low lr and keeps increasing it until the loss stops decreasing.
- augment data with the `tfms_from_model()` method, with the transformations to perform passed in with `aug_tfms=`
- homework: recreate my own versions of the fastai notebooks
- note: the fastai library is frequently updated so `git pull` it from github instead of installing it using pip. to use the fastai library in my own github repo,create a symlink from the folder containing jupyter notebooks to the library like so `ln -s /path/to/fastai/fastai` and import things as per the fastai notebooks.
- deep learning
- A lot of things are very hard, like figuring out cancer cells in pathology slides.
- you needed a lot of domain expertise and smart computer programmers to code algorithims and so on, and it took years of work
- what DL models give us is a infinitely flexible function which can learn features/parameters directly from data in a fast and scalable way. Its fits these parameters to the data by using a loss function - often gradient descent, which modifies the parameters so they better predict our data
- in a ways, for certain classes of problems ML is a [universal approximation function]
- this is all made possible becuase of cheap GPUs, which are super fast at crunching numbers
- Google is using deep learning everywhere
以上是关于markdown fastai 2018课程笔记的主要内容,如果未能解决你的问题,请参考以下文章
GCP 实例中的 jupyter 笔记本无法导入 wget 或 fastai