This commit is contained in:
Jeremy Howard 2022-04-25 15:43:24 +10:00
parent 4a9a281c03
commit a64c789ebe
43 changed files with 203 additions and 232 deletions

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -2917,18 +2917,6 @@
"display_name": "Python 3 (ipykernel)",
"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.9.5"
}
},
"nbformat": 4,

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"# !pip install -Uqq fastbook\n",
"# ! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -2011,4 +2011,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -1054,31 +1054,6 @@
"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.7.7"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": true,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -2,19 +2,19 @@
"cells": [
{
"cell_type": "code",
"execution_count": 134,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@ -816,7 +816,7 @@
},
{
"cell_type": "code",
"execution_count": 113,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@ -826,7 +826,7 @@
},
{
"cell_type": "code",
"execution_count": 114,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -840,7 +840,7 @@
" [ 1.0698, 1.6187]])"
]
},
"execution_count": 114,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -859,7 +859,7 @@
},
{
"cell_type": "code",
"execution_count": 115,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -873,7 +873,7 @@
" [0.7446, 0.8346]])"
]
},
"execution_count": 115,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -895,7 +895,7 @@
},
{
"cell_type": "code",
"execution_count": 116,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -904,7 +904,7 @@
"tensor([0.6025, 0.5021, 0.1332, 0.9966, 0.5959, 0.3661])"
]
},
"execution_count": 116,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -940,7 +940,7 @@
},
{
"cell_type": "code",
"execution_count": 117,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -954,7 +954,7 @@
" [0.3661, 0.6339]])"
]
},
"execution_count": 117,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1017,7 +1017,7 @@
},
{
"cell_type": "code",
"execution_count": 118,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@ -1033,7 +1033,7 @@
},
{
"cell_type": "code",
"execution_count": 119,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1047,7 +1047,7 @@
" [0.3661, 0.6339]])"
]
},
"execution_count": 119,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1065,7 +1065,7 @@
},
{
"cell_type": "code",
"execution_count": 120,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1074,7 +1074,7 @@
"tensor([0.6025, 0.4979, 0.1332, 0.0034, 0.4041, 0.3661])"
]
},
"execution_count": 120,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1093,7 +1093,7 @@
},
{
"cell_type": "code",
"execution_count": 136,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1194,7 +1194,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1203,7 +1203,7 @@
"tensor([-0.6025, -0.4979, -0.1332, -0.0034, -0.4041, -0.3661])"
]
},
"execution_count": 13,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1214,7 +1214,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1223,7 +1223,7 @@
"tensor([-0.6025, -0.4979, -0.1332, -0.0034, -0.4041, -0.3661])"
]
},
"execution_count": 14,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1257,7 +1257,7 @@
},
{
"cell_type": "code",
"execution_count": 124,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1308,7 +1308,7 @@
},
{
"cell_type": "code",
"execution_count": 132,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1344,7 +1344,7 @@
},
{
"cell_type": "code",
"execution_count": 137,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1472,7 +1472,7 @@
},
{
"cell_type": "code",
"execution_count": 128,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@ -1488,7 +1488,7 @@
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1497,7 +1497,7 @@
"tensor(1.8045)"
]
},
"execution_count": 129,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1515,7 +1515,7 @@
},
{
"cell_type": "code",
"execution_count": 130,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1524,7 +1524,7 @@
"tensor(1.8045)"
]
},
"execution_count": 130,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -1544,7 +1544,7 @@
},
{
"cell_type": "code",
"execution_count": 131,
"execution_count": null,
"metadata": {},
"outputs": [
{
@ -1553,7 +1553,7 @@
"tensor([0.5067, 0.6973, 2.0160, 5.6958, 0.9062, 1.0048])"
]
},
"execution_count": 131,
"execution_count": null,
"metadata": {},
"output_type": "execute_result"
}
@ -2726,18 +2726,6 @@
"display_name": "Python 3 (ipykernel)",
"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.9.7"
}
},
"nbformat": 4,

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -1019,18 +1019,6 @@
"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.7.6"
}
},
"nbformat": 4,

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook kaggle waterfallcharts treeinterpreter dtreeviz\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab kaggle waterfallcharts treeinterpreter dtreeviz\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -2279,18 +2279,6 @@
"display_name": "Python 3 (ipykernel)",
"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.9.5"
}
},
"nbformat": 4,

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -246,31 +246,6 @@
"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.7.7"
},
"toc": {
"base_numbering": 1,
"nav_menu": {},
"number_sections": false,
"sideBar": true,
"skip_h1_title": true,
"title_cell": "Table of Contents",
"title_sidebar": "Contents",
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": false
}
},
"nbformat": 4,

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"# !pip install -Uqq fastbook\n",
"# ! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -326,7 +326,7 @@
"source": [
"def binary_cross_entropy(inputs, targets):\n",
" inputs = inputs.sigmoid()\n",
" return -torch.where(targets==1, 1-inputs, inputs).log().mean()"
" return -torch.where(targets==1, inputs, 1-inputs).log().mean()"
]
},
{

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook kaggle waterfallcharts treeinterpreter dtreeviz\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab kaggle waterfallcharts treeinterpreter dtreeviz\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]
@ -770,7 +770,7 @@
"split_at_heading": true
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
}

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]

View File

@ -7,7 +7,7 @@
"outputs": [],
"source": [
"#hide\n",
"!pip install -Uqq fastbook\n",
"! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab\n",
"import fastbook\n",
"fastbook.setup_book()"
]