Browse Source

Update

master
Joerg Marks 2 years ago
parent
commit
764c07f3db
  1. 30
      notebooks/03_ml_basics_ex_3_mlp_clothing.ipynb

30
notebooks/03_ml_basics_ex_3_mlp_clothing.ipynb

@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d63563a8",
"id": "6c180d4b",
"metadata": {},
"outputs": [],
"source": [
@ -16,7 +16,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "062f7519",
"id": "b0e31b9c",
"metadata": {},
"outputs": [],
"source": [
@ -29,7 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "4ccb3a5e",
"id": "1ae1412e",
"metadata": {},
"outputs": [],
"source": [
@ -40,7 +40,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e5ede535",
"id": "f8814914",
"metadata": {},
"outputs": [],
"source": [
@ -52,7 +52,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "39c100c1",
"id": "2810da39",
"metadata": {},
"outputs": [],
"source": [
@ -65,7 +65,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e267a290",
"id": "96f7ff8a",
"metadata": {},
"outputs": [],
"source": [
@ -93,7 +93,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7dae353a",
"id": "a3fe609c",
"metadata": {},
"outputs": [],
"source": [
@ -111,7 +111,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "bd237a4b",
"id": "cf6c978d",
"metadata": {},
"outputs": [],
"source": [
@ -122,7 +122,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "169fc8c4",
"id": "97fc2313",
"metadata": {
"scrolled": true
},
@ -136,7 +136,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7f2e657a",
"id": "ef5f19d0",
"metadata": {},
"outputs": [],
"source": [
@ -164,7 +164,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "298ac3bc",
"id": "c0ebddc4",
"metadata": {},
"outputs": [],
"source": [
@ -183,7 +183,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9a0355ec",
"id": "9175d533",
"metadata": {
"scrolled": true
},
@ -194,10 +194,10 @@
"y_pred = np.argmax(y_pred, axis=1)\n",
"\n",
"# Plot some examples from the test set and their predictions\n",
"fig, axes = plt.subplots(4, 4, figsize=(14, 14))\n",
"fig, axes = plt.subplots(4, 4, figsize=(18, 18))\n",
"for i, ax in enumerate(axes.ravel()):\n",
" ax.matshow(x_test[i].reshape(28, 28), cmap='gray')\n",
" ax.set_title(\"True: %d\\nPredict: %d\" % (np.argmax(y_test[i]), y_pred[i]))\n",
" ax.set_title(\"True: %d\\nPredict: %d\" % (y_test[i], y_pred[i]))\n",
" ax.axis(\"off\")\n",
"\n",
"plt.show()"
@ -206,7 +206,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "facda3d1",
"id": "4a6e85be",
"metadata": {},
"outputs": [],
"source": []

Loading…
Cancel
Save