Skip to content
Open
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
12 changes: 6 additions & 6 deletions chapter3_NN/logistic-regression/logistic-regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@
],
"source": [
"# 画出参数更新之前的结果\n",
"w0 = w[0].data[0]\n",
"w1 = w[1].data[0]\n",
"b0 = b.data[0]\n",
"w0 = w[0].data[0].numpy()\n",
"w1 = w[1].data[0].numpy()\n",
"b0 = b.data[0].numpy()\n",
"\n",
"plot_x = np.arange(0.2, 1, 0.01)\n",
"plot_y = (-w0 * plot_x - b0) / w1\n",
Expand Down Expand Up @@ -613,9 +613,9 @@
],
"source": [
"# 画出更新之后的结果\n",
"w0 = w[0].data[0]\n",
"w1 = w[1].data[0]\n",
"b0 = b.data[0]\n",
"w0 = w[0].data[0].numpy()\n",
"w1 = w[1].data[0].numpy()\n",
"b0 = b.data[0].numpy()\n",
"\n",
"plot_x = np.arange(0.2, 1, 0.01)\n",
"plot_y = (-w0 * plot_x - b0) / w1\n",
Expand Down