{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Welcome to fastai" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "hide_input": true }, "outputs": [], "source": [ "from fastai.vision import *\n", "from fastai.gen_doc.nbdoc import *\n", "from fastai.core import *\n", "from fastai.basic_train import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The fastai library simplifies training fast and accurate neural nets using modern best practices. It's based on research in to deep learning best practices undertaken at [fast.ai](http://www.fast.ai), including \"out of the box\" support for [`vision`](/vision.html#vision), [`text`](/text.html#text), [`tabular`](/tabular.html#tabular), and [`collab`](/collab.html#collab) (collaborative filtering) models. If you're looking for the source code, head over to the [fastai repo](https://github.com/fastai/fastai) on GitHub. For brief examples, see the [examples](https://github.com/fastai/fastai/tree/master/examples) folder; detailed examples are provided in the full documentation (see the sidebar). For example, here's how to train an MNIST model using [resnet18](https://arxiv.org/abs/1512.03385) (from the [vision example](https://github.com/fastai/fastai/blob/master/examples/vision.ipynb)):" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Total time: 00:09
epoch | \n", "train_loss | \n", "valid_loss | \n", "accuracy | \n", "
---|---|---|---|
1 | \n", "0.128580 | \n", "0.082647 | \n", "0.973503 | \n", "
rotate
[source][test]rotate
(**`degrees`**:[`uniform`](/torch_core.html#uniform)) → [`Image`](/vision.image.html#Image) :: [`TfmAffine`](/vision.image.html#TfmAffine)\n",
"\n",
"transform
that handles the transformations of our data (data augmentation for computer vision, numericalizing and tokenizing for text and preprocessing for tabular)\n",
"- a submodule named data
that contains the class that will create datasets specific to this application and the helper functions to create [`DataBunch`](/basic_data.html#DataBunch) objects.\n",
"- a submodule named models
that contains the models specific to this application.\n",
"- optionally, a submodule named {application}.learner
that will contain [`Learner`](/basic_train.html#Learner) specific to the application.\n",
"\n",
"Here is a graph of the key module dependencies:"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"![Modules overview](imgs/dependencies.svg)"
]
}
],
"metadata": {
"jekyll": {
"keywords": "fastai",
"toc": "false"
},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}