├── .github
└── workflows
│ └── deploy.yaml
├── .gitignore
├── .nojekyll
├── CAM.ipynb
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── README_bn.md
├── README_es.md
├── README_id.md
├── README_it.md
├── README_ko.md
├── README_pt.md
├── README_vn.md
├── README_zh.md
├── _quarto.yml
├── accel_sgd.ipynb
├── app_blog.ipynb
├── app_jupyter.ipynb
├── arch_details.ipynb
├── book10.qmd
├── book11.qmd
├── book12.qmd
├── book15.qmd
├── book18.qmd
├── book19.qmd
├── book2.qmd
├── book20.qmd
├── book3.qmd
├── book5.qmd
├── book6.qmd
├── book7.qmd
├── book8.qmd
├── book9.qmd
├── collab.ipynb
├── conclusion.ipynb
├── convolutions.ipynb
├── cover.png
├── ethics.ipynb
├── foundations.ipynb
├── images
├── 0_jupyter.png
├── Dropout.png
├── Dropout1.png
├── LSTM.png
├── analytics_chain.gif
├── att_00000.png
├── att_00001.png
├── att_00002.png
├── att_00003.png
├── att_00004.png
├── att_00005.png
├── att_00006.png
├── att_00007.png
├── att_00008.png
├── att_00009.png
├── att_00010.png
├── att_00011.png
├── att_00012.png
├── att_00013.png
├── att_00014.png
├── att_00015.png
├── att_00016.png
├── att_00017.png
├── att_00018.png
├── att_00019.png
├── att_00020.png
├── att_00021.png
├── att_00022.png
├── att_00023.png
├── att_00024.png
├── att_00025.png
├── att_00026.png
├── att_00027.png
├── att_00028.png
├── att_00029.png
├── att_00030.png
├── att_00031.png
├── att_00032.png
├── att_00033.png
├── att_00034.png
├── att_00035.png
├── att_00036.png
├── att_00037.png
├── att_00038.png
├── att_00039.png
├── att_00040.png
├── att_00041.png
├── att_00042.png
├── att_00043.png
├── att_00044.png
├── att_00045.png
├── att_00046.png
├── att_00047.png
├── att_00048.png
├── att_00049.png
├── att_00050.png
├── att_00051.png
├── att_00052.png
├── att_00053.png
├── att_00054.png
├── att_00055.png
├── att_00056.png
├── att_00057.png
├── att_00058.png
├── att_00059.png
├── att_00060.png
├── att_00061.png
├── att_00062.png
├── att_00063.png
├── att_00064.png
├── att_00065.png
├── att_00066.png
├── att_00067.png
├── att_00068.png
├── att_00069.png
├── att_00070.png
├── att_00071.png
├── chapter1_add.png
├── chapter1_busy.png
├── chapter1_cat_example.jpg
├── chapter1_markdown.png
├── chapter1_new_notebook.png
├── chapter1_run.png
├── chapter1_save.png
├── chapter1_terminal.png
├── chapter2_bouncing.PNG
├── chapter2_bouncy.svg
├── chapter2_derivative.PNG
├── chapter2_div.svg
├── chapter2_layer3.PNG
├── chapter2_layer4and5.PNG
├── chapter2_perfect.svg
├── chapter2_sgd.PNG
├── chapter2_small.svg
├── chapter4_1cycle_schedule.png
├── chapter4_overfit.png
├── chapter7_neuron.png
├── chapter9_baseconv.svg
├── chapter9_bottleneck.png
├── chapter9_cat_conv.png
├── chapter9_conv_basic.png
├── chapter9_conv_pad.png
├── chapter9_conv_rgb.png
├── chapter9_conv_stride.png
├── chapter9_loss_landscape.png
├── chapter9_nopadconv.svg
├── chapter9_padconv.svg
├── chapter9_rgb_conv_stack.svg
├── chapter9_rgbconv.svg
├── chapter9_skip_connection.png
├── chapter9_strideconv.svg
├── colorful_dist.jpeg
├── colorful_summ.png
├── cover.png
├── decision_tree.PNG
├── dl4c.jpg
├── doc_ex.png
├── driver.PNG
├── drivetrain-approach.png
├── ethics
│ ├── image1.png
│ ├── image10.png
│ ├── image11.png
│ ├── image12.png
│ ├── image13.png
│ ├── image14.png
│ ├── image15.jpeg
│ ├── image16.png
│ ├── image17.jpeg
│ ├── image17.png
│ ├── image18.jpeg
│ ├── image2.png
│ ├── image3.jpeg
│ ├── image4.png
│ ├── image5.png
│ ├── image6.png
│ ├── image7.png
│ ├── image8.png
│ ├── image9.jpeg
│ └── pipeline_diagram.svg
├── fast_template
│ ├── image1.png
│ ├── image10.png
│ ├── image11.png
│ ├── image12.png
│ ├── image13.png
│ ├── image14.png
│ ├── image15.png
│ ├── image16.png
│ ├── image2.png
│ ├── image3.png
│ ├── image4.png
│ ├── image5.png
│ ├── image6.png
│ ├── image7.png
│ ├── image8.png
│ └── image9.png
├── fltscale.svg
├── gitblog
│ ├── commit.png
│ ├── image1.png
│ ├── image2.png
│ ├── image3.png
│ ├── image4.png
│ └── image5.png
├── grad_illustration.svg
├── grizzly.jpg
├── healthy_skin.gif
├── layer1.png
├── layer2.png
├── matmul2.svg
├── mnist3_xl.gif
├── mnist3_xl_300.gif
├── mnist3_xl_custom.gif
├── pratchett.png
├── profit_drivers.gif
├── sklearn_features.png
├── tarsier.png
├── timeseries1.png
├── timeseries2.png
└── timeseries3.png
├── index.qmd
├── intro.ipynb
├── learner.ipynb
├── midlevel_data.ipynb
├── mnist_basics.ipynb
├── multicat.ipynb
├── nlp.ipynb
├── nlp_dive.ipynb
├── pet_breeds.ipynb
├── production.ipynb
├── references.bib
├── references.qmd
├── resnet.ipynb
├── settings.ini
├── sizing_and_tta.ipynb
├── styles.css
├── tabular.ipynb
└── tools
├── clean.py
└── fix_imgs.ipynb
/.github/workflows/deploy.yaml:
--------------------------------------------------------------------------------
1 | name: Deploy to GitHub Pages
2 | on:
3 | push:
4 | branches: [master]
5 | workflow_dispatch:
6 | jobs:
7 | deploy:
8 | runs-on: ubuntu-latest
9 | steps:
10 | - uses: actions/checkout@v3
11 | - name: Install quarto
12 | run: |
13 | wget -q $(curl https://latest.fast.ai/pre/quarto-dev/quarto-cli/linux-amd64.deb)
14 | sudo dpkg -i quarto*.deb
15 | rm quarto*.deb
16 | quarto render
17 | - name: Deploy to GitHub Pages
18 | uses: peaceiris/actions-gh-pages@v3
19 | with:
20 | github_token: ${{ github.token }}
21 | force_orphan: true
22 | publish_dir: ./_book
23 | user_name: github-actions[bot]
24 | user_email: 41898282+github-actions[bot]@users.noreply.github.com
25 |
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | _book/
3 | /.quarto/
4 | .gitattributes
5 | models/
6 | tmp/
7 | *.bak
8 | *.pkl
9 | bears/
10 | __pycache__/
11 | .last_checked
12 | .gitconfig
13 | .ipynb_checkpoints/
14 |
--------------------------------------------------------------------------------
/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/.nojekyll
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to make participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, gender identity and expression, level of experience,
9 | education, socio-economic status, nationality, personal appearance, race,
10 | religion, or sexual identity and orientation.
11 |
12 | Examples of unacceptable behavior by participants include:
13 |
14 | * The use of sexualized language or imagery and unwelcome sexual attention or
15 | advances
16 | * Trolling, insulting/derogatory comments, and personal or political attacks
17 | * Public or private harassment
18 | * Publishing others' private information, such as a physical or electronic
19 | address, without explicit permission
20 |
21 | These examples of unacceptable behaviour are requirements; we will not allow them
22 | in any fast.ai project, including this one.
23 |
24 | ## Our Standards
25 |
26 | Examples of behavior that contributes to creating a positive environment
27 | include:
28 |
29 | * Using welcoming and inclusive language
30 | * Being respectful of differing viewpoints and experiences
31 | * Gracefully accepting constructive criticism
32 | * Focusing on what is best for the community
33 | * Showing empathy towards other community members
34 |
35 | These examples are shown only to help you participate effectively -- they are not
36 | requirements, just requests and guidance.
37 |
38 | ## Our Responsibilities
39 |
40 | Project maintainers are responsible for clarifying the standards of acceptable
41 | behavior and are expected to take appropriate and fair corrective action in
42 | response to any instances of unacceptable behavior.
43 |
44 | Project maintainers have the right and responsibility to remove, edit, or
45 | reject comments, commits, code, wiki edits, issues, and other contributions
46 | that are not aligned to this Code of Conduct, or to ban temporarily or
47 | permanently any contributor for other behaviors that they deem inappropriate,
48 | threatening, offensive, or harmful.
49 |
50 | ## Scope
51 |
52 | This Code of Conduct applies both within project spaces and in public spaces
53 | when an individual is representing the project or its community. Examples of
54 | representing a project or community include using an official project e-mail
55 | address, posting via an official social media account or acting as an appointed
56 | representative at an online or offline event. Representation of a project may be
57 | further defined and clarified by project maintainers.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing or otherwise unacceptable behavior may be
62 | reported by contacting the project team at info@fast.ai. All
63 | complaints will be reviewed and investigated and will result in a response that
64 | is deemed necessary and appropriate to the circumstances. The project team is
65 | obligated to maintain confidentiality with regard to the reporter of an incident.
66 | Further details of specific enforcement policies may be posted separately.
67 |
68 | Project maintainers who do not follow or enforce the Code of Conduct in good
69 | faith may face temporary or permanent repercussions as determined by other
70 | members of the project's leadership.
71 |
72 | ## Attribution
73 |
74 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
76 |
77 | [homepage]: https://www.contributor-covenant.org
78 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md) / [Portuguese](./README_pt.md) / [Vietnamese](./README_vn.md)
2 |
3 | # The fastai book
4 |
5 | These notebooks cover an introduction to deep learning, [fastai](https://docs.fast.ai/), and [PyTorch](https://pytorch.org/). fastai is a layered API for deep learning; for more information, see [the fastai paper](https://www.mdpi.com/2078-2489/11/2/108). Everything in this repo is copyright Jeremy Howard and Sylvain Gugger, 2020 onwards.
6 |
7 | These notebooks are used for [a MOOC](https://course.fast.ai) and form the basis of [this book](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), which is currently available for purchase. It does not have the same GPL restrictions that are on this repository.
8 |
9 | The code in the notebooks and python `.py` files is covered by the GPL v3 license; see the LICENSE file for details. The remainder (including all markdown cells in the notebooks and other prose) is not licensed for any redistribution or change of format or medium, other than making copies of the notebooks or forking this repo for your own private use. No commercial or broadcast use is allowed. We are making these materials freely available to help you learn deep learning, so please respect our copyright and these restrictions.
10 |
11 | If you see someone hosting a copy of these materials somewhere else, please let them know that their actions are not allowed and may lead to legal action. Moreover, they would be hurting the community because we're not likely to release additional materials in this way if people ignore our copyright.
12 |
13 | ## Colab
14 |
15 | Instead of cloning this repo and opening it on your machine, you can read and work with the notebooks using [Google Colab](https://research.google.com/colaboratory/). This is the recommended approach for folks who are just getting started -- there's no need to set up a Python development environment on your own machine, since you can just work directly in your web-browser.
16 |
17 | You can open any chapter of the book in Colab by clicking on one of these links: [Introduction to Jupyter](https://colab.research.google.com/github/fastai/fastbook/blob/master/app_jupyter.ipynb) | [Chapter 1, Intro](https://colab.research.google.com/github/fastai/fastbook/blob/master/01_intro.ipynb) | [Chapter 2, Production](https://colab.research.google.com/github/fastai/fastbook/blob/master/02_production.ipynb) | [Chapter 3, Ethics](https://colab.research.google.com/github/fastai/fastbook/blob/master/03_ethics.ipynb) | [Chapter 4, MNIST Basics](https://colab.research.google.com/github/fastai/fastbook/blob/master/04_mnist_basics.ipynb) | [Chapter 5, Pet Breeds](https://colab.research.google.com/github/fastai/fastbook/blob/master/05_pet_breeds.ipynb) | [Chapter 6, Multi-Category](https://colab.research.google.com/github/fastai/fastbook/blob/master/06_multicat.ipynb) | [Chapter 7, Sizing and TTA](https://colab.research.google.com/github/fastai/fastbook/blob/master/07_sizing_and_tta.ipynb) | [Chapter 8, Collab](https://colab.research.google.com/github/fastai/fastbook/blob/master/08_collab.ipynb) | [Chapter 9, Tabular](https://colab.research.google.com/github/fastai/fastbook/blob/master/09_tabular.ipynb) | [Chapter 10, NLP](https://colab.research.google.com/github/fastai/fastbook/blob/master/10_nlp.ipynb) | [Chapter 11, Mid-Level API](https://colab.research.google.com/github/fastai/fastbook/blob/master/11_midlevel_data.ipynb) | [Chapter 12, NLP Deep-Dive](https://colab.research.google.com/github/fastai/fastbook/blob/master/12_nlp_dive.ipynb) | [Chapter 13, Convolutions](https://colab.research.google.com/github/fastai/fastbook/blob/master/13_convolutions.ipynb) | [Chapter 14, Resnet](https://colab.research.google.com/github/fastai/fastbook/blob/master/14_resnet.ipynb) | [Chapter 15, Arch Details](https://colab.research.google.com/github/fastai/fastbook/blob/master/15_arch_details.ipynb) | [Chapter 16, Optimizers and Callbacks](https://colab.research.google.com/github/fastai/fastbook/blob/master/16_accel_sgd.ipynb) | [Chapter 17, Foundations](https://colab.research.google.com/github/fastai/fastbook/blob/master/17_foundations.ipynb) | [Chapter 18, GradCAM](https://colab.research.google.com/github/fastai/fastbook/blob/master/18_CAM.ipynb) | [Chapter 19, Learner](https://colab.research.google.com/github/fastai/fastbook/blob/master/19_learner.ipynb) | [Chapter 20, conclusion](https://colab.research.google.com/github/fastai/fastbook/blob/master/20_conclusion.ipynb)
18 |
19 |
20 | ## Contributions
21 |
22 | If you make any pull requests to this repo, then you are assigning copyright of that work to Jeremy Howard and Sylvain Gugger. (Additionally, if you are making small edits to spelling or text, please specify the name of the file and a very brief description of what you're fixing. It's difficult for reviewers to know which corrections have already been made. Thank you.)
23 |
24 | ## Citations
25 |
26 | If you wish to cite the book, you may use the following:
27 |
28 | ```
29 | @book{howard2020deep,
30 | title={Deep Learning for Coders with Fastai and Pytorch: AI Applications Without a PhD},
31 | author={Howard, J. and Gugger, S.},
32 | isbn={9781492045526},
33 | url={https://books.google.no/books?id=xd6LxgEACAAJ},
34 | year={2020},
35 | publisher={O'Reilly Media, Incorporated}
36 | }
37 | ```
38 |
39 |
--------------------------------------------------------------------------------
/README_bn.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # fastai বই
5 |
6 | এই নোটবুকগুলি প্রারম্ভিক ডীপ লার্নিং, [fastai](https://docs.fast.ai/), এবং [PyTorch](https://pytorch.org/) কভার করে। fastai হল ডীপ লার্নিং -এর জন্য একটি স্তরবিশিষ্ট API; আরও জানার জন্য [fastai পেপারটি](https://www.mdpi.com/2078-2489/11/2/108) দেখুন। এই রেপোর অন্তর্ভুক্ত সমস্তকিছুর স্বত্ব ২০২০ সাল থেকে জেরেমি হাওয়ার্ড ও সিলভ্যাঁ গাগার দ্বারা রক্ষিত।
7 |
8 | এই নোটবুকগুলি [একটি MOOC -এ](https://course.fast.ai) ব্যবহৃত হয় এবং এগুলি [এই বইটার](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527) ভিত্তি, যা এখন কিনতে পাওয়া যাচ্ছে। এই খসড়ার অন্তর্ভুক্ত বিষয়বস্তু GPL লাইসেন্সের আওতাধীন, কিন্তু বইটি GPL লাইসেন্সের বাঁধাধরার আওতাভুক্ত নয়।
9 |
10 | এই নোটবুকগুলিতে ব্যবহৃত কোড এবং পাইথন `.py` ফাইলগুলি GPL v3 লাইসেন্সের আওতাধীন। আরও জানার জন্য LICENSE ফাইলটি দেখুন।
11 |
12 | বাদবাকি সমস্তকিছুর (নোটবুকের সমস্ত মার্কডাউন সেল এবং অন্যান্য টেক্সটের) কোনরকম পুনর্বিতরণ বা তাদের আকার বা মাধ্যমের কোনরকম পরিবর্তন অনুমোদিত নয়। তবে এই নোটবুকগুলিকে ব্যক্তিগত ব্যবহারের প্রয়োজনে কপি করা যেতে পারে, বা রেপোটিকে ফর্ক করা যেতে পারে। এই নোটবুকগুলি ব্যবসায়িক উদ্দেশ্যে ব্যবহার করা বা কোনভাবে সম্প্রচার করা নিষিদ্ধ। আমরা আপনাদের ডীপ লার্নিং শেখায় সাহায্য করার জন্য এই মেটেরিয়ালগুলি বিনামূল্যে উপলব্ধ করছি। সুতরাং আমাদের স্বত্বাধিকারকে সম্মান করুন, এবং বিধিনিষেধগুলিকে মান্যতা দিন।
13 |
14 | যদি আপনি এই মেটেরিয়ালগুলি বা তাদের কোন কপিকে অন্য কোথাও কারও দ্বারা হোস্টেড হতে দেখেন, তাহলে তাঁদের জানান যে তাঁদের কার্যকলাপ অনুমোদিত নয়, এবং তাঁদের বিরুদ্ধে আইনী ব্যবস্থা নেওয়া হতে পারে। উপরন্তু, তাঁরা ব্যবহারকারী গোষ্ঠীর ক্ষতিসাধন করবেন, কারণ আমাদের স্বত্বাধিকার ক্ষতিগ্রস্ত হলে আমরা এইভাবে অতিরিক্ত মেটেরিয়াল প্রকাশ করার আগে অনেকবার ভাববো।
15 |
16 | এইটা একটা শুরুর দিকের খসড়া। যদি আপনার নোটবুকগুলি রান করতে কোনরকম সমস্যা হয়, তাহলে [fastai-dev ফোরামে](https://forums.fast.ai/c/fastai-users/fastai-dev/) উত্তরের খোঁজ করুন, অথবা সাহায্যের প্রয়োজন হলে সাহায্য চান। নোটবুকগুলি রান করতে কোনরকম সমস্যা হলে তা জানানোর জন্য অনুগ্রহ করে গিটহাব ইস্যুর ব্যবহার করবেন না।
17 |
18 | আপনি যদি এই রেপোতে কোন পুল রিকোয়েস্ট তৈরি করেন, তাহলে আপনি সেই কাজের স্বত্বাধিকার জেরেমি হাওয়ার্ড এবং সিলভ্যাঁ গাগারকে অর্পণ করছেন। (আরও জেনে রাখুন- আপনি যদি বানান বা লেখায় ছোট আকারের কোন ভুল সংশোধন করতে চান, তাহলে অনুগ্রহ করে ফাইলের নাম এবং আপনার করা পরিবর্তনের একটা অতিসংক্ষিপ্ত বিবরণ যোগ করুন। রিভিউয়ারদের পক্ষে বিভিন্ন ফাইল এবং সম্পর্কিত পরিবর্তনের হিসেব রাখা কঠিন হয়ে দাঁড়াচ্ছে। ধন্যবাদ।)
19 |
--------------------------------------------------------------------------------
/README_es.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # The fastai book
5 |
6 | Una colección de Jupyter Notebooks que cubren una introducción al Deep Learning, [fastai](https://docs.fast.ai/) y [PyTorch](https://pytorch.org/). fastai es una API en capas para Deep Learning; para mayor información lea [la publicación](https://www.mdpi.com/2078-2489/11/2/108). Todos los documentos incluídos en este repositorio tienen derechos de autor para Jeremy Howard y Sylvain Gugger, desde 2020 en adelante.
7 |
8 | Estos Notebooks son usados para [el MOOC](https://course.fast.ai) (Massive Open Online Courses por sus siglas en ingles, cursos abiertos masivos en línea) y forman la base del [libro](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), el cual se encuentra actualmente disponible para su compra. El libro no tiene las mismas restricciones de GPL que se incluyen en este borrador.
9 |
10 | El código en los Notebooks y en los archivos de python `.py` está cubierto por la licencia GPL v3; consulte el archivo de LICENSE para obtener más detalles.
11 |
12 | El resto de textos (incluidas todas las celdas de Markdown en los Notebooks) no tienen licencia para su redistribución o cambio de formato o medio, más allá del uso de copias de los Notebooks o bifurcar el repositorio para uso privado. No se permite el uso comercial o de difusión. Ponemos estos materiales a su disposición de forma gratuita para ayudarle a aprender sobre Deep Learning, así que por favor respete las restricciones y nuestros derechos de autor.
13 |
14 | Si observa a alguien usando una copia de estos materiales incumpliendo la licencia, por favor infórmele que sus acciones no están permitidas y pueden dar lugar a acciones legales. Además, estarían perjudicando a la comunidad porque es probable que dejemos de publicar materiales adicionales si la gente ignora nuestros derechos de autor.
15 |
16 | Este es un borrador inicial. Si encuentra problemas ejecutando los Notebooks, podrá buscar ayuda y respuestas en el [foro fastai-dev](https://forums.fast.ai/c/fastai-users/fastai-dev/). Por favor, no utilice _GitHub issues_ para problemas relacionados con la ejecución de los Notebooks.
17 |
18 | Todo _pull request_ realizado a este repositorio queda asignado bajo derechos de autor a Jeremy Howard y Sylvain Gugger. (Además, si realiza pequeñas modificaciones en la ortografía o el texto, por favor indique el nombre del archivo y una descripción breve de lo que está corrigiendo. A los revisores les resulta cada vez más difícil saber qué correcciones ya se han realizado. Gracias).
19 |
--------------------------------------------------------------------------------
/README_id.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # Buku fastai
5 |
6 | Notebook-notebook ini membahas pengantar deep learning, [fastai](https://docs.fast.ai/), dan [PyTorch](https://pytorch.org/). fastai adalah API berlapis untuk deep learning; untuk informasi lebih lanjut, lihat [the fastai paper](https://www.mdpi.com/2078-2489/11/2/108). Semua yang ada di repo ini adalah hak cipta Jeremy Howard dan Sylvain Gugger, 2020 dan seterusnya.
7 |
8 | Notebook ini digunakan untuk [MOOC](https://course.fast.ai) dan menjadi dasar untuk [buku ini](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), yang saat ini tersedia untuk dibeli. Buku tersebut tidak memiliki batasan GPL yang sama dengan yang ada di draf ini.
9 |
10 | Kode dalam notebook dan file python `.py` dilindungi oleh lisensi GPL v3; lihat file LICENSE untuk lebih detail.
11 |
12 | Lebih dari itu (termasuk semua sel-sel markdown di notebook-notebook dan prosa lainnya) tidak dilisensikan untuk pendistribusian ulang atau perubahan format atau media, selain untuk membuat salinan dari notebook-notebook atau me-fork repo ini untuk penggunaan pribadi anda sendiri. Tidak ada penggunaan komersial atau hak siaran diperbolehkan. Kami menyediakan materi ini secara gratis untuk membantu anda mempelajari deep learning, jadi mohon harap hormati hak cipta kami dan batasan-batasan ini.
13 |
14 | Jika anda melihat seseorang menghosting salinan materi ini di tempat lain, beri tahu mereka bahwa tindakan mereka tidak diizinkan dan dapat menyebabkan tindakan hukum. Selain itu, mereka akan merugikan komunitas karena kami tidak mungkin merilis materi tambahan dengan cara ini jika orang mengabaikan hak cipta kami.
15 |
16 | Ini adalah draf awal. Jika anda mengalami kebuntuan saat menjalankan notebook, silakan cari [forum fastai-dev](https://forums.fast.ai/c/fastai-users/fastai-dev/) untuk mendapatkan jawaban, dan mintalah bantuan di sana jika diperlukan. Harap jangan gunakan GitHub issues untuk masalah menjalankan notebook.
17 |
18 | Jika anda membuat pull request apa pun ke repo ini, anda memberikan hak cipta atas karya tersebut kepada Jeremy Howard dan Sylvain Gugger. (Selain itu, jika anda membuat pengeditan kecil pada ejaan atau teks, harap sebutkan nama file dan uraian singkat perihal apa saja yang anda perbaiki. Seiring berjalannya waktu, semakin sulit bagi peninjau untuk mengetahui koreksi mana yang telah dilakukan. Terima kasih.)
19 |
20 | ## Kutipan
21 |
22 | Jika Anda ingin mengutip buku tersebut, Anda dapat menggunakan:
23 |
24 | ```
25 | @book{howard2020deep,
26 | title={Deep Learning for Coders with Fastai and Pytorch: AI Applications Without a PhD},
27 | author={Howard, J. and Gugger, S.},
28 | isbn={9781492045526},
29 | url={https://books.google.no/books?id=xd6LxgEACAAJ},
30 | year={2020},
31 | publisher={O'Reilly Media, Incorporated}
32 | }
33 | ```
--------------------------------------------------------------------------------
/README_it.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # Il libro di fastai
5 |
6 | Questi notebooks contengono un'introduzione al deep learning, [fastai](https://docs.fast.ai/), e [PyTorch](https://pytorch.org/). fastai è un API a più livelli per il deep learning; per ulteriori informazioni, si rimanda al [paper di fastai](https://www.mdpi.com/2078-2489/11/2/108). Tutto ciò che è contenuto in questa repo è copyright di Jeremy Howard e Sylvain Gugger, dal 2020 in poi.
7 |
8 | Questi notebooks sono utilizzati come [MOOC (Massive Open Online Courses)](https://course.fast.ai) e costituiscono la base di [questo libro](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), attualmente disponibile per l'acquisto. Il libro non ha le stesse restrizioni GPL presenti in questa bozza.
9 |
10 | Il codice presente nei notebook e i file python `.py` sono coperti dalla licena GPL v3; consulta il file LICENSE per maggiori dettagli.
11 |
12 | Il resto (incluse tutte le celle di markdown dei notebooks) non è concesso in licenza per alcuna ridistribuzione o cambio di formato o supporto, salvo la creazione di copie dei notebooks o fork della repo per uso privato. Non è consentito alcun uso commerciale o distributivo. Stiamo rendendo questi materiali disponibili gratuitamente per aiutarti ad apprendere il deep learning, quindi ti preghiamo di rispettare il nostro copyright e queste restrizioni.
13 |
14 | Qualora si notasse qualcuno intendo ad utilizzare una copia di questi materiali da qualche altra parte, si prega di informarlo che le sue azioni non sono consentite e potrebbero portare a un'azione legale. Inoltre, danneggerebbero la comunità perché è probabile che in questo modo non rilasceremo più materiale aggiuntivo se le persone ignorano il nostro copyright.
15 |
16 | Questa è una prima bozza. Se si incontrano difficoltà nell'eseguire i notebooks, si prega di cercare risposte nel [fastai-dev forum](https://forums.fast.ai/c/fastai-users/fastai-dev/), chiedendo aiuto lì se necessario. Si prega di non utilizzare GitHub issues per problemi relativi all'esecuzione dei notebooks.
17 |
18 | Qualsiasi pull request a questa repo assegna il copyright del lavoro a Jeremy Howard e Sylvain Gugger. (Inoltre, se si stanno apportando piccole modifiche all'ortografia o al testo, si prega di specificare il nome del file e una breve descrizione di ciò che si sta sistemando. È difficile per i revisori sapere quali correzioni sono già state apportate. Grazie.)
19 |
20 | ## Citazioni
21 |
22 | Qualora si desiderasse citare il libro, è possibile farlo nella seguente maniera:
23 |
24 | ```
25 | @book{howard2020deep,
26 | title={Deep Learning for Coders with Fastai and Pytorch: AI Applications Without a PhD},
27 | author={Howard, J. and Gugger, S.},
28 | isbn={9781492045526},
29 | url={https://books.google.no/books?id=xd6LxgEACAAJ},
30 | year={2020},
31 | publisher={O'Reilly Media, Incorporated}
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/README_ko.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # The fastai book - draft
5 |
6 | 이 draft는 [fastai](https://docs.fast.ai/), [PyTorch](https://pytorch.org/) 에 대한 소개를 다루고 있습니다. fastai는 딥러닝을 위한 레이어드 API입니다. fastai에 대한 자세한 정보는 [the fastai paper](https://www.mdpi.com/2078-2489/11/2/108) 를 참고하실 수 있습니다. 이 저장소는 2020년부터 Jeremy Howard와 Sylvain Gugger가 저작권을 갖고 있습니다.
7 |
8 | 이 노트북들은 2020년 3월부터 샌프란시스코에서 [강의하는 과정](https://www.usfca.edu/data-institute/certificates/deep-learning-part-one) 에 사용되며, 2020년 7월경부터는 MOOC 강좌로 이용할 수 있을 것입니다. 우리의 계획은 이 노트북들이 [이 책](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527) 의 기본이 되어 선주문할 수 있게 하는 것입니다. 그 책에는 이 초안에 있는 것과 같은 GPL 규제를 가지고 있지 않을 것입니다.
9 |
10 | 노트북에 포함된 코드와 python `.py` 파일의 코드는 GPL v3 라이센스로 처리됩니다. 자세한 내용은 License 파일을 참조 부탁드립니다.
11 |
12 | 나머지(노트북 및 기타 모든 마크다운 셀 포함)는 노트북의 복사본을 만들거나 개인적으로 이 리포(repo)를 요청하는 것 외에는, 형식이나 매체의 재배포 또는 변경에 대해 허가되지 않습니다. 또한, 상업적으로 사용하거나 방송용으로의 이용은 허용되지 않습니다. 딥러닝을 배우는 데 도움이 될 수 있도록 이러한 자료를 무료로 제공하고 있으니, 당사의 저작권 및 제한 조치를 따라 주세요.
13 |
14 | 다른 곳에서 이러한 자료의 사본을 호스팅하는 사람을 보게 되면, 불법 행위이며, 법적 조치로 이어질 수 있음을 알려주기 바랍니다. 또한 만약 사람들이 이 제한을 무시한다면, 더 이상 이런 식으로 추가 자료를 발표하지 않을 것이기 때문에 꼭 지켜주시길 바랍니다.
15 |
16 | 이것은 가장 초안입니다. 노트북을 실행할 때 오류가 발생한다면 [fastai-v2 포럼](https://forums.fast.ai/c/fastai-users/fastai-v2) 에서 답변을 검색하고, 도움을 요청하십시오. GitHub issue 에서는 이러한 문제를 다루지 않을 것이니 올려주시지 않기를 부탁드립니다.
17 |
18 | 만약 이 repo에 PR을 보낸다면, 해당 저작물의 저작권을 Jeremy Howard와 Sylvain Gugger에게 할당하는 것입니다. (추가적으로, 철자법이나 텍스트에 대해 편집을 한다면, 파일의 이름과 당신이 고치고 있는 것에 대한 간단한 설명을 함께 명시해주십시오. 검토자들이 어떤 수정이 이루어졌는지 확인하는 것이 어렵기 때문입니다. 감사합니다.)
19 |
--------------------------------------------------------------------------------
/README_pt.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Portuguese](./README_pt.md)
3 |
4 | # O Livro fastai
5 |
6 | Estes cadernos Jupyter cobrem a introdução a _deep learning_, [fastai](https://docs.fast.ai/), e [PyTorch](https://pytorch.org/). A fastai é como uma interface por camadas para _deep learning_. Para mais informações, ler o [paper sobre a fastai](https://www.mdpi.com/2078-2489/11/2/108). Todos os direitos dos conteúdos deste repositório são reservados a Jeremy Howard e Sylvain Gugger, de 2020 ao presente.
7 |
8 | Os cadernos são usados para o [curso online](https://course.fast.ai) e são a base [deste livro](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), que se econtra atualmente para a venda. O livro não contém as mesmas restrições da licença GPL que constam neste rascunho.
9 |
10 | O código existente nos cadernos e ficheiros python `.py` estão abrangidos pela licença GPLv3. Ver o ficheiro LICENSE para mais detalhes.
11 |
12 | Os restantes conteúdos, incluindo todas as celas markdown nos cadernos e outros textos, não são licenciados para nenhuma redistribuição ou alteração de formato ou meio, além de cópias dos cadernos ou bifurcações do repositório para uso privado. Nenhum uso comercial ou de distribuição é permitido. Estes materiais são distribuídos gratuitamente para poder ajudar a aprender sobre _deep learning_ e, como tal, pede-se o respeito pelas licenças e estas restrições.
13 |
14 | Se souber de alguém a fornecer uma cópia destes materiais noutro sítio, por favor, indique-lhe que não é permitido e pode levar a ação judicial. Além do mais, estariam a prejudicar a comunidade pois deixaremos de publicar novos materiais se as licenças e restrições forem continuamente ignoradas.
15 |
16 | Este repositório é um esboço inicial. Se se deparar com algum problema ao correr os cadernos, por favor use o [fastai-dev forum](https://forums.fast.ai/c/fastai-users/fastai-dev/) para obter ajuda e crie novas perguntas se for necessário. Não utilize os _issues_ do GitHub para problemas relacionados com a execução dos cadernos.
17 |
18 | Ao fazer um pedido de junção de alterações (_pull request_) para este repositório está a transferir todos os direitos desse trabalho para o Jeremy Howard e Sylvain Gugger (Adicionalmente, se for uma alteração de texto mínima para corrigir ortografia ou melhorar gramática, por favor, indique o nome do ficheiro e uma breve descrição do que está a alterar. É difícil para quem mantém o repositório saber quais correções já foram feitas. Obrigado.)
19 |
20 | ## Citações
21 |
22 | Se deseja citar o livre, pode fazê-lo da seguinte forma:
23 |
24 | ```
25 | @book{howard2020deep,
26 | title={Deep Learning for Coders with Fastai and Pytorch: AI Applications Without a PhD},
27 | author={Howard, J. and Gugger, S.},
28 | isbn={9781492045526},
29 | url={https://books.google.no/books?id=xd6LxgEACAAJ},
30 | year={2020},
31 | publisher={O'Reilly Media, Incorporated}
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/README_vn.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Vietnamese](./README_vn.md)
3 |
4 | # Cuốn sách fastai
5 |
6 | Những notebooks này giới thiệu về học sâu, sử dụng [fastai](https://docs.fast.ai/) và [PyTorch](https://pytorch.org/). Fastai là một thư viện API cho học sâu; để biết thêm thông tin, hãy xem [fastai paper](https://www.mdpi.com/2078-2489/11/2/108). Mọi tài liệu trong repo này thuộc bản quyền của Jeremy Howard và Sylvain Gugger, từ năm 2020 trở đi.
7 |
8 | Các notebooks được sử dụng cho khóa học online mở [a MOOC](https://course.fast.ai) và là nội dung cơ bản của cuốn [sách này](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527), và hiện bạn có thể đặt mua. Cuốn sách này không có các hạn chế GPL giống như trong bản notebooks ở repo này.
9 |
10 | Mã nguồn trong các notebooks và file python `.py` được đăng ký giấy phép GPL v3; chi tiết xem tại file LICENSE.
11 |
12 | Những phần còn lại (bao gồm tất cả các markdown cells trong các notebooks cùng các nội dung khác) không được phép phân phối hoặc thay đổi định dạng hoặc phương tiện nào. Trừ trường hợp, bản sao của notebooks hoặc forking của notebooks này cho mục đích sử dụng cá nhân. Không được phép sử dụng notebooks cho mục đích thương mại hoặc quảng bá. Chúng tôi cung cấp miễn phí những tài liệu này để giúp bạn học về học sâu, vì vậy hãy tôn trọng bản quyền của chúng tôi và những hạn chế này.
13 |
14 | Nếu bạn thấy ai đó lưu trữ bản sao của những tài liệu này ở một nơi khác, vui lòng cho họ biết rằng hành động của họ là không được phép và có thể dẫn đến hành động pháp lý. Hơn nữa, chúng sẽ gây tổn hại cho cộng đồng vì chúng tôi không có khả năng sẽ không tiếp tục phát hành tài liệu bổ sung theo cách này nếu mọi người bỏ qua bản quyền của chúng tôi.
15 |
16 | Đây là một bản thảo draft. Nếu bạn gặp khó khăn khi chạy các notebooks, vui lòng tìm kiếm câu trả lời và yêu cầu trợ giúp nếu cần tại [diễn đàn fastai-dev](https://forums.fast.ai/c/fastai-users/fastai-dev/). Vui lòng không sử dụng GitHub cho các lỗi (issues) khi chạy notebooks.
17 |
18 | Nếu bạn thực hiện bất kỳ pull requests nào đối với repo này, thì bạn đang chuyển nhượng bản quyền của nội dung đó cho Jeremy Howard và Sylvain Gugger. (Ngoài ra, nếu bạn thực hiện các chỉnh sửa nhỏ như về lỗi chính tả, vui lòng nêu rõ tên của tệp file văn bản và mô tả rất ngắn gọn về những gì bạn đang sửa. Bởi vì rất khó để reviewers biết bạn đã sửa những nơi nào. Xin cảm ơn!)
19 |
20 | ## Trích dẫn
21 |
22 | Nếu bạn muốn trích dẫn cuốn sách, bạn có thể sử dụng như sau:
23 |
24 | ```
25 | @book{howard2020deep,
26 | title={Deep Learning for Coders with Fastai and Pytorch: AI Applications Without a PhD},
27 | author={Howard, J. and Gugger, S.},
28 | isbn={9781492045526},
29 | url={https://books.google.no/books?id=xd6LxgEACAAJ},
30 | year={2020},
31 | publisher={O'Reilly Media, Incorporated}
32 | }
33 | ```
34 |
--------------------------------------------------------------------------------
/README_zh.md:
--------------------------------------------------------------------------------
1 | [](https://mybinder.org/v2/gh/fastai/fastbook/master)
2 | [English](./README.md) / [Spanish](./README_es.md) / [Korean](./README_ko.md) / [Chinese](./README_zh.md) / [Bengali](./README_bn.md) / [Indonesian](./README_id.md) / [Italian](./README_it.md)
3 |
4 | # The fastai book
5 |
6 | 这些notebook包含了对深度学习,[fastai](https://docs.fast.ai/),以及[PyTorch](https://pytorch.org/)的介绍。fastai是一个用于深度学习的分层API;要了解更多信息,请阅读[the fastai paper](https://www.mdpi.com/2078-2489/11/2/108)论文。本repo的所有内容的版权都属于Jeremy Howard和Sylvain Gugger,起自2020年。
7 |
8 | 这些notebook被用于[一个MOOC课程](https://course.fast.ai),并且是[这本书](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527)(目前可供购买)的基础。书籍并没有本稿的GPL限制。
9 |
10 | notebook 里的代码以及 python 的 `.py` 文件受到 GPL v3 开源协议的保护;更多详情请查看 LICENSE 文件。
11 |
12 | 其余部分(包括 notebook 里的 markdown 单元以及其他文字内容)可以用于重新发布,调整格式或者载体。你可以复制这里的 notebook 或者 fork 本 repo 用于个人目的。但是任何商业传播行为都是不被允许的。我们制作这些资料是用来帮助你学习深度学习的,所以请遵守我们的版权以及上述限制.
13 |
14 | 如果你在别的地方发现任何人持有这些资料的副本,请告诉他们,他们的行为是不被允许的,并可能导致法律措施被采取。而且,他们可能会对社区造成伤害。这是因为如果人们忽视我们的版权,我们可能不会再像这样发布新的资料。
15 |
16 | 这些资料还属于初稿阶段。如果你在运行这些 notebook 时遇到困难,请尝试在[fastai-dev forum](https://forums.fast.ai/c/fastai-users/fastai-dev/)搜索或者寻求帮助。请不要因为运行 notebook 中遇到的问题而使用 GitHub issues。
17 |
18 | 若果你要为本 repo 创建 pull request,那么你的作品版权将归于 Jeremy Howard 和 Sylvain Gugger。(另外,如果你是对拼写和文本做一些小修改,请标注文件名并对你的修改提供一个简单的说明。因为对 reviewer 来说,越来越难发现哪些地方已经被改正了。非常感谢。)
19 |
--------------------------------------------------------------------------------
/_quarto.yml:
--------------------------------------------------------------------------------
1 | project:
2 | type: book
3 | preview:
4 | port: 3000
5 | browser: false
6 |
7 | format:
8 | html:
9 | number-depth: 2
10 | theme: cosmo
11 | css: styles.css
12 |
13 | book:
14 | title: "Practical Deep Learning for Coders"
15 | author: "Jeremy Howard and Sylvain Gugger"
16 | site-url: https://fastai.github.io/fastbook2e
17 | twitter-card:
18 | creator: "jeremyphoward"
19 | site: "fastdotai"
20 | open-graph: true
21 | chapters:
22 | - index.qmd
23 | - part: "Getting Started"
24 | chapters:
25 | - intro.ipynb
26 | #- production.ipynb
27 | - book2.qmd
28 | #- ethics.ipynb
29 | - book3.qmd
30 | - part: "The Details"
31 | chapters:
32 | - mnist_basics.ipynb
33 | #- pet_breeds.ipynb
34 | - book5.qmd
35 | #- multicat.ipynb
36 | - book6.qmd
37 | #- sizing_and_tta.ipynb
38 | - book7.qmd
39 | #- collab.ipynb
40 | - book8.qmd
41 | #- tabular.ipynb
42 | - book9.qmd
43 | #- nlp.ipynb
44 | - book10.qmd
45 | - part: "From the Foundations"
46 | chapters:
47 | #- midlevel_data.ipynb
48 | - book11.qmd
49 | #- nlp_dive.ipynb
50 | - book12.qmd
51 | - convolutions.ipynb
52 | - resnet.ipynb
53 | #- arch_details.ipynb
54 | - book15.qmd
55 | - accel_sgd.ipynb
56 | - foundations.ipynb
57 | #- CAM.ipynb
58 | - book18.qmd
59 | #- learner.ipynb
60 | - book19.qmd
61 | #- conclusion.ipynb
62 | - book20.qmd
63 | #appendices:
64 | #- app_blog.ipynb
65 | #- app_jupyter.ipynb
66 |
67 | bibliography: references.bib
68 |
69 |
--------------------------------------------------------------------------------
/app_blog.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "raw",
5 | "metadata": {},
6 | "source": [
7 | "[[appendix_blog]]\n",
8 | "[appendix]\n",
9 | "[role=\"Creating a blog\"]"
10 | ]
11 | },
12 | {
13 | "cell_type": "markdown",
14 | "metadata": {},
15 | "source": [
16 | "# Creating a Blog {.unnumbered}"
17 | ]
18 | },
19 | {
20 | "cell_type": "markdown",
21 | "metadata": {},
22 | "source": [
23 | "Unfortunately, when it comes to blogging, it seems like you have to make a difficult decision: either use a platform that makes it easy but subjects you and your readers to advertisements, paywalls, and fees, or spend hours setting up your own hosting service and weeks learning about all kinds of intricate details. Perhaps the biggest benefit to the \"do-it-yourself\" approach is that you really own your own posts, rather than being at the whim of a service provider and their decisions about how to monetize your content in the future.\n",
24 | "\n",
25 | "It turns out, however, that you can have the best of both worlds! "
26 | ]
27 | },
28 | {
29 | "cell_type": "markdown",
30 | "metadata": {},
31 | "source": [
32 | "## Blogging with GitHub Pages"
33 | ]
34 | },
35 | {
36 | "cell_type": "markdown",
37 | "metadata": {},
38 | "source": [
39 | "A great solution is to host your blog on a platform called [GitHub Pages](https://pages.github.com/), which is free, has no ads or pay wall, and makes your data available in a standard way such that you can at any time move your blog to another host. But all the approaches I’ve seen to using GitHub Pages have required knowledge of the command line and arcane tools that only software developers are likely to be familiar with. For instance, GitHub's [own documentation](https://help.github.com/en/github/working-with-github-pages/creating-a-github-pages-site-with-jekyll) on setting up a blog includes a long list of instructions that involve installing the Ruby programming language, using the `git` command-line tool, copying over version numbers, and more—17 steps in total!\n",
40 | "\n",
41 | "To cut down the hassle, we’ve created an easy approach that allows you to use an *entirely browser-based interface* for all your blogging needs. You will be up and running with your new blog within about five minutes. It doesn’t cost anything, and you can easily add your own custom domain to it if you wish to. In this section, we'll explain how to do it, using a template we've created called *fast\\_template*. (NB: be sure to check the [book's website](https://book.fast.ai) for the latest blog recommendations, since new tools are always coming out)."
42 | ]
43 | },
44 | {
45 | "cell_type": "markdown",
46 | "metadata": {},
47 | "source": [
48 | "### Creating the Repository"
49 | ]
50 | },
51 | {
52 | "cell_type": "markdown",
53 | "metadata": {},
54 | "source": [
55 | "You’ll need an account on GitHub, so head over there now and create an account if you don’t have one already. Make sure that you are logged in. Normally, GitHub is used by software developers for writing code, and they use a sophisticated command-line tool to work with it—but we're going to show you an approach that doesn't use the command line at all!\n",
56 | "\n",
57 | "To get started, point your browser to [https://github.com/fastai/fast_template/generate](https://github.com/fastai/fast_template/generate) (you need to be logged in to GitHub for the link to work). This will allow you to create a place to store your blog, called a *repository*. You will a screen like the one in @fig-github-repo. Note that you have to enter your repository name using the *exact* format shown here—that is, your GitHub username followed by `.github.io`.\n",
58 | "\n",
59 | "{width=\"440\" id=\"fig-github-repo\" fig-alt=\"Screenshot of the GitHub page for creating a new repository\"}\n",
60 | "\n",
61 | "Once you’ve entered that, and any description you like, click \"Create repository from template.\" You have the choice to make the repository \"private,\" but since you are creating a blog that you want other people to read, having the underlying files publicly available hopefully won't be a problem for you.\n",
62 | "\n",
63 | "Now, let's set up your home page!"
64 | ]
65 | },
66 | {
67 | "cell_type": "markdown",
68 | "metadata": {},
69 | "source": [
70 | "### Setting Up Your Home Page"
71 | ]
72 | },
73 | {
74 | "cell_type": "markdown",
75 | "metadata": {},
76 | "source": [
77 | "When readers arrive at your blog the first thing that they will see is the content of a file called *index.md*. This is a [markdown](https://guides.github.com/features/mastering-markdown/) file. Markdown is a powerful yet simple way of creating formatted text, such as bullet points, italics, hyperlinks, and so forth. It is very widely used, including for all the formatting in Jupyter notebooks, nearly every part of the GitHub site, and many other places all over the internet. To create markdown text, you can just type in plain English, then add some special characters to add special behavior. For instance, if you type a `*` character before and after a word or phrase, that will put it in *italics*. Let’s try it now.\n",
78 | "\n",
79 | "To open the file, click its filename in GitHub. To edit it, click on the pencil icon at the far right hand side of the screen as shown in @fig-fastpage-edit.\n",
80 | "\n",
81 | "{width=\"800\" id=\"fig-fastpage-edit\" fig-alt=\"Screenshot showing where to click to edit the file\"}"
82 | ]
83 | },
84 | {
85 | "cell_type": "markdown",
86 | "metadata": {},
87 | "source": [
88 | "You can add to, edit, or replace the texts that you see. Click \"Preview changes\" (@fig-fastpage-preview) to see what your markdown text will look like in your blog. Lines that you have added or changed will appear with a green bar on the lefthand side.\n",
89 | "\n",
90 | "{width=\"350\" id=\"fig-fastpage-preview\" fig-alt=\"Screenshot showing where to click to preview changes\"}\n",
91 | "\n",
92 | "To save your changes, scroll to the bottom of the page and click \"Commit changes,\" as shown in @fig-fastpage-commit. On GitHub, to \"commit\" something means to save it to the GitHub server.\n",
93 | "\n",
94 | ""
95 | ]
96 | },
97 | {
98 | "cell_type": "markdown",
99 | "metadata": {},
100 | "source": [
101 | "Next, you should configure your blog’s settings. To do so, click on the file called *\\_config.yml*, then click the edit button like you did for the index file. Change the title, description, and GitHub username values (see @fig-github-config. You need to leave the names before the colons in place, and type your new values in after the colon (and a space) on each line. You can also add to your email address and Twitter username if you wish, but note that these will appear on your public blog if you fill them in here.\n",
102 | "\n",
103 | "{width=\"800\" id=\"fig-github-config\" fig-alt=\"Screenshot showing the config file and how to fill it in\"}\n",
104 | "\n",
105 | "After you’re done, commit your changes just like you did with the index file, then wait a minute or so while GitHub processes your new blog. Point your web browser to * .github.io* (replacing ** with your GitHub username). You should see your blog, which will look something like @fig-github-blog.\n",
106 | "\n",
107 | ""
108 | ]
109 | },
110 | {
111 | "cell_type": "markdown",
112 | "metadata": {},
113 | "source": [
114 | "### Creating Posts"
115 | ]
116 | },
117 | {
118 | "cell_type": "markdown",
119 | "metadata": {},
120 | "source": [
121 | "Now you’re ready to create your first post. All your posts will go in the *\\_posts* folder. Click on that now, and then click the \"Create file\" button. You need to be careful to name your file using the format *---.md*, as shown in @fig-fastpage-name, where ** is a four-digit number, and ** and ** are two-digit numbers. ** can be anything you want that will help you remember what this post was about. The *.md* extension is for markdown documents.\n",
122 | "\n",
123 | "{width=\"440\" id=\"fig-fastpage-name\" fig-alt=\"Screenshot showing the right syntax to create a new blog post\"}\n",
124 | "\n",
125 | "You can then type the contents of your first post. The only rule is that the first line of your post must be a markdown heading. This is created by putting `# ` at the start of a line, as shown in @fig-fastpage-title (that creates a level-1 heading, which you should just use once at the start of your document; you can create level-2 headings using `## `, level 3 with `###`, and so forth).\n",
126 | "\n",
127 | ""
128 | ]
129 | },
130 | {
131 | "cell_type": "markdown",
132 | "metadata": {},
133 | "source": [
134 | "As before, you can click the \"Preview\" button to see how your markdown formatting will look (@fig-fastpage-preview1).\n",
135 | "\n",
136 | "{width=\"400\" id=\"fig-fastpage-preview1\" fig-alt=\"Screenshot showing the same blog post interpreted in HTML\"}\n",
137 | "\n",
138 | "And you will need to click the \"Commit new file\" button to save it to GitHub, as shown in @fig-fastpage-commit1.\n",
139 | "\n",
140 | ""
141 | ]
142 | },
143 | {
144 | "cell_type": "markdown",
145 | "metadata": {},
146 | "source": [
147 | "Have a look at your blog home page again, and you will see that this post has now appeared--@fig-fastpage-live shows the result with the sample pose we just added. (Remember that you will need to wait a minute or so for GitHub to process the request before the file shows up.)\n",
148 | "\n",
149 | "{width=\"500\" id=\"fig-fastpage-live\" fig-alt=\"Screenshot showing the first post on the blog website\"}\n",
150 | "\n",
151 | "You may have noticed that we provided a sample blog post, which you can go ahead and delete now. Go to your *\\_posts* folder, as before, and click on *2020-01-14-welcome.md*. Then click the trash icon on the far right, as shown in @fig-fastpage-delete.\n",
152 | "\n",
153 | ""
154 | ]
155 | },
156 | {
157 | "cell_type": "markdown",
158 | "metadata": {},
159 | "source": [
160 | "In GitHub, nothing actually changes until you commit—including when you delete a file! So, after you click the trash icon, scroll down to the bottom of the page and commit your changes.\n",
161 | "\n",
162 | "You can include images in your posts by adding a line of markdown like\n",
163 | "the following:\n",
164 | "\n",
165 | " \n",
166 | "\n",
167 | "For this to work, you will need to put the image inside your *images* folder. To do this, click the *images* folder, them click \"Upload files\" button (@fig-fastpage-upload).\n",
168 | "\n",
169 | "{width=\"400\" id=\"fig-fastpage-upload\" fig-alt=\"Screenshot showing how to upload new files\"}"
170 | ]
171 | },
172 | {
173 | "cell_type": "markdown",
174 | "metadata": {},
175 | "source": [
176 | "Now let's see how to do all of this directly from your computer."
177 | ]
178 | },
179 | {
180 | "cell_type": "markdown",
181 | "metadata": {},
182 | "source": [
183 | "### Synchronizing GitHub and Your Computer"
184 | ]
185 | },
186 | {
187 | "cell_type": "markdown",
188 | "metadata": {},
189 | "source": [
190 | "There are lots of reasons you might want to copy your blog content from GitHub to your computer--you might want to be able to read or edit your posts offline, or maybe you’d like a backup in case something happens to your GitHub repository.\n",
191 | "\n",
192 | "GitHub does more than just let you copy your repository to your computer; it lets you *synchronize* it with your computer. That means you can make changes on GitHub, and they’ll copy over to your computer, and you can make changes on your computer, and they’ll copy over to GitHub. You can even let other people access and modify your blog, and their changes and your changes will be automatically combined together the next time you sync.\n",
193 | "\n",
194 | "To make this work, you have to install an application called [GitHub Desktop](https://desktop.github.com/) on your computer. It runs on Mac, Windows, and Linux. Follow the directions to install it, and when you run it it’ll ask you to log in to GitHub and select the repository to sync. Click \"Clone a repository from the Internet,\" as shown in @fig-fastpage-clone.\n",
195 | "\n",
196 | "{width=\"400\" id=\"fig-fastpage-clone\" fig-alt=\"A screenshot showing how to clone your repository\"}"
197 | ]
198 | },
199 | {
200 | "cell_type": "markdown",
201 | "metadata": {},
202 | "source": [
203 | "Once GitHub has finished syncing your repo, you’ll be able to click \"View the files of your repository in Explorer\" (or Finder), as shown in @fig-fastpage-explorer and you’ll see the local copy of your blog! Try editing one of the files on your computer. Then return to GitHub Desktop, and you’ll see the \"Sync\" button is waiting for you to press it. When you click it your changes will be copied over to GitHub, where you’ll see them reflected on the website.\n",
204 | "\n",
205 | "{width=\"600\" id=\"fig-fastpage-explorer\" fig-alt=\"A screenshot showing the cloned repository\"}"
206 | ]
207 | },
208 | {
209 | "cell_type": "markdown",
210 | "metadata": {},
211 | "source": [
212 | "If you haven't used `git` before, GitHub Desktop is a great way to get started. As you'll discover, it's a fundamental tool used by most data scientists. Another tool that we hope you now love is Jupyter Notebooks--and there's a way to write your blog directly with that too!"
213 | ]
214 | },
215 | {
216 | "cell_type": "markdown",
217 | "metadata": {},
218 | "source": [
219 | "## Jupyter for Blogging"
220 | ]
221 | },
222 | {
223 | "cell_type": "markdown",
224 | "metadata": {},
225 | "source": [
226 | "You can also write blog posts using Jupyter notebooks. Your markdown cells, code cells, and all the outputs will appear in your exported blog post. The best way to do this may have changed by the time you are reading this book, so be sure to check out the [book's website](https://book.fast.ai) for the latest information. As we write this, the easiest way to create a blog from notebooks is to use [`fastpages`](http://fastpages.fast.ai/), which is a more advanced version of `fast_template`. \n",
227 | "\n",
228 | "To blog with a notebook, just pop it in the *\\_notebooks* folder in your blog repo, and it will appear in your list of blog posts. When you write your notebook, write whatever you want your audience to see. Since most writing platforms make it hard to include code and outputs, many of us are in the habit of including fewer real examples than we should. This is a great way to instead get into the habit of including lots of examples as you write.\n",
229 | "\n",
230 | "Often, you'll want to hide boilerplate such as import statements. You can add `#| echo: false` to the top of any cell to make it not show up in output. Jupyter displays the result of the last line of a cell, so there's no need to include `print()`. (Including extra code that isn't needed means there's more cognitive overhead for the reader; so don't include code that you don't really need!)"
231 | ]
232 | },
233 | {
234 | "cell_type": "code",
235 | "execution_count": null,
236 | "metadata": {},
237 | "outputs": [],
238 | "source": []
239 | }
240 | ],
241 | "metadata": {
242 | "jupytext": {
243 | "split_at_heading": true
244 | },
245 | "kernelspec": {
246 | "display_name": "Python 3",
247 | "language": "python",
248 | "name": "python3"
249 | }
250 | },
251 | "nbformat": 4,
252 | "nbformat_minor": 2
253 | }
254 |
--------------------------------------------------------------------------------
/book10.qmd:
--------------------------------------------------------------------------------
1 | # *NLP Deep Dive: RNNs* {#sec-nlp}
2 |
3 | In @sec-intro we saw that deep learning can be used to get great results with natural language datasets. Our example relied on using a pretrained language model and fine-tuning it to classify reviews. That example highlighted a difference between transfer learning in NLP and computer vision: in general in NLP the pretrained model is trained on a different task.
4 |
5 | What we call a language model is a model that has been trained to guess what the next word in a text is (having read the ones before). This kind of task is called *self-supervised learning*: we do not need to give labels to our model, just feed it lots and lots of texts. It has a process to automatically get labels from the data, and this task isn't trivial: to properly guess the next word in a sentence, the model will have to develop an understanding of the English (or other) language. Self-supervised learning can also be used in other domains; for instance, see ["Self-Supervised Learning and Computer Vision"](https://www.fast.ai/2020/01/13/self_supervised/) for an introduction to vision applications. Self-supervised learning is not usually used for the model that is trained directly, but instead is used for pretraining a model used for transfer learning.
6 |
7 | > jargon: Self-supervised learning: Training a model using labels that are embedded in the independent variable, rather than requiring external labels. For instance, training a model to predict the next word in a text.
8 |
9 | The language model we used in @sec-intro to classify IMDb reviews was pretrained on Wikipedia. We got great results by directly fine-tuning this language model to a movie review classifier, but with one extra step, we can do even better. The Wikipedia English is slightly different from the IMDb English, so instead of jumping directly to the classifier, we could fine-tune our pretrained language model to the IMDb corpus and then use *that* as the base for our classifier.
10 |
11 | Even if our language model knows the basics of the language we are using in the task (e.g., our pretrained model is in English), it helps to get used to the style of the corpus we are targeting. It may be more informal language, or more technical, with new words to learn or different ways of composing sentences. In the case of the IMDb dataset, there will be lots of names of movie directors and actors, and often a less formal style of language than that seen in Wikipedia.
12 |
13 | We already saw that with fastai, we can download a pretrained English language model and use it to get state-of-the-art results for NLP classification. (We expect pretrained models in many more languages to be available soon—they might well be available by the time you are reading this book, in fact.) So, why are we learning how to train a language model in detail?
14 |
15 | One reason, of course, is that it is helpful to understand the foundations of the models that you are using. But there is another very practical reason, which is that you get even better results if you fine-tune the (sequence-based) language model prior to fine-tuning the classification model. For instance, for the IMDb sentiment analysis task, the dataset includes 50,000 additional movie reviews that do not have any positive or negative labels attached. Since there are 25,000 labeled reviews in the training set and 25,000 in the validation set, that makes 100,000 movie reviews altogether. We can use all of these reviews to fine-tune the pretrained language model, which was trained only on Wikipedia articles; this will result in a language model that is particularly good at predicting the next word of a movie review.
16 |
17 | ---
18 |
19 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
20 |
21 |
--------------------------------------------------------------------------------
/book11.qmd:
--------------------------------------------------------------------------------
1 | # *Data Munging with fastai's Mid-Level API* {#sec-midlevel-data}
2 |
3 | We have seen what `Tokenizer` and `Numericalize` do to a collection of texts, and how they're used inside the data block API, which handles those transforms for us directly using the `TextBlock`. But what if we want to only apply one of those transforms, either to see intermediate results or because we have already tokenized texts? More generally, what can we do when the data block API is not flexible enough to accommodate our particular use case? For this, we need to use fastai's *mid-level API* for processing data. The data block API is built on top of that layer, so it will allow you to do everything the data block API does, and much much more.
4 |
5 | ## Going Deeper into fastai's Layered API
6 |
7 | The fastai library is built on a *layered API*. In the very top layer there are *applications* that allow us to train a model in five lines of codes, as we saw in @sec-intro. In the case of creating `DataLoaders` for a text classifier, for instance, we used the line:
8 |
9 | ```python
10 | from fastai.text.all import *
11 |
12 | dls = TextDataLoaders.from_folder(untar_data(URLs.IMDB), valid='test')
13 | ```
14 |
15 | The factory method `TextDataLoaders.from_folder` is very convenient when your data is arranged the exact same way as the IMDb dataset, but in practice, that often won't be the case. The data block API offers more flexibility.
16 |
17 | ---
18 |
19 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
20 |
21 |
--------------------------------------------------------------------------------
/book12.qmd:
--------------------------------------------------------------------------------
1 | # *A Language Model from Scratch* {#sec-nlp-dive}
2 |
3 | We're now ready to go deep... deep into deep learning! You already learned how to train a basic neural network, but how do you go from there to creating state-of-the-art models? In this part of the book we're going to uncover all of the mysteries, starting with language models.
4 |
5 | You saw in @sec-nlp how to fine-tune a pretrained language model to build a text classifier. In this chapter, we will explain to you what exactly is inside that model, and what an RNN is. First, let's gather some data that will allow us to quickly prototype our various models.
6 |
7 | ## The Data
8 |
9 | Whenever we start working on a new problem, we always first try to think of the simplest dataset we can that will allow us to try out methods quickly and easily, and interpret the results. When we started working on language modeling a few years ago we didn't find any datasets that would allow for quick prototyping, so we made one. We call it *Human Numbers*, and it simply contains the first 10,000 numbers written out in English.
10 |
11 | > j: One of the most common practical mistakes I see even amongst highly experienced practitioners is failing to use appropriate datasets at appropriate times during the analysis process. In particular, most people tend to start with datasets that are too big and too complicated.
12 |
13 | ---
14 |
15 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
16 |
17 |
--------------------------------------------------------------------------------
/book15.qmd:
--------------------------------------------------------------------------------
1 | # *Application Architectures Deep Dive* {#sec-arch-details}
2 |
3 | We are now in the exciting position that we can fully understand the architectures that we have been using for our state-of-the-art models for computer vision, natural language processing, and tabular analysis. In this chapter, we're going to fill in all the missing details on how fastai's application models work and show you how to build the models they use.
4 |
5 | We will also go back to the custom data preprocessing pipeline we saw in @sec-midlevel-data for Siamese networks and show you how you can use the components in the fastai library to build custom pretrained models for new tasks.
6 |
7 | We'll start with computer vision.
8 |
9 | ## Computer Vision
10 |
11 | For computer vision application we use the functions `vision_learner` and `unet_learner` to build our models, depending on the task. In this section we'll explore how to build the `Learner` objects we used in Parts 1 and 2 of this book.
12 |
13 | ### vision_learner
14 |
15 | Let's take a look at what happens when we use the `vision_learner` function. We begin by passing this function an architecture to use for the *body* of the network. Most of the time we use a ResNet, which you already know how to create, so we don't need to delve into that any further. Pretrained weights are downloaded as required and loaded into the ResNet.
16 |
17 | Then, for transfer learning, the network needs to be *cut*. This refers to slicing off the final layer, which is only responsible for ImageNet-specific categorization. In fact, we do not slice off only this layer, but everything from the adaptive average pooling layer onwards. The reason for this will become clear in just a moment. Since different architectures might use different types of pooling layers, or even completely different kinds of *heads*, we don't just search for the adaptive pooling layer to decide where to cut the pretrained model. Instead, we have a dictionary of information that is used for each model to determine where its body ends, and its head starts.
18 |
19 | ---
20 |
21 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
22 |
23 |
--------------------------------------------------------------------------------
/book18.qmd:
--------------------------------------------------------------------------------
1 | # *CNN Interpretation with CAM* {#sec-CAM}
2 |
3 | Now that we know how to build up pretty much anything from scratch, let's use that knowledge to create entirely new (and very useful!) functionality: the *class activation map*. It gives us some insight into why a CNN made the predictions it did.
4 |
5 | In the process, we'll learn about one handy feature of PyTorch we haven't seen before, the *hook*, and we'll apply many of the concepts introduced in the rest of the book. If you want to really test out your understanding of the material in this book, after you've finished this chapter, try putting it aside and recreating the ideas here yourself from scratch (no peeking!).
6 |
7 | ## CAM and Hooks
8 |
9 | The class activation map (CAM) was introduced by Bolei Zhou et al. in ["Learning Deep Features for Discriminative Localization"](https://arxiv.org/abs/1512.04150). It uses the output of the last convolutional layer (just before the average pooling layer) together with the predictions to give us a heatmap visualization of why the model made its decision. This is a useful tool for interpretation.
10 |
11 | More precisely, at each position of our final convolutional layer, we have as many filters as in the last linear layer. We can therefore compute the dot product of those activations with the final weights to get, for each location on our feature map, the score of the feature that was used to make a decision.
12 |
13 | We're going to need a way to get access to the activations inside the model while it's training. In PyTorch this can be done with a *hook*. Hooks are PyTorch's equivalent of fastai's callbacks. However, rather than allowing you to inject code into the training loop like a fastai `Learner` callback, hooks allow you to inject code into the forward and backward calculations themselves. We can attach a hook to any layer of the model, and it will be executed when we compute the outputs (forward hook) or during backpropagation (backward hook). A forward hook is a function that takes three things—a module, its input, and its output—and it can perform any behavior you want. (fastai also provides a handy `HookCallback` that we won't cover here, but take a look at the fastai docs; it makes working with hooks a little easier.)
14 |
15 | ---
16 |
17 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
18 |
19 |
--------------------------------------------------------------------------------
/book19.qmd:
--------------------------------------------------------------------------------
1 | # *A fastai Learner from Scratch* {#sec-learner}
2 |
3 | This final chapter (other than the conclusion and the online chapters) is going to look a bit different. It contains far more code and far less prose than the previous chapters. We will introduce new Python keywords and libraries without discussing them. This chapter is meant to be the start of a significant research project for you. You see, we are going to implement many of the key pieces of the fastai and PyTorch APIs from scratch, building on nothing other than the components that we developed in @sec-foundations! The key goal here is to end up with your own `Learner` class, and some callbacks—enough to be able to train a model on Imagenette, including examples of each of the key techniques we've studied. On the way to building `Learner`, we will create our own version of `Module`, `Parameter`, and parallel `DataLoader` so you have a very good idea of what those PyTorch classes do.
4 |
5 | The end-of-chapter questionnaire is particularly important for this chapter. This is where we will be pointing you in the many interesting directions that you could take, using this chapter as your starting point. We suggest that you follow along with this chapter on your computer, and do lots of experiments, web searches, and whatever else you need to understand what's going on. You've built up the skills and expertise to do this in the rest of this book, so we think you are going to do great!
6 |
7 | Let's begin by gathering (manually) some data.
8 |
9 | ---
10 |
11 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
12 |
13 |
--------------------------------------------------------------------------------
/book2.qmd:
--------------------------------------------------------------------------------
1 | # *From Model to Production* {#sec-production}
2 |
3 | The six lines of code we saw in @sec-intro are just one small part of the process of using deep learning in practice. In this chapter, we're going to use a computer vision example to look at the end-to-end process of creating a deep learning application. More specifically, we're going to build a bear classifier! In the process, we'll discuss the capabilities and constraints of deep learning, explore how to create datasets, look at possible gotchas when using deep learning in practice, and more. Many of the key points will apply equally well to other deep learning problems, such as those in @sec-intro. If you work through a problem similar in key respects to our example problems, we expect you to get excellent results with little code, quickly.
4 |
5 | Let's start with how you should frame your problem.
6 |
7 | ## The Practice of Deep Learning
8 |
9 | We've seen that deep learning can solve a lot of challenging problems quickly and with little code. As a beginner, there's a sweet spot of problems that are similar enough to our example problems that you can very quickly get extremely useful results. However, deep learning isn't magic! The same 6 lines of code won't work for every problem anyone can think of today. Underestimating the constraints and overestimating the capabilities of deep learning may lead to frustratingly poor results, at least until you gain some experience and can solve the problems that arise. Conversely, overestimating the constraints and underestimating the capabilities of deep learning may mean you do not attempt a solvable problem because you talk yourself out of it.
10 |
11 | We often talk to people who underestimate both the constraints and the capabilities of deep learning. Both of these can be problems: underestimating the capabilities means that you might not even try things that could be very beneficial, and underestimating the constraints might mean that you fail to consider and react to important issues.
12 |
13 | The best thing to do is to keep an open mind. If you remain open to the possibility that deep learning might solve part of your problem with less data or complexity than you expect, then it is possible to design a process where you can find the specific capabilities and constraints related to your particular problem as you work through the process. This doesn't mean making any risky bets — we will show you how you can gradually roll out models so that they don't create significant risks, and can even backtest them prior to putting them in production.
14 |
15 | ---
16 |
17 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
18 |
19 |
--------------------------------------------------------------------------------
/book20.qmd:
--------------------------------------------------------------------------------
1 | # *Concluding Thoughts* {#sec-conclusion}
2 |
3 | Congratulations! You've made it! If you have worked through all of the notebooks to this point, then you have joined the small, but growing group of people that are able to harness the power of deep learning to solve real problems. You may not feel that way yet—in fact you probably don't. We have seen again and again that students that complete the fast.ai courses dramatically underestimate how effective they are as deep learning practitioners. We've also seen that these people are often underestimated by others with a classic academic background. So if you are to rise above your own expectations and the expectations of others, what you do next, after closing this book, is even more important than what you've done to get to this point.
4 |
5 | The most important thing is to keep the momentum going. In fact, as you know from your study of optimizers, momentum is something that can build upon itself! So think about what you can do now to maintain and accelerate your deep learning journey. @fig-do-next can give you a few ideas.
6 |
7 | {width="550" id="fig-do-next" fig-alt="What to do next"}
8 |
9 | ---
10 |
11 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
12 |
13 |
--------------------------------------------------------------------------------
/book5.qmd:
--------------------------------------------------------------------------------
1 | # *Image Classification* {#sec-pet-breeds}
2 |
3 | Now that you understand what deep learning is, what it's for, and how to create and deploy a model, it's time for us to go deeper! In an ideal world deep learning practitioners wouldn't have to know every detail of how things work under the hood… But as yet, we don't live in an ideal world. The truth is, to make your model really work, and work reliably, there are a lot of details you have to get right, and a lot of details that you have to check. This process requires being able to look inside your neural network as it trains, and as it makes predictions, find possible problems, and know how to fix them.
4 |
5 | So, from here on in the book we are going to do a deep dive into the mechanics of deep learning. What is the architecture of a computer vision model, an NLP model, a tabular model, and so on? How do you create an architecture that matches the needs of your particular domain? How do you get the best possible results from the training process? How do you make things faster? What do you have to change as your datasets change?
6 |
7 | We will start by repeating the same basic applications that we looked at in the first chapter, but we are going to do two things:
8 |
9 | - Make them better.
10 | - Apply them to a wider variety of types of data.
11 |
12 | In order to do these two things, we will have to learn all of the pieces of the deep learning puzzle. This includes different types of layers, regularization methods, optimizers, how to put layers together into architectures, labeling techniques, and much more. We are not just going to dump all of these things on you, though; we will introduce them progressively as needed, to solve actual problems related to the projects we are working on.
13 |
14 | ---
15 |
16 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
17 |
18 |
--------------------------------------------------------------------------------
/book6.qmd:
--------------------------------------------------------------------------------
1 | # *Other Computer Vision Problems* {#sec-multicat}
2 |
3 | In the previous chapter you learned some important practical techniques for training models in practice. Considerations like selecting learning rates and the number of epochs are very important to getting good results.
4 |
5 | In this chapter we are going to look at two other types of computer vision problems: multi-label classification and regression. The first one is when you want to predict more than one label per image (or sometimes none at all), and the second is when your labels are one or several numbers—a quantity instead of a category.
6 |
7 | In the process will study more deeply the output activations, targets, and loss functions in deep learning models.
8 |
9 | ## Multi-Label Classification
10 |
11 | Multi-label classification refers to the problem of identifying the categories of objects in images that may not contain exactly one type of object. There may be more than one kind of object, or there may be no objects at all in the classes that you are looking for.
12 |
13 | For instance, this would have been a great approach for our bear classifier. One problem with the bear classifier that we rolled out in @sec-production was that if a user uploaded something that wasn't any kind of bear, the model would still say it was either a grizzly, black, or teddy bear—it had no ability to predict "not a bear at all." In fact, after we have completed this chapter, it would be a great exercise for you to go back to your image classifier application, and try to retrain it using the multi-label technique, then test it by passing in an image that is not of any of your recognized classes.
14 |
15 | In practice, we have not seen many examples of people training multi-label classifiers for this purpose—but we very often see both users and developers complaining about this problem. It appears that this simple solution is not at all widely understood or appreciated! Because in practice it is probably more common to have some images with zero matches or more than one match, we should probably expect in practice that multi-label classifiers are more widely applicable than single-label classifiers.
16 |
17 | First, let's see what a multi-label dataset looks like, then we'll explain how to get it ready for our model. You'll see that the architecture of the model does not change from the last chapter; only the loss function does. Let's start with the data.
18 |
19 | ---
20 |
21 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
22 |
23 |
--------------------------------------------------------------------------------
/book7.qmd:
--------------------------------------------------------------------------------
1 | # *Training a State-of-the-Art Model* {#sec-sizing-and-tta}
2 |
3 | This chapter introduces more advanced techniques for training an image classification model and getting state-of-the-art results. You can skip it if you want to learn more about other applications of deep learning and come back to it later—knowledge of this material will not be assumed in later chapters.
4 |
5 | We will look at what normalization is, a powerful data augmentation technique called mixup, the progressive resizing approach and test time augmentation. To show all of this, we are going to train a model from scratch (not using transfer learning) using a subset of ImageNet called [Imagenette](https://github.com/fastai/imagenette). It contains a subset of 10 very different categories from the original ImageNet dataset, making for quicker training when we want to experiment.
6 |
7 | This is going to be much harder to do well than with our previous datasets because we're using full-size, full-color images, which are photos of objects of different sizes, in different orientations, in different lighting, and so forth. So, in this chapter we're going to introduce some important techniques for getting the most out of your dataset, especially when you're training from scratch, or using transfer learning to train a model on a very different kind of dataset than the pretrained model used.
8 |
9 | ## Imagenette
10 |
11 | When fast.ai first started there were three main datasets that people used for building and testing computer vision models:
12 |
13 | - ImageNet:: 1.3 million images of various sizes around 500 pixels across, in 1,000 categories, which took a few days to train
14 | - MNIST:: 50,000 28×28-pixel grayscale handwritten digits
15 | - CIFAR10:: 60,000 32×32-pixel color images in 10 classes
16 |
17 | The problem was that the smaller datasets didn't actually generalize effectively to the large ImageNet dataset. The approaches that worked well on ImageNet generally had to be developed and trained on ImageNet. This led to many people believing that only researchers with access to giant computing resources could effectively contribute to developing image classification algorithms.
18 |
19 | We thought that seemed very unlikely to be true. We had never actually seen a study that showed that ImageNet happen to be exactly the right size, and that other datasets could not be developed which would provide useful insights. So we thought we would try to create a new dataset that researchers could test their algorithms on quickly and cheaply, but which would also provide insights likely to work on the full ImageNet dataset.
20 |
21 | About three hours later we had created Imagenette. We selected 10 classes from the full ImageNet that looked very different from one another. As we had hoped, we were able to quickly and cheaply create a classifier capable of recognizing these classes. We then tried out a few algorithmic tweaks to see how they impacted Imagenette. We found some that worked pretty well, and tested them on ImageNet as well—and we were very pleased to find that our tweaks worked well on ImageNet too!
22 |
23 | There is an important message here: the dataset you get given is not necessarily the dataset you want. It's particularly unlikely to be the dataset that you want to do your development and prototyping in. You should aim to have an iteration speed of no more than a couple of minutes—that is, when you come up with a new idea you want to try out, you should be able to train a model and see how it goes within a couple of minutes. If it's taking longer to do an experiment, think about how you could cut down your dataset, or simplify your model, to improve your experimentation speed. The more experiments you can do, the better!
24 |
25 | ---
26 |
27 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
28 |
29 |
30 |
--------------------------------------------------------------------------------
/book8.qmd:
--------------------------------------------------------------------------------
1 | # *Collaborative Filtering Deep Dive* {#sec-collab}
2 |
3 | One very common problem to solve is when you have a number of users and a number of products, and you want to recommend which products are most likely to be useful for which users. There are many variations of this: for example, recommending movies (such as on Netflix), figuring out what to highlight for a user on a home page, deciding what stories to show in a social media feed, and so forth. There is a general solution to this problem, called *collaborative filtering*, which works like this: look at what products the current user has used or liked, find other users that have used or liked similar products, and then recommend other products that those users have used or liked.
4 |
5 | For example, on Netflix you may have watched lots of movies that are science fiction, full of action, and were made in the 1970s. Netflix may not know these particular properties of the films you have watched, but it will be able to see that other people that have watched the same movies that you watched also tended to watch other movies that are science fiction, full of action, and were made in the 1970s. In other words, to use this approach we don't necessarily need to know anything about the movies, except who like to watch them.
6 |
7 | There is actually a more general class of problems that this approach can solve, not necessarily involving users and products. Indeed, for collaborative filtering we more commonly refer to *items*, rather than *products*. Items could be links that people click on, diagnoses that are selected for patients, and so forth.
8 |
9 | The key foundational idea is that of *latent factors*. In the Netflix example, we started with the assumption that you like old, action-packed sci-fi movies. But you never actually told Netflix that you like these kinds of movies. And Netflix never actually needed to add columns to its movies table saying which movies are of these types. Still, there must be some underlying concept of sci-fi, action, and movie age, and these concepts must be relevant for at least some people's movie watching decisions.
10 |
11 | For this chapter we are going to work on this movie recommendation problem. We'll start by getting some data suitable for a collaborative filtering model.
12 |
13 | ---
14 |
15 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
16 |
17 |
--------------------------------------------------------------------------------
/book9.qmd:
--------------------------------------------------------------------------------
1 | # *Tabular Modeling Deep Dive* {#sec-tabular}
2 |
3 | Tabular modeling takes data in the form of a table (like a spreadsheet or CSV). The objective is to predict the value in one column based on the values in the other columns. In this chapter we will not only look at deep learning but also more general machine learning techniques like random forests, as they can give better results depending on your problem.
4 |
5 | We will look at how we should preprocess and clean the data as well as how to interpret the result of our models after training, but first, we will see how we can feed columns that contain categories into a model that expects numbers by using embeddings.
6 |
7 | ## Categorical Embeddings
8 |
9 | In tabular data some columns may contain numerical data, like "age," while others contain string values, like "sex." The numerical data can be directly fed to the model (with some optional preprocessing), but the other columns need to be converted to numbers. Since the values in those correspond to different categories, we often call this type of variables *categorical variables*. The first type are called *continuous variables*.
10 |
11 | > jargon: Continuous and Categorical Variables: Continuous variables are numerical data, such as "age," that can be directly fed to the model, since you can add and multiply them directly. Categorical variables contain a number of discrete levels, such as "movie ID," for which addition and multiplication don't have meaning (even if they're stored as numbers).
12 |
13 | At the end of 2015, the [Rossmann sales competition](https://www.kaggle.com/c/rossmann-store-sales) ran on Kaggle. Competitors were given a wide range of information about various stores in Germany, and were tasked with trying to predict sales on a number of days. The goal was to help the company to manage stock properly and be able to satisfy demand without holding unnecessary inventory. The official training set provided a lot of information about the stores. It was also permitted for competitors to use additional data, as long as that data was made public and available to all participants.
14 |
15 | ---
16 |
17 | This is just a preview of this chapter. The rest of this chapter is not available here, but you read the [source notebook](https://github.com/fastai/fastbook/) which has the same content (but with less nice formatting).
18 |
19 |
--------------------------------------------------------------------------------
/conclusion.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "metadata": {},
7 | "outputs": [],
8 | "source": [
9 | "#| include: false\n",
10 | "! [ -e /content ] && pip install -Uqq fastbook\n",
11 | "import fastbook\n",
12 | "fastbook.setup_book()"
13 | ]
14 | },
15 | {
16 | "cell_type": "markdown",
17 | "metadata": {},
18 | "source": [
19 | "# Concluding Thoughts {#sec-conclusion}"
20 | ]
21 | },
22 | {
23 | "cell_type": "markdown",
24 | "metadata": {},
25 | "source": [
26 | "Congratulations! You've made it! If you have worked through all of the notebooks to this point, then you have joined the small, but growing group of people that are able to harness the power of deep learning to solve real problems. You may not feel that way yet—in fact you probably don't. We have seen again and again that students that complete the fast.ai courses dramatically underestimate how effective they are as deep learning practitioners. We've also seen that these people are often underestimated by others with a classic academic background. So if you are to rise above your own expectations and the expectations of others, what you do next, after closing this book, is even more important than what you've done to get to this point.\n",
27 | "\n",
28 | "The most important thing is to keep the momentum going. In fact, as you know from your study of optimizers, momentum is something that can build upon itself! So think about what you can do now to maintain and accelerate your deep learning journey. @fig-do-next can give you a few ideas."
29 | ]
30 | },
31 | {
32 | "cell_type": "markdown",
33 | "metadata": {},
34 | "source": [
35 | "{width=\"550\" id=\"fig-do-next\" fig-alt=\"What to do next\"}"
36 | ]
37 | },
38 | {
39 | "cell_type": "markdown",
40 | "metadata": {},
41 | "source": [
42 | "We've talked a lot in this book about the value of writing, whether it be code or prose. But perhaps you haven't quite written as much as you had hoped so far. That's okay! Now is a great chance to turn that around. You have a lot to say, at this point. Perhaps you have tried some experiments on a dataset that other people don't seem to have looked at in quite the same way. Tell the world about it! Or perhaps thinking about trying out some ideas that occurred to you while you were reading—now is a great time to turn those ideas into code.\n",
43 | "\n",
44 | "If you'd like to share your ideas, one fairly low-key place to do so is the [fast.ai forums](https://forums.fast.ai/). You will find that the community there is very supportive and helpful, so please do drop by and let us know what you've been up to. Or see if you can answer a few questions for those folks who are earlier in their journey than you.\n",
45 | "\n",
46 | "And if you do have some successes, big or small, in your deep learning journey, be sure to let us know! It's especially helpful if you post about them on the forums, because learning about the successes of other students can be extremely motivating.\n",
47 | "\n",
48 | "Perhaps the most important approach for many people to stay connected with their learning journey is to build a community around it. For instance, you could try to set up a small deep learning meetup in your local neighborhood, or a study group, or even offer to do a talk at a local meetup about what you've learned so far or some particular aspect that interested you. It's okay that you are not the world's leading expert just yet—the important thing to remember is that you now know about plenty of stuff that other people don't, so they are very likely to appreciate your perspective.\n",
49 | "\n",
50 | "Another community event which many people find useful is a regular book club or paper reading club. You might find that there are some in your neighbourhood already, and if not you could try to get one started yourself. Even if there is just one other person doing it with you, it will help give you the support and encouragement to get going.\n",
51 | "\n",
52 | "If you are not in a geography where it's easy to get together with like-minded folks in person, drop by the forums, because there are always people starting up virtual study groups. These generally involve a bunch of folks getting together over video chat once a week or so to discuss some deep learning topic.\n",
53 | "\n",
54 | "Hopefully, by this point, you have a few little projects that you've put together and experiments that you've run. Our recommendation for the next step is to pick one of these and make it as good as you can. Really polish it up into the best piece of work that you can—something you are really proud of. This will force you to go much deeper into a topic, which will really test your understanding and give you the opportunity to see what you can do when you really put your mind to it.\n",
55 | "\n",
56 | "Also, you may want to take a look at the fast.ai free online course that covers the same material as this book. Sometimes, seeing the same material in two different ways can really help to crystallize the ideas. In fact, human learning researchers have found that one of the best ways to learn material is to see the same thing from different angles, described in different ways.\n",
57 | "\n",
58 | "Your final mission, should you choose to accept it, is to take this book and give it to somebody that you know—and get somebody else started on their own deep learning journey!"
59 | ]
60 | },
61 | {
62 | "cell_type": "code",
63 | "execution_count": null,
64 | "metadata": {},
65 | "outputs": [],
66 | "source": []
67 | }
68 | ],
69 | "metadata": {
70 | "jupytext": {
71 | "split_at_heading": true
72 | },
73 | "kernelspec": {
74 | "display_name": "Python 3",
75 | "language": "python",
76 | "name": "python3"
77 | }
78 | },
79 | "nbformat": 4,
80 | "nbformat_minor": 4
81 | }
82 |
--------------------------------------------------------------------------------
/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/cover.png
--------------------------------------------------------------------------------
/images/0_jupyter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/0_jupyter.png
--------------------------------------------------------------------------------
/images/Dropout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/Dropout.png
--------------------------------------------------------------------------------
/images/Dropout1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/Dropout1.png
--------------------------------------------------------------------------------
/images/LSTM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/LSTM.png
--------------------------------------------------------------------------------
/images/analytics_chain.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/analytics_chain.gif
--------------------------------------------------------------------------------
/images/att_00000.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00000.png
--------------------------------------------------------------------------------
/images/att_00001.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00001.png
--------------------------------------------------------------------------------
/images/att_00002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00002.png
--------------------------------------------------------------------------------
/images/att_00003.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00003.png
--------------------------------------------------------------------------------
/images/att_00004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00004.png
--------------------------------------------------------------------------------
/images/att_00005.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00005.png
--------------------------------------------------------------------------------
/images/att_00006.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00006.png
--------------------------------------------------------------------------------
/images/att_00007.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00007.png
--------------------------------------------------------------------------------
/images/att_00008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00008.png
--------------------------------------------------------------------------------
/images/att_00009.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00009.png
--------------------------------------------------------------------------------
/images/att_00010.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00010.png
--------------------------------------------------------------------------------
/images/att_00011.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00011.png
--------------------------------------------------------------------------------
/images/att_00012.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00012.png
--------------------------------------------------------------------------------
/images/att_00013.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00013.png
--------------------------------------------------------------------------------
/images/att_00014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00014.png
--------------------------------------------------------------------------------
/images/att_00015.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00015.png
--------------------------------------------------------------------------------
/images/att_00016.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00016.png
--------------------------------------------------------------------------------
/images/att_00017.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00017.png
--------------------------------------------------------------------------------
/images/att_00018.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00018.png
--------------------------------------------------------------------------------
/images/att_00019.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00019.png
--------------------------------------------------------------------------------
/images/att_00020.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00020.png
--------------------------------------------------------------------------------
/images/att_00021.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00021.png
--------------------------------------------------------------------------------
/images/att_00022.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00022.png
--------------------------------------------------------------------------------
/images/att_00023.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00023.png
--------------------------------------------------------------------------------
/images/att_00024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00024.png
--------------------------------------------------------------------------------
/images/att_00025.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00025.png
--------------------------------------------------------------------------------
/images/att_00026.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00026.png
--------------------------------------------------------------------------------
/images/att_00027.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00027.png
--------------------------------------------------------------------------------
/images/att_00028.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00028.png
--------------------------------------------------------------------------------
/images/att_00029.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00029.png
--------------------------------------------------------------------------------
/images/att_00030.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00030.png
--------------------------------------------------------------------------------
/images/att_00031.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00031.png
--------------------------------------------------------------------------------
/images/att_00032.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00032.png
--------------------------------------------------------------------------------
/images/att_00033.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00033.png
--------------------------------------------------------------------------------
/images/att_00034.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00034.png
--------------------------------------------------------------------------------
/images/att_00035.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00035.png
--------------------------------------------------------------------------------
/images/att_00036.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00036.png
--------------------------------------------------------------------------------
/images/att_00037.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00037.png
--------------------------------------------------------------------------------
/images/att_00038.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00038.png
--------------------------------------------------------------------------------
/images/att_00039.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00039.png
--------------------------------------------------------------------------------
/images/att_00040.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00040.png
--------------------------------------------------------------------------------
/images/att_00041.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00041.png
--------------------------------------------------------------------------------
/images/att_00042.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00042.png
--------------------------------------------------------------------------------
/images/att_00043.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00043.png
--------------------------------------------------------------------------------
/images/att_00044.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00044.png
--------------------------------------------------------------------------------
/images/att_00045.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00045.png
--------------------------------------------------------------------------------
/images/att_00046.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00046.png
--------------------------------------------------------------------------------
/images/att_00047.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00047.png
--------------------------------------------------------------------------------
/images/att_00048.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00048.png
--------------------------------------------------------------------------------
/images/att_00049.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00049.png
--------------------------------------------------------------------------------
/images/att_00050.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00050.png
--------------------------------------------------------------------------------
/images/att_00051.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00051.png
--------------------------------------------------------------------------------
/images/att_00052.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00052.png
--------------------------------------------------------------------------------
/images/att_00053.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00053.png
--------------------------------------------------------------------------------
/images/att_00054.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00054.png
--------------------------------------------------------------------------------
/images/att_00055.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00055.png
--------------------------------------------------------------------------------
/images/att_00056.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00056.png
--------------------------------------------------------------------------------
/images/att_00057.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00057.png
--------------------------------------------------------------------------------
/images/att_00058.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00058.png
--------------------------------------------------------------------------------
/images/att_00059.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00059.png
--------------------------------------------------------------------------------
/images/att_00060.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00060.png
--------------------------------------------------------------------------------
/images/att_00061.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00061.png
--------------------------------------------------------------------------------
/images/att_00062.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00062.png
--------------------------------------------------------------------------------
/images/att_00063.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00063.png
--------------------------------------------------------------------------------
/images/att_00064.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00064.png
--------------------------------------------------------------------------------
/images/att_00065.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00065.png
--------------------------------------------------------------------------------
/images/att_00066.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00066.png
--------------------------------------------------------------------------------
/images/att_00067.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00067.png
--------------------------------------------------------------------------------
/images/att_00068.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00068.png
--------------------------------------------------------------------------------
/images/att_00069.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00069.png
--------------------------------------------------------------------------------
/images/att_00070.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00070.png
--------------------------------------------------------------------------------
/images/att_00071.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/att_00071.png
--------------------------------------------------------------------------------
/images/chapter1_add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_add.png
--------------------------------------------------------------------------------
/images/chapter1_busy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_busy.png
--------------------------------------------------------------------------------
/images/chapter1_cat_example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_cat_example.jpg
--------------------------------------------------------------------------------
/images/chapter1_markdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_markdown.png
--------------------------------------------------------------------------------
/images/chapter1_new_notebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_new_notebook.png
--------------------------------------------------------------------------------
/images/chapter1_run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_run.png
--------------------------------------------------------------------------------
/images/chapter1_save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_save.png
--------------------------------------------------------------------------------
/images/chapter1_terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter1_terminal.png
--------------------------------------------------------------------------------
/images/chapter2_bouncing.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter2_bouncing.PNG
--------------------------------------------------------------------------------
/images/chapter2_derivative.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter2_derivative.PNG
--------------------------------------------------------------------------------
/images/chapter2_div.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/images/chapter2_layer3.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter2_layer3.PNG
--------------------------------------------------------------------------------
/images/chapter2_layer4and5.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter2_layer4and5.PNG
--------------------------------------------------------------------------------
/images/chapter2_perfect.svg:
--------------------------------------------------------------------------------
1 |
2 |
79 |
--------------------------------------------------------------------------------
/images/chapter2_sgd.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter2_sgd.PNG
--------------------------------------------------------------------------------
/images/chapter4_1cycle_schedule.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter4_1cycle_schedule.png
--------------------------------------------------------------------------------
/images/chapter4_overfit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter4_overfit.png
--------------------------------------------------------------------------------
/images/chapter7_neuron.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter7_neuron.png
--------------------------------------------------------------------------------
/images/chapter9_bottleneck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_bottleneck.png
--------------------------------------------------------------------------------
/images/chapter9_cat_conv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_cat_conv.png
--------------------------------------------------------------------------------
/images/chapter9_conv_basic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_conv_basic.png
--------------------------------------------------------------------------------
/images/chapter9_conv_pad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_conv_pad.png
--------------------------------------------------------------------------------
/images/chapter9_conv_rgb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_conv_rgb.png
--------------------------------------------------------------------------------
/images/chapter9_conv_stride.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_conv_stride.png
--------------------------------------------------------------------------------
/images/chapter9_loss_landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_loss_landscape.png
--------------------------------------------------------------------------------
/images/chapter9_nopadconv.svg:
--------------------------------------------------------------------------------
1 |
2 |
34 |
--------------------------------------------------------------------------------
/images/chapter9_padconv.svg:
--------------------------------------------------------------------------------
1 |
2 |
48 |
--------------------------------------------------------------------------------
/images/chapter9_rgb_conv_stack.svg:
--------------------------------------------------------------------------------
1 |
2 |
47 |
--------------------------------------------------------------------------------
/images/chapter9_skip_connection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/chapter9_skip_connection.png
--------------------------------------------------------------------------------
/images/chapter9_strideconv.svg:
--------------------------------------------------------------------------------
1 |
2 |
34 |
--------------------------------------------------------------------------------
/images/colorful_dist.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/colorful_dist.jpeg
--------------------------------------------------------------------------------
/images/colorful_summ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/colorful_summ.png
--------------------------------------------------------------------------------
/images/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/cover.png
--------------------------------------------------------------------------------
/images/decision_tree.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/decision_tree.PNG
--------------------------------------------------------------------------------
/images/dl4c.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/dl4c.jpg
--------------------------------------------------------------------------------
/images/doc_ex.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/doc_ex.png
--------------------------------------------------------------------------------
/images/driver.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/driver.PNG
--------------------------------------------------------------------------------
/images/drivetrain-approach.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/drivetrain-approach.png
--------------------------------------------------------------------------------
/images/ethics/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image1.png
--------------------------------------------------------------------------------
/images/ethics/image10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image10.png
--------------------------------------------------------------------------------
/images/ethics/image11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image11.png
--------------------------------------------------------------------------------
/images/ethics/image12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image12.png
--------------------------------------------------------------------------------
/images/ethics/image13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image13.png
--------------------------------------------------------------------------------
/images/ethics/image14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image14.png
--------------------------------------------------------------------------------
/images/ethics/image15.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image15.jpeg
--------------------------------------------------------------------------------
/images/ethics/image16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image16.png
--------------------------------------------------------------------------------
/images/ethics/image17.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image17.jpeg
--------------------------------------------------------------------------------
/images/ethics/image17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image17.png
--------------------------------------------------------------------------------
/images/ethics/image18.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image18.jpeg
--------------------------------------------------------------------------------
/images/ethics/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image2.png
--------------------------------------------------------------------------------
/images/ethics/image3.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image3.jpeg
--------------------------------------------------------------------------------
/images/ethics/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image4.png
--------------------------------------------------------------------------------
/images/ethics/image5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image5.png
--------------------------------------------------------------------------------
/images/ethics/image6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image6.png
--------------------------------------------------------------------------------
/images/ethics/image7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image7.png
--------------------------------------------------------------------------------
/images/ethics/image8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image8.png
--------------------------------------------------------------------------------
/images/ethics/image9.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/ethics/image9.jpeg
--------------------------------------------------------------------------------
/images/fast_template/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image1.png
--------------------------------------------------------------------------------
/images/fast_template/image10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image10.png
--------------------------------------------------------------------------------
/images/fast_template/image11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image11.png
--------------------------------------------------------------------------------
/images/fast_template/image12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image12.png
--------------------------------------------------------------------------------
/images/fast_template/image13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image13.png
--------------------------------------------------------------------------------
/images/fast_template/image14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image14.png
--------------------------------------------------------------------------------
/images/fast_template/image15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image15.png
--------------------------------------------------------------------------------
/images/fast_template/image16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image16.png
--------------------------------------------------------------------------------
/images/fast_template/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image2.png
--------------------------------------------------------------------------------
/images/fast_template/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image3.png
--------------------------------------------------------------------------------
/images/fast_template/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image4.png
--------------------------------------------------------------------------------
/images/fast_template/image5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image5.png
--------------------------------------------------------------------------------
/images/fast_template/image6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image6.png
--------------------------------------------------------------------------------
/images/fast_template/image7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image7.png
--------------------------------------------------------------------------------
/images/fast_template/image8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image8.png
--------------------------------------------------------------------------------
/images/fast_template/image9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/fast_template/image9.png
--------------------------------------------------------------------------------
/images/gitblog/commit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/commit.png
--------------------------------------------------------------------------------
/images/gitblog/image1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/image1.png
--------------------------------------------------------------------------------
/images/gitblog/image2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/image2.png
--------------------------------------------------------------------------------
/images/gitblog/image3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/image3.png
--------------------------------------------------------------------------------
/images/gitblog/image4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/image4.png
--------------------------------------------------------------------------------
/images/gitblog/image5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/gitblog/image5.png
--------------------------------------------------------------------------------
/images/grad_illustration.svg:
--------------------------------------------------------------------------------
1 |
2 |
71 |
--------------------------------------------------------------------------------
/images/grizzly.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/grizzly.jpg
--------------------------------------------------------------------------------
/images/healthy_skin.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/healthy_skin.gif
--------------------------------------------------------------------------------
/images/layer1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/layer1.png
--------------------------------------------------------------------------------
/images/layer2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/layer2.png
--------------------------------------------------------------------------------
/images/mnist3_xl.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/mnist3_xl.gif
--------------------------------------------------------------------------------
/images/mnist3_xl_300.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/mnist3_xl_300.gif
--------------------------------------------------------------------------------
/images/mnist3_xl_custom.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/mnist3_xl_custom.gif
--------------------------------------------------------------------------------
/images/pratchett.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/pratchett.png
--------------------------------------------------------------------------------
/images/profit_drivers.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/profit_drivers.gif
--------------------------------------------------------------------------------
/images/sklearn_features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/sklearn_features.png
--------------------------------------------------------------------------------
/images/tarsier.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/tarsier.png
--------------------------------------------------------------------------------
/images/timeseries1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/timeseries1.png
--------------------------------------------------------------------------------
/images/timeseries2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/timeseries2.png
--------------------------------------------------------------------------------
/images/timeseries3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fastai/fastbook2e/54f038b07ad589171bc62d36efcd5263885e7767/images/timeseries3.png
--------------------------------------------------------------------------------
/index.qmd:
--------------------------------------------------------------------------------
1 | ---
2 | toc: false
3 | ---
4 |
5 | # Preface {.unnumbered}
6 |
7 | This is a preview version of [Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527). Note that chapters shown in *italics* in the sidebar are only available as a preview of the first few paragraphs. The full content of all chapters is available for free as Jupyter Notebooks [here](https://github.com/fastai/fastbook/) with only basic formatting. A nicely typeset version can be purchased [from Amazon](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527).
8 |
9 | {.fai-imager .preview-image width=190}
10 |
11 | Here's a list of all the full chapters available here:
12 |
13 | - @sec-intro: Your Deep Learning Journey
14 | - @sec-mnist-basics: Under the Hood: Training a Digit Classifier
15 | - @sec-convolutions: Convolutional Neural Networks
16 | - @sec-resnet: ResNets
17 | - @sec-accel-sgd: The Training Process
18 | - @sec-foundations: A Neural Net from the Foundations
19 |
20 | This book is designed to go with our free deep learning course, available at [course.fast.ai](https://course.fast.ai).
21 |
22 | Once you've finished the first eight chapters of the book, or completed course.fast.ai, you'll be ready for our new course, [From Deep Learning Foundations to Stable Diffusion](https://www.fast.ai/posts/part2-2022.html), which starts on Oct 11th 2022 (Australian time; Oct 10th US time). You can sign up [here](https://itee.uq.edu.au/event/2022/practical-deep-learning-coders-uq-fastai-part-2). If you're an open source author you may qualify for a scholarship -- [details here](https://www.fast.ai/posts/part2-2022-signup.html).
23 |
24 |
--------------------------------------------------------------------------------
/references.bib:
--------------------------------------------------------------------------------
1 | @article{knuth84,
2 | author = {Knuth, Donald E.},
3 | title = {Literate Programming},
4 | year = {1984},
5 | issue_date = {May 1984},
6 | publisher = {Oxford University Press, Inc.},
7 | address = {USA},
8 | volume = {27},
9 | number = {2},
10 | issn = {0010-4620},
11 | url = {https://doi.org/10.1093/comjnl/27.2.97},
12 | doi = {10.1093/comjnl/27.2.97},
13 | journal = {Comput. J.},
14 | month = may,
15 | pages = {97–111},
16 | numpages = {15}
17 | }
18 |
19 |
20 |
--------------------------------------------------------------------------------
/references.qmd:
--------------------------------------------------------------------------------
1 | # References {.unnumbered}
2 |
3 | ::: {#refs}
4 | :::
5 |
--------------------------------------------------------------------------------
/settings.ini:
--------------------------------------------------------------------------------
1 | [DEFAULT]
2 | lib_name = fastbook2e
3 | user = fastai
4 | description = fastbook2e
5 | keywords = jupyter notebook asciidoc
6 | author = Jeremy Howard and Sylvain Gugger
7 | author_email = info@fast.ai
8 | copyright = fast.ai
9 | branch = master
10 | version = 0.0.1
11 | min_python = 3.6
12 | audience = Developers
13 | language = English
14 | custom_sidebar = False
15 | license = custom
16 | status = 2
17 | nbs_path = .
18 | doc_path = docs
19 | git_url = https://github.com/fastai/fastbook
20 | lib_path = fastbook2e
21 | title = fastbook2e
22 | doc_host = https://fastai.github.io
23 | doc_baseurl = /fastbook2e/
24 | host = github
25 |
26 |
--------------------------------------------------------------------------------
/styles.css:
--------------------------------------------------------------------------------
1 | .cell {
2 | margin-bottom: 1rem;
3 | }
4 |
5 | .cell > .sourceCode {
6 | margin-bottom: 0;
7 | }
8 |
9 | .cell-output > pre {
10 | margin-bottom: 0;
11 | }
12 |
13 | .cell-output > pre, .cell-output > .sourceCode > pre, .cell-output-stdout > pre {
14 | margin-left: 0.8rem;
15 | margin-top: 0;
16 | background: none;
17 | border-left: 2px solid lightsalmon;
18 | border-top-left-radius: 0;
19 | border-top-right-radius: 0;
20 | }
21 |
22 | .cell-output > .sourceCode {
23 | border: none;
24 | }
25 |
26 | .cell-output > .sourceCode {
27 | background: none;
28 | margin-top: 0;
29 | }
30 |
31 | div.description {
32 | padding-left: 2px;
33 | padding-top: 5px;
34 | font-style: italic;
35 | font-size: 135%;
36 | opacity: 70%;
37 | }
38 |
39 | .quarto-figure-center > figure > figcaption {
40 | text-align: center;
41 | font-style: italic;
42 | }
43 |
44 | .fai-imager {
45 | float:right;
46 | margin:1rem;
47 | }
48 |
49 |
--------------------------------------------------------------------------------
/tools/clean.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import nbformat
4 | from nbdev.export import *
5 | from nbdev.clean import *
6 | from fastcore.all import *
7 |
8 | _re_header = re.compile(r'^#+\s+\S+')
9 | _re_clean = re.compile(r'^\s*#\s*clean\s*')
10 |
11 | def is_header_cell(cell): return _re_header.search(cell['source']) is not None
12 | def is_clean_cell(cell): return _re_clean.search(cell['source']) is not None
13 |
14 | _re_questionnaire = re.compile(r'^#+\s+Questionnaire')
15 |
16 | def get_stop_idx(cells):
17 | i = 0
18 | while i < len(cells) and _re_questionnaire.search(cells[i]['source']) is None: i+=1
19 | return i
20 |
21 | def clean_tags(cell):
22 | if is_header_cell(cell): return cell
23 | for attr in ["id", "caption", "alt", "width", "hide_input", "hide_output", "clean"]:
24 | cell["source"] = re.sub(r'#\s*' + attr + r'.*?($|\n)', '', cell["source"])
25 | return cell
26 |
27 | def proc_nb(fname, dest):
28 | nb = read_nb(fname)
29 | i = get_stop_idx(nb['cells'])
30 | nb['cells'] = [clean_tags(c) for j,c in enumerate(nb['cells']) if
31 | c['cell_type']=='code' or is_header_cell(c) or is_clean_cell(c) or j >= i]
32 | clean_nb(nb, clear_all=True)
33 | with open(dest/fname.name, 'w') as f: nbformat.write(nb, f, version=4)
34 |
35 | def proc_all(path='.', dest_path='clean'):
36 | path,dest_path = Path(path),Path(dest_path)
37 | fns = [f for f in path.iterdir() if f.suffix == '.ipynb' and not f.name.startswith('_')]
38 | for fn in fns: proc_nb(fn, dest=dest_path)
39 |
40 | if __name__=='__main__': proc_all()
41 |
42 |
--------------------------------------------------------------------------------
/tools/fix_imgs.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "cells": [
3 | {
4 | "cell_type": "code",
5 | "execution_count": null,
6 | "id": "d35ddef5",
7 | "metadata": {},
8 | "outputs": [],
9 | "source": [
10 | "from fastcore.all import *\n",
11 | "from execnb.nbio import *"
12 | ]
13 | },
14 | {
15 | "cell_type": "code",
16 | "execution_count": null,
17 | "id": "891eb357",
18 | "metadata": {},
19 | "outputs": [],
20 | "source": [
21 | "from bs4 import BeautifulSoup\n",
22 | "from bs4.formatter import HTMLFormatter"
23 | ]
24 | },
25 | {
26 | "cell_type": "code",
27 | "execution_count": null,
28 | "id": "8f3176d9",
29 | "metadata": {},
30 | "outputs": [
31 | {
32 | "data": {
33 | "text/plain": [
34 | "'Natural'"
35 | ]
36 | },
37 | "execution_count": null,
38 | "metadata": {},
39 | "output_type": "execute_result"
40 | }
41 | ],
42 | "source": [
43 | "b = BeautifulSoup('hi ')\n",
44 | "im = b.img\n",
45 | "im['alt']"
46 | ]
47 | },
48 | {
49 | "cell_type": "code",
50 | "execution_count": null,
51 | "id": "9fa51767",
52 | "metadata": {},
53 | "outputs": [],
54 | "source": [
55 | "def img2md(im):\n",
56 | " r = ''\n",
61 | " d = {}\n",
62 | " a = im.get('width', None)\n",
63 | " if a: d['width'] = a\n",
64 | " a = im.get('id', None)\n",
65 | " if a: d['id'] = 'fig-'+re.sub('_', '-', a)\n",
66 | " a = im.get('alt', None)\n",
67 | " if a: d['fig-alt'] = a\n",
68 | " if d: r+='{' + ' '.join(f'{k}=\"{v}\"' for k,v in d.items()) + '}'\n",
69 | " return r"
70 | ]
71 | },
72 | {
73 | "cell_type": "code",
74 | "execution_count": null,
75 | "id": "ac9430d1",
76 | "metadata": {},
77 | "outputs": [],
78 | "source": [
79 | "class UnsortedAttributes(HTMLFormatter):\n",
80 | " def attributes(self, tag): yield from tag.attrs.items()\n",
81 | "\n",
82 | "def enc(t): return t.encode_contents(formatter=UnsortedAttributes()).decode('utf-8')"
83 | ]
84 | },
85 | {
86 | "cell_type": "code",
87 | "execution_count": null,
88 | "id": "232f3673",
89 | "metadata": {},
90 | "outputs": [],
91 | "source": [
92 | "def nb_images(nb):\n",
93 | " for c in nb.cells:\n",
94 | " o = c.source\n",
95 | " if c.cell_type=='markdown' and '>', fix_sec, o)\n",
128 | " o = re.sub(r'<<(\\w+)>>', fix_fig, o)\n",
129 | " c.source = o\n",
130 | " # print(o)"
131 | ]
132 | },
133 | {
134 | "cell_type": "code",
135 | "execution_count": null,
136 | "id": "3b24c7a7",
137 | "metadata": {},
138 | "outputs": [],
139 | "source": [
140 | "def fix_lab(o): return '#| label: fig-' + re.sub('_', '-', o.group(1))"
141 | ]
142 | },
143 | {
144 | "cell_type": "code",
145 | "execution_count": null,
146 | "id": "35df4b8f",
147 | "metadata": {},
148 | "outputs": [],
149 | "source": [
150 | "def nb_comput(nb):\n",
151 | " for c in nb.cells:\n",
152 | " o = c.source\n",
153 | " if c.cell_type=='code' and '#id' in o:\n",
154 | " o = re.sub(r'^#id +(\\w+)', fix_lab, o, flags=re.MULTILINE)\n",
155 | " o = re.sub(r'^#caption +(.+)', r'#| fig-cap: \"\\1\"', o, flags=re.MULTILINE)\n",
156 | " o = re.sub(r'^#alt +(.+)', r'#| fig-alt: \"\\1\"', o, flags=re.MULTILINE)\n",
157 | " c.source = o\n",
158 | " # print(o)"
159 | ]
160 | },
161 | {
162 | "cell_type": "code",
163 | "execution_count": null,
164 | "id": "762e5dee",
165 | "metadata": {},
166 | "outputs": [],
167 | "source": [
168 | "def fix_nb(path):\n",
169 | " nb = read_nb(path)\n",
170 | " nb_images(nb)\n",
171 | " nb_xrefs(nb)\n",
172 | " nb_comput(nb)\n",
173 | " write_nb(nb, path)"
174 | ]
175 | },
176 | {
177 | "cell_type": "code",
178 | "execution_count": null,
179 | "id": "5351c94f",
180 | "metadata": {},
181 | "outputs": [],
182 | "source": [
183 | "# fix_nb('../mnist_basics.ipynb')"
184 | ]
185 | },
186 | {
187 | "cell_type": "code",
188 | "execution_count": null,
189 | "id": "591ffa9f",
190 | "metadata": {},
191 | "outputs": [],
192 | "source": [
193 | "# for path in Path('..').ls(file_exts=['.ipynb']): fix_nb(path)"
194 | ]
195 | },
196 | {
197 | "cell_type": "code",
198 | "execution_count": null,
199 | "id": "68b7c95a",
200 | "metadata": {},
201 | "outputs": [],
202 | "source": []
203 | }
204 | ],
205 | "metadata": {
206 | "kernelspec": {
207 | "display_name": "Python 3 (ipykernel)",
208 | "language": "python",
209 | "name": "python3"
210 | }
211 | },
212 | "nbformat": 4,
213 | "nbformat_minor": 5
214 | }
215 |
--------------------------------------------------------------------------------