Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sgugger committed Mar 27, 2019
1 parent 71247ae commit 00b8276
Show file tree
Hide file tree
Showing 11 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion docs/applications.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2 id="Module-structure">Module structure<a class="anchor-link" href="#Module-s
<h3 id="transform"><a href="/tabular.transform.html#tabular.transform"><code>transform</code></a><a class="anchor-link" href="#transform">&#182;</a></h3><p>This sub-module deals with the pre-processing (data augmentation for images, cleaning for tabular data, tokenizing and numericalizing for text).</p>
<h3 id="data"><a href="/tabular.data.html#tabular.data"><code>data</code></a><a class="anchor-link" href="#data">&#182;</a></h3><p>This sub-module defines the dataset class(es) to deal with this kind of data.</p>
<h3 id="models"><a href="/tabular.models.html#tabular.models"><code>models</code></a><a class="anchor-link" href="#models">&#182;</a></h3><p>This sub-module defines the specific models used for this kind of data.</p>
<h3 id="learner"><a href="/text.learner.html#text.learner"><code>learner</code></a><a class="anchor-link" href="#learner">&#182;</a></h3><p>When it exists, this sub-module contains functions will directly bind this data with a suitable model and add the necessary callbacks.</p>
<h3 id="learner"><a href="/text.learner.html#text.learner"><code>learner</code></a><a class="anchor-link" href="#learner">&#182;</a></h3><p>When it exists, this sub-module contains functions that will directly bind this data with a suitable model and add the necessary callbacks.</p>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/basic_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ <h4 id="load_data" class="doc_header"><code>load_data</code><a href="https://git
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>This is to allow you to easily create a new <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> with a different bath size for instance. You will also need to reapply any normalization (in vision) you might have done on your original <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>.</p>
<p>This is to allow you to easily create a new <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> with a different batch size for instance. You will also need to reapply any normalization (in vision) you might have done on your original <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>.</p>

</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions docs/basic_train.html
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@ <h4 id="Learner.export" class="doc_header"><code>export</code><a href="https://g


<div class="output_markdown rendered_html output_subarea ">
<h4 id="load_learner" class="doc_header"><code>load_learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L587" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#load_learner-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>load_learner</code>(<strong><code>path</code></strong>:<code>PathOrStr</code>, <strong><code>fname</code></strong>:<code>PathOrStr</code>=<strong><em><code>'export.pkl'</code></em></strong>, <strong><code>test</code></strong>:<a href="/data_block.html#ItemList"><code>ItemList</code></a>=<strong><em><code>None</code></em></strong>, <strong>**<code>db_kwargs</code></strong>)</p>
<h4 id="load_learner" class="doc_header"><code>load_learner</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L588" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#load_learner-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>load_learner</code>(<strong><code>path</code></strong>:<code>PathOrStr</code>, <strong><code>fname</code></strong>:<code>PathOrStr</code>=<strong><em><code>'export.pkl'</code></em></strong>, <strong><code>test</code></strong>:<a href="/data_block.html#ItemList"><code>ItemList</code></a>=<strong><em><code>None</code></em></strong>, <strong>**<code>db_kwargs</code></strong>)</p>
</blockquote>
<div class="collapse" id="load_learner-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#load_learner-pytest" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></a><p>Tests found for <code>load_learner</code>:</p><ul><li><code>pytest -sv tests/test_basic_train.py::test_export_load_learner</code> <a href="https://github.com/fastai/fastai/blob/master/tests/test_basic_train.py#L218" class="source_link" style="float:right">[source]</a></li></ul><p>To run tests please refer to this <a href="/dev/test.html#quick-guide">guide</a>.</p></div></div><p>Load a <a href="/basic_train.html#Learner"><code>Learner</code></a> object saved with <code>export_state</code> in <code>path/fn</code> with empty data, optionally add <code>test</code> and load on <code>cpu</code>.</p>

Expand Down Expand Up @@ -2654,7 +2654,7 @@ <h3 id="Plotting-methods">Plotting methods<a class="anchor-link" href="#Plotting


<div class="output_markdown rendered_html output_subarea ">
<h4 id="Recorder.plot" class="doc_header"><code>plot</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L518" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>10</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>5</code></em></strong>, <strong><code>suggestion</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>, <strong>**<code>kwargs</code></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
<h4 id="Recorder.plot" class="doc_header"><code>plot</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L517" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>10</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>5</code></em></strong>, <strong><code>suggestion</code></strong>:<code>bool</code>=<strong><em><code>False</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>, <strong>**<code>kwargs</code></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
</blockquote>
<div class="collapse" id="Recorder-plot-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Recorder-plot-pytest" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></a><p>No tests found for <code>plot</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Plot learning rate and losses, trimmed between <code>skip_start</code> and <code>skip_end</code>. Optionally plot and return min gradient</p>

Expand Down Expand Up @@ -2746,7 +2746,7 @@ <h4 id="Recorder.plot" class="doc_header"><code>plot</code><a href="https://gith


<div class="output_markdown rendered_html output_subarea ">
<h4 id="Recorder.plot_losses" class="doc_header"><code>plot_losses</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L542" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot_losses-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_losses</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
<h4 id="Recorder.plot_losses" class="doc_header"><code>plot_losses</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L541" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot_losses-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_losses</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
</blockquote>
<div class="collapse" id="Recorder-plot_losses-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Recorder-plot_losses-pytest" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></a><p>No tests found for <code>plot_losses</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Plot training and validation losses.</p>

Expand Down Expand Up @@ -2945,7 +2945,7 @@ <h4 id="Recorder.plot_lr" class="doc_header"><code>plot_lr</code><a href="https:


<div class="output_markdown rendered_html output_subarea ">
<h4 id="Recorder.plot_metrics" class="doc_header"><code>plot_metrics</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L561" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot_metrics-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_metrics</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
<h4 id="Recorder.plot_metrics" class="doc_header"><code>plot_metrics</code><a href="https://github.com/fastai/fastai/blob/master/fastai/basic_train.py#L556" class="source_link" style="float:right">[source]</a><a class="source_link" data-toggle="collapse" data-target="#Recorder-plot_metrics-pytest" style="float:right; padding-right:10px">[test]</a></h4><blockquote><p><code>plot_metrics</code>(<strong><code>skip_start</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>skip_end</code></strong>:<code>int</code>=<strong><em><code>0</code></em></strong>, <strong><code>return_fig</code></strong>:<code>bool</code>=<strong><em><code>None</code></em></strong>) → <code>Optional</code>[<code>Figure</code>]</p>
</blockquote>
<div class="collapse" id="Recorder-plot_metrics-pytest"><div class="card card-body pytest_card"><a type="button" data-toggle="collapse" data-target="#Recorder-plot_metrics-pytest" class="close" aria-label="Close"><span aria-hidden="true">&times;</span></a><p>No tests found for <code>plot_metrics</code>. To contribute a test please refer to <a href="/dev/test.html">this guide</a> and <a href="https://forums.fast.ai/t/improving-expanding-functional-tests/32929">this discussion</a>.</p></div></div><p>Plot metrics collected during training.</p>

Expand Down
2 changes: 1 addition & 1 deletion docs/data_block.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ <h2 id="The-data-block-API">The data block API<a class="anchor-link" href="#The-
<li>How to add a test set?</li>
<li>How to wrap in dataloaders and create the <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a>?</li>
</ol>
<p>Each of these may be addresses with a specific block designed for your unique setup. Your inputs might be in a folder, a csv file, or a dataframe. You may want to split them randomly, by certain indices or depending on the folder they are in. You can have your labels in your csv file or your dataframe, but it may come from folders or a specific function of the input. You may choose to add data augmentation or not. A test set is optional too. Finally you have to set the arguments to put the data together in a <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> (batch size, collate function...)</p>
<p>Each of these may be addressed with a specific block designed for your unique setup. Your inputs might be in a folder, a csv file, or a dataframe. You may want to split them randomly, by certain indices or depending on the folder they are in. You can have your labels in your csv file or your dataframe, but it may come from folders or a specific function of the input. You may choose to add data augmentation or not. A test set is optional too. Finally you have to set the arguments to put the data together in a <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> (batch size, collate function...)</p>
<p>The data block API is called as such because you can mix and match each one of those blocks with the others, allowing for a total flexibility to create your customized <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> for training, validation and testing. The factory methods of the various <a href="/basic_data.html#DataBunch"><code>DataBunch</code></a> are great for beginners but you can't always make your data fit in the tracks they require.</p>
<p><img src="imgs/mix_match.png" alt="Mix and match" width="200"></p>
<p>As usual, we'll begin with end-to-end examples, then switch to the details of each of those parts.</p>
Expand Down

0 comments on commit 00b8276

Please sign in to comment.