Clean up notebooks

This commit is contained in:
Dmitri Soshnikov 2022-04-27 21:26:54 +03:00
parent d988e730fc
commit b338181e13
4 changed files with 578 additions and 578 deletions

File diff suppressed because one or more lines are too long

View File

@ -49,7 +49,7 @@
"source": [
"def train(positive_examples, negative_examples, num_iterations = 100):\n",
" num_dims = positive_examples.shape[1]\n",
" weights = np.zeros((num_dims,1)) # инициализируем веса\n",
" weights = np.zeros((num_dims,1)) # initialize weights\n",
" \n",
" pos_count = positive_examples.shape[0]\n",
" neg_count = negative_examples.shape[0]\n",

View File

@ -68,7 +68,7 @@
"X = X.astype(np.float32)\n",
"Y = Y.astype(np.int32)\n",
"\n",
"# Разбиваем на обучающую и тестовые выборки\n",
"# Split into train and test dataset\n",
"train_x, test_x = np.split(X, [n*8//10])\n",
"train_labels, test_labels = np.split(Y, [n*8//10])"
]
@ -708,7 +708,7 @@
"source": [
"To compute $\\partial\\mathcal{L}/\\partial W$ we can use the **chaining rule** for computing derivatives of a composite function, as you can see in the formulae above. It corresponds to the following idea:\n",
"\n",
"* Suppose under given input we have obtained loss $\\Delta\\mathcal{L}$\n",
"* Suppose under given input we have obtanes loss $\\Delta\\mathcal{L}$\n",
"* To minimize it, we would have to adjust softmax output $p$ by value $\\Delta p = (\\partial\\mathcal{L}/\\partial p)\\Delta\\mathcal{L}$ \n",
"* This corresponds to the changes to node $z$ by $\\Delta z = (\\partial\\mathcal{p}/\\partial z)\\Delta p$\n",
"* To minimize this error, we need to adjust parameters accordingly: $\\Delta W = (\\partial\\mathcal{z}/\\partial W)\\Delta z$ (and the same for $b$)\n",
@ -821,7 +821,7 @@
"source": [
"## Training the Model\n",
"\n",
"Now we are ready to write the **training loop**, which will go through our dataset, and perform the optimization minibatch by minibatch. One complete pass through the dataset is often called **an epoch**:"
"Now we are ready to write the **training loop**, which will go through our dataset, and perform the optimization minibatch by minibatch.One complete pass through the dataset is often called **an epoch**:"
]
},
{
@ -1169,7 +1169,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
" Adding several layers make sense, because unlike one-layer network, multi-layered model will be able to accurately classify sets that are not linearly separable. I.e., a model with several layers will be **reacher**.\n",
" Adding several layers make sense, because unlike one-layer network, multi-layered model will be able to accuratley classify sets that are not linearly separable. I.e., a model with several layers will be **reacher**.\n",
"\n",
"> It can be demonstrated that with sufficient number of neurons a two-layered model is capable to classifying any convex set of data points, and three-layered network can classify virtually any set.\n",
"\n",

File diff suppressed because one or more lines are too long