Merge branch 'master' of github.com:ageron/handson-ml2
commit
523a878531
|
@ -495,14 +495,20 @@
|
|||
" plt.grid(True) # Not shown\n",
|
||||
" plt.axis([-50000, 50000, 0, 1]) # Not shown\n",
|
||||
"\n",
|
||||
"plt.figure(figsize=(8, 4)) # Not shown\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"recall_90_precision = recalls[np.argmax(precisions >= 0.90)]\n",
|
||||
"threshold_90_precision = thresholds[np.argmax(precisions >= 0.90)]\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"plt.figure(figsize=(8, 4)) # Not shown\n",
|
||||
"plot_precision_recall_vs_threshold(precisions, recalls, thresholds)\n",
|
||||
"plt.plot([7813, 7813], [0., 0.9], \"r:\") # Not shown\n",
|
||||
"plt.plot([-50000, 7813], [0.9, 0.9], \"r:\") # Not shown\n",
|
||||
"plt.plot([-50000, 7813], [0.4368, 0.4368], \"r:\")# Not shown\n",
|
||||
"plt.plot([7813], [0.9], \"ro\") # Not shown\n",
|
||||
"plt.plot([7813], [0.4368], \"ro\") # Not shown\n",
|
||||
"save_fig(\"precision_recall_vs_threshold_plot\") # Not shown\n",
|
||||
"plt.plot([threshold_90_precision, threshold_90_precision], [0., 0.9], \"r:\") # Not shown\n",
|
||||
"plt.plot([-50000, threshold_90_precision], [0.9, 0.9], \"r:\") # Not shown\n",
|
||||
"plt.plot([-50000, threshold_90_precision], [recall_90_precision, recall_90_precision], \"r:\")# Not shown\n",
|
||||
"plt.plot([threshold_90_precision], [0.9], \"ro\") # Not shown\n",
|
||||
"plt.plot([threshold_90_precision], [recall_90_precision], \"ro\") # Not shown\n",
|
||||
"save_fig(\"precision_recall_vs_threshold_plot\") # Not shown\n",
|
||||
"plt.show()"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -717,8 +717,8 @@
|
|||
" keras.layers.BatchNormalization(),\n",
|
||||
" keras.layers.Activation(\"relu\"),\n",
|
||||
" keras.layers.Dense(100, use_bias=False),\n",
|
||||
" keras.layers.Activation(\"relu\"),\n",
|
||||
" keras.layers.BatchNormalization(),\n",
|
||||
" keras.layers.Activation(\"relu\"),\n",
|
||||
" keras.layers.Dense(10, activation=\"softmax\")\n",
|
||||
"])"
|
||||
]
|
||||
|
|
|
@ -45,7 +45,7 @@ If you're on Windows, and you want to go through chapter 18 on Reinforcement Lea
|
|||
|
||||
|
||||
## Start Jupyter
|
||||
You're almost there! You just need to register the `tf2` conda environment to Jupyter. The notebooks in this project will defaut to the environment named `python3`, so it's best to register this environment using the name `python3` (if you prefer to use another name, you will have to select it in the "Kernel > Change kernel..." menu in Jupyter every time you open a notebook):
|
||||
You're almost there! You just need to register the `tf2` conda environment to Jupyter. The notebooks in this project will default to the environment named `python3`, so it's best to register this environment using the name `python3` (if you prefer to use another name, you will have to select it in the "Kernel > Change kernel..." menu in Jupyter every time you open a notebook):
|
||||
|
||||
$ python3 -m ipykernel install --user --name=python3
|
||||
|
||||
|
|
|
@ -525,7 +525,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"As you might guess, dividing a vector by a scalar is equivalent to multiplying by its inverse:\n",
|
||||
"As you might guess, dividing a vector by a scalar is equivalent to multiplying by its multiplicative inverse (reciprocal):\n",
|
||||
"\n",
|
||||
"$\\dfrac{\\textbf{u}}{\\lambda} = \\dfrac{1}{\\lambda} \\times \\textbf{u}$"
|
||||
]
|
||||
|
@ -1062,7 +1062,7 @@
|
|||
" Q_{m1} + R_{m1} & Q_{m2} + R_{m2} & Q_{m3} + R_{m3} & \\cdots & Q_{mn} + R_{mn} \\\\\n",
|
||||
"\\end{bmatrix}$\n",
|
||||
"\n",
|
||||
"For example, let's create a $2 \\times 3$ matric $B$ and compute $A + B$:"
|
||||
"For example, let's create a $2 \\times 3$ matrix $B$ and compute $A + B$:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue