Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Mar 29, 2021
1 parent d3d4c78 commit 0245d17
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 60 deletions.
58 changes: 29 additions & 29 deletions flash_notebooks/image_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "serious-guard",
"id": "brutal-journalist",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/PyTorchLightning/lightning-flash/blob/master/flash_notebooks/image_classification.ipynb\" target=\"_parent\">\n",
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "markdown",
"id": "documented-empty",
"id": "structural-literacy",
"metadata": {},
"source": [
"In this notebook, we'll go over the basics of lightning Flash by finetuning/predictin with an ImageClassifier on [Hymenoptera Dataset](https://www.kaggle.com/ajayrana/hymenoptera-data) containing ants and bees images.\n",
Expand Down Expand Up @@ -43,7 +43,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "viral-prison",
"id": "explicit-spray",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "markdown",
"id": "industrial-czech",
"id": "boring-spanking",
"metadata": {},
"source": [
"### The notebook runtime has to be re-started once Flash is installed."
Expand All @@ -62,7 +62,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "after-complement",
"id": "boring-failing",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -75,7 +75,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "binary-february",
"id": "domestic-correspondence",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -86,7 +86,7 @@
},
{
"cell_type": "markdown",
"id": "polyphonic-indicator",
"id": "failing-violence",
"metadata": {},
"source": [
"## 1. Download data\n",
Expand All @@ -96,7 +96,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "noticed-statistics",
"id": "registered-approval",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -105,7 +105,7 @@
},
{
"cell_type": "markdown",
"id": "associate-software",
"id": "patent-syndication",
"metadata": {},
"source": [
"<h2>2. Load the data</h2>\n",
Expand All @@ -128,7 +128,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "placed-latino",
"id": "wicked-slope",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -141,7 +141,7 @@
},
{
"cell_type": "markdown",
"id": "built-gambling",
"id": "ancient-portal",
"metadata": {},
"source": [
"### 3. Build the model\n",
Expand All @@ -153,7 +153,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "adjusted-township",
"id": "lucky-hopkins",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -162,7 +162,7 @@
},
{
"cell_type": "markdown",
"id": "liquid-patent",
"id": "finite-fleece",
"metadata": {},
"source": [
"### 4. Create the trainer. Run once on data\n",
Expand All @@ -179,7 +179,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "varying-marathon",
"id": "isolated-aurora",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -188,7 +188,7 @@
},
{
"cell_type": "markdown",
"id": "suited-contemporary",
"id": "available-making",
"metadata": {},
"source": [
"### 5. Finetune the model"
Expand All @@ -197,7 +197,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "personal-dancing",
"id": "multiple-washer",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -206,7 +206,7 @@
},
{
"cell_type": "markdown",
"id": "charged-moderator",
"id": "entire-north",
"metadata": {},
"source": [
"### 6. Test the model"
Expand All @@ -215,7 +215,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "popular-value",
"id": "impressive-participant",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -224,7 +224,7 @@
},
{
"cell_type": "markdown",
"id": "nearby-burning",
"id": "crucial-allen",
"metadata": {},
"source": [
"### 7. Save it!"
Expand All @@ -233,7 +233,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "stuffed-antigua",
"id": "every-rochester",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -242,15 +242,15 @@
},
{
"cell_type": "markdown",
"id": "christian-keeping",
"id": "capital-career",
"metadata": {},
"source": [
"# Predicting"
]
},
{
"cell_type": "markdown",
"id": "verified-queensland",
"id": "abandoned-cambridge",
"metadata": {},
"source": [
"### 1. Load the model from a checkpoint"
Expand All @@ -259,7 +259,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "adjusted-complaint",
"id": "after-explorer",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -268,7 +268,7 @@
},
{
"cell_type": "markdown",
"id": "heated-butter",
"id": "first-compatibility",
"metadata": {},
"source": [
"### 2a. Predict what's on a few images! ants or bees?"
Expand All @@ -277,7 +277,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "continental-smart",
"id": "danish-fundamentals",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -291,7 +291,7 @@
},
{
"cell_type": "markdown",
"id": "neither-procedure",
"id": "personal-controversy",
"metadata": {},
"source": [
"### 2b. Or generate predictions with a whole folder!"
Expand All @@ -300,7 +300,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "solar-brunei",
"id": "tribal-noise",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -311,7 +311,7 @@
},
{
"cell_type": "markdown",
"id": "bibliographic-necessity",
"id": "unlimited-burden",
"metadata": {},
"source": [
"<code style=\"color:#792ee5;\">\n",
Expand Down Expand Up @@ -367,7 +367,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 0245d17

Please sign in to comment.