Wykład 12

This commit is contained in:
Paweł Skórzewski 2023-01-26 14:26:06 +01:00
parent 772450120e
commit c554dac58f

View File

@ -260,8 +260,8 @@
}
},
"source": [
"$$ f(x_1, x_2) = \\max(x_1 + x_2) \\hskip{12em} \\\\\n",
"\\to \\qquad \\frac{\\partial f}{\\partial x_1} = \\mathbb{1}_{x \\geq y}, \\quad \\frac{\\partial f}{\\partial x_2} = \\mathbb{1}_{y \\geq x}, \\quad \\nabla f = (\\mathbb{1}_{x \\geq y}, \\mathbb{1}_{y \\geq x}) $$ "
"$$ f(x_1, x_2) = \\max(x_1, x_2) \\hskip{12em} \\\\\n",
"\\to \\qquad \\frac{\\partial f}{\\partial x_1} = \\mathbb{1}_{x_1 \\geq x_2}, \\quad \\frac{\\partial f}{\\partial x_2} = \\mathbb{1}_{x_2 \\geq x_1}, \\quad \\nabla f = (\\mathbb{1}_{x_1 \\geq x_2}, \\mathbb{1}_{x_2 \\geq x_1}) $$ "
]
},
{
@ -1085,9 +1085,9 @@
"source": [
"model = keras.Sequential()\n",
"model.add(Dense(512, activation=\"relu\", input_shape=(784,)))\n",
"# model.add(Dropout(0.2))\n",
"model.add(Dropout(0.2))\n",
"model.add(Dense(512, activation=\"relu\"))\n",
"# model.add(Dropout(0.2))\n",
"model.add(Dropout(0.2))\n",
"model.add(Dense(num_classes, activation=\"softmax\"))\n",
"model.summary()"
]