Skip to content

Commit

Permalink
udpate to reflect 2.0RC version numbers (PaddlePaddle/book#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzhang533 authored and wadefelix committed Jul 30, 2021
1 parent 2c68eb7 commit 0acb01c
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 135 deletions.
93 changes: 50 additions & 43 deletions paddle2.0_docs/dynamic_graph/dynamic_graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"0.0.0\n"
"2.0.0-rc0\n"
]
}
],
Expand Down Expand Up @@ -60,19 +60,19 @@
"output_type": "stream",
"text": [
"Tensor(shape=[4, 2], dtype=float32, place=CPUPlace, stop_gradient=True,\n",
" [[-0.48561832, 0.19684727],\n",
" [0.21801907, 0.95240211],\n",
" [-1.50321424, -0.91024435],\n",
" [-1.11347270, 0.38288113]])\n",
" [[1.60883498, 0.43853286],\n",
" [1.02701402, 1.91869283],\n",
" [-1.14591110, 1.26320088],\n",
" [-0.04009963, 0.42621592]])\n",
"Tensor(shape=[2], dtype=float32, place=CPUPlace, stop_gradient=True,\n",
" [1., 2.])\n",
"Tensor(shape=[4, 2], dtype=float32, place=CPUPlace, stop_gradient=True,\n",
" [[0.51438165, 2.19684720],\n",
" [1.21801901, 2.95240211],\n",
" [-0.50321424, 1.08975565],\n",
" [-0.11347270, 2.38288116]])\n",
" [[2.60883498, 2.43853283],\n",
" [2.02701402, 3.91869283],\n",
" [-0.14591110, 3.26320076],\n",
" [0.95990038, 2.42621589]])\n",
"Tensor(shape=[4], dtype=float32, place=CPUPlace, stop_gradient=True,\n",
" [-0.09192377, 2.12282324, -3.32370281, -0.34771043])\n"
" [2.48590064, 4.86439991, 1.38049066, 0.81233221])\n"
]
}
],
Expand Down Expand Up @@ -111,10 +111,10 @@
"0 +> [5 6 7]\n",
"1 +> [5 7 9]\n",
"2 +> [ 5 9 15]\n",
"3 +> [ 5 13 33]\n",
"4 +> [ 5 21 87]\n",
"5 -> [ -3 27 237]\n",
"6 -> [ -3 59 723]\n",
"3 -> [-3 3 21]\n",
"4 -> [-3 11 75]\n",
"5 +> [ 5 37 249]\n",
"6 +> [ 5 69 735]\n",
"7 +> [ 5 133 2193]\n",
"8 -> [ -3 251 6555]\n",
"9 -> [ -3 507 19677]\n"
Expand Down Expand Up @@ -147,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -173,28 +173,28 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 [1.2955463]\n",
"200 [0.77384627]\n",
"400 [0.6532049]\n",
"600 [0.25712505]\n",
"800 [0.13184026]\n",
"1000 [0.11274599]\n",
"1200 [0.05956862]\n",
"1400 [0.03555047]\n",
"1600 [0.0093412]\n",
"1800 [0.00385031]\n",
"2000 [0.0032444]\n",
"2200 [0.00211858]\n",
"2400 [0.00196482]\n",
"2600 [0.00393465]\n",
"2800 [0.00075138]\n"
"0 [1.1263953]\n",
"200 [0.58878094]\n",
"400 [0.44702315]\n",
"600 [0.3890689]\n",
"800 [0.06900629]\n",
"1000 [0.12029597]\n",
"1200 [0.01054306]\n",
"1400 [0.00916436]\n",
"1600 [0.00322669]\n",
"1800 [0.00234438]\n",
"2000 [0.01355543]\n",
"2200 [0.00712038]\n",
"2400 [0.00424345]\n",
"2600 [0.00101277]\n",
"2800 [0.0006593]\n"
]
}
],
Expand Down Expand Up @@ -237,23 +237,23 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"step: 0, loss: [0.3281808]\n",
"step: 1, loss: [0.2921526]\n",
"step: 2, loss: [0.2674874]\n",
"step: 3, loss: [0.24434155]\n",
"step: 4, loss: [0.21798739]\n",
"step: 5, loss: [0.18811488]\n",
"step: 6, loss: [0.15787916]\n",
"step: 7, loss: [0.13166748]\n",
"step: 8, loss: [0.11265013]\n",
"step: 9, loss: [0.10081809]\n"
"step: 0, loss: [0.3177247]\n",
"step: 1, loss: [0.28907454]\n",
"step: 2, loss: [0.26719114]\n",
"step: 3, loss: [0.24093461]\n",
"step: 4, loss: [0.20997363]\n",
"step: 5, loss: [0.17817578]\n",
"step: 6, loss: [0.14984149]\n",
"step: 7, loss: [0.12758136]\n",
"step: 8, loss: [0.1117612]\n",
"step: 9, loss: [0.10136593]\n"
]
}
],
Expand Down Expand Up @@ -281,8 +281,15 @@
"source": [
"## The end\n",
"\n",
"可以看到使用动态图带来了更灵活易用的方式来组网和训练。"
"可以看到使用动态图带来了更灵活易用的方式来组网和训练。你也可以在【使用注意力机制的LSTM的机器翻译】和【图片检索】两个示例中看到更完整的动态图的实际应用的灵活和便利。"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
30 changes: 15 additions & 15 deletions paddle2.0_docs/hello_paddle/hello_paddle.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"paddle 0.0.0\n"
"paddle 2.0.0-rc0\n"
]
}
],
Expand Down Expand Up @@ -167,14 +167,14 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"w before optimize: -0.5361055135726929\n",
"w before optimize: -0.4046955108642578\n",
"b before optimize: 0.0\n"
]
}
Expand Down Expand Up @@ -204,7 +204,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -223,19 +223,19 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"epoch 0 loss [1166.1115]\n",
"epoch 1000 loss [7.992399]\n",
"epoch 2000 loss [1.7870402]\n",
"epoch 3000 loss [0.399562]\n",
"epoch 4000 loss [0.0893373]\n",
"finished training, loss [0.02000565]\n"
"epoch 0 loss [1078.4275]\n",
"epoch 1000 loss [8.00917]\n",
"epoch 2000 loss [1.7907966]\n",
"epoch 3000 loss [0.40040764]\n",
"epoch 4000 loss [0.08952817]\n",
"finished training, loss [0.02004853]\n"
]
}
],
Expand Down Expand Up @@ -265,15 +265,15 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"w after optimize: 2.0180110931396484\n",
"b after optimize: 9.76970100402832\n"
"w after optimize: 2.0180301666259766\n",
"b after optimize: 9.769454002380371\n"
]
}
],
Expand All @@ -296,7 +296,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 9,
"metadata": {},
"outputs": [
{
Expand Down
158 changes: 82 additions & 76 deletions paddle2.0_docs/image_search/image_search.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"0.0.0\n"
"2.0.0-rc0\n"
]
}
],
Expand Down

0 comments on commit 0acb01c

Please sign in to comment.