Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 50 additions & 42 deletions docs/practices/cv/convnet_image_classification.ipynb

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions docs/practices/cv/image_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"# 使用LeNet在MNIST数据集实现图像分类\n",
"\n",
"**作者:** [PaddlePaddle](https://github.com/PaddlePaddle) <br>\n",
"**日期:** 2021.10 <br>\n",
"**日期:** 2021.11 <br>\n",
"**摘要:** 本示例教程演示如何在MNIST数据集上用LeNet进行图像分类。"
]
},
Expand All @@ -21,7 +21,7 @@
"source": [
"## 一、环境配置\n",
"\n",
"本教程基于Paddle 2.2.0-rc0 编写,如果您的环境不是本版本,请先参考官网[安装](https://www.paddlepaddle.org.cn/install/quick) Paddle 2.1 。"
"本教程基于Paddle 2.2.0 编写,如果你的环境不是本版本,请先参考官网[安装](https://www.paddlepaddle.org.cn/install/quick) Paddle 2.2.0 。"
]
},
{
Expand All @@ -35,7 +35,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"2.2.0-rc0\n"
"2.2.0\n"
]
}
],
Expand Down Expand Up @@ -188,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand All @@ -208,7 +208,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 8,
"metadata": {
"collapsed": false
},
Expand All @@ -219,9 +219,9 @@
"text": [
"The loss value printed in the log is the current step, and the metric is the average value of previous steps.\n",
"Epoch 1/2\n",
"step 938/938 [==============================] - loss: 0.0329 - acc: 0.9399 - 10ms/step \n",
"step 938/938 [==============================] - loss: 0.0763 - acc: 0.9526 - 11ms/step \n",
"Epoch 2/2\n",
"step 938/938 [==============================] - loss: 0.0092 - acc: 0.9798 - 10ms/step \n"
"step 938/938 [==============================] - loss: 0.0075 - acc: 0.9835 - 10ms/step \n"
]
}
],
Expand All @@ -245,7 +245,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 9,
"metadata": {
"collapsed": false
},
Expand All @@ -255,17 +255,17 @@
"output_type": "stream",
"text": [
"Eval begin...\n",
"step 157/157 [==============================] - loss: 4.4728e-04 - acc: 0.9857 - 8ms/step \n",
"step 157/157 [==============================] - loss: 2.0455e-04 - acc: 0.9864 - 8ms/step \n",
"Eval samples: 10000\n"
]
},
{
"data": {
"text/plain": [
"{'loss': [0.0004472804], 'acc': 0.9857}"
"{'loss': [0.00020454898], 'acc': 0.9864}"
]
},
"execution_count": 11,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -297,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 10,
"metadata": {
"collapsed": false
},
Expand All @@ -306,14 +306,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"epoch: 0, batch_id: 0, loss is: [3.2611141], acc is: [0.078125]\n",
"epoch: 0, batch_id: 300, loss is: [0.24404016], acc is: [0.921875]\n",
"epoch: 0, batch_id: 600, loss is: [0.03953885], acc is: [1.]\n",
"epoch: 0, batch_id: 900, loss is: [0.03700985], acc is: [0.984375]\n",
"epoch: 1, batch_id: 0, loss is: [0.05806625], acc is: [0.96875]\n",
"epoch: 1, batch_id: 300, loss is: [0.06538856], acc is: [0.953125]\n",
"epoch: 1, batch_id: 600, loss is: [0.03884572], acc is: [0.984375]\n",
"epoch: 1, batch_id: 900, loss is: [0.01922364], acc is: [0.984375]\n"
"epoch: 0, batch_id: 0, loss is: [3.0316443], acc is: [0.0625]\n",
"epoch: 0, batch_id: 300, loss is: [0.16949166], acc is: [0.9375]\n",
"epoch: 0, batch_id: 600, loss is: [0.04333997], acc is: [0.984375]\n",
"epoch: 0, batch_id: 900, loss is: [0.0382758], acc is: [0.984375]\n",
"epoch: 1, batch_id: 0, loss is: [0.05184244], acc is: [0.96875]\n",
"epoch: 1, batch_id: 300, loss is: [0.04323502], acc is: [0.984375]\n",
"epoch: 1, batch_id: 600, loss is: [0.06236228], acc is: [0.984375]\n",
"epoch: 1, batch_id: 900, loss is: [0.03451318], acc is: [0.96875]\n"
]
}
],
Expand Down
102 changes: 34 additions & 68 deletions docs/practices/cv/image_search.ipynb

Large diffs are not rendered by default.

93 changes: 14 additions & 79 deletions docs/practices/cv/image_segmentation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"# 基于U-Net卷积神经网络实现宠物图像分割\n",
"\n",
"**作者:** [PaddlePaddle](https://github.com/PaddlePaddle)<br>\n",
"**日期:** 2021.10<br>\n",
"**日期:** 2021.11<br>\n",
"**摘要:** 本示例教程使用U-Net实现图像分割。"
]
},
Expand Down Expand Up @@ -47,7 +47,7 @@
{
"data": {
"text/plain": [
"'2.2.0-rc0'"
"'2.2.0'"
]
},
"execution_count": null,
Expand Down Expand Up @@ -731,6 +731,14 @@
"collapsed": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"W1108 15:37:35.553402 159 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 10.1, Runtime API Version: 10.1\n",
"W1108 15:37:35.558030 159 device_context.cc:465] device: 0, cuDNN Version: 7.6.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
Expand Down Expand Up @@ -862,7 +870,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 15,
"metadata": {
"collapsed": false
},
Expand All @@ -873,80 +881,7 @@
"text": [
"The loss value printed in the log is the current step, and the metric is the average value of previous steps.\n",
"Epoch 1/15\n",
"step 197/197 [==============================] - loss: 0.7315 - 255ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.6949 - 232ms/step \n",
"Eval samples: 1108\n",
"Epoch 2/15\n",
"step 197/197 [==============================] - loss: 0.4554 - 249ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.5985 - 232ms/step \n",
"Eval samples: 1108\n",
"Epoch 3/15\n",
"step 197/197 [==============================] - loss: 0.4946 - 273ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.5212 - 264ms/step \n",
"Eval samples: 1108\n",
"Epoch 4/15\n",
"step 197/197 [==============================] - loss: 0.6329 - 263ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.6810 - 233ms/step \n",
"Eval samples: 1108\n",
"Epoch 5/15\n",
"step 197/197 [==============================] - loss: 0.5155 - 247ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4560 - 234ms/step \n",
"Eval samples: 1108\n",
"Epoch 6/15\n",
"step 197/197 [==============================] - loss: 0.3929 - 251ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4077 - 233ms/step \n",
"Eval samples: 1108\n",
"Epoch 7/15\n",
"step 197/197 [==============================] - loss: 0.2830 - 260ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.3842 - 232ms/step \n",
"Eval samples: 1108\n",
"Epoch 8/15\n",
"step 197/197 [==============================] - loss: 0.2933 - 259ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4037 - 231ms/step \n",
"Eval samples: 1108\n",
"Epoch 9/15\n",
"step 197/197 [==============================] - loss: 0.4570 - 252ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.5587 - 230ms/step \n",
"Eval samples: 1108\n",
"Epoch 10/15\n",
"step 197/197 [==============================] - loss: 0.3355 - 256ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4318 - 231ms/step \n",
"Eval samples: 1108\n",
"Epoch 11/15\n",
"step 197/197 [==============================] - loss: 0.3249 - 247ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4173 - 232ms/step \n",
"Eval samples: 1108\n",
"Epoch 12/15\n",
"step 197/197 [==============================] - loss: 0.2620 - 258ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.3748 - 235ms/step \n",
"Eval samples: 1108\n",
"Epoch 13/15\n",
"step 197/197 [==============================] - loss: 0.3584 - 260ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4346 - 233ms/step \n",
"Eval samples: 1108\n",
"Epoch 14/15\n",
"step 197/197 [==============================] - loss: 0.3658 - 248ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4121 - 239ms/step \n",
"Eval samples: 1108\n",
"Epoch 15/15\n",
"step 197/197 [==============================] - loss: 0.3259 - 247ms/step \n",
"Eval begin...\n",
"step 35/35 [==============================] - loss: 0.4794 - 235ms/step \n",
"Eval samples: 1108\n"
"step 80/197 [===========>..................] - loss: 1.0866 - ETA: 29s - 248ms/st"
]
}
],
Expand Down Expand Up @@ -992,7 +927,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -1025,7 +960,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"metadata": {
"collapsed": false
},
Expand Down
Loading